roms.in

From WikiROMS
Jump to navigationJump to search
Standard Input Script - ocean.in

File ocean.in is the ROMS standard input file to any model run. This file sets the application spatial dimensions and many of the parameters that are not specified at compile time, including parallel tile decomposition, time-stepping, physical coefficients and constants, vertical coordinate set-up, logical switches and flags to control the frequency of output, the names of input and output NetCDF files, and additional input scripts names for data assimilation, stations, floats trajectories, ecosystem models, and sediment model.

This standard input ASCII file is organized in several sections as shown below, with links to more detailed explanation where required.

Note Notice: A detailed information about ROMS input script file syntax can be found here.

Note Notice: A default ocean.in input script is provided in the User/External subdirectory. Also there are several standard input scripts in the ROMS/External subdirectory which are used in the distributed test cases. They are usually named ocean_app.in where app is the lowercase of the test case cpp option.

Configuration Parameters

  • Application title. This string will be saved in the output NetCDF files.
    TITLE = Wind-Driven Upwelling/Downwelling over a Periodic Channel
  • C-preprocessing Flag to define the specific configuration. In versions up to 2.3 this flag was one of the predefined model applications that headed the cppdefs.h file. You must make the value of MyAppCPP below consistent with variable ROMS_APPLICATION in the makefile. ROMS converts the ROMS_APPLICATION variable to lowercase to determine the name of the file to include. To see the options used in the predefined applications browse the files in ROMS/Include.Note Notice: It is recommended that users setting up their own configuration by creating a new file e.g. myproject.h to hold CPP options and keep this either in User/Include or a separate directory that is indicated by the MY_HEADER_DIR macro definition in makefile.

    Warning Warning: If you copy a predefined application from ROMS/Include as a template for your application you must rename it. You cannot stop ROMS from first looking in ROMS/Include, in which case any edits you make will get shadowed and your changes will not be used.
  • Input variable information file name. This file needs to be processed first so all information arrays can be initialized properly.
    VARNAME = ROMS/External/varinfo.dat
  • Grid dimension parameters. These are used to dynamically allocate all model state variables upon execution.
    Lm == 41  ! Number of I-direction INTERIOR RHO-points
    Mm == 80  ! Number of J-direction INTERIOR RHO-points
    N == 16  ! Number of vertical levels

    Nbed = 0  ! Number of sediment bed layers

    NAT = 2  ! Number of active tracers (usually, 2)
    NPT = 0  ! Number of inactive passive tracers
    NCS = 0  ! Number of cohesive (mud) sediment tracers
    NNS = 0  ! Number of non-cohesive (sand) sediment tracers
  • Domain decomposition parameters for serial, distributed-memory or shared-memory configurations used to determine tile horizontal range indices (Istr,Iend) and (Jstr,Jend), [1:Ngrids] values are expected.
    NtileI == 1  ! I-direction partition
    NtileJ == 1  ! J-direction partition

Time-Stepping and Iterations Parameters

  • Time-stepping parameters.
    NTIMES = 1440  ! Number of time steps
    DT == 300.0d0  ! Time-step size (seconds)
    NDTFAST == 30  ! Number of barotropic steps
  • Model iteration loops parameters.
    ERstr = 1  ! Starting perturbation or iteration
    ERend = 1  ! Ending perturbation or iteration
    Nouter = 1  ! Maximum number of 4DVar outer loop iterations
    Ninner = 1  ! Maximum number of 4DVar inner loop iterations
    Nintervals = 1  ! Number of stochastic optimals interval divisions
  • Number of eigenvalues (NEV) and eigenvectors (NCV) to compute for the Lanczos/Arnoldi problem in the Generalized Stability Theory (GST) analysis. NCV must be greater than NEV.
    NEV = 2  ! Number of eigenvalues
    NCV = 10  ! Number of eigenvectors
    Note Notice: At present, there is no a-priori analysis to guide the selection of NCV relative to NEV. The only formal requirement is that NCV > NEV. However in optimal perturbations, it is recommended to have NCV ≥ 2*NEV. In Finite Time Eigenmodes (FTE) and Adjoint Finite Time Eigenmodes (AFTE) the requirement is to have NCV ≥ 2*NEV+1. The efficiency of calculations depends critically on the combination of NEV and NCV. If NEV is large (greater than 10 say), you can use NCV=2*NEV+1 but for NEV small (less than 6) it will be inefficient to use NCV=2*NEV+1. In complicated applications, you can start with NEV=2 and NCV=10. Otherwise, it will iterate for very long time.

