# namelist.nemo-ORCA1L46.cfg.sh writes the NEMO namelist for ORCA1L46 in
# coupled mode to standard output. This namelist will overwrite the reference
# namelist (namelist.nemo.ref.sh). Hence, only parameters specific to the
# ORCA1L46/coupled configuration should be specified here.

cat << EOF
!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

!!======================================================================
!!                   ***  Run management namelists  ***
!!======================================================================
!!   namrun       parameters of the run
!!======================================================================
!
!-----------------------------------------------------------------------
&namrun        !   parameters of the run
!-----------------------------------------------------------------------
   nn_leapy      =  0             !  Leap year calendar (1) or not (0)
/
!
!!======================================================================
!!                      ***  Domain namelists  ***
!!======================================================================
!!   namcfg       parameters of the configuration
!!   namzgr       vertical coordinate
!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
!!   namdom       space and time domain (bathymetry, mesh, timestep)
!!   namtsd       data: temperature & salinity
!!======================================================================
!
!-----------------------------------------------------------------------
&namcfg        !   parameters of the configuration
!-----------------------------------------------------------------------
   cp_cfg      =  "orca"               !  name of the configuration
   jp_cfg      =     025               !  resolution of the configuration
   jpidta      =    1442               !  1st lateral dimension ( >= jpi )
   jpjdta      =    1050               !  2nd    "         "    ( >= jpj )
   jpkdta      =      75               !  number of levels      ( >= jpk )
   jpiglo      =    1442               !  1st dimension of global domain --> i =jpidta
   jpjglo      =    1050               !  2nd    -                  -    --> j  =jpjdta
   jperio      =       4               !  lateral cond. type (between 0 and 6)
                                       !  = 0 closed                 ;   = 1 cyclic East-West
                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot
                                       !  = 4 cyclic East-West AND North fold T-point pivot
                                       !  = 5 North fold F-point pivot
                                       !  = 6 cyclic East-West AND North fold F-point pivot
/
!-----------------------------------------------------------------------
&namzgr        !   vertical coordinate
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namdom        !   space and time domain (bathymetry, mesh, timestep)
!-----------------------------------------------------------------------
   rn_hmin     =   10.     !  min depth of the ocean (>0) or min number of ocean level (<0)
   rn_e3zps_min=   25.     !  partial step thickness is set larger than the minimum of
   rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
                           !
   rn_rdt      = ${nem_time_step_sec} !  time step for the dynamics (and tracer if nn_acc=0)
   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
   ppsur       =   -3958.951371276829  !  ORCA r4, r2 and r05 coefficients
   ppa0        =     103.9530096000000 ! (default coefficients)
   ppa1        =       2.415951269000000   !
   ppkth       =      15.35101370000000    !
   ppacr       =       7.0             !
   ppdzmin     =  999999.0             !  Minimum vertical spacing
   pphmax      =  999999.0             !  Maximum depth
   ldbletanh   =    .TRUE.             !  Use/do not use double tanf function for vertical coordinates
   ppa2        =      100.760928500000 !  Double tanh function parameters
   ppkth2      =       48.029893720000 !
   ppacr2      =       13.000000000000 !
/
!-----------------------------------------------------------------------
&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
!-----------------------------------------------------------------------
   ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
   ln_bt_av      =    .TRUE.           !  Time filtering of barotropic variables
   ln_bt_nn_auto =    .TRUE.           !  Set nn_baro automatically to be just below
                                       !  a user defined maximum courant number (rn_bt_cmax)
   nn_baro       =    80               !  Number of iterations of barotropic mode
                                       !  during rn_rdt seconds. Only used if ln_bt_nn_auto=F
   rn_bt_cmax    =    0.8              !  Maximum courant number allowed if ln_bt_nn_auto=T
   nn_bt_flt     =    1                !  Time filter choice
                                       !  = 0 None
                                       !  = 1 Boxcar over   nn_baro barotropic steps
                                       !  = 2 Boxcar over 2*nn_baro     "        "
