!
!  ROMS/TOMS Standard Input parameters.
!
!svn $Id: ocean.in 810 2016-08-05 01:58:16Z arango $
!========================================================= Hernan G. Arango ===
!  Copyright (c) 2002-2016 The ROMS/TOMS Group                                !
!    Licensed under a MIT/X style license                                     !
!    See License_ROMS.txt                                                     !
!==============================================================================
!                                                                             !
! Input parameters can be entered in ANY order, provided that the parameter   !
! KEYWORD (usually, upper case) is typed correctly followed by "="  or "=="   !
! symbols. Any comment lines are allowed and must begin with an exclamation   !
! mark (!) in column one.  Comments may  appear to the right of a parameter   !
! specification to improve documentation.  Comments will be ignored  during   !
! reading.  Blank lines are also allowed and ignored. Continuation lines in   !
! a parameter specification are allowed and must be preceded by a backslash   !
! (\).  In some instances, more than one value is required for a parameter.   !
! If fewer values are provided, the  last value  is assigned for the entire   !
! parameter array.  The multiplication symbol (*),  without blank spaces in   !
! between, is allowed for a parameter specification.  For example, in a two   !
! grids nested application:                                                   !
!                                                                             !
!    AKT_BAK == 2*1.0d-6  2*5.0d-6              ! m2/s                        !
!                                                                             !
! indicates that the first two entries of array AKT_BAK,  in fortran column-  !
! major order, will have the same value of "1.0d-6" for grid 1,  whereas the  !
! next two entries will have the same value of "5.0d-6" for grid 2.           !
!                                                                             !
! In multiple levels of nesting and/or multiple connected domains  step-ups,  !
! "Ngrids" entries are expected for some of these parameters.  In such case,  !
! the order of the entries for a parameter is extremely important.  It  must  !
! follow the same order (1:Ngrids) as in the state variable declaration. The  !
! USER may follow the above guidelines for specifying his/her values.  These  !
! parameters are marked by "==" plural symbol after the KEYWORD.              !
!                                                                             !
! Multiple NetCDF files are allowed for input field(s).  This is useful when  !
! splitting input data (climatology,  boundary,  forcing)  time records into  !
! several files (say monthly, annual, etc). In this case, each multiple file  !
! entry line needs to be ended by the vertical bar (|) symbol. For example:   !
!                                                                             !
!    NFFILES == 7                          ! number of forcing files          !
!                                                                             !
!    FRCNAME == my_tides.nc       \                                           !
!               my_lwrad_year1.nc |                                           !
!               my_lwrad_year2.nc \                                           !
!               my_swrad_year1.nc |                                           !
!               my_swrad_year2.nc \                                           !
!               my_winds_year1.nc |                                           !
!               my_winds_year2.nc \                                           !
!               my_Pair_year1.nc  |                                           !
!               my_Pair_year2.nc  \                                           !
!               my_Qair_year1.nc  |                                           !
!               my_Qair_year2.nc  \                                           !
!               my_Tair_year1.nc  |                                           !
!               my_Tair_year2.nc                                              !
!                                                                             !
! Notice that NFFILES is 7 and not 13. There are 7 uniquely different fields  !
! in the file list,  we  DO NOT  count file entries followed by the vertical  !
! bar symbol.  This is because  multiple file  entries are processed in ROMS  !
! with derived type structures.                                               !
!                                                                             !
!==============================================================================
!
! Application title.
!

       TITLE = ROMS 3.6 - Arctic-4km - Coupled ROMS-CICE

! C-preprocessing Flag.

    MyAppCPP = ARCTIC4KM

! Input variable information file name.  This file needs to be processed
! first so all information arrays can be initialized properly.

  VARNAME = /cluster/projects/nn9824k/metroms_npi/metroms/apps/common/include/varinfo.dat_ERAatm

! Number of nested grids.

      Ngrids =  1

! Number of grid nesting layers.  This parameter is used to allow refinement
! and composite grid combinations.

  NestLayers =  1

! Number of grids in each nesting layer [1:NestLayers].

GridsInLayer =  1

! Grid dimension parameters. See notes below in the Glossary for how to set
! these parameters correctly.

          Lm == 1600       ! Number of I-direction INTERIOR RHO-points
          Mm == 1200       ! Number of J-direction INTERIOR RHO-points
           N == 35       ! 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].

      NtileI ==  16                               ! I-direction partition
      NtileJ ==  24                               ! J-direction partition

! Set lateral boundary conditions keyword. Notice that a value is expected
! for each boundary segment per nested grid for each state variable.
!
! Each tracer variable requires [1:4,1:NAT+NPT,Ngrids] values. Otherwise,
! [1:4,1:Ngrids] values are expected for other variables. The boundary
! order is: 1=west, 2=south, 3=east, and 4=north. That is, anticlockwise
! starting at the western boundary.
!
! The keyword is case insensitive and usually has three characters. However,
! it is possible to have compound keywords, if applicable. For example, the
! keyword "RadNud" implies radiation boundary condition with nudging. This
! combination is usually used in active/passive radiation conditions.
!
!   Keyword    Lateral Boundary Condition Type
!
!   Cha        Chapman
!   Cla        Clamped
!   Clo        Closed
!   Fla        Flather                                _____N_____     j=Mm
!   Gra        Gradient                              |     4     |
!   Nes        Nested                                |           |
!   Nud        Nudging                             1 W           E 3
!   Per        Periodic                              |           |
!   Rad        Radiation                             |_____S_____|
!   Red        Reduced Physics                             2          j=1
!                                                   i=1         i=Lm
!                   W       S       E       N
!                   e       o       a       o
!                   s       u       s       r
!                   t       t       t       t
!                           h               h
!
!                   1       2       3       4

   LBC(isFsur) ==   Cha     Clo     Cha     Cha         ! free-surface
   LBC(isUbar) ==   Fla     Clo     Fla     Fla         ! 2D U-momentum
   LBC(isVbar) ==   Fla     Clo     Fla     Fla         ! 2D V-momentum
   LBC(isUvel) ==   RadNud     Clo     RadNud     RadNud         ! 3D U-momentum
   LBC(isVvel) ==   RadNud     Clo     RadNud     RadNud         ! 3D V-momentum
   LBC(isMtke) ==   Gra     Clo     Gra     Gra         ! mixing TKE

   LBC(isTvar) ==   RadNud     Clo     RadNud     RadNud \       ! temperature
                    RadNud     Clo     RadNud     RadNud         ! salinity


! Adjoint-based algorithms can have different lateral boundary
! conditions keywords.

ad_LBC(isFsur) ==   Cha     Clo     Clo     Clo         ! free-surface
ad_LBC(isUbar) ==   Fla     Clo     Clo     Clo         ! 2D U-momentum
ad_LBC(isVbar) ==   Fla     Clo     Clo     Clo         ! 2D U-momentum
ad_LBC(isUvel) ==   Cla     Clo     Clo     Clo         ! 3D U-momentum
ad_LBC(isVvel) ==   Cla     Clo     Clo     Clo         ! 3D V-momentum
ad_LBC(isMtke) ==   Gra     Clo     Clo     Clo         ! mixing TKE

ad_LBC(isTvar) ==   Cla     Clo     Clo     Clo \       ! temperature
                    Cla     Clo     Clo     Clo         ! salinity

! Set lateral open boundary edge volume conservation switch for
! nonlinear model and adjoint-based algorithms. Usually activated
! with radiation boundary conditions to enforce global mass
! conservation, except if tidal forcing is enabled. [1:Ngrids].

   VolCons(west)  ==  F                            ! western  boundary
   VolCons(east)  ==  F                            ! eastern  boundary
   VolCons(south) ==  F                            ! southern boundary
   VolCons(north) ==  F                            ! northern boundary

ad_VolCons(west)  ==  F                            ! western  boundary
ad_VolCons(east)  ==  F                            ! eastern  boundary
ad_VolCons(south) ==  F                            ! southern boundary
ad_VolCons(north) ==  F                            ! northern boundary

! Time-Stepping parameters.

      NTIMES == 318240.0
          DT == 120
     NDTFAST == 60

! Model iteration loops parameters.

       ERstr =  1
       ERend =  1
      Nouter =  1
      Ninner =  1
  Nintervals =  1

! 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 (see documentation below).

         NEV =  2                               ! Number of eigenvalues
         NCV =  10                              ! Number of eigenvectors

! Input/Output parameters.

       NRREC == -1
   LcycleRST == F
        NRST == 720
        NSTA == 720
        NFLT == 299970
       NINFO == 360

