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.
    MyAppCPP = UPWELLING
    Though this is set by ROMS_APPLICATION in the makefile or build Script, ROMS is also compiled with -D$(ROMS_APPLICATION), which allows the use of
    #ifdef UPWELLING
    for instance. The net result of both
    -D$(ROMS_APPLICATION)=UPWELLING -DUPWELLING
    is that ROMS_APPLICATION becomes 1 in the source code. ROMS therefore needs to be told the application name here as well in order to report it to the output file.
  • 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
    NSFF == 72  ! Number of time-steps between 4DVAR adjustment of
     ! surface forcing fluxes
    NOBC == 72  ! Number of time-steps between 4DVAR adjustment of
     ! open boundary fields
  • 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 for the nonlinear model and adjoint-based algorithms: [1:NAT+NPT,Ngrids] values are expected. 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

    ad_TNU2 == 0.0d0 0.0d0  ! m2/s
    ad_TNU4 == 0.0d0 0.0d0  ! m4/s
  • Harmonic/biharmonic, horizontal viscosity coefficient for the nonlinear model and adjoint-based algorithms: [1:Ngrids values are expected. Only used if the appropriate CPP options are defined.
    VISC2 == 0.0d0  ! m2/s
    VISC4 == 0.0d0  ! m4/s

    ad_VISC2 == 0.0d0  ! m2/s
    ad_VISC4 == 0.0d0  ! m4/s
  • Background vertical mixing coefficients for active (NAT) and inert (NPT) tracers for the nonlinear model and basic state scale factor in adjoint-based algorithms: [1:NAT+NPT,Ngrids] values are expected.
    AKT_BAK == 1.0d-6 1.0d-6  ! m2/s

    ad_AKT_fac == 1.0d0 1.0d0 !nondimensional
  • Background vertical mixing coefficient for momentum for the nonlinear model and basic state scale factor in the adjoint-based algorithms: [1:Ngrids] values are expected.
    AKV_BAK == 1.0d-5  ! m2/s

    ad_AKV_fac == 1.0d0 !nondimensional
  • 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
  • Generic length-scale turbulence closure parameters. These parameters are used when GLS_MIXING is activated.
    GLS_P == 3.0d0  ! K-epsilon
    GLS_M == 1.5d0  ! Turbulent kinetic energy exponent
    GLS_N == -1.0d0  ! Turbulent length scale exponent
    GLS_Kmin == 7.6d-6  ! Minimum value of specific turbulent energy
    GLS_Pmin == 1.0d-12  ! Minimum Value of dissipation

    ! Closure independent constraint parameters:

    GLS_CMU0 == 0.5477d0  ! Stability coefficient
    GLS_C1 == 1.44d0  ! Shear production coefficient
    GLS_C2 == 1.92d0  ! Dissipation coefficient
    GLS_C3M == -0.4d0  ! Buoyancy production coefficient (minus)
    GLS_C3P == 1.0d0  ! Buoyancy production coefficient (plus)
    GLS_SIGK == 1.0d0  ! Constant Schmidt number for turbulent
     ! kinetic energy diffusivity
    GLS_SIGP == 1.30d0  ! Constant Schmidt number for turbulent
     ! generic statistical field, "psi"
  • 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 == 10.0d0  ! air humidity
    BLK_ZT == 10.0d0  ! air temperature
    BLK_ZW == 10.0d0  ! winds
  • Minimum depth for wetting and drying.
    DCRIT == 0.10d0  ! m
  • Jerlov water type used to set vertical depth scale for shortwave radiation absorption.
    WTYPE == 1
  • 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] values are expected.
    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, [1:Ngrids] values are expected.
    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
  • Logical switches (TRUE/FALSE) to specify which variables to consider on tracers point Sources/Sinks (like river runoff): [1:NAT+NPT,Ngrids] values are expected.
    LtracerSrc = T T  ! temperature, salinity, inert

Vertical Coordinates Parameters

  • Set vertical, terrain-following coordinates transformation equation and stretching function (see Vertical S-coordinate for more details).
    Vtransform == 1  ! transformation equation
    Vstretching == 1  ! stretching function
  • Terrain-following coordinates surface control parameter, [1:Ngrids] values are expected.
    THETA_S == 3.0d0  ! 0 < THETA_S < 20
  • Terrain-following coordinates bottom control parameter, [1:Ngrids] values are expected.
    THETA_B == 0.0d0  ! 0 < THETA_B < 1
  • Width of surface or bottom boundary layer in which higher vertical resolution is required during stretching.
    TCLINE == 50.0d0  ! m