/
!-----------------------------------------------------------------------
&namcrs        !   Grid coarsening for dynamics output and/or
               !   passive tracer coarsened online simulations
!-----------------------------------------------------------------------
   nn_factx    = 3         !  Reduction factor of x-direction
   nn_facty    = 3         !  Reduction factor of y-direction
   nn_binref   = 0         !  Bin centering preference: NORTH or EQUAT
                           !  0, coarse grid is binned with preferential treatment of the north fold
                           !  1, coarse grid is binned with centering at the equator
                           !    Symmetry with nn_facty being odd-numbered. Asymmetry with even-numbered nn_facty.
   nn_msh_crs  = 0         !  create (=1) a mesh file or not (=0)
   nn_crs_kz   = 0         ! 0, MEAN of volume boxes
                           ! 1, MAX of boxes
                           ! 2, MIN of boxes
   ln_crs_wn   = .true.    ! wn coarsened (T) or computed using horizontal divergence ( F )
/
!-----------------------------------------------------------------------
&namtsd    !   data : Temperature  & Salinity
!-----------------------------------------------------------------------
!          !  file name    ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
!          !               ! (if <0  months)   !  name     ! (logical)    !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
   sn_tem  = 'conservative_temperature_WOA13_decav_Reg1L75_clim', -1 ,'votemper' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca025_bilinear.nc' , '' , ''
   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim'       , -1 ,'vosaline' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca025_bilinear.nc' , '' , ''
   ln_tsd_tradmp = ${ln_tsd_tradmp}  !  damping of ocean T & S toward T &S input data (T) or not (F)
/
!-----------------------------------------------------------------------
&namsbc        !   Surface Boundary Condition (surface module)
!-----------------------------------------------------------------------
   nn_fsbc     = $(( lim_time_step_sec / nem_time_step_sec )) !  frequency of surface boundary condition computation
                           !     (also = the frequency of sea-ice model call)
   ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana )
   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx )
   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)
   ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core)
   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs )
   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
   nn_ice      = 2         !  =0 no ice boundary condition   ,
                           !  =1 use observed ice-cover      ,
                           !  =2 ice-model used                         ("key_lim3" or "key_lim2")
   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
                           !  =1 levitating ice with mass and salt exchange but no presure effect
                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
   ln_dm2dc    = ${ln_dm2dc}!  daily mean to diurnal cycle on short wave
   ln_rnf      = .true.    !  runoffs                                   (T   => fill namsbc_rnf)
   nn_isf      = 0         !  ice shelf melting/freezing                (/=0 => fill namsbc_isf)
                           !  0 =no isf                  1 = presence of ISF
                           !  2 = bg03 parametrisation   3 = rnf file for isf
                           !  4 = ISF fwf specified
                           !  option 1 and 4 need ln_isfcav = .true. (domzgr)
   ln_ssr      = ${ln_ssr}   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
   nn_fwb      = 2         !  FreshWater Budget: =0 unchecked
                           !     =1 global mean of e-p-r set to zero at each time step
                           !     =2 annual global mean of e-p-r set to zero
   ln_wave = .false.       !  Activate coupling with wave (either Stokes Drift or Drag coefficient, or both)  (T => fill namsbc_wave)
   ln_cdgw = .false.       !  Neutral drag coefficient read from wave model (T => fill namsbc_wave)
   ln_sdw  = .false.       !  Computation of 3D stokes drift                (T => fill namsbc_wave)
   nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,
                           !  =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field)
   nn_limflx = -1          !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)
                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled
                           !  = 0  Average per-category fluxes (forced and coupled mode)
                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled
                           !  = 2  Redistribute a single flux over categories (coupled mode only)
/
!-----------------------------------------------------------------------
&namsbc_ana    !   analytical surface boundary condition
!-----------------------------------------------------------------------
   nn_tau000   =   0       !  gently increase the stress over the first ntau_rst time-steps
   rn_utau0    =   0.5     !  uniform value for the i-stress
   rn_vtau0    =   0.e0    !  uniform value for the j-stress
   rn_qns0     =   0.e0    !  uniform value for the total heat flux
   rn_qsr0     =   0.e0    !  uniform value for the solar radiation
   rn_emp0     =   0.e0    !  uniform value for the freswater budget (E-P)