! Output history, average, diagnostic files parameters.

     LDEFOUT == T
        NHIS == 720
     NDEFHIS == 720
        NQCK == 720
     NDEFQCK == 720
      NTSAVG == 1
        NAVG == 720
     NDEFAVG == 720
      NTSDIA == 1
        NDIA == 720        
     NDEFDIA == 0

! Output tangent linear and adjoint models parameters.

   LcycleTLM == F
        NTLM == 72
     NDEFTLM == 0
   LcycleADJ == F
        NADJ == 72
     NDEFADJ == 0
        NSFF == 0
        NOBC == 0

! Output check pointing GST restart parameters.

   LmultiGST =  F                               ! one eigenvector per file
     LrstGST =  F                               ! GST restart switch
  MaxIterGST =  500                             ! maximun number of iterations
        NGST =  10                              ! check pointing interval

! Relative accuracy of the Ritz values computed in the GST analysis.

    Ritz_tol =  1.0d-15

! Harmonic/biharmonic horizontal diffusion of tracer: [1:NAT+NPT,Ngrids].

        TNU2 == 2*1.0d2                         ! m2/s
        TNU4 == 1.6d8                           ! m4/s

     ad_TNU2 == 50.0d0  50.0d0                    ! m2/s
     ad_TNU4 == 0.0d0  0.0d0                    ! m4/s

! Harmononic/biharmonic, horizontal viscosity coefficient: [Ngrids].

       VISC2 == 1.0d2                           ! m2/s
       VISC4 == 1.6d8                           ! m4/s

    ad_VISC2 == 10.0d0                           ! m2/s
    ad_VISC4 == 0.0d0                           ! m4/s

! Logical switches (TRUE/FALSE) to increase/decrease horizontal viscosity
! and/or diffusivity in specific areas of the application domain (like
! sponge areas) for the desired application grid.

    LuvSponge == F                              ! horizontal momentum
LtracerSponge == F F                            ! temperature, salinity, inert

! Vertical mixing coefficients for active tracers: [1:NAT+NPT,Ngrids]

     AKT_BAK == 1.0d-6 1.0d-6                   ! m2/s
  ad_AKT_fac == 1.0d0  1.0d0                    ! nondimensional

! Vertical mixing coefficient for momentum: [Ngrids].

     AKV_BAK == 5.0d-6                          ! m2/s
  ad_AKV_fac == 1.0d0                           ! nondimensional

! Turbulent closure 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.

       GLS_P == 0.0d0                           ! Mellor-Yamada 2.5
       GLS_M == 1.0d0
       GLS_N == 1.0d0
    GLS_Kmin == 5.0d-6
    GLS_Pmin == 5.0d-6

    GLS_CMU0 == 0.5544d0
      GLS_C1 == 0.9d0
      GLS_C2 == 0.5d0
     GLS_C3M == 0.9d0
     GLS_C3P == 0.9d0
    GLS_SIGK == 1.96d0
    GLS_SIGP == 1.96d0

! Constants used in surface turbulent kinetic energy flux computation.

  CHARNOK_ALPHA == 1000.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 == 0.0d-04                    ! m/s
       RDRG2 == 3.0d-03                    ! nondimensional
         Zob == 0.0d0                      ! m
         Zos == 0.02d0                     ! m

! Bulk flux measurement heights for atmospheric variables
      BLK_ZQ == 2.0d0                     ! m
      BLK_ZT == 2.0d0                     ! m
      BLK_ZW == 10.0d0                     ! m

! Minimum depth for wetting and drying.

       DCRIT == 0.10d0                     ! m

! Various parameters.

       WTYPE == 1
     LEVSFRC == 15
     LEVBFRC == 1

! Set vertical, terrain-following coordinates transformation equation and
! stretching function (see below for details), [1:Ngrids].

  Vtransform == 2                          ! transformation equation
 Vstretching == 2                          ! stretching function

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

     THETA_S == 6.0d0                      ! 0 < THETA_S < 20
     THETA_B == 0.1d0                      ! 0 < THETA_B < 1
      TCLINE == 100.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 =  14897.0                  ! Use start time equal to tidal reference date
   TIDE_START = 14897.0d0                  ! Tides reference
    TIME_REF =  19700101.00                    ! yyyymmdd.dd

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

       TNUDG == 05.0d0 05.0d0              ! days
       ZNUDG == 0.0d0                      ! days
      M2NUDG == 5.0d0                      ! days
      M3NUDG == 15.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 == 1.0d0                    ! nondimensional

! Width of nudgingzone.
      
      IWRK == 15                         ! no. of gridpoints

! Logical switches (TRUE/FALSE) to specify which variables to process for
! tracers climatology: [1:NAT+NPT,Ngrids]. See glossary below for details.

  LtracerCLM == T T                        ! temperature, salinity, inert

! 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

! Logical switches (TRUE/FALSE) to activate horizontal momentum transport
! point Sources/Sinks (like river runoff transport) and mass point
! Sources/Sinks (like volume vertical influx), [1:Ngrids].

      LuvSrc == T                          ! horizontal momentum transport
       LwSrc == F                          ! volume vertical influx

! Logical switches (TRUE/FALSE) to activate tracers point Sources/Sinks
! (like river runoff) and to specify which tracer variables to consider:
! [1:NAT+NPT,Ngrids].  See glossary below for details.

  LtracerSrc == F T                        ! temperature, salinity, inert

! Logical switches (TRUE/FALSE) to read and process climatology fields.
! See glossary below for details.

     LsshCLM == F                          ! sea-surface height
      Lm2CLM == F                          ! 2D momentum
      Lm3CLM == F                          ! 3D momentum

  LtracerCLM == T T                        ! temperature, salinity, inert

! Logical switches (TRUE/FALSE) to nudge the desired climatology field(s).
! If not analytical climatology fields, users need to turn ON the logical
! switches above to process the fields from the climatology NetCDF file
! that are needed for nudging. See glossary below for details.

 LnudgeM2CLM == F                          ! 2D momentum
 LnudgeM3CLM == F                          ! 3D momentum

  LnudgeTCLM == F F                        ! temperature, salinity, inert

! 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

Lstate(isTvar) == F F F F F F F            ! NT tracers

! Logical switches (TRUE/FALSE) to specify the state variables for
! which Forcing Singular Vectors or Stochastic Optimals is required.

Fstate(isFsur) == F                        ! free-surface
Fstate(isUbar) == F                        ! 2D U-momentum
Fstate(isVbar) == F                        ! 2D V-momentum
Fstate(isUvel) == F                        ! 3D U-momentum
Fstate(isVvel) == F                        ! 3D V-momentum
Fstate(isTvar) == F F F F F F F            ! NT tracers

Fstate(isUstr) == T                        ! surface U-stress
Fstate(isVstr) == T                        ! surface V-stress
Fstate(isTsur) == F F F F F F F            ! NT surface tracers flux

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

    SO_decay == 2.0d0                      ! days

! Stochastic Optimals surface forcing standard deviation for
! dimensionalization.

SO_sdev(isFsur) == 1.0d0                   ! free-surface
SO_sdev(isUbar) == 1.0d0                   ! 2D U-momentum
SO_sdev(isVbar) == 1.0d0                   ! 2D V-momentum
SO_sdev(isUvel) == 1.0d0                   ! 3D U-momentum
SO_sdev(isVvel) == 1.0d0                   ! 3D V-momentum
SO_sdev(isTvar) == 1.0d0 1.0d0             ! NT tracers

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 tracers flux

! Logical switches (TRUE/FALSE) to activate writing of fields into
! HISTORY output file.

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

Hout(idTvar) == T T     ! temp, salt         temperature and salinity

Hout(idpthR) == F       ! z_rho              time-varying depths of RHO-points
Hout(idpthU) == F       ! z_u                time-varying depths of U-points
Hout(idpthV) == F       ! z_v                time-varying depths of V-points
Hout(idpthW) == F       ! z_w                time-varying depths of W-points

Hout(idUsms) == F       ! sustr              surface U-stress
Hout(idVsms) == F       ! svstr              surface V-stress
Hout(idUbms) == F       ! bustr              bottom U-stress
Hout(idVbms) == F       ! bvstr              bottom V-stress

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

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

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

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

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

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

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

Hout(idDano) == F       ! rho                density anomaly
Hout(idVvis) == T       ! AKv                vertical viscosity
Hout(idTdif) == T       ! AKt                vertical T-diffusion
Hout(idSdif) == T       ! AKs                vertical Salinity diffusion
Hout(idHsbl) == T       ! Hsbl               depth of surface boundary layer
Hout(idHbbl) == T       ! Hbbl               depth of bottom boundary layer
Hout(idMtke) == T       ! tke                turbulent kinetic energy
Hout(idMtls) == T       ! gls                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) == F                          ! inert passive tracers



