Opened 8 months ago

Closed 8 months ago

#955 closed upgrade (Done)

IMPORTANT: Refactored state vector indices

Reported by: arango Owned by:
Priority: major Milestone: Release ROMS/TOMS 4.2
Component: Nonlinear Version: 4.1
Keywords: Cc:

Description (last modified by arango)

  • The state vector indices are used in various algorithms. The numeric order is essential in data assimilation because they are used to associate observations with the type of variables in the state vector:
          isFsur = 1                ! free-surface
          isUbar = 2                ! 2D U-velocity
          isVbar = 3                ! 2D V-velocity
          isUvel = 4                ! 3D U-velocity
          isVvel = 5                ! 3D V-velocity
          ic=5
    #ifdef SOLVE3D
          DO i=1,MT
            ic=ic+1
            isTvar(i)=ic            ! Active/Passive tracers
          END DO
    #endif
    #if defined ADJUST_WSTRESS || defined FORCING_SV     || \
        defined HESSIAN_FSV    || defined SO_SEMI        || \
        defined STOCHASTIC_OPT
          ic=ic+1
          isUstr=ic                 ! surface U-velocity stress
          ic=ic+1
          isVstr=ic                 ! surface V-velocity stress
    #endif
    #ifdef SOLVE3D
    # if defined ADJUST_STFLUX  || defined FORCING_SV     || \
         defined HESSIAN_FSV    || defined SO_SEMI        || \
         defined STOCHASTIC_OPT
          DO i=1,MT
            ic=ic+1
            isTsur(i)=ic            ! surface tracer flux      
          END DO
    # endif
    #endif
    #ifdef WEC
          ic=ic+1
          isU2Sd=ic                 ! 2D Stokes U-velocity 
          ic=ic+1
          isV2Sd=ic                 ! 2D Stokes V-velocity
    # if defined SOLVE3D
          ic=ic+1
          isU3Sd=ic                 ! 3D Stokes U-velocity
          ic=ic+1
          isV3Sd=ic                 ! 3D Stokes V-velocity
    # endif
    #endif
    #ifdef SOLVE3D
    # if defined GLS_MIXING || defined MY25_MIXING
          ic=ic+1
          isMtke=ic                 ! TKE
    # endif
          ic=ic+1
          isWvel=ic                 ! vertical velocity
    #endif
    
    Therefore, all the state indices from the zeta to the last Tvar(:) tracer variables cannot be changed.
  • Updated the GNU make configuration (*.mk) files to include the environmental variable ESMFMKFILE. Thus, now we have:
    ifdef USE_ESMF
                         include $(ESMFMKFILE)
              ESMF_OS ?= $(OS)
          ESMF_SUBDIR := $(ESMF_OS).$(ESMF_COMPILER).$(ESMF_ABI).$(ESMF_COMM).$(ESMF_SITE)
          ESMF_MK_DIR ?= $(ESMF_DIR)/lib/lib$(ESMF_BOPT)/$(ESMF_SUBDIR)
               FFLAGS += $(ESMF_F90COMPILEPATHS)
                 LIBS += $(ESMF_F90LINKPATHS) $(ESMF_F90ESMFLINKLIBS)
    endif
    
    Many thanks to Ufuk Turuncoglu for bringing this issue to my attention.
  • Made tiny changes to NUOPC cap modules cmeps_roms.F and esmf_roms.F.
  • Corrected issue in esmf_esm.F (routine ESM_SetRunSequence) that used LocalPET before being assigned.

Change History (1)

comment:1 by arango, 8 months ago

Description: modified (diff)
Resolution: Done
Status: newclosed
Note: See TracTickets for help on using tickets.