/
!-----------------------------------------------------------------------
&namsbc_flx    !   surface boundary condition : flux formulation
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_core   !   namsbc_core  CORE bulk formulae
!-----------------------------------------------------------------------
!              !  file name  ! frequency (hours) ! variable ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation !
!              !             !  (if <0  months)  !   name   !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  !
$( . ${ctrl_file_dir}/namelist.nemo.forcing_${nem_forcing_set}.sh )

/
!-----------------------------------------------------------------------
&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtra_qsr    !   penetrative solar radiation
!-----------------------------------------------------------------------
   nn_chldta   =      0    !  RGB : Chl data (=1) or cst value (=0)
/
!-----------------------------------------------------------------------
&namsbc_rnf    !   runoffs namelist surface boundary condition
!-----------------------------------------------------------------------
!         !  file name         ! frequency (hours) ! variable   ! time interp. ! clim  ! 'yearly'/ ! weights  ! rotation !
!         !                    !  (if <0  months)  !   name     !   (logical)  ! (T/F) ! 'monthly' ! filename ! pairing  !
   sn_rnf = 'ORCA_R025_runoff_v1.1.nc', -1        , 'sornficb' , .true.       , .true., 'yearly'  ,    ''    ,    ''    , ''
   sn_cnf = 'ORCA_R025_runoff_v1.1.nc',  0        , 'socoefr'  , .false.      , .true., 'yearly'  ,    ''    ,    ''    , ''
   sn_dep_rnf = 'runoff_depth' ,     0             , 'rodepth'  ,    .false.   , .true.,  'yearly' ,     ''   , ''       , ''
                !
   cn_dir       = './'       !  root directory for the location of the runoff files
   ln_rnf_mouth = .false.    !  specific treatment at rivers mouths
   rn_hrnf      =  10.       !  depth over which enhanced vertical mixing is used
   rn_avt_rnf   =   2.e-3    !  value of the additional vertical mixing coef. [m2/s]
   rn_rfact     =   1.e0     !  multiplicative factor for runoff
   ln_rnf_depth = .true.     !  read in depth information for runoff 
   ln_rnf_tem   = .false.    !  read in temperature information for runoff
   ln_rnf_sal   = .false.    !  read in salinity information for runoff
   ln_rnf_depth_ini = .false.!  compute depth at initialisation from runoff file
   rn_rnf_max   = 0.0065     !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
   rn_dep_max   = 150.       !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
   nn_rnf_depth_file = 0     !  create (=1) a runoff depth file or not (=0)
/
!-----------------------------------------------------------------------
&namsbc_ssr    !   surface boundary condition : sea surface restoring
!-----------------------------------------------------------------------
!
! 07/2018 - Yohan Ruprich-Robert chages: add mask_ssr reading option and take into account last shaconemo update (06/2018)
!
   !             ! filename          ! freq  ! variable name  ! time     ! clim     ! year or   ! weights   ! rot     ! mask
   !             !                   !       !                ! interp   !          ! monthly   ! filename  ! pair    ! filename
   !----------------------------------------------------------------------------------------------------------------------------------------
   sn_sss      = 'sss_restore_data'  , -1.   , 'so'           , .true.   , .true.  , 'yearly'   , ''        , ''      , ''
   sn_sst      = 'sst_restore_data'  , -1.   , 'thetao'       , .true.   , .true.  , 'yearly'   , ''        , ''      , ''
   sn_msk      = 'mask_restore'      , -12.  , 'mask_ssr'     , .false.  , .true.  , 'yearly'   , ''        , ''      , ''
   !
   cn_dir      = './'    !  root directory for the location of the runoff files  
   nn_sstr     = 1       !  add a retroaction term in the surface heat flux (=1) or not (=0)
   nn_sssr     = 2       !  add a damping term in the surface freshwater flux (=2) or to SSS only (=1) or no damping term (=0)
   nn_icedmp   = 0       !  Cntrl of surface restoration under ice nn_icedmp 
                         !  ( 0   =  no restoration under ice )
                         !  ( 1   =  restoration everywhere  )
                         !  ( > 1 =  reinforced damping (x nn_icedmp) under ice
   nn_msk      = 0       !  add a sub-regional masking to the surface restoring (=1) or not (=0)
                         !  sn_msk can be empty if nn_msk = 0
   rn_dqdt     = -40.    !  magnitude of the retroaction on temperature   [W/m2/K]
   rn_deds     = -166.67 ! -864 magnitude of the damping on salinity   [kg/m2/s/psu]
   ln_sssr_bnd = .false. ! .true. !  flag to bound erp term (associated with nn_sssr=2)
   rn_sssr_bnd = 4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] (associated with nn_sssr=2)
   ln_sssd_bnd = .false. ! .true. !  flag to bound S-S* term (associated with nn_ssr=2)
   rn_sssd_bnd = 0.01    !  ABS(Max./Min.) value of S-S* term [psu] (associated with nn_ssr=2)