! Logical switches (TRUE/FALSE) to activate writing of fields into
! QUICKSAVE output file.

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

Qout(idTvar) == F F     ! temp, salt         temperature and salinity

Qout(idUsur) == F       ! u_sur              surface U-velocity
Qout(idVsur) == F       ! v_sur              surface V-velocity
Qout(idUsuE) == F       ! u_sur_eastward     surface U-eastward  velocity
Qout(idVsuN) == F       ! v_sur_northward    surface V-northward velocity

Qout(idsurT) == F F     ! temp_sur, salt_sur surface temperature and salinity

Qout(idpthR) == F       ! z_rho              time-varying depths of RHO-points
Qout(idpthU) == F       ! z_u                time-varying depths of U-points
Qout(idpthV) == F       ! z_v                time-varying depths of V-points
Qout(idpthW) == F       ! z_w                time-varying depths of W-points

Qout(idUsms) == F       ! sustr              surface U-stress
Qout(idVsms) == F       ! svstr              surface V-stress
Qout(idUbms) == F       ! bustr              bottom U-stress
Qout(idVbms) == F       ! bvstr              bottom V-stress

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

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

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

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

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

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

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

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

! Logical switches (TRUE/FALSE) to activate writing of extra inert passive
! tracers other than biological and sediment tracers into the QUICKSAVE
! output file. 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.

 Qout(inert) == F       ! dye_01, ...        inert passive tracers
 Qout(Snert) == F       ! dye_01_sur, ..     surface inert passive tracers

! Logical switches (TRUE/FALSE) to activate writing of time-averaged
! fields into AVERAGE output file.

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

Aout(idTvar) == T T     ! temp, salt         temperature and salinity

Aout(idUsms) == T       ! sustr              surface U-stress
Aout(idVsms) == T       ! svstr              surface V-stress
Aout(idUbms) == F       ! bustr              bottom U-stress
Aout(idVbms) == F       ! bvstr              bottom V-stress

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

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

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

Aout(idTsur) == T T     ! shflux, ssflux     surface net heat and salt flux
Aout(idLhea) == F       ! latent             latent heat flux
Aout(idShea) == F       ! sensible           sensible heat flux
Aout(idLrad) == F       ! lwrad              longwave radiation flux
Aout(idSrad) == F       ! swrad              shortwave radiation flux
Aout(idevap) == F       ! evaporation        evaporation rate
Aout(idrain) == F       ! rain               precipitation rate

Aout(idDano) == F       ! rho                density anomaly
Aout(idVvis) == T       ! AKv                vertical viscosity
Aout(idTdif) == T       ! AKt                vertical T-diffusion
Aout(idSdif) == T       ! AKs                vertical Salinity diffusion
Aout(idHsbl) == T       ! Hsbl               depth of surface boundary layer
Aout(idHbbl) == T       ! Hbbl               depth of bottom boundary layer

Aout(id2dRV) == F       ! pvorticity_bar     2D relative vorticity
Aout(id3dRV) == F       ! pvorticity         3D relative vorticity
Aout(id2dPV) == F       ! rvorticity_bar     2D potential vorticity
Aout(id3dPV) == F       ! rvorticity         3D potential vorticity

Aout(idu3dD) == F       ! u_detided          detided 3D U-velocity
Aout(idv3dD) == F       ! v_detided          detided 3D V-velocity
Aout(idu2dD) == F       ! ubar_detided       detided 2D U-velocity
Aout(idv2dD) == F       ! vbar_detided       detided 2D V-velocity
Aout(idFsuD) == F       ! zeta_detided       detided free-surface

Aout(idTrcD) == F F     ! temp_detided, ...  detided temperature and salinity

Aout(idHUav) == F       ! Huon               u-volume flux, Huon
Aout(idHVav) == F       ! Hvom               v-volume flux, Hvom
Aout(idUUav) == T       ! uu                 quadratic <u*u> term
Aout(idUVav) == T       ! uv                 quadratic <u*v> term
Aout(idVVav) == T       ! vv                 quadratic <v*v> term
Aout(idU2av) == T       ! ubar2              quadratic <ubar*ubar> term
Aout(idV2av) == T       ! vbar2              quadratic <vbar*vbar> term
Aout(idZZav) == T       ! zeta2              quadratic <zeta*zeta> term

Aout(idTTav) == T T     ! temp_2, ...        quadratic <t*t> tracer terms
Aout(idUTav) == T T     ! u_temp, ...        quadratic <u*t> tracer terms
Aout(idVTav) == T T     ! v_temp, ...        quadratic <v*t> tracer terms
Aout(iHUTav) == F F     ! Huon_temp, ...     tracer volume flux, <Huon*t>
Aout(iHVTav) == F F     ! Hvom_temp, ...     tracer volume flux, <Hvom*t>

! Logical switches (TRUE/FALSE) to activate writing of extra inert passive
! tracers other than biological and sediment tracers into the AVERAGE file.

 Aout(inert) == F F F F F       ! dye_01, ...        inert passive tracers

! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! 2D momentum (ubar,vbar) diagnostic terms into DIAGNOSTIC output file.

Dout(M2rate) == F                          ! acceleration
Dout(M2pgrd) == F                          ! pressure gradient
Dout(M2fcor) == F                          ! Coriolis force
Dout(M2hadv) == F                          ! horizontal total advection
Dout(M2xadv) == F                          ! horizontal XI-advection
Dout(M2yadv) == F                          ! horizontal ETA-advection
Dout(M2hrad) == F                          ! horizontal total radiation stress
Dout(M2hvis) == F                          ! horizontal total viscosity
Dout(M2xvis) == F                          ! horizontal XI-viscosity
Dout(M2yvis) == F                          ! horizontal ETA-viscosity
Dout(M2sstr) == F                          ! surface stress
Dout(M2bstr) == F                          ! bottom stress

! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! 3D momentum (u,v) diagnostic terms into DIAGNOSTIC output file.

Dout(M3rate) == F                          ! acceleration
Dout(M3pgrd) == F                          ! pressure gradient
Dout(M3fcor) == F                          ! Coriolis force
Dout(M3hadv) == F                          ! horizontal total advection
Dout(M3xadv) == F                          ! horizontal XI-advection
Dout(M3yadv) == F                          ! horizontal ETA-advection
Dout(M3vadv) == F                          ! vertical advection
Dout(M3hrad) == F                          ! horizontal total radiation stress
Dout(M3vrad) == F                          ! vertical radiation stress
Dout(M3hvis) == F                          ! horizontal total viscosity
Dout(M3xvis) == F                          ! horizontal XI-viscosity
Dout(M3yvis) == F                          ! horizontal ETA-viscosity
Dout(M3vvis) == F                          ! vertical viscosity

! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! active (temperature and salinity) and passive (inert) tracer diagnostic
! terms into DIAGNOSTIC output file: [1:NAT+NPT,Ngrids].

Dout(iTrate) == F T                        ! time rate of change
Dout(iThadv) == F F                        ! horizontal total advection
Dout(iTxadv) == F F                        ! horizontal XI-advection
Dout(iTyadv) == F F                        ! horizontal ETA-advection
Dout(iTvadv) == F F                        ! vertical advection
Dout(iThdif) == F F                        ! horizontal total diffusion
Dout(iTxdif) == F F                        ! horizontal XI-diffusion
Dout(iTydif) == F F                        ! horizontal ETA-diffusion
Dout(iTsdif) == F F                        ! horizontal S-diffusion
Dout(iTvdif) == F F                        ! vertical diffusion

! Generic User parameters, [1:NUSER].

       NUSER =  0
        USER =  0.d0

! NetCDF-4/HDF5 compression parameters for output files.

  NC_SHUFFLE =  1                 ! if non-zero, turn on shuffle filter
  NC_DEFLATE =  1                 ! if non-zero, turn on deflate filter
   NC_DLEVEL =  3                 ! deflate level [0-9]

! Input NetCDF file names, [1:Ngrids].

     GRDNAME == /cluster/work/users/andriani/metroms_run/arctic-4km/a4_input/input_files_NS9081/grid/arctic4km_grd.nc
     ININAME == /cluster/work/users/andriani/metroms_run/arctic-4km/ocean_ini.nc
!     ININAME == /cluster/work/users/andriani/metroms_run/arctic-4km/ocean_rst.nc
     ITLNAME == ocean_itl.nc
     IRPNAME == ocean_irp.nc
     IADNAME == ocean_iad.nc
     FWDNAME == ocean_fwd.nc
     ADSNAME == ocean_ads.nc

! Nesting grids connectivity data: contact points information. This
! NetCDF file is special and complex. It is currently generated using
! the script "matlab/grid/contact.m" from the Matlab repository.

     NGCNAME =  ocean_ngc.nc

