Custom Query (986 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (637 - 639 of 986)

Ticket Owner Reporter Resolution Summary
#766 arango Done Minor update to facilitate multi-model coupling
Description
  • The internal CPP option ATM_COUPLING is renamed to FRC_COUPLING since it is possible to couple to an atmospheric model or a data model (DATA_COUPLING) for the same forcing fields. It is done to consolidate with the coupling research branch that uses the ESMF/NUOPC library.
  • Introduced CPP option ROMS_STDOUT to redirect ROMS standard output information to file log.roms. It coupling is advantageous to separate the standard output information of all the coupled Earth System Model (ESM) components to different log files. It is easier to track the solution of each ESM component when they are separated. In inp_par.F, we now have:
    #ifdef ROMS_STDOUT
    !
    !  Change default Fortran standard out unit, so ROMS run information is
    !  directed to a file. This is advantageous in coupling applications to
    !  ROMS information separated from other models.
    !
           stdout=20                      ! overwite Fortran default unit 6
    !
           OPEN (stdout, FILE='log.roms', FORM='formatted',                 &
         &       STATUS='replace')
    #endif
    
    Changed several routines to replace PRINT statements with WRITE (stdout,*).
  • Update ROMS Nonlinear model driver nl_ocean.h to provide the correct information to time stepping kernel during model coupling:
    !
    !  Local variable declarations.
    !
    #if defined MODEL_COUPLING && !defined MCT_LIB
          logical, save :: FirstPass = .TRUE.
    #endif
          integer :: ng
    #if defined MODEL_COUPLING && !defined MCT_LIB
          integer :: NstrStep, NendStep
    #endif
          real (r8) :: MyRunInterval
    !
    !-----------------------------------------------------------------------
    !  Time-step nonlinear model over all nested grids, if applicable.
    #if defined MODEL_COUPLING && !defined MCT_LIB
    !  On first pass, add a timestep to the coupling interval to account
    !  for ROMS kernel delayed delayed output until next timestep.
    #endif
    !-----------------------------------------------------------------------
    !
          MyRunInterval=RunInterval
          IF (Master) WRITE (stdout,'(1x)')
          DO ng=1,Ngrids
    #if defined MODEL_COUPLING && !defined MCT_LIB
            step_counter(ng)=0
            NstrStep=iic(ng)
            IF (FirstPass) THEN
              NendStep=NstrStep+INT((RunInterval+dt(ng))/dt(ng))
              IF (ng.eq.1) MyRunInterval=MyRunInterval+dt(ng) 
              FirstPass=.FALSE.
            ELSE
              NendStep=NstrStep+INT(MyRunInterval/dt(ng))
            END IF
            IF (Master) WRITE (stdout,10) 'NL', ng, NstrStep, NendStep
    #else
            IF (Master) WRITE (stdout,10) 'NL', ng, ntstart(ng), ntend(ng)
    #endif
          END DO
          IF (Master) WRITE (stdout,'(1x)')
    !
    !$OMP PARALLEL
    #ifdef SOLVE3D
          CALL main3d (MyRunInterval)
    #else
          CALL main2d (MyRunInterval)
    #endif
    !$OMP END PARALLEL
    
    Recall that MyRunInterval may span the full period of the simulation, a multi-model coupling interval (RunInterval > ifac*dt), or just a single step (RunInterval=0). The zero value here is valid and can be explained by ROMS design of delayed output.
#767 arango Done Updated CORRELATION algorithm
Description

The CORRELATION driver that computes the 4D-Var error covariance normalization coefficients is updated:

  • The set-up in read_phypar.F was cleaned out, so only the input grid and initial conditions NetCDF are processed. The other input ROMS NetCDF files are ignored since they are not needed.
  • The input parameter NTIMES was overwritten and set to 1 since this driver does not timestep the ROMS kernel. The computer was running out of memory when ADJUST_BOUNDARY, ADJUST_STFLUX, or ADJUST_WSTRESS was activated with very large NTIMES and small NOBC and NSFF.

We have a case with:

   NTIMES =  788400
     NOBC == 10
     NSFF == 10

So the internal parameter:

    Nbrec = 1 + ntime(ng)/Nobc(ng) = 78841

resulting in the following array been allocated as:

    t_obc(0:217, 40, 4, 78841, 2, 2)

which is huge, and we several similar arrays when ADJUST_BOUNDARY is activated. Warnings for such cases were added in read_phypar.F. It makes sense to make NTIMES=1 in this driver to avoid such problem in the future.

  • Lots of warnings were added to get_state.F when the needed NetCDF variable is not founded in the input NetCDF file. For example, to process tangent linear model free-surface we have:
    !
    !  Read in tangent linear free-surface (m).
    !
            IF (get_var(idFsur)) THEN
              foundit=find_string(var_name, n_var, TRIM(Vname(1,idFsur)),   &
         &                        varid)
              IF (foundit) THEN
                gtype=var_flag(varid)*r2dvar
                status=nf_fread2d(ng, IDmod, ncname, ncINPid,               &
         &                        Vname(1,idFsur), varid,                   &
         &                        InpRec, gtype, Vsize,                     &
         &                        LBi, UBi, LBj, UBj,                       &
         &                        Fscl, Fmin, Fmax,                         &
    # ifdef MASKING
         &                        GRID(ng) % rmask,                         &
    # endif
         &                        OCEAN(ng) % tl_zeta(:,:,Tindex))
                IF (FoundError(status, nf90_noerr, __LINE__,                &
         &                     __FILE__)) THEN
                  IF (Master) THEN
                    WRITE (stdout,60) string, TRIM(Vname(1,idFsur)),        &
         &                            InpRec, TRIM(ncname)
                  END IF
                  exit_flag=2
                  ioerror=status
                  RETURN
                ELSE
                  IF (Master) THEN
                    WRITE (stdout,70) TRIM(Vname(2,idFsur)), Fmin, Fmax
                  END IF
                END IF
              ELSE
                IF (Master) THEN
                  WRITE (stdout,80) string, TRIM(Vname(1,idFsur)),          &
         &                          TRIM(ncname)
                END IF
                exit_flag=4
                IF (FoundError(exit_flag, nf90_noerr, __LINE__,             &
         &                     __FILE__)) THEN
                  RETURN
                END IF
              END IF
            END IF
    
    so the new piece of code is after the ELSE statement if the variable is not found:
           IF (get_var(idFsur)) THEN
             ...
             IF (foundit) THEN
               ...
             ELSE
               IF (Master) THEN
                 WRITE (stdout,80) string, TRIM(Vname(1,idFsur)),          &
        &                          TRIM(ncname)
               END IF
               exit_flag=4
               IF (FoundError(exit_flag, nf90_noerr, __LINE__,             &
        &                     __FILE__)) THEN
                 RETURN
               END IF
             END IF
           END IF
    

Many thanks to Andy Moore for reporting some of these issues.

#768 arango Fixed Corrected interpolate.m and ad_tinerpolate.m
Description

Corrected a bug in interpolate.m and ad_interpolate.m, which are used to compute the input functionals for 4D-Var observation impacts and sensitivities for the desired metric.

The problem is in the call to the function sw_dist from the seawater package. We need

     dis = cumsum([0; sw_dist(Ypath(:),Xpath(:),'km')]);

instead of

     dis = cumsum([0; sw_dist(Xpath(:),Ypath(:),'km')]);

since the ordetr of argument is sw_dist(lat,lon,...).

Many thanks to Andy Moore for bringing this to my attention.

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.