/
!-----------------------------------------------------------------------
&namsbc_alb    !   albedo parameters
!-----------------------------------------------------------------------
   rn_alb_smlt = 0.72    !  melting snow albedo; obs in (0.72-0.82) range
/
!-----------------------------------------------------------------------
&namberg       !   iceberg parameters
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namlbc        !   lateral momentum boundary condition
!-----------------------------------------------------------------------
   rn_shlat    =    0.0    !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
                           !  free slip  !   partial slip  !   no slip   ! strong slip
   ln_vorlat   = .false.   !  consistency of vorticity boundary condition with analytical eqs.
/
!-----------------------------------------------------------------------
&namcla        !   cross land advection
!-----------------------------------------------------------------------
   nn_cla      =    0      !  advection between 2 ocean pts separates by land
/
!-----------------------------------------------------------------------
&namobc        !   open boundaries parameters                           ("key_obc")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namagrif      !  AGRIF zoom                                            ("key_agrif")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_tide      !   tide parameters (#ifdef key_tide)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambdy        !  unstructured open boundaries                          ("key_bdy")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambdy_dta      !  open boundaries - external data           ("key_bdy")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambdy_tide     ! tidal forcing at open boundaries
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambfr        !   bottom friction
!-----------------------------------------------------------------------
   nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
                           !                              = 2 : nonlinear friction
   rn_bfri1    =    4.e-4  !  bottom drag coefficient (linear case)
   rn_bfri2    =    1.e-3  !  bottom drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
   rn_bfri2_max =   1.e-1  !  max. bottom drag coefficient (non linear case and ln_loglayer=T)
   rn_bfeb2    =    2.5e-3 !  bottom turbulent kinetic energy background  (m2/s2)
   rn_bfrz0    =    3.e-3  !  bottom roughness [m] if ln_loglayer=T
   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file )
   rn_bfrien   =    10.    !  local multiplying factor of bfr (ln_bfr2d=T)
   rn_tfri1    =    4.e-4  !  top drag coefficient (linear case)
   rn_tfri2    =    2.5e-3 !  top drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
   rn_tfri2_max =   1.e-1  !  max. top drag coefficient (non linear case and ln_loglayer=T)
   rn_tfeb2    =    0.0    !  top turbulent kinetic energy background  (m2/s2)
   rn_tfrz0    =    3.e-3  !  top roughness [m] if ln_loglayer=T
   ln_tfr2d    = .false.   !  horizontal variation of the top friction coef (read a 2D mask file )
   rn_tfrien   =    50.    !  local multiplying factor of tfr (ln_tfr2d=T)

   ln_bfrimp   = .false.   !  implicit bottom friction (requires ln_zdfexp = .false. if true)
   ln_loglayer = .false.   !  logarithmic formulation (non linear case)
