Opened 6 years ago

Closed 6 years ago

#680 closed upgrade (Done)

IMPORTANT: stations and floats in nesting applications

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

Description (last modified by arango)


The routine read_stapar.F that reads the stations input script ( was updated so the CPP option STATIONS is more robust across nested grids. Only one input script is needed in nested applications. As in, we just need to use the plural symbol == after the KEYWORD for relevant nested grids parameters.

For example, in a four nested grids application we can have:

! Switch to control the writing of stations data within nested and/or multiple
! connected grids, [1:Ngrids].

   Lstations == T T T T

! Logical switches (TRUE/FALSE) to activate writing of fields in STATION
! output file, [Sout(:,ng), ng=1, Ngrids].

Sout(idUvel) == 4*T     ! u                  3D U-velocity
Sout(idVvel) == 4*T     ! v                  3D V-velocity
Sout(idu3dE) == 4*F     ! u_eastward         3D U-eastward at RHO-points
Sout(idv3dN) == 4*F     ! v_northward        3D V-nortward at RHO-points
Sout(idWvel) == 4*T     ! w                  3D W-velocity
Sout(idOvel) == 4*T     ! omega              3D omega vertical velocity
Sout(idUbar) == 4*T     ! ubar               2D U-velocity
Sout(idVbar) == 4*T     ! vbar               2D V-velocity
Sout(idu2dE) == 4*F     ! ubar_eastward      2D U-eastward  at RHO-points
Sout(idv2dN) == 4*F     ! vbar_northward     2D V-northward at RHO-points
Sout(idFsur) == 4*T     ! zeta               free-surface
Sout(idBath) == 4*T     ! bath               time-dependent bathymetry

Sout(idTvar) == 8*T     ! temp, salt, ...    all (NT) tracers

Sout(idUsms) == 4*T     ! sustr              surface U-stress
Sout(idVsms) == 4*T     ! svstr              surface V-stress
Sout(idUbms) == 4*T     ! bustr              bottom U-stress
Sout(idVbms) == 4*T     ! bvstr              bottom V-stress

Sout(idUbrs) == 4*F     ! bustrc             bottom U-current stress
Sout(idVbrs) == 4*F     ! bvstrc             bottom V-current stress
Sout(idUbws) == 4*F     ! bustrw             bottom U-wave stress
Sout(idVbws) == 4*F     ! bvstrw             bottom V-wave stress
Sout(idUbcs) == 4*F     ! bustrcwmax         bottom max wave-current U-stress
Sout(idVbcs) == 4*F     ! bvstrcwmax         bottom max wave-current V-stress

Sout(idUbot) == 4*F     ! Ubot               bed wave orbital U-velocity
Sout(idVbot) == 4*F     ! Vbot               bed wave orbital V-velocity
Sout(idUbur) == 4*F     ! Ur                 bottom U-velocity above bed
Sout(idVbvr) == 4*F     ! Vr                 bottom V-velocity above bed

Sout(idW2xx) == 4*F     ! Sxx_bar            2D radiation stress, Sxx component
Sout(idW2xy) == 4*F     ! Sxy_bar            2D radiation stress, Sxy component
Sout(idW2yy) == 4*F     ! Syy_bar            2D radiation stress, Syy component
Sout(idU2rs) == 4*F     ! Ubar_Rstress       2D radiation U-stress
Sout(idV2rs) == 4*F     ! Vbar_Rstress       2D radiation V-stress
Sout(idU2Sd) == 4*F     ! ubar_stokes        2D U-Stokes velocity
Sout(idV2Sd) == 4*F     ! vbar_stokes        2D V-Stokes velocity

Sout(idW3xx) == 4*F     ! Sxx                3D radiation stress, Sxx component
Sout(idW3xy) == 4*F     ! Sxy                3D radiation stress, Sxy component
Sout(idW3yy) == 4*F     ! Syy                3D radiation stress, Syy component
Sout(idW3zx) == 4*F     ! Szx                3D radiation stress, Szx component
Sout(idW3zy) == 4*F     ! Szy                3D radiation stress, Szy component
Sout(idU3rs) == 4*F     ! u_Rstress          3D U-radiation stress
Sout(idV3rs) == 4*F     ! v_Rstress          3D V-radiation stress
Sout(idU3Sd) == 4*F     ! u_stokes           3D U-Stokes velocity
Sout(idV3Sd) == 4*F     ! v_stokes           3D V-Stokes velocity

Sout(idWamp) == 4*F     ! Hwave              wave height
Sout(idWlen) == 4*F     ! Lwave              wave length
Sout(idWdir) == 4*F     ! Dwave              wave direction
Sout(idWptp) == 4*F     ! Pwave_top          wave surface period
Sout(idWpbt) == 4*F     ! Pwave_bot          wave bottom period
Sout(idWorb) == 4*F     ! Ub_swan            wave bottom orbital velocity
Sout(idWdis) == 4*F     ! Wave_dissip        wave dissipation

Sout(idPair) == 4*F     ! Pair               surface air pressure
Sout(idUair) == 4*F     ! Uair               surface U-wind component
Sout(idVair) == 4*F     ! Vair               surface V-wind component

Sout(idTsur) == 8*F     ! shflux, ssflux     surface net heat and salt flux
Sout(idLhea) == 4*F     ! latent             latent heat flux
Sout(idShea) == 4*F     ! sensible           sensible heat flux
Sout(idLrad) == 4*F     ! lwrad              longwave radiation flux
Sout(idSrad) == 4*F     ! swrad              shortwave radiation flux
Sout(idEmPf) == 4*F     ! EminusP            E-P flux
Sout(idevap) == 4*F     ! evaporation        evaporation rate
Sout(idrain) == 4*F     ! rain               precipitation rate

Sout(idDano) == 4*T     ! rho                density anomaly
Sout(idVvis) == 4*T     ! AKv                vertical viscosity
Sout(idTdif) == 4*T     ! AKt                vertical T-diffusion
Sout(idSdif) == 4*T     ! AKs                vertical Salinity diffusion
Sout(idHsbl) == 4*T     ! Hsbl               depth of surface boundary layer
Sout(idHbbl) == 4*F     ! Hbbl               depth of bottom boundary layer
Sout(idMtke) == 4*F     ! tke                turbulent kinetic energy
Sout(idMtls) == 4*F     ! gls                turbulent length scale

! Logical switches (TRUE/FALSE) to activate writing of exposed sediment
! layer properties into STATIONS output file.  Currently, MBOTP properties
! are expected for the bottom boundary layer and/or sediment models:
! idBott( 1=isd50)   grain_diameter          mean grain diameter
! idBott( 2=idens)   grain_density           mean grain density
! idBott( 3=iwsed)   settling_vel            mean settling velocity
! idBott( 4=itauc)   erosion_stress          critical erosion stress
! idBott( 5=irlen)   ripple_length           ripple length
! idBott( 6=irhgt)   ripple_height           ripple height
! idBott( 7=ibwav)   bed_wave_amp            wave excursion amplitude
! idBott( 8=izdef)   Zo_def                  default bottom roughness
! idBott( 9=izapp)   Zo_app                  apparent bottom roughness
! idBott(10=izNik)   Zo_Nik                  Nikuradse bottom roughness
! idBott(11=izbio)   Zo_bio                  biological bottom roughness
! idBott(12=izbfm)   Zo_bedform              bed form bottom roughness
! idBott(13=izbld)   Zo_bedload              bed load bottom roughness
! idBott(14=izwbl)   Zo_wbl                  wave bottom roughness
! idBott(15=iactv)   active_layer_thickness  active layer thickness
! idBott(16=ishgt)   saltation               saltation height
!                                 1 1 1 1 1 1 1
!               1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6

Sout(idBott) == F F F F F F F F F F F F F F F F \
                F F F F F F F F F F F F F F F F \
                F F F F F F F F F F F F F F F F \
                F F F F F F F F F F F F F F F F

! Number of stations to process in each nested grid.  These values are
! essential because the station arrays are dynamically allocated using
! these values, [1:Ngrids].

    NSTATION ==  1 1 1 1

! Station locations for all grids in any desired order.  The horizontal
! location for a particular station may be specified in terms of fractional
! (I,J) grid pairs (FLAG=0) or (longitude,latitude) grid pairs (FLAG=1).
! Here, FLAG is a special switch and may be used for multiple purposes.
! The GRID column indicates nested grid number to process. This value must
! be one in non-nested applications.  The COMMENT section is ignored during
! reading and may be used to help documentation.

POS =  GRID  FLAG      X-POS       Y-POS     COMMENT

         1    0        50.0d0      40.0d0
         2    0        60.0d0      65.0d0
         3    0        57.0d0      30.0d0
         4    0        66.0d0      25.0d0

Users need to pay attention to all the above parameters. In particular: Lstations, NSTATION, and POS.


Similarly, one is need in nested applications when the CPP option FLOATS is activated. Currently, the floats trajectories are independent of each nested grid. That is, once that the trajectory exit a particular grid it will not continue into the other nested grids. We will figure out in the future how to allow this but it is not high in our priority list.

As mentioned above, we just need to use the plural symbol == after the KEYWORD for nested grids parameters. For example, in a four nested grids application we can have:

! Switch to control the computation of floats trajectories within nested
! and/or multiple connected grids, [1:Ngrids].
     Lfloats == T F F F

! Switch to control the printing of floats initial positions to standard
! output file, [1:Ngrids].
      Fprint == T T T T

! Flag indicating re-start from previous solution. If FRREC = 0, a new
! NetCDF output file is created.

       FRREC == 4*0 

! If applicable, input script file name containing biological floats behavior
! model parameters.

     FBIONAM =

! Number of floats to release in each nested grid.  These values are
! essential because the FLOATS structure in "mod_floats" is dynamically
! allocated using these values, [1:Ngrids].

     NFLOATS == 1 1 1 1

! Initial floats locations for all grids:
!   G      Nested grid number
!   C      Initial horizontal coordinate type (0: grid units, 1: spherical)
!   T      Float trajectory type (1: Lagrangian, 2: isobaric, 3: Geopotential)
!   N      Number floats to be released at (Fx0,Fy0,Fz0)
!   Ft0    Float release time (days) after model initialization
!   Fx0    Initial float X-location (grid units or longitude)
!   Fy0    Initial float Y-location (grid units or latitude)
!   Fz0    Initial float Z-location (grid units or depth)
!   Fdt    Float cluster release time interval (days)
!   Fdx    Float cluster X-distribution parameter
!   Fdy    Float cluster Y-distribution parameter
!   Fdz    Float cluster Z-distribution parameter

POS = G, C, T, N,   Ft0,    Fx0,    Fy0,    Fz0,    Fdt,    Fdx,    Fdy,   Fdz

      1  0  1  1   0.0d0   50.0d0  40.0d0   8.0d0   0.0d0   0.0d0   0.0d0  0.0d0
      2  0  1  1   0.0d0   60.0d0  65.0d0   8.0d0   0.0d0   0.0d0   0.0d0  0.0d0 
      3  0  1  1   0.0d0   57.0d0  30.0d0   8.0d0   0.0d0   0.0d0   0.0d0  0.0d0 
      4  0  1  1   0.0d0   66.0d0  25.0d0   8.0d0   0.0d0   0.0d0   0.0d0  0.0d0 

Users need to pay attention to the following parameters Lfloats, NFLOATS. and POS.

Corrected nesting.F around Line 122 to avoid compilation problems when MASKING is not activated:

# if defined MASKING || defined WET_DRY
      PRIVATE :: mask_hweights
# endif

Many thanks to Jamie Pringle for bringing this to my attention.

Change History (1)

comment:1 Changed 6 years ago by arango

  • Description modified (diff)
  • Resolution set to Done
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.