Adjoint Sensitivity Parameters

  • 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 tracervariables whose sensitivity is required, [1:NT,1:Ngrids] values are expected.
    Lstate(isTvar) == F F  ! tracers

Stochastic Optimals Parameters

  • 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, [1:NT,1:Ngrids] 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

Output Variables Switches

  • 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. [1:NPT,1:Ngrids] values are expected. However, these switches can be activated using compact parameter specification.
    Hout(inert) == T  ! inert passive tracers

Generic User Parameters

  • NUSER is the number (integer) of user parameters to consider. USER is a vector containing NUSER user parameters (real array).
    NUSER = 0
    USER = 0.d0
    This array is primarily used with the SANITY_CHECK to test the correctness of the tangent linear adjoint models. It contains the model variable and grid point to perturb:
    ! INT(user(1)): tangent state variable to perturb
    ! INT(user(2)): adjoint state variable to perturb
    ! [ isFsur = 1 ] free-surface
    ! [ isUbar = 2 ] 2D U-momentum
    ! [ isVbar = 3 ] 2D V-momentum
    ! [ isUvel = 4 ] 3D U-momentum
    ! [ isVvel = 5 ] 3D V-momentum
    ! [ isTvar = 6 ] First tracer (temperature)
    ! [ ... ]
    ! [ isTvar = ? ] Last tracer
    !
    ! INT(user(3)): I-index of tangent variable to perturb
    ! INT(user(4)): I-index of adjoint variable to perturb
    ! INT(user(5)): J-index of tangent variable to perturb
    ! INT(user(6)): J-index of adjoint variable to perturb
    ! INT(user(7)): K-index of tangent variable to perturb, if 3D
    ! INT(user(8)): K-index of adjoint variable to perturb, if 3D
    Set tangent and adjoint parameters to the same values if perturbing and reporting the same variable.
  • This parameter could also be used to adjust constants in analytical functions at run time.

NetCDF-4/HDF5 Compression Parameters

  • NetCDF-4/HDF5 compression parameters for output files. This capability is used when both NETCDF4 and DEFLATE C-preprocessing options are activated. The user needs to compile with the NetCDF-4/HDF5 and MPI libraries. File deflation cannot be used in parallel I/O for writing libraries. File deflation cannot be used in parallel I/O for writing to exactly map the data to the disk location. For more information, check NetCDF official website.
    NC_SHUFFLE = 1  ! if non-zero, turn on shuffle filter
    NC_DEFLATE = 1  ! if non-zero, turn on deflate filter
    NC_DLEVEL = 1  ! deflate level [0-9]

Input NetCDF Files

  • Input NetCDF file names, [1:Ngrids] values are expected.
    GRDNAME == ocean_grd.nc  ! Grid
    ININAME == ocean_ini.nc  ! NLM initial conditions
    ITLNAME == ocean_itl.nc  ! TLM initial conditions
    IRPNAME == ocean_irp.nc  ! RPM initial conditions
    IADNAME == ocean_iad.nc  ! ADM initial conditions
    CLMNAME == ocean_clm.nc  ! Climatology
    BRYNAME == ocean_bry.nc  ! Open boundary conditions
    FWDNAME == ocean_fwd.nc  ! Forward trajectory
    ADSNAME == ocean_ads.nc  ! Adjoint sensitivity functionals
  • 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 Files

  • Output NetCDF file names, [1:Ngrids] files are expected.
    GSTNAME == ocean_gst.nc  ! GST analysis restart
    RSTNAME == ocean_rst.nc  ! Restart
    HISNAME == ocean_his.nc  ! History
    TLMNAME == ocean_tlm.nc  ! TLM history
    TLFNAME == ocean_tlf.nc  ! Impulse TLM forcing
    ADJNAME == ocean_adj.nc  ! ADM history
    AVGNAME == ocean_avg.nc  ! Averages
    DIANAME == ocean_dia.nc  ! Diagnostics
    STANAME == ocean_sta.nc  ! Stations
    FLTNAME == ocean_flt.nc  ! Floats

Additional Input Scripts