/
!-----------------------------------------------------------------------
&nambbc        !   bottom temperature boundary condition
!-----------------------------------------------------------------------
   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
                           !     = 1 constant flux
                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
   sn_qgh      = 'Goutorbe_ghflux.nc', -12. , 'gh_flux' , .false. , .true. , 'yearly' , 'weights_Goutorbe1_2_orca025_bilinear.nc' , '' , ''
/
!-----------------------------------------------------------------------
&nambbl        !   bottom boundary layer scheme
!-----------------------------------------------------------------------
   nn_bbl_ldf  =  1      !  diffusive bbl (=1)   or not (=0)
   nn_bbl_adv  =  1      !  advective bbl (=1/2) or not (=0)
   rn_ahtbbl   =  1000.  !  lateral mixing coefficient in the bbl  [m2/s]
   rn_gambbl   =  10.    !  advective bbl coefficient                 [s]
/

!!======================================================================
!!                        Tracer (T & S ) namelists
!!======================================================================
!!   nameos        equation of state
!!   namtra_adv    advection scheme
!!   namtra_adv_mle   mixed layer eddy param. (Fox-Kemper param.)
!!   namtra_ldf    lateral diffusion scheme
!!   namtra_dmp    T & S newtonian damping
!!======================================================================
!
!-----------------------------------------------------------------------
&nameos        !   ocean physical parameters
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtra_adv    !   advection scheme for tracer
!-----------------------------------------------------------------------
   ln_traadv_cen2   =  .false.  !  2nd order centered scheme
   ln_traadv_tvd    =  .true.   !  TVD scheme
   ln_traadv_muscl  =  .false.  !  MUSCL scheme
   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries
   ln_traadv_ubs    =  .false.  !  UBS scheme
   ln_traadv_qck    =  .false.  !  QUICKEST scheme
   ln_traadv_msc_ups=  .false.  !  use upstream scheme within muscl
   ln_traadv_tvd_zts=  .false.  !  TVD scheme with sub-timestepping of vertical tracer advection
/
!-----------------------------------------------------------------------
&namtra_adv_mle !   mixed layer eddy parametrisation (Fox-Kemper param)
!-----------------------------------------------------------------------
   ln_mle    = .false.     ! (T) use the Mixed Layer Eddy (MLE) parameterisation
   rn_ce     = 0.06        ! magnitude of the MLE (typical value: 0.06 to 0.08)
   nn_mle    = 1           ! MLE type: =0 standard Fox-Kemper ; =1 new formulation
   rn_lf     = 5.e+3       ! typical scale of mixed layer front (meters)                      (case rn_mle=0)
   rn_time   = 172800.     ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0)
   rn_lat    = 20.         ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1)
   nn_mld_uv = 0           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max)
   nn_conv   = 0           ! =1 no MLE in case of convection ; =0 always MLE
   rn_rho_c_mle  = 0.01    ! delta rho criterion used to calculate MLD for FK
/
!----------------------------------------------------------------------------------
&namtra_ldf    !   lateral diffusion scheme for tracers
!----------------------------------------------------------------------------------
   !                       !  Operator type:
   ln_traldf_lap    =  .true.   !  laplacian operator
   ln_traldf_iso    =  .true.   !  iso-neutral                 (needs "key_ldfslp")
   !                       !  Coefficients
   ! Eddy-induced (GM) advection always used with Griffies; otherwise needs "key_traldf_eiv"
   ! Value rn_aeiv_0 is ignored unless = 0 with Held-Larichev spatially varying aeiv
   !                                  (key_traldf_c2d & key_traldf_eiv & key_orca_r2, _r1 or _r05)
   rn_aeiv_0        =  0.     !  eddy induced velocity coefficient [m2/s]
   rn_aht_0         =  1000.     !  horizontal eddy diffusivity for tracers [m2/s]
   rn_ahtb_0        =     0.    !  background eddy diffusivity for ldf_iso [m2/s]
   !                                           (normally=0; not used with Griffies)
   rn_slpmax        =     0.01  !  slope limit
   rn_chsmag        =     1.    !  multiplicative factor in Smagorinsky diffusivity
   rn_smsh          =     0.    !  Smagorinsky diffusivity: = 0 - use only sheer
   rn_aht_m         =  2000.    !  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