! Input lateral boundary conditions and climatology file names.  The
! USER has the option to split input data time records into several
! NetCDF files (see prologue instructions above). If so, use a single
! line per entry with a vertical bar (|) symbol after each entry,
! except the last one.

     CLMNAME == /cluster/work/users/andriani/metroms_run/arctic-4km/a4_input/input_files_NS9081/ocean_clm_KLAR.nc_v2
     BRYNAME == /cluster/work/users/andriani/metroms_run/arctic-4km/a4_input/input_files_NS9081/ocean_bry_KLAR.nc

! Input climatology nudging coefficients file name.

     NUDNAME == ocean_nud.nc

! Input Sources/Sinks forcing (like river runoff) file name.

     SSFNAME == /cluster/projects/nn9824k/metroms_npi/metroms/apps/common/rivers/newA4_rivers_mitya.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 == 2                         ! number of forcing files

    FRCNAME ==  /cluster/work/users/andriani/metroms_run/arctic-4km/a4_input/div_fra_vilje/tide.nc  \
                /cluster/work/users/andriani/metroms_run/arctic-4km/era5_A4_intrp/era5_2010_intrp.nc | 
/cluster/work/users/andriani/metroms_run/arctic-4km/era5_A4_intrp/era5_2011_intrp.nc
                


! Output NetCDF file names, [1:Ngrids].

     DAINAME == ocean_dai.nc
     QCKNAME == ocean_qck.nc
     GSTNAME == ocean_gst.nc
     RSTNAME == ocean_rst.nc
     HISNAME == /cluster/work/users/andriani/metroms_run/arctic-4km/A4_long_run/2011/ocean_his.nc
     TLMNAME == ocean_tlm.nc
     TLFNAME == ocean_tlf.nc
     ADJNAME == ocean_adj.nc
     AVGNAME == /cluster/work/users/andriani/metroms_run/arctic-4km/A4_long_run/2011/ocean_avg.nc
     STANAME == /cluster/work/users/andriani/metroms_run/arctic-4km/A4_long_run/2011/ocean_sta.nc
!     DIANAME == /ocean_dia.nc
     FLTNAME == ocean_flt.nc

! Input ASCII parameter filenames.

     APARNAM =  s4dvar.in
     SPOSNAM =  stations.in
     FPOSNAM =  ../External/floats.in
     BPARNAM =  ../External/bio_Fennel.in
     SPARNAM =  ../External/sediment.in
     USRNAME =  ../External/MyFile.dat
     IPARNAM =  /cluster/work/users/andriani/metroms_run/arctic-4km/ice.in