Output Frequency Parameters

  • Flags controlling the frequency of output.
    NRREC = 0  ! Model restart flag
    LcycleRST == T  ! Switch to recycle restart time records
    NRST == 288  ! Number of time-steps between restart records
    NSTA == 1  ! Number of time-steps between stations records
    NFLT == 1  ! Number of time-steps between floats records
    NINFO == 1  ! Number of time-steps between information diagnostics
  • Output history, average, diagnostic files parameters.
    LDEFOUT == T  ! File creation/append switch
    NHIS == 72  ! Number of time-steps between history records
    NDEFHIS == 0  ! Number of time-steps between creation of new history file
    NTSAVG == 1  ! Starting averages time-step
    NAVG == 72  ! Number of time-steps between averages records
    NDEFAVG == 0  ! Number of time-steps between creation of new averages file
    NTSDIA == 1  ! Starting diagnostics time-step
    NDIA == 72  ! Number of time-steps between diagnostics records
    NDEFDIA == 0  ! Number of time-steps between creation of new diagnostics file
  • Output tangent linear and adjoint models parameters.
    LcycleTLM == F  ! Switch to recycle TLM time records
    NTLM == 72  ! Number of time-steps between TLM records
    NDEFTLM == 0  ! Number of time-steps between creation of new TLM file
    LcycleADJ == F  ! Switch to recycle ADM time records
    NADJ == 72  ! Number of time-steps between ADM records
    NDEFADJ == 0  ! Number of time-steps between creation of new ADM file
  • Output check pointing GST restart parameters.
    LrstGST = F  ! GST restart switch
    MaxIterGST = 500  ! maximum number of iterations
    NGST = 10  ! check pointing interval