/
!-----------------------------------------------------------------------
&namtra_dmp    !   tracer: T & S newtonian damping
!-----------------------------------------------------------------------
   ln_tradmp   =  ${ln_tradmp}  !  add a damping termn (T) or not (F)
   nn_zdmp     =    2      !  vertical   shape =0    damping throughout the water column
                           !                   =1 no damping in the mixing layer (kz  criteria)
                           !                   =2 no damping in the mixed  layer (rho crieria)
   cn_resto    = 'resto.nc' ! Name of file containing restoration coefficient field (use dmp_tools to create this)
/
!-----------------------------------------------------------------------
&namdyn_adv    !   formulation of the momentum advection
!-----------------------------------------------------------------------
   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
   ln_dynzad_zts = .false. !  Use (T) sub timestepping for vertical momentum advection
/
!-----------------------------------------------------------------------
&nam_vvl    !   vertical coordinate options
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
!-----------------------------------------------------------------------
   ln_dynvor_ene = .false. !  enstrophy conserving scheme
   ln_dynvor_ens = .false. !  energy conserving scheme
   ln_dynvor_mix = .false. !  mixed scheme
   ln_dynvor_een = .true.  !  energy & enstrophy scheme
   ln_dynvor_een_old = .false.  !  energy & enstrophy scheme - original formulation
/
!-----------------------------------------------------------------------
&namdyn_hpg    !   Hydrostatic pressure gradient option
!-----------------------------------------------------------------------
   ln_hpg_zco  = .false.   !  z-coordinate - full steps
   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation)
   ln_hpg_isf  = .false.   !  s-coordinate (sco ) adapted to isf
   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
   ln_hpg_prj  = .true.    !  s-coordinate (Pressure Jacobian scheme)
   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
                           !           centered      time scheme  (F)
/
!-----------------------------------------------------------------------
&namdyn_ldf    !   lateral diffusion on momentum
!-----------------------------------------------------------------------
   !                       !  Type of the operator :
   ln_dynldf_lap    =  .false.  !  laplacian operator
   ln_dynldf_bilap  =  .true.   !  bilaplacian operator
   !                       !  Direction of action  :
   ln_dynldf_level  =  .false.  !  iso-level
   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.)
   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp")
   !                       !  Coefficient
   rn_ahm_0_lap     =     0.    !  horizontal laplacian eddy viscosity   [m2/s]
   rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s]
   rn_ahm_0_blp     =    -6.4e11!  horizontal bilaplacian eddy viscosity [m4/s]
   rn_cmsmag_1      =     3.    !  constant in laplacian Smagorinsky viscosity
   rn_cmsmag_2      =     3     !  constant in bilaplacian Smagorinsky viscosity
   rn_cmsh          =     0.    !  1 or 0 , if 0 -use only shear for Smagorinsky viscosity
   rn_ahm_m_blp     =    -1.e12 !  upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
   rn_ahm_m_lap     = 40000.    !  upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
/
!-----------------------------------------------------------------------
&namzdf        !   vertical physics
!-----------------------------------------------------------------------
   rn_avm0     =   1.e-4   !  vertical eddy viscosity   [m2/s]          (background Kz if not "key_zdfcst")
   rn_avt0     =   1.e-5   !  vertical eddy diffusivity [m2/s]          (background Kz if not "key_zdfcst")
   nn_avb      =    0      !  profile for background avt & avm (=1) or not (=0)
   nn_havtb    =    1      !  horizontal shape for avtb (=1) or not (=0)
   ln_zdfevd   = .true.    !  enhanced vertical diffusion (evd) (T) or not (F)
   nn_evdm     =    1      !  evd apply on tracer (=0) or on tracer and momentum (=1)
   rn_avevd    =   10.     !  evd mixing coefficient [m2/s]
   ln_zdfnpc   = .false.   !  Non-Penetrative Convective algorithm (T) or not (F)
   nn_npc      =    1            !  frequency of application of npc
   nn_npcp     =  365            !  npc control print frequency
   ln_zdfexp   = .false.   !  time-stepping: split-explicit (T) or implicit (F) time stepping
   nn_zdfexp   =    3            !  number of sub-timestep for ln_zdfexp=T