!
!  GLOSSARY:
!  =========
!
!------------------------------------------------------------------------------
! Application title (string with a maximum of eighty characters) and
! C-preprocessing flag.
!------------------------------------------------------------------------------
!
!  TITLE       Application title.
!
!  MyAppCPP    Application C-preprocession option.
!
!------------------------------------------------------------------------------
! Variable information file name (string with a maximum of eighty characters).
!------------------------------------------------------------------------------
!
!  VARNAME     Input/Output variable information file name.  This file need to
!              be processed first so all information arrays and indices can be
!              initialized properly in "mod_ncparam.F".
!
!------------------------------------------------------------------------------
! Grid dimension parameters.
!------------------------------------------------------------------------------+!
! These parameters are very important since it determine the grid of the
! application to solve. They need to be read first in order to dynamically
! allocate all model variables.
!
! WARNING: It is trivial and posible to change these dimension parameters in
! -------  idealized applications via analytical expressions. However, in
! realistic applications any change to these parameters requires redoing all
! input NetCDF files.
!
!  Lm          Number of INTERIOR grid RHO-points in the XI-direction for
!                each nested grid, [1:Ngrids]. If using NetCDF files as
!                input, Lm=xi_rho-2 where "xi_rho" is the NetCDF file
!                dimension of RHO-points. Recall that all RHO-point
!                variables have a computational I-range of [0:Lm+1].
!
!  Mm          Number of INTERIOR grid RHO-points in the ETA-direction for
!                each nested grid, [1:Ngrids]. If using NetCDF files as
!                input, Mm=eta_rho-2 where "eta_rho" is the NetCDF file
!                dimension of RHO-points. Recall that all RHO-point
!                variables have a computational J-range of [0:Mm+1].
!
!  N           Number of vertical terrain-following levels at RHO-points,
!                [1:Ngrids].
!
!  Nbed        Number of sediment bed layers, [1:Ngrids]. This parameter
!                is only relevant if CPP option SEDIMENT is activated.
!
!                Mm+1  ___________________                _______  Kw = N
!                     |                   |              |       |
!                  Mm |   _____________   |              |       | Kr = N
!                     |  |             |  |              |_______|
!                     |  |             |  |              |       |
!                  Jr |  |             |  |              |       |
!                     |  |             |  |              |_______|
!                     |  |             |  |              |       |
!                   1 |  |_____________|  |              |       |
!                     |                   |              |_______|
!                   0 |___________________|              |       |
!                              Ir                        |       | 1
!                     0  1            Lm  Lm+1    h(i,j) |_______|
!                                                        ::::::::: 0
!                                                        :::::::::
!                                                        ::::::::: Nbed-1
!                                                        ::::::::: Nbed
!
!  NAT         Number of active tracer type variables. Usually, NAT=2 for
!                potential temperature and salinity.
!
!  NPT         Number of inert (dyes, age, etc) passive tracer type variables
!                to advect and diffuse only. This parameter is only relevant
!                if CPP option T_PASSIVE is activated.
!
!  NCS         Number of cohesive (mud) sediment tracer type variables. This
!                parameter is only relevant if CPP option SEDIMENT is
!                activated.
!
!  NNS         Number of non-cohesive (sand) sediment tracer type variables.
!                This parameter is only relevant if CPP option SEDIMENT is
!                activated.
!
!              The total of sediment tracers is NST=NCS+NNS. Notice that
!              NST must be greater than zero (NST>0).
!
!------------------------------------------------------------------------------
! Domain tile partition parameters.
!------------------------------------------------------------------------------
!
! Model tile decomposition parameters for serial and parallel configurations
! which are used to determine tile horizontal range indices (Istr,Iend) and
! (Jstr,Jend). In some computers, it is advantageous to have tile partitions
! in serial applications.
!
!  NtileI      Number of domain partitions in the I-direction (XI-coordinate).
!              It must be equal or greater than one.
!
!  NtileJ      Number of domain partitions in the J-direction (ETA-coordinate).
!              It must be equal or greater than one.
!
!  WARNING:    In shared-memory (OpenMP), the product of NtileI and NtileJ must
!              be a MULTIPLE of the number of parallel threads specified with
!              the OpenMP environmental variable OMP_NUM_THREADS.
!
!              In distributed-memory (MPI), the product of NtileI and NtileJ
!              must be EQUAL to the number of parallel nodes specified during
!              execution with the "mprun" or "mpirun" command.
!
!------------------------------------------------------------------------------
! Time-Stepping parameters.
!------------------------------------------------------------------------------
!
!  NTIMES      Total number time-steps in current run.  If 3D configuration,
!              NTIMES is the total of baroclinic time-steps.  If only 2D
!              configuration, NTIMES is the total of barotropic time-steps.
!
!  DT          Time-Step size in seconds.  If 3D configuration, DT is the
!              size of baroclinic time-step.  If only 2D configuration, DT
!              is the size of the barotropic time-step.
!
!  NDTFAST     Number of barotropic time-steps between each baroclinic time
!              step. If only 2D configuration, NDTFAST should be unity since
!              there is not need to splitting time-stepping.
!
!------------------------------------------------------------------------------
! Model iteration loops parameters.
!------------------------------------------------------------------------------
!
!  ERstr       Starting ensemble run (perturbation or iteration) number.
!
!  ERend       Ending   ensemble run (perturbation or iteration) number.
!
!  Nouter      Maximum number of 4DVAR outer loop iterations.
!
!  Ninner      Maximum number of 4DVAR inner loop iterations.
!
!  Nintervals  Number of time interval divisions for stochastic optimals
!              computations. It must be a multiple of NTIMES. The tangent
!              linear model (TLM) and the adjoint model (ADM) are integrated
!              forward and backward in different intervals.  For example,
!              if Nintervals=3,
!
!              1               NTIMES/3         2*NTIMES/3           NTIMES
!              +..................+..................+..................+
!              <========================================================> (1)
!                                 <=====================================> (2)
!                                                    <==================> (3)
!
!              In the first iteration (1), the TLM is integrated forward from
!              1 to NTIMES and the ADM is integrated backward from NTIMES to 1.
!              In the second iteration (2), the TLM is integrated forward from
!              NTIMES/3 to NTIMES and the ADM is integrated backward from
!              NTIMES to NTIMES/3. And so on.
!
!------------------------------------------------------------------------------
!  Eigenproblem parameters.
!------------------------------------------------------------------------------
!
!  NEV         Number of eigenvalues to compute for the Lanczos/Arnoldi
!              problem.  Notice that the model memory requirement increases
!              substantially as NEV increases.  The GST requires NEV+1
!              copies of the model state vector.  The memory requirements
!              are decreased in distributed-memory applications.
!
!  NCV         Number of eigenvectors to compute for the Lanczos/Arnoldi
!              problem. NCV must be greater than NEV.
!
!  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 greater than or
!  equal to 2*NEV. In Finite Time Eigenmodes (FTE) and Adjoint Finite Time
!  Eigenmodes (AFTE) the requirement is to have NCV greater than or equal to
!  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.
!
!------------------------------------------------------------------------------
! Input/Output parameters.
!------------------------------------------------------------------------------
!
!  NRREC       Switch to indicate re-start from a previous solution.  Use
!              NRREC=0 for new solutions. In a re-start solution, NRREC
!              is the time index of the re-start NetCDF file assigned for
!              initialization.  If NRREC is negative (said NRREC=-1), the
!              model will re-start from the most recent time record. That
!              is, the initialization record is assigned internally.
!              Notice that it is also possible to re-start from a history
!              or time-averaged NetCDF files.  If a history file is used
!              for re-start, it must contains all the necessary primitive
!              variables at all levels.
!
!  LcycleRST   Logical switch (T/F) used to recycle time records in output
!              re-start file.  If TRUE,  only the latest two re-start time
!              records are maintained.  If FALSE, all re-start fields are
!              saved every NRST time-steps without recycling.  The re-start
!              fields are written at all levels in double precision.
!
!  NRST        Number of time-steps between writing of re-start fields.
!
!  NSTA        Number of time-steps between writing data into stations file.
!              Station data is written at all levels.
!
!  NFLT        Number of time-steps between writing data into floats file.
!
!  NINFO       Number of time-steps between print of single line information
!              to standard output.  If also determines the interval between
!              computation of global energy diagnostics.
!
!------------------------------------------------------------------------------
!  Output history and average files parameters.
!------------------------------------------------------------------------------
!
!  LDEFOUT     Logical switch (T/F) used to create new output files when
!              initializing from a re-start file, abs(NRREC) > 0.  If TRUE
!              and applicable, a new history, average, diagnostic and
!              station files are created during the initialization stage.
!              If FALSE and applicable, data is appended to an existing
!              history, average, diagnostic and station files.  See also
!              parameters NDEFHIS, NDEFAVG and NDEFDIA below.
!
!  NHIS        Number of time-steps between writing fields into history file.
!
!  NDEFHIS     Number of time-steps between the creation of new history file.
!              If NDEFHIS=0, the model will only process one history file.
!              This feature is useful for long simulations when history files
!              get too large; it creates a new file every NDEFHIS time-steps.
!
!  NTSAVG      Starting time-step for the accumulation of output time-averaged
!              data.
!
!  NAVG        Number of time-steps between writing time-averaged data
!              into averages file.  Averaged date is written for all fields.
!
!  NDEFAVG     Number of time-steps between the creation of new average
!              file.  If NDEFAVG=0, the model will only process one average
!              file.  This feature is useful for long simulations when
!              average files get too large; it creates a new file every
!              NDEFAVG time-steps.
!
!  NTSDIA      Starting time-step for the accumulation of output time-averaged
!              diagnostics data.
!
!  NDIA        Number of time-steps between writing time-averaged diagnostics
!              data into diagnostics file.  Averaged date is written for all
!              fields.
!
!  NDEFDIA     Number of time-steps between the creation of new time-averaged
!              diagnostics file.  If NDEFDIA=0, the model will only process one
!              diagnostics file.  This feature is useful for long simulations
!              when diagnostics files get too large; it creates a new file
!              every NDEFDIA time-steps.
!
!------------------------------------------------------------------------------
!  Output tangent linear and adjoint model parameters.
!------------------------------------------------------------------------------
!
!  LcycleTLM   Logical switch (T/F) used to recycle time records in output
!              tangent linear file.  If TRUE, only the latest two time
!              records are maintained.  If FALSE, all tangent linear fields
!              are saved every NTLM time-steps without recycling.
!
!  NTLM        Number of time-steps between writing fields into tangent linear
!              model file.
!
!  NDEFTLM     Number of time-steps between the creation of new tangent linear
!              file. If NDEFTLM=0, the model will only process one tangent
!              linear file. This feature is useful for long simulations when
!              output NetCDF files get too large; it creates a new file every
!              NDEFTLM time-steps.
!
!  LcycleADJ   Logical switch (T/F) used to recycle time records in output
!              adjoint file.  If TRUE, only the latest two time records are
!              maintained.  If FALSE, all tangent linear fields re saved
!              every NADJ time-steps without recycling.
!
!  NADJ        Number of time-steps between writing fields into adjoint model
!              file.
!
!  NDEFADJ     Number of time-steps between the creation of new adjoint file.
!              If NDEFADJ=0, the model will only process one adjoint file.
!              This feature is useful for long simulations when output NetCDF
!              files get too large; it creates a new file every NDEFADJ
!              time-steps.
!
!------------------------------------------------------------------------------
!  Generalized Stability Theory (GST) analysis parameters.
!------------------------------------------------------------------------------
!
!  LrstGST     Logical switch (TRUE/FALSE) to restart GST analysis. If TRUE,
!              the check pointing data is read in from the GST restart NetCDF
!              file.  If FALSE and applicable, the check pointing GST data is
!              saved and overwritten every NGST iterations of the algorithm.
!
!  MaxIterGST  Maximum number of GST algorithm iterations.
!
!  NGST        Number of GST iterations between storing of check pointing
!              data into NetCDF file. The restart data is always saved if
!              MaxIterGST is reached without convergence. It is also saved
!              when convergence is achieved. It is always a good idea to
!              save the check pointing data at regular intervals so there
!              is a mechanism to recover from an unexpected interruption
!              in this very expensive computation. The check pointing data
!              can be used also to recompute the Ritz vectors by changing
!              some of the parameters, like convergence criteria (Ritz_tol)
!              and number of Arnoldi iterations (iparam(3)).
!
!  Ritz_tol    Relative accuracy of the Ritz values computed in the GST
!              analysis.
!
!------------------------------------------------------------------------------
! Harmonic/Biharmonic horizontal diffusion for active tracers.
!------------------------------------------------------------------------------
!
!  TNU2        Lateral, harmonic, constant, mixing coefficient (m2/s) for
!              active (NAT) and inert (NPT) tracer variables.  If variable
!              horizontal diffusion is activated, TNU2 is the mixing
!              coefficient for the largest grid-cell in the domain.
!
!  TNU4        Lateral, biharmonic, constant, mixing coefficient (m4/s) for
!              active (NAT) and inert (NPT) tracer variables.  If variable
!              horizontal diffusion is activated, TNU4 is the mixing
!              coefficient for the largest grid-cell in the domain.
!
!------------------------------------------------------------------------------
! Harmonic/biharmonic horizontal viscosity coefficients.
!------------------------------------------------------------------------------
!
!  VISC2       Lateral, harmonic, constant, mixing coefficient (m2/s) for
!              momentum.  If variable horizontal viscosity is activated, UVNU2
!              is the mixing coefficient for the largest grid-cell in the
!              domain.
!
!  VISC4       Lateral, biharmonic, constant mixing coefficient (m4/s) for
!              momentum. If variable horizontal viscosity is activated, UVNU4
!              is the mixing coefficient for the largest grid-cell in the
!              domain.
!
!------------------------------------------------------------------------------
! Vertical mixing coefficients for active tracers.
!------------------------------------------------------------------------------
!
!  AKT_BAK     Background vertical mixing coefficient (m2/s) for active
!              (NAT) and inert (NPT) tracer variables.
!
!------------------------------------------------------------------------------
! Vertical mixing coefficient for momentum.
!------------------------------------------------------------------------------
!
!  AKV_BAK     Background vertical mixing coefficient (m2/s) for momentum.
!
!------------------------------------------------------------------------------
! Turbulent closure parameters.
!------------------------------------------------------------------------------
!
!  AKK_BAK     Background vertical mixing coefficient (m2/s) for turbulent
!              kinetic energy.
!
!  AKP_BAK     Background vertical mixing coefficient (m2/s) for turbulent
!              generic statistical field, "psi".
!
!  TKENU2      Lateral, harmonic, constant, mixing coefficient (m2/s) for
!              turbulent closure variables.
!
!  TKENU4      Lateral, biharmonic, constant mixing coefficient (m4/s) for
!              turbulent closure variables.
!
!------------------------------------------------------------------------------
! Generic length-scale turbulence closure parameters.
!------------------------------------------------------------------------------
!
!  GLS_P       Stability exponent (non-dimensional).
!
!  GLS_M       Turbulent kinetic energy exponent (non-dimensional).
!
!  GLS_N       Turbulent length scale exponent (non-dimensional).
!
!  GLS_Kmin    Minimum value of specific turbulent kinetic energy
!
!  GLS_Pmin    Minimum Value of dissipation.
!
! Closure independent constraint parameters (non-dimensional):
!
!  GLS_CMU0    Stability coefficient.
!
!  GLS_C1      Shear production coefficient.
!
!  GLS_C2      Dissipation coefficient.
!
!  GLS_C3M     Buoyancy production coefficient (minus).
!
!  GLS_C3P     Buoyancy production coefficient (plus).
!
!  GLS_SIGK    Constant Schmidt number (non-dimensional) for turbulent
!              kinetic energy diffusivity.
!
!  GLS_SIGP    Constant Schmidt number (non-dimensional) for turbulent
!              generic statistical field, "psi".
!
! Suggested values for various parameterizations:
!
!              MY2.5         K-epsilon    K-omega      K-omega      K-tao
!
!      GLS_P = 0.d0          3.0d0       -1.0d0       -1.0d0       -3.0d0
!      GLS_M = 1.d0          1.5d0        0.5d0        0.5d0        0.5d0
!      GLS_N = 1.d0         -1.0d0       -1.0d0       -1.0d0        1.0d0
!   GLS_Kmin = 5.0d-6        7.6d-6       7.6d-6       7.6d-6       7.6d-6
!   GLS_Pmin = 5.0d-6        1.0d-12      1.0d-12      1.0d-12      1.0d-12
!
!   GLS_CMU0 = 0.5544d0      0.5477d0     0.5477d0     0.5477d0     0.5477d0
!     GLS_C1 = 0.9d0         1.44d0       0.555d0      0.52d0       0.173d0
!     GLS_C2 = 0.5d0         1.92d0       0.833d0      0.8d0        0.225d0
!    GLS_C3M = 0.9d0        -0.4d0       -0.6d0       -0.6d0        0.0d0
!    GLS_C3P = 0.9d0         1.0d0        1.0d0        1.0d0        0.0d0
!   GLS_SIGK = 1.96d0        1.0d0        2.0d0        2.0d0        1.46d0
!   GLS_SIGP = 1.96d0        1.30d0       2.0d0        2.0d0       10.8d0
!
!------------------------------------------------------------------------------
! Constants used in the computation of momentum stress.
!------------------------------------------------------------------------------
!
!  RDRG        Linear bottom drag coefficient (m/s).
!
!  RDRG2       Quadratic bottom drag coefficient.
!
!  Zob         Bottom roughness (m).
!
!  Zos         Surface roughness (m).
!
!------------------------------------------------------------------------------
! Jerlow Water type.
!------------------------------------------------------------------------------
!
!  WTYPE       Jerlov water type: an integer value from 1 to 5.
!
!------------------------------------------------------------------------------
! Body-force parameters. Used when CPP option BODYFORCE is activated.
!------------------------------------------------------------------------------
!
!  LEVSFRC     Deepest level to apply surface momentum stress as a body-force.
!
!  LEVBFRC     Shallowest level to apply bottom momentum stress as a body-force.
!
!------------------------------------------------------------------------------
! Vertical S-coordinates parameters.
!------------------------------------------------------------------------------
!
!  THETA_S     S-coordinate surface control parameter, [0 < theta_s < 20].
!
!  THETA_B     S-coordinate bottom  control parameter, [0 < theta_b < 1].
!
!  TCLINE      Width (m) of surface or bottom boundary layer in which
!              higher vertical resolution is required during stretching.
!
!              WARNING:  Users need to experiment with these parameters. We
!                        have found out that the model goes unstable with
!                        high values of THETA_S.  In steep and very tall
!                        topography, it is recommended to use THETA_S < 3.0.
!
!------------------------------------------------------------------------------
! Mean Density and background Brunt-Vaisala frequency.
!------------------------------------------------------------------------------
!
!  RHO0        Mean density (Kg/m3) used when the Boussinesq approximation
!              is inferred.
!
!  BVF_BAK     Background Brunt-Vaisala frequency squared (1/s2). Typical
!              values for the ocean range (as a function of depth) from
!              1.0E-4 to 1.0E-6.
!
!------------------------------------------------------------------------------
! Time Stamps.
!------------------------------------------------------------------------------
!
!  DSTART      Time stamp assigned to model initialization (days).  Usually
!              a Calendar linear coordinate, like modified Julian Day.  For
!              Example:
!
!                       Julian Day = 1  for  Nov 25, 0:0:0 4713 BCE
!              modified Julian Day = 1  for  May 24, 0:0:0 1968  CE GMT
!
!              It is called truncated or modified Julian day because an offset
!              of 2440000 needs to be added.
!
!  TIDE_START  Reference time origin for tidal forcing (days). This is the
!              time used when processing input tidal model data. It is needed
!              in routine "set_tides" to compute the correct phase lag with
!              respect ROMS/TOMS initialization time.
!
!  TIME_REF    Reference time (yyyymmdd.f) used to compute relative time:
!              elapsed time interval since reference-time.  The "units"
!              attribute takes the form "time-unit since reference-time".
!              This parameter also provides information about the calendar
!              used:
!
!              If TIME_REF = -2, model time and DSTART are in modified Julian
!              days units.  The "units" attribute is:
!
!                      'time-units since 1968-05-23 00:00:00 GMT'
!
!              If TIME_REF = -1, model time and DSTART are in a calendar
!              with 360 days in every year (30 days each month).  The "units"
!              attribute is:
!
!                      'time-units since 0000-01-01 00:00:00'
!
!              If TIME_REF = 0, model time and DSTART are in a common year
!              calendar with 365.25 days.  The "units" attribute is:
!
!                      'time-units since 0000-01-01 00:00:00'
!
!              If TIME_REF > 0, model time and DSTART are the elapsed time
!              units since specified reference time.  For example,
!              TIME_REF=20020115.5 will yield the following attribute:
!
!                      'time-units since 2002-01-15 12:00:00'
!
!------------------------------------------------------------------------------
! Nudging/relaxation time scales, inverse scales will be computed internally.
!------------------------------------------------------------------------------
!
! When passive/active open boundary conditions are activated, these nudging
! values correspond to the passive (outflow) nudging time scales.
!
!  TNUDG       Nudging time scale (days) for active tracer variables.
!              (1:NAT+NPT,1:Ngrids) values are expected.
!
!  ZNUDG       Nudging time scale (days) for free-surface.
!
!  M2NUDG      Nudging time scale (days) for 2D momentum.
!
!  M3NUDG      Nudging time scale (days) for 3D momentum.
!
!  OBCFAC      Factor between passive (outflow) and active (inflow) open
!              boundary conditions.  The nudging time scales for the
!              active (inflow) conditions are obtained by multiplying
!              the passive values by OBCFAC. If OBCFAC > 1, nudging on
!              inflow is stronger than on outflow (recommended).
!
!------------------------------------------------------------------------------
! Linear equation of State parameters.
!------------------------------------------------------------------------------
!
! Ignoring pressure, the linear equation of state is:
!
!              rho(:,:,:) = R0 - R0 * TCOEF * (t(:,:,:,:,itemp) - T0)
!                              + R0 * SCOEF * (t(:,:,:,:,isalt) - S0)
!
!              Typical values:     R0 = 1027.0  kg/m3               
!                                  T0 = 10.0    Celsius
!                                  S0 = 35.0    PSU
!                               TCOEF = 1.7d-4  1/Celsius
!                               SCOEF = 7.6d-4  1/PSU
!
!  R0          Background density value (Kg/m3) used in Linear Equation of
!              State.
!
!  T0          Background potential temperature (Celsius) constant.
!
!  S0          Background salinity (PSU) constant.
!
!  TCOEF       Thermal expansion coefficient in Linear Equation of State.
!
!  SCOEF       Saline contraction coefficient in Linear Equation of State.
!
!------------------------------------------------------------------------------
! Slipperiness parameter.
!------------------------------------------------------------------------------
!
!  GAMMA2      Slipperiness variable, either 1.0 (free slip) or -1.0 (no slip).
!
!------------------------------------------------------------------------------
!  Adjoint sensitivity parameters.
!------------------------------------------------------------------------------
!
!  DstrS       Starting day for adjoint sensitivity forcing.
!
!  DendS       Ending   day for adjoint sensitivity forcing.
!
!              The adjoint forcing is applied at every time step according to
!              desired state functional stored in the adjoint sensitivity
!              NetCDF file. 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.
!
!  KstrS       Starting vertical level of the 3D adjoint state variables whose
!                sensitivity is required.
!  KendS       Ending   vertical level of the 3D adjoint state variables whose
!                sensitivity is required.
!
!  Lstate      Logical switches (TRUE/FALSE) to specify the adjoint state
!                variables whose sensitivity is required.
!
!                Lstate(isFsur):   Free-surface
!                Lstate(isUbar):   2D U-momentum
!                Lstate(isVbar):   2D V-momentum
!                Lstate(isUvel):   3D U-momentum
!                Lstate(isVvel):   3D V-momentum
!                Lstate(isTvar):   Traces (NT values expected)
!
!------------------------------------------------------------------------------
!  Stochastic optimals parameters.
!------------------------------------------------------------------------------
!
!  SO_decay    Stochastic optimals time decorrelation scale (days) assumed
!                for red noise processes.
!
!  SOstate     Logical switches (TRUE/FALSE) to specify the state surface
!                forcing variable whose stochastic optimals is required.
!
!                SOstate(isustr):  surface u-stress
!                SOstate(isvstr):  surface v-stress
!                SOstate(isTsur):  surface tracer flux (NT values expected)
!
!  SO_sdev     Stochastic optimals surface forcing standard deviation for
!                dimensionalization.
!
!                SO_sdev(isustr):  surface u-stress
!                SO_sdev(isvstr):  surface v-stress
!                SO_sdev(isTsur):  surface tracer flux (NT values expected)
!
!------------------------------------------------------------------------------
! Logical switches (T/F) to activate writing of fields into HISTORY file.
!------------------------------------------------------------------------------
!
!  Hout(idUvel)  Write out 3D U-velocity component.
!  Hout(idVvel)  Write out 3D V-velocity component.
!  Hout(idWvel)  Write out 3D W-velocity component.
!  Hout(idOvel)  Write out 3D omega vertical velocity.
!  Hout(idUbar)  Write out 2D U-velocity component.
!  Hout(idVbar)  Write out 2D V-velocity component.
!  Hout(idFsur)  Write out free-surface.
!
!  Hout(idTvar)  Write out active (NAT) tracers: temperature and salinity.
!
!  Hout(idUsms)  Write out surface U-momentum stress.
!  Hout(idVsms)  Write out surface V-momentum stress.
!  Hout(idUbms)  Write out bottom  U-momentum stress.
!  Hout(idVbms)  Write out bottom  V-momentum stress.
!
!  Hout(idUbrs)  Write out current-induced, U-momentum stress.
!  Hout(idVbrs)  Write out current-induced, V-momentum stress.
!  Hout(idUbws)  Write out wind-induced, bottom U-wave stress.
!  Hout(idVbws)  Write out wind-induced, bottom V-wave stress.
!  Hout(idUbcs)  Write out bottom maximum wave and current U-stress.
!  Hout(idVbcs)  Write out bottom maximum wave and current V-stress.
!
!  Hout(idUbot)  Write out wind-induced, bed wave orbital U-velocity.
!  Hout(idVbot)  Write out wind-induced, bed wave orbital V-velocity.
!  Hout(idUbur)  Write out bottom U-velocity above bed.
!  Hout(idVbvr)  Write out bottom V-velocity above bed.
!
!  Hout(idTsur)  Write out surface net heat and salt flux
!  Hout(idLhea)  Write out latent heat flux.
!  Hout(idShea)  Write out sensible heat flux.
!  Hout(idLrad)  Write out long-wave radiation flux.
!  Hout(idSrad)  Write out short-wave radiation flux.
!  Hout(idevap)  Write out evaporation rate.
!  Hout(idrain)  Write out precipitation rate.
!
!  Hout(idDano)  Write out density anomaly.
!  Hout(idVvis)  Write out vertical viscosity coefficient.
!  Hout(idTdif)  Write out vertical diffusion coefficient of temperature.
!  Hout(idSdif)  Write out vertical diffusion coefficient of salinity.
!  Hout(idHsbl)  Write out depth of oceanic surface boundary layer.
!  Hout(idHbbl)  Write out depth of oceanic bottom boundary layer.
!  Hout(idMtke)  Write out turbulent kinetic energy.
!  Hout(idMtls)  Write out turbulent kinetic energy times length scale.
!
!  Hout(inert)   Write out extra inert passive tracers.
!
!  Hout(idBott)  Write out exposed sediment layer properties, 1:MBOTP.
!
!------------------------------------------------------------------------------
! Generic User parameters.
!------------------------------------------------------------------------------
!
!  NUSER       Number of User parameters to consider (integer).
!  USER        Vector containing user parameters (real array). This array
!                is used with the SANITY_CHECK to test the correctness of
!                the tangent linear adjoint models.  It contains information
!                of 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] Firt 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.
!
!------------------------------------------------------------------------------
! Input/output NetCDF file names (string with a maximum of eighty characters).
!------------------------------------------------------------------------------
!
!  GRDNAME     Input grid file name.
!  ININAME     Input nonlinear initial conditions file name. It can be a
!                re-start file.
!  IRPNAME     Input representer model initial conditions file name.
!  ITLNAME     Input tangent linear model initial conditions file name.
!  IADNAME     Input adjoint model initial conditions file name.
!  FRCNAME     Input forcing fields file name.
!  CLMNAME     Input climatology fields file name.
!  BRYNAME     Input open boundary data file name.
!  FWDNAME     Input forward solution fields file name.
!  ADSNAME     Input adjoint sensitivity functional file name.
!
!  GSTNAME     Output GST analysis re-start file name.
!  RSTNAME     Output re-start file name.
!  HISNAME     Output history file name.
!  TLFNAME     Output impulse forcing for tangent linear (TLM and RPM) models.
!  TLMNAME     Output tangent linear file name.
!  ADJNAME     Output adjoint file name.
!  AVGNAME     Output averages file name.
!  DIANAME     Output diagnostics file name.
!  STANAME     Output stations file name.
!  FLTNAME     Output floats file name.
!
!------------------------------------------------------------------------------
! Input ASCII parameters file names.
!------------------------------------------------------------------------------
!
!  APARNAM     Input assimilation parameters file name.
!  SPOSNAM     Input stations positions file name.
!  FPOSNAM     Input initial drifters positions file name.
!  BPARNAM     Input biological parameters file name.
!  SPARNAM     Input sediment transport parameters file name.
!  USRNAME     USER's input generic file name.
!