Physical and Numerical Parameters

  • Relative accuracy of the Ritz values computed in the GST analysis.
    Ritz_tol = 1.0d-15
  • Harmonic/biharmonic horizontal diffusion of all active and passive (dye) tracers, [1:NAT+NPT,Ngrids]. Diffusion coefficients for biology and sediment tracers are set in their respective input scripts.
    TNU2 == 0.0d0 0.0d0  ! m2/s
    TNU4 == 2*0.0d0  ! m4/s
  • Harmonic/biharmonic, horizontal viscosity coefficient: [1:Ngrids values are expected. Only used if the appropriate CPP options are defined.
    VISC2 == 0.0d0  ! m2/s
    VISC4 == 0.0d0  ! m4/s
  • Background vertical mixing coefficients for active and passive (dye) tracers: [1:NAT+NPT,Ngrids] values are expected.
    AKT_BAK == 1.0d-6 1.0d-6  ! m2/s
  • Background vertical mixing coefficient for momentum: [1:Ngrids] values are expected.
    AKV_BAK == 1.0d-5  ! m2/s
  • Turbulent closures parameters.
    AKK_BAK == 5.0d-6  ! m2/s
    AKP_BAK == 5.0d-6  ! m2/s
    TKENU2 == 0.0d0  ! m2/s
    TKENU4 == 0.0d0  ! m4/s
  • Constants used in surface turbulent kinetic energy flux computation.
    CHARNOK_ALPHA == 1400.0d0  ! Charnok surface roughness
    ZOS_HSIG_ALPHA == 0.5d0  ! Roughness from wave amplitude
    SZ_ALPHA == 0.25d0  ! roughness from wave dissipation
    CRGBAN_CW == 100.0d0  ! Craig and Banner wave breaking
  • Constants used in momentum stress computation.
    RDRG == 3.0d-04  ! m/s
    RDRG2 == 3.0d-03  ! nondimensional
    Zob == 0.02d0  ! m
    Zos == 0.02d0  ! m
  • Height (m) of atmospheric measurements for Bulk fluxes parameterization.
    BLK_ZQ == 2.0d0  ! air humidity
    BLK_ZT == 2.0d0  ! air temperature
    BLK_ZW == 10.0d0  ! winds
  • Minimum depth for wetting and drying.
    DCRIT == 0.10d0  ! m

Various parameters.

  WTYPE == 1       ! Jerlov water type sets vertical depth scale for shortwave radiation absorption
    LEVSFRC == 15
    LEVBFRC == 1

Vertical S-coordinates parameters, [1:Ngrids].

    THETA_S == 3.0d0                      ! 0 < THETA_S < 20
    THETA_B == 0.0d0                      ! 0 < THETA_B < 1
     TCLINE == 50.0d0                     ! m

Mean Density and Brunt-Vaisala frequency.

       RHO0 =  1025.0d0                   ! kg/m3
    BVF_BAK =  1.0d-4                     ! 1/s2

Time-stamp assigned for model initialization, reference time origin for tidal forcing, and model reference time for output NetCDF units attribute.

     DSTART =  0.0d0                      ! days                 
 TIDE_START =  0.0d0                      ! days
   TIME_REF =  0.0d0                      ! yyyymmdd.dd

Nudging/relaxation time scales, inverse scales will be computed internally, [1:Ngrids].

      TNUDG == 2*0.0d0                    ! days
      ZNUDG == 0.0d0                      ! days
     M2NUDG == 0.0d0                      ! days
     M3NUDG == 0.0d0                      ! days

Factor between passive (outflow) and active (inflow) open boundary conditions, [1:Ngrids]. If OBCFAC > 1, nudging on inflow is stronger than on outflow (recommended).

     OBCFAC == 0.0d0                      ! nondimensional

Linear equation of State parameters:

         R0 == 1027.0d0                   ! kg/m3
         T0 == 10.0d0                     ! Celsius
         S0 == 35.0d0                     ! PSU
      TCOEF == 1.7d-4                     ! 1/Celsius
      SCOEF == 7.6d-4                     ! 1/PSU

Slipperiness parameter: 1.0 (free slip) or -1.0 (no slip)

     GAMMA2 =  1.0d0

Starting (DstrS) and ending (DendS) day for adjoint sensitivity forcing. DstrS must be less or equal to DendS. If both values are zero, their values are reset internally to the full range of the adjoint integration.

      DstrS == 0.0d0                      ! starting day
      DendS == 0.0d0                      ! ending day

Starting and ending vertical levels of the 3D adjoint state variables whose sensitivity is required.

      KstrS == 1                          ! starting level
      KendS == 1                          ! ending level

Logical switches (TRUE/FALSE) to specify the adjoint state variables whose sensitivity is required.

     Lstate(isFsur) == F                        ! free-surface
     Lstate(isUbar) == F                        ! 2D U-momentum
     Lstate(isVbar) == F                        ! 2D V-momentum
     Lstate(isUvel) == F                        ! 3D U-momentum
     Lstate(isVvel) == F                        ! 3D V-momentum

Logical switches (TRUE/FALSE) to specify the adjoint state tracer variables whose sensitivity is required (NT values are expected).

     Lstate(isTvar) == F F                      ! tracers

Stochastic optimals time decorrelation scale (days) assumed for red noise processes.

   SO_decay == 2.0d0                      ! days

Logical switches (TRUE/FALSE) to specify the state surface forcing variable whose stochastic optimals is required.

     SOstate(isUstr) == T                       ! surface u-stress
     SOstate(isVstr) == T                       ! surface v-stress

Logical switches (TRUE/FALSE) to specify the surface tracer forcing variable whose stochastic optimals is required (NT values are expected).

     SOstate(isTsur) == F F                     ! surface tracer flux

Stochastic optimals surface forcing standard deviation for dimensionalization.

     SO_sdev(isUstr) == 1.0d0                   ! surface u-stress
     SO_sdev(isVstr) == 1.0d0                   ! surface v-stress
     SO_sdev(isTsur) == 1.0d0 1.0d0             ! NT surface tracer flux

Logical switches (TRUE/FALSE) to activate writing of fields into HISTORY output file. If CPP option AVERAGES is defined, these switches will cause the same data to be averaged and written to the averages file.

     Hout(idUvel) == T                          ! 3D U-velocity
     Hout(idVvel) == T                          ! 3D V-velocity
     Hout(idWvel) == T                          ! 3D W-velocity
     Hout(idOvel) == T                          ! omega vertical velocity
     Hout(idUbar) == T                          ! 2D U-velocity
     Hout(idVbar) == T                          ! 2D V-velocity
     Hout(idFsur) == T                          ! free-surface
     Hout(idTvar) == T T                        ! temperature and salinity
     Hout(idUsms) == F                          ! surface U-stress
     Hout(idVsms) == F                          ! surface V-stress
     Hout(idUbms) == F                          ! bottom U-stress
     Hout(idVbms) == F                          ! bottom V-stress   
     Hout(idUbrs) == F                          ! bottom U-current stress
     Hout(idVbrs) == F                          ! bottom V-current stress
     Hout(idUbws) == F                          ! bottom U-wave stress
     Hout(idVbws) == F                          ! bottom V-wave stress
     Hout(idUbcs) == F                          ! bottom max wave-current U-stress
     Hout(idVbcs) == F                          ! bottom max wave-current V-stress
     Hout(idUbot) == F                          ! bed wave orbital U-velocity
     Hout(idVbot) == F                          ! bed wave orbital V-velocity
     Hout(idUbur) == F                          ! bottom U-velocity above bed
     Hout(idVbvr) == F                          ! bottom V-velocity above bed
     Hout(idTsur) == F F                        ! surface net heat and salt flux
     Hout(idLhea) == F                          ! latent heat flux
     Hout(idShea) == F                          ! sensible heat flux
     Hout(idLrad) == F                          ! longwave radiation flux
     Hout(idSrad) == F                          ! shortwave radiation flux
     Hout(idevap) == F                          ! evaporation rate
     Hout(idrain) == F                          ! precipitation rate
     Hout(idDano) == F                          ! density anomaly
     Hout(idVvis) == F                          ! vertical viscosity
     Hout(idTdif) == F                          ! vertical T-diffusion
     Hout(idSdif) == F                          ! vertical Salinity diffusion
     Hout(idHsbl) == F                          ! depth of surface boundary layer
     Hout(idHbbl) == F                          ! depth of bottom boundary layer
     Hout(idMtke) == F                          ! turbulent kinetic energy
     Hout(idMtls) == F                          ! turbulent length scale

Logical switches (TRUE/FALSE) to activate writing of extra inert passive tracers other than biological and sediment tracers. An inert passive tracer is one that it is only advected and diffused. Other processes are ignored. These tracers include, for example, dyes, pollutants, oil spills, etc. NPT values are expected. However, these switches can be activated using compact parameter specification.

      Hout(inert) == T                          ! inert passive tracers

Logical switches (TRUE/FALSE) to activate writing of exposed sediment layer properties into HISTORY output file. Currently, MBOTP properties are expected for the bottom boundary layer and/or sediment models:

  Hout(idBott(isd50)),  isd50 = 1        ! mean grain diameter
  Hout(idBott(idens)),  idens = 2        ! mean grain density
  Hout(idBott(iwsed)),  iwsed = 3        ! mean settling velocity
  Hout(idBott(itauc)),  itauc = 4        ! critical erosion stress
  Hout(idBott(irlen)),  irlen = 5        ! ripple length
  Hout(idBott(irhgt)),  irhgt = 6        ! ripple height
  Hout(idBott(ibwav)),  ibwav = 7        ! wave excursion amplitude
  Hout(idBott(izdef)),  izdef = 8        ! default bottom roughness
  Hout(idBott(izapp)),  izapp = 9        ! apparent bottom roughness
  Hout(idBott(izNik)),  izNik = 10       ! Nikuradse bottom roughness
  Hout(idBott(izbio)),  izbio = 11       ! biological bottom roughness
  Hout(idBott(izbfm)),  izbfm = 12       ! bed form bottom roughness
  Hout(idBott(izbld)),  izbld = 13       ! bed load bottom roughness
  Hout(idBott(izwbl)),  izwbl = 14       ! wave bottom roughness
  Hout(idBott(iactv)),  iactv = 15       ! active layer thickness
  Hout(idBott(ishgt)),  ishgt = 16       ! 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
   Hout(idBott) == T T T T T T T T T F F F F F F F

Generic User parameters, [1:NUSER].

      NUSER =  0
       USER =  0.d0

Input NetCDF file names, [1:Ngrids].

    GRDNAME == ocean_grd.nc
    ININAME == ocean_ini.nc
    ITLNAME == ocean_itl.nc
    IRPNAME == ocean_irp.nc
    IADNAME == ocean_iad.nc
    CLMNAME == ocean_clm.nc
    BRYNAME == ocean_bry.nc
    FWDNAME == ocean_fwd.nc
    ADSNAME == ocean_ads.nc

Input forcing NetCDF file name(s). The USER has the option to enter several files names per each nested grid. For example, the USER may have a different files for wind products, heat fluxes, rivers, tides, etc. The model will scan the file list and will read the needed data from the first file in the list containing the forcing field. Therefore, the order of the file names is very important. If multiple forcing files per grid, enter first all the file names for grid 1, then grid 2, and so on. Use a single line per entry with a continuation (\) symbol at the each entry, except the last one.

    NFFILES == 1                          ! number of forcing files
    FRCNAME == ocean_frc.nc               ! forcing file 1, grid 1

Output NetCDF file names, [1:Ngrids].

    GSTNAME == ocean_gst.nc
    RSTNAME == ocean_rst.nc
    HISNAME == ocean_his.nc
    TLMNAME == ocean_tlm.nc
    TLFNAME == ocean_tlf.nc
    ADJNAME == ocean_adj.nc
    AVGNAME == ocean_avg.nc
    DIANAME == ocean_dia.nc
    STANAME == ocean_sta.nc
    FLTNAME == ocean_flt.nc

Input ASCII parameter filenames.

    APARNAM =  ROMS/External/assimilation.in
    SPOSNAM =  ROMS/External/stations.in
    FPOSNAM =  ROMS/External/floats.in
    BPARNAM =  ROMS/External/bioFasham.in
    SPARNAM =  ROMS/External/sediment.in
    USRNAME =  ROMS/External/MyFile.dat

and