/
!-----------------------------------------------------------------------
&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
!-----------------------------------------------------------------------
   rn_avmri    = 100.e-4   !  maximum value of the vertical viscosity
   rn_alp      =   5.      !  coefficient of the parameterization
   nn_ric      =   2       !  coefficient of the parameterization
   rn_ekmfc    =   0.7     !  Factor in the Ekman depth Equation
   rn_mldmin   =   1.0     !  minimum allowable mixed-layer depth estimate (m)
   rn_mldmax   =1000.0     !  maximum allowable mixed-layer depth estimate (m)
   rn_wtmix    =  10.0     !  vertical eddy viscosity coeff [m2/s] in the mixed-layer
   rn_wvmix    =  10.0     !  vertical eddy diffusion coeff [m2/s] in the mixed-layer
   ln_mldw     = .true.    !  Flag to use or not the mized layer depth param.
/
!-----------------------------------------------------------------------
&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
!-----------------------------------------------------------------------
   rn_ediff    =   0.1     !  coef. for vertical eddy coef. (avt=rn_ediff*mxl*sqrt(e) )
   rn_ediss    =   0.7     !  coef. of the Kolmogoroff dissipation
   rn_ebb      =  67.83    !  coef. of the surface input of tke (=67.83 suggested when ln_mxl0=T)
   rn_emin     =   1.e-6   !  minimum value of tke [m2/s2]
   rn_emin0    =   1.e-4   !  surface minimum value of tke [m2/s2]
   rn_bshear   =   1.e-20  ! background shear (>0) currently a numerical threshold (do not change it)
   nn_mxl      =   3       !  mixing length: = 0 bounded by the distance to surface and bottom
                           !                 = 1 bounded by the local vertical scale factor
                           !                 = 2 first vertical derivative of mixing length bounded by 1
                           !                 = 3 as =2 with distinct disspipative an mixing length scale
   nn_pdl      =   1       !  Prandtl number function of richarson number (=1, avt=pdl(Ri)*avm) or not (=0, avt=avm)
   ln_mxl0     = .true.    !  surface mixing length scale = F(wind stress) (T) or not (F)
   rn_mxl0     =   0.01    !  surface  buoyancy lenght scale minimum value
   ln_lc       = .true.    !  Langmuir cell parameterisation (Axell 2002)
   rn_lc       =   0.20    !  coef. associated to Langmuir cells
   nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
                           !        = 0 no penetration
                           !        = 1 add a tke source below the ML
                           !        = 2 add a tke source just at the base of the ML
                           !        = 3 as = 1 applied on HF part of the stress    ("key_coupled")
   rn_efr      =   0.05    !  fraction of surface tke value which penetrates below the ML (nn_etau=1 or 2)
   nn_htau     =   1       !  type of exponential decrease of tke penetration below the ML
                           !        = 0  constant 10 m length scale
                           !        = 1  0.5m at the equator to 30m poleward of 40 degrees
/
!------------------------------------------------------------------------
&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
   ln_kpprimix = .true.    !  shear instability mixing
   rn_difmiw   =  1.0e-04  !  constant internal wave viscosity [m2/s]
   rn_difsiw   =  0.1e-04  !  constant internal wave diffusivity [m2/s]
   rn_riinfty  =  0.8      !  local Richardson Number limit for shear instability
   rn_difri    =  0.0050   !  maximum shear mixing at Rig = 0    [m2/s]
   rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2]
   rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s]
   nn_avb      =  0        !  horizontal averaged (=1) or not (=0) on avt and amv
   nn_ave      =  1        !  constant (=0) or profile (=1) background on avt