!
!  *************** COUPLING ************
!
!
! Logical switch to report verbose information about import/export field
! ranges.

        Lreport = T

! Number of models to couple.

        Nmodels = 2

! Coupled models order label used to process information arrays, [1:Nmodels]
! string values are expected. The order is arbitrary, the indices below are
! ordered from bottom to top grids.
!
!     OrderLabel = ocean \
!                  waves \
!                  atmos \
!                  cice

     OrderLabel = ocean \
                  cice

! Number of parallel threads assigned to each model in the coupled system,
! [1:Nmodels] KEYWORD entries are expected with the order label (OrderLabel)
! in parenthesis. The sum of all entries must be equal to the total number
! of processors.

Nthreads(ocean) = 384
Nthreads(cice) = 128

! Time interval (seconds) between coupling of models, [1:Nmodels] real
! values are expected corresponding to the entries of a lower triangular
! matrix Aij for i>j.  For example, for three model components ordered
! as ocean, waves, and atmos, the time interval is read as:
!
!      Aij     1      2     3
!      i\j   ocean  waves atmos
!  1  ocean    -      -     -          v(1): ocean-waves coupling interval
!  2  waves   v(1)    -     -          v(2): ocean-atmos coupling interval
!  3  atmos   v(2)   v(3)   -          v(3): waves-atmos coupling interval
!
!  TimeInterval = v(1) v(2) v(3)

