roms.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.
Notice: A detailed information about ROMS input script file syntax can be found here.
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 = UPWELLINGThough 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 UPWELLINGfor instance. The net result of both-D$(ROMS_APPLICATION)=UPWELLING -DUPWELLINGis 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.
Time-Stepping and Iterations Parameters
- Time-stepping parameters.
- 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. 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.
- 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.
- 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.
- 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.
- Turbulent closures parameters.
- 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.
- Height (m) of atmospheric measurements for Bulk fluxes parameterization.
- 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
- Deepest and shallowest levels to apply surface momentum stress as a body-force.
- Mean Density and Brunt-Vaisala frequency.
- Time-stamp assigned for model initialization, reference time origin for tidal forcing, and model reference time for output NetCDF units attribute.
- Nudging/relaxation time scales, inverse scales will be computed internally, [1:Ngrids] values are expected.
- 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.
- 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).
- 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.
- Starting and ending vertical levels of the 3D adjoint state variables whose sensitivity is required.
- 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 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.
- 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 fields into history output file. If CPP option AVERAGES is defined, these switches will cause the samedata 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(idBath) == T ! time-dependent bathymetry
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(idW2xx) == F ! 2D radiation stress, Sxx component
Hout(idW2xy) == F ! 2D radiation stress, Sxy component
Hout(idW2yy) == F ! 2D radiation stress, Syy component
Hout(idU2rs) == F ! 2D radiation U-stress
Hout(idV2rs) == F ! 2D radiation V-stress
Hout(idU2Sd) == F ! 2D U-Stokes velocity
Hout(idV2Sd) == F ! 2D V-Stokes velocity
Hout(idW3xx) == F ! 3D radiation stress, Sxx component
Hout(idW3xy) == F ! 3D radiation stress, Sxy component
Hout(idW3yy) == F ! 3D radiation stress, Syy component
Hout(idW3zx) == F ! 3D radiation stress, Szx component
Hout(idW3zy) == F ! 3D radiation stress, Szy component
Hout(idU3rs) == F ! 3D radiation U-stress
Hout(idV3rs) == F ! 3D radiation V-stress
Hout(idU3Sd) == F ! 3D U-Stokes velocity
Hout(idV3Sd) == F ! 3D V-Stokes velocity
Hout(idWamp) == F ! wave height
Hout(idWlen) == F ! wave length
Hout(idWdir) == F ! wave direction
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(idEmPf) == F ! E-P 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. [1:NPT,1:Ngrids] 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
- NUSER is the number (integer) of user parameters to consider. USER is a vector containing NUSER user parameters (real array).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 perturbSet tangent and adjoint parameters to the same values if perturbing and reporting the same variable.
! 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
- 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.
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
- Input ASCII parameter filenames.APARNAM = ROMS/External/s4dvar.in
SPOSNAM = ROMS/External/stations.in
FPOSNAM = ROMS/External/floats.in
BPARNAM = ROMS/External/biology.in
SPARNAM = ROMS/External/sediment.in
USRNAME = ROMS/External/MyFile.dat