/
!-----------------------------------------------------------------------
&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
!-----------------------------------------------------------------------
   rn_emin       = 1.e-6   !  minimum value of e   [m2/s2]
   rn_epsmin     = 1.e-12  !  minimum value of eps [m2/s3]
   ln_length_lim = .true.  !  limit on the dissipation rate under stable stratification (Galperin et al., 1988)
   rn_clim_galp  = 0.53    !  galperin limit
   ln_sigpsi     = .true.  !  Activate or not Burchard 2001 mods on psi schmidt number in the wb case
   rn_crban      = 100.    !  Craig and Banner 1994 constant for wb tke flux
   rn_charn      = 70000.  !  Charnock constant for wb induced roughness length
   rn_hsro       =  0.02   !  Minimum surface roughness
   rn_frac_hs    =   1.3   !  Fraction of wave height as roughness (if nn_z0_met=2)
   nn_z0_met     =     2   !  Method for surface roughness computation (0/1/2)
   nn_bc_surf    =     1   !  surface condition (0/1=Dir/Neum)
   nn_bc_bot     =     1   !  bottom condition (0/1=Dir/Neum)
   nn_stab_func  =     2   !  stability function (0=Galp, 1= KC94, 2=CanutoA, 3=CanutoB)
   nn_clos       =     1   !  predefined closure type (0=MY82, 1=k-eps, 2=k-w, 3=Gen)
/
!-----------------------------------------------------------------------
&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
!-----------------------------------------------------------------------
   rn_avts     = 1.e-4     !  maximum avs (vertical mixing on salinity)
   rn_hsbfr    = 1.6       !  heat/salt buoyancy flux ratio
/
!-----------------------------------------------------------------------
&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
!-----------------------------------------------------------------------
   rn_htmx     = 500.      !  vertical decay scale for turbulence (meters)
   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1)
   rn_tfe      = 0.333     !  tidal dissipation efficiency
   rn_me       = 0.2       !  mixing efficiency
   ln_tmx_itf  = .true.    !  ITF specific parameterisation
   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency
/
!-----------------------------------------------------------------------
&namzdf_tmx_new    !   new tidal mixing parameterization                ("key_zdftmx_new")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsol        !   elliptic solver / island / free surface
!-----------------------------------------------------------------------
   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
                           !                   =2 successive-over-relaxation (sor)
   nn_sol_arp  =      0    !  absolute/relative (0/1) precision convergence test
   rn_eps      =  1.e-6    !  absolute precision of the solver
   nn_nmin     =    300    !  minimum of iterations for the SOR solver
   nn_nmax     =    800    !  maximum of iterations for the SOR solver
   nn_nmod     =     10    !  frequency of test for the SOR solver
   rn_resmax   =  1.e-10   !  absolute precision for the SOR solver
   rn_sor      =  1.92     !  optimal coefficient for SOR solver (to be adjusted with the domain)
/
!-----------------------------------------------------------------------
&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namctl        !   Control prints & Benchmark
!-----------------------------------------------------------------------
ln_ctl = .false.
nn_timing   =    0         ! timing by routine activated (=1) creates timing.output file, or not (=0)
/
!-----------------------------------------------------------------------
&namc1d        !   1D configuration options                             ("key_c1d")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namc1d_uvd    !   data: U & V currents                                 ("key_c1d")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsto       ! Stochastic parametrization of EOS
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtrd        !   diagnostics on dynamics and/or tracer trends         ("key_trddyn" and/or "key_trdtra")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namflo       !   float parameters                                      ("key_float")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namptr       !   Poleward Transport Diagnostic
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namhsb       !  Heat and salt budgets
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_diaharm   !   Harmonic analysis of tidal constituents ('key_diaharm')
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namdct        ! transports through sections
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namobs       !  observation usage switch                               ('key_diaobs')
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_asminc   !   assimilation increments                               ('key_asminc')
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_wave   ! External fields from wave model
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
!-----------------------------------------------------------------------
/
EOF