!   TimeInterval = 60.0d0 10.0d0  10.0d0

TimeInterval = 360

! Coupled model standard input file name, [1:Nmodels] KEYWORD entries are
! expected with the label code in parenthesis.

 INPname(ocean) = /cluster/work/users/andriani/metroms_run/arctic-4km/roms.in
 INPname(cice)  = /cluster/work/users/andriani/metroms_run/arctic-4km/ice_in

! Coupled models variables information file name.
! This file gets copied to the bin dir by the build script

        CPLname = coupling.dat

! Export/Import fields: Use the following string codes to set the fields
!                       to export/import for each coupled model.
!
!   Field   Export    Import
!
!   NONE    -         -                 No field to import or export
!   Pair    atmos     ocean             surface air pressure
!   Tair    atmos     ocean             surface air temperature
!   Hair    atmos     ocean             surface air relative humidity
!   cloud   atmos     ocean             cloud fraction
!   SWrad   atmos     ocean             shortwave radiation flux
!   LWrad   atmos     ocean             longwave radiation flux
!   rain    atmos     ocean             rain fall rate
!   Uwind   atmos     ocean, waves      surface U-wind component
!   Vwind   atmos     ocean, waves      surface V-wind component
!   heat    atmos     ocean             surface net heat flux
!   Ustr    atmos     ocean             surface U-momentum stress
!   Vstr    atmos     ocean             surface V-momentum stress
!   SST     ocean     atmos             sea surface temperature
!   bath    ocean     waves             bathymetry
!   SSH     ocean     waves             free-surface
!   Ubar    ocean     waves             vertically integrated U-momentum
!   Vbar    ocean     waves             vertically integrated V-momentum
!   ZO      ocean     waves             bottom roughness
!   Wdir    waves     ocean             wave direction
!   Wamp    waves     ocean             significant wave height
!   Wlen    waves     ocean             average wave length
!   Wptop   waves     ocean             surface wave relative peak period
!   Wpbot   waves     ocean             bottom wave period
!   Wdiss   waves     ocean             wave energy dissipation
!   Wbrk    waves     ocean             percent wave breaking
!   Wubot   waves     ocean             wave bottom orbital velocity
!
! Export fields per model, [1:Nexport(...)] string values are expected per
! coupled model. The string inside parenthesis must be the same as the one
! given in "OrderLabel". If there is no field to export, set
!
!      Nexport(...) = 0
!       Export(...) = NONE

 Nexport(ocean) = 6
 Nexport(cice)  = 7

  Export(ocean) = SST  \
                  SSS  \
                  FRZMLT \
                  u  \
                  v  \
                  SSH

!  Export(ocean) = SST   \
!                  bath  \
!                  SSH   \
!                  Ubar  \
!                  Vbar

!  Export(waves) = Wdir  \
!                  Wamp  \
!                  Wlen  \
!                  Wptop \
!                  Wpbot
!
!  Export(atmos) = Pair  \
!                  Tair  \
!                  Hair  \
!                  cloud \
!                  SWrad \
!                  LWrad \
!                  rain  \
!                  Uwind \
!                 Vwind

  Export(cice) =  AICE  \
                  freshAI \
                  fsaltAI
                  fhocnAI \
                  fswthruAI \
                  strocnx \
                  strocny


! Import fields per model, [1:Nimport(...)] string values are expected per
! coupled model. If there is no field to import, set
!
!      Nimport(...) = 0
!       Import(...) = NONE

 Nimport(ocean) = 7
 Nimport(cice)  = 6

  Import(ocean) = AICE \
                  freshAI \
                  fsaltAI
                  fhocnAI \
                  fswthruAI \
                  strocnx \
                  strocny


!  Import(waves) = Uwind \
!                  Vwind \
!                  bath  \
!                  SSH   \
!                  Ubar  \
!                  Vbar
!
!  Import(atmos) = SST

  Import(cice) = SST  \
                 SSS  \
                 FRZMLT \
                 u    \
                 v    \
                 SSH
  

!
!  GLOSSARY:
!  =========
!
!------------------------------------------------------------------------------
! Coupled model parameters.
!------------------------------------------------------------------------------
!
! Lreport       Logical switch (T/F) to report verbose information about
!                 import/export field ranges.
!
! Nmodels       Number of models to couple.
!
! OrderLabel    Coupled models label code, [1:Nmodels] string values are
!                 expected. Enter one string per line and use the continuation
!                 backlash for each entry, except last. The order of the
!                 strings determines how information arrays are processed
!                 and DO loops executed. Currently, the following labels
!                 and associated indices are used:
!
!                    ocean =>  Iocean           Ocean model label
!                    waves =>  Iwaves           Wave model label
!                    atmos =>  Iatmos           Atmosphere model label
!
!                 These labels and indices are defined in "mod_coupler.F"
!                 and processed in "inp_par.F" (routine read_CouplePar).
!
!                 Use the same label code in  other KEYWORD entries set
!                 in this input file. It is highly recommended to use
!                 "ocean" first since all coupled models use ROMS framework
!                 to build the program driver.  This allows ROMS to own
!                 the master thread (node 0 in MPI).
!
! Nthreads(...) Number of parallel threads assigned to each model in the
!                 coupled system, [1:Nmodels] KEYWORD entries are expected
!                 with label code in parenthesis:
!
!                 Nthreads(ocean) = ?           Ocean model
!                 Nthreads(waves) = ?           Wave model
!                 Nthreads(atmos) = ?           Atmosphere model
!                 ...
!
!                 The sum of all entries must be equal to the total number
!                 of processors.
!
! TimeInterval  Time interval (seconds) between coupling of models,
!                 [1:Nmodels] real values are expected corresponding to
!                 the entries of a lower triangular matrix Aij for i>j.
!                 For example, for three model components ordered
!                 as ocean, waves, and atmos, the time interval is
!                 assigned as follows:
!
!                     Aij     1      2     3
!                     i\j   ocean  waves atmos  ...
!                 1  ocean    -      -     -
!                 2  waves   v(1)    -     -
!                 3  atmos   v(2)   v(3)   -
!                     ...
!
!                 where:
!
!                   v(1): ocean-waves coupling interval
!                   v(2): ocean-atmos coupling interval
!                   v(3): waves-atmos coupling interval
!                   ...
!
!                 This matrix is read in "inp_par.F" using the following
!                 statements:
!
!                 ic=0
!                 DO j=1,Nmodels
!                   DO i=1,Nmodels
!                     IF (i.gt.j) THEN
!                       ic=ic+1
!                       TimeInterval(i,j)=v(ic)
!                       TimeInterval(j,i)=v(ic)
!                     END IF
!                   END DO
!                 END DO
!
!------------------------------------------------------------------------------
! Coupled models standard input file names.
!------------------------------------------------------------------------------
!
! INPname(...)  Coupled model standard input file names, [1:Nmodels] KEYWORD
!                 entries are expected with the label code in parenthesis:
!
!                 INPname(ocean) = ?            Ocean model
!                 INPname(waves) = ?            Wave model
!                 INPname(atmos) = ?            Atmosphere model
!
! CPL_name      Coupled models variables information file name.
!
!------------------------------------------------------------------------------
! Export/Import fields to process.
!------------------------------------------------------------------------------
!
! Export/Import fields names (abbreviated string codes). Currently, the
! following fields below are processed. However, the list can be expanded
! easly.
!
!               NONE      No import or export field
!               Pair      surface air pressure
!               Tair      surface air temperature
!               Hair      surface air relative humidity
!               cloud     cloud fraction
!               SWrad     shortwave radiation flux
!               LWrad     longwave radiation flux
!               rain      rain fall rate
!               Uwind     surface U-wind component
!               Vwind     surface V-wind component
!               heat      surface net heat flux
!               Ustr      surface U-momentum stress
!               Vstr      surface V-momentum stress
!               SST       sea surface temperature
!               bath      bathymetry
!               SSH       free-surface
!               Ubar      vertically integrated U-momentum
!               Vbar      vertically integrated V-momentum
!               ZO        bottom roughness
!               Wdir      wave direction
!               Wamp      significant wave height
!               Wlen      average wave length
!               Wptop     surface wave relative peak period
!               Wpbot     bottom wave period
!               Wdiss     wave energy dissipation
!               Wbrk      percent wave breaking
!               Wubot     wave bottom orbital velocity
!
!  Nexport(...) Number of export fields per model, [1:Nmodels] KEYWORD
!                 entries are expected with the label code in parenthesis.
!                 Set to zero if no fields to export by a particular model.
!
!                 Nexport(ocean) = ?            Ocean model
!                 Nexport(waves) = ?            Wave model
!                 Nexport(atmos) = ?            Atmosphere model
!
!  Export(...)  Export fields codes per model, Nexport(...) string codes
!                 are expected. If Nexport(...) = 0, set Export = NONE.
!
!  Nimport(...) Number of import fields per model, [1:Nmodels] KEYWORD
!                 entries are expected with the label code in parenthesis.
!                 Set to zero if no fields to import by a particular model.
!
!                 Nimport(ocean) = ?            Ocean model
!                 Nimport(waves) = ?            Wave model
!                 Nimport(atmos) = ?            Atmosphere model
!
!  Import(...)  Import fields codes per model, Nimport(...) string codes
!                 are expected. If Nimport(...) = 0, set Import = NONE.
!





