!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!! NEMO/OPA  : AMM12 configuration namelist used to overwrite defaults values defined in SHARED/namelist_ref
!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!-----------------------------------------------------------------------
&namrun        !   parameters of the run
!-----------------------------------------------------------------------
   cn_exp      =  "AMM12"  !  experience name
   nn_it000    =       1   !  first time step
   nn_itend    =    1296   !  last  time step (std 1 day = 144)
   nn_date0    =  20120102 !  date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
   nn_leapy    =       1   !  Leap year calendar (1) or not (0)
   ln_rstart   =  .true.  !  start from rest (F) or from a restart file (T)
   nn_euler    =       1   !  = 0 : start with forward time step if ln_rstart=.true.
   cn_ocerst_in   = "amm12_restart_oce"   !  suffix of ocean restart name (input)
   cn_ocerst_out  = "restart_oce_out"   !  suffix of ocean restart name (input)
   nn_stock    =    1296   !  frequency of creation of a restart file (modulo referenced to 1)
   nn_write    =     144   !  frequency of write in the output file   (modulo referenced to nit000) 
/
!-----------------------------------------------------------------------
&namcfg        !   parameters of the configuration
!-----------------------------------------------------------------------
   ln_read_cfg = .true.   !  (=T) read the domain configuration file
      !                    !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules
      cn_domcfg = "AMM_R12_sco_domcfg"     ! domain configuration filename
/

!-----------------------------------------------------------------------
&namdom        !   space and time domain (bathymetry, mesh, timestep)
!-----------------------------------------------------------------------
   rn_rdt      =   600.    !  time step for the dynamics (and tracer if nn_acc=0)
/
!-----------------------------------------------------------------------
&namcrs        !   Grid coarsening for dynamics output and/or
!              !   passive tracer coarsened online simulations
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtsd    !   data : Temperature  & Salinity
!-----------------------------------------------------------------------
   ln_tsd_init   = .false.   !  Initialisation of ocean T & S with T &S input data (T) or not (F)
   ln_tsd_tradmp = .false.   !  damping of ocean T & S toward T &S input data (T) or not (F)
/
!-----------------------------------------------------------------------
&namsbc        !   Surface Boundary Condition (surface module)
!-----------------------------------------------------------------------
   nn_fsbc     = 1         !  frequency of surface boundary condition computation
                           !     (also = the frequency of sea-ice model call)
   ln_flx      = .true.    !  flux formulation                          (T => fill namsbc_flx )
   ln_blk      = .false.   !  Bulk formulation                          (T => fill namsbc_blk )
   nn_ice      = 0         !  =0 no ice boundary condition
   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
   ln_traqsr   = .false.   !  Light penetration (T) or not (F)
/
!-----------------------------------------------------------------------
&namsbc_flx    !   surface boundary condition : flux formulation
!-----------------------------------------------------------------------
!          !  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_utau = 'amm12_utau',          1        , 'utau'    ,  .false.     , .false., 'daily'   ,  ''      ,  ''      , ''
   sn_vtau = 'amm12_vtau',          1        , 'vtau'    ,  .false.     , .false., 'daily'   ,  ''      ,  ''      , ''
   sn_qtot = 'amm12_flx' ,          3        , 'sonsfldo',  .true.      , .false., 'daily'   ,  ''      ,  ''      , ''
   sn_qsr  = 'amm12_flx' ,          3        , 'soshfldo',  .true.      , .false., 'daily'   ,  ''      ,  ''      , ''
   sn_emp  = 'amm12_flx' ,          3        , 'sowafldo',  .true.      , .false., 'daily'   ,  ''      ,  ''      , ''
   cn_dir  = './fluxes/'        !  root directory for the location of the flux files
/
!-----------------------------------------------------------------------
&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 ! land/sea mask !
!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
   sn_rnf      = 'amm12_rivers'       ,        24         , 'rorunoff',   .false.    , .true. , 'yearly'  , ''       , ''  , ''
   sn_cnf      = 'runoff_1m_nomask'   ,         0         , 'socoefr0',   .false.    , .true. , 'yearly'  , ''       , ''  , ''
   sn_s_rnf    = 'amm12_rivers'       ,        24         , 'rosaline',   .false.    , .true. , 'yearly'  , ''       , ''  , ''
   sn_t_rnf    = 'amm12_rivers'       ,        24         , 'rotemper',   .false.    , .true. , 'yearly'  , ''       , ''  , ''
   sn_dep_rnf  = 'amm12_rivers'       ,        24         , 'rodepth' ,   .false.    , .true. , 'yearly'  , ''       , ''  , ''
   ln_rnf_mouth = .false.   !  specific treatment at rivers mouths
   ln_rnf_depth = .true.    !  read in depth information for runoff
   ln_rnf_tem   = .true.    !  read in temperature information for runoff
   ln_rnf_sal   = .true.    !  read in salinity information for runoff
/
!-----------------------------------------------------------------------
&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
!-----------------------------------------------------------------------
!          !  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_apr     = 'amm12_mslp'     ,          1        ,  'p_msl'      , .false.      , .false. , 'daily'   ,  ''      ,  ''  , ''

   cn_dir      = './fluxes/' !  root directory for the location of the bulk files
   rn_pref     = 101000.     !  reference atmospheric pressure   [N/m2]/
   ln_ref_apr  = .false.    !  ref. pressure: global mean Patm (T) or a constant (F)
   ln_apr_obc  = .true.    !  inverse barometer added to OBC ssh data
/
!-----------------------------------------------------------------------
&namsbc_ssr    !   surface boundary condition : sea surface restoring
!-----------------------------------------------------------------------
!          !  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_sst      = 'amm12_sstref'    ,        24         ,  'sst'     ,     .true.     , .false. , 'daily'   , .false. , ''       , '' , ''
   sn_sss      = 'sss_data'        ,        -1         ,  'sss'     ,     .true.     , .true.  , 'yearly'  , .false. , ''       , '' , ''

   cn_dir      = 'fluxes/' !  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     =     0     !  add a damping     term in the surface freshwater flux (=2)
                           !  or to SSS only (=1) or no damping term (=0)
   rn_deds     =  -27.7    !  magnitude of the damping on salinity   [mm/day]
/
!-----------------------------------------------------------------------
&namsbc_alb    !   albedo parameters
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namberg       !   iceberg parameters
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namlbc        !   lateral momentum boundary condition
!-----------------------------------------------------------------------
   rn_shlat    =     0     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
                           !  free slip  !   partial slip  !   no slip   ! strong slip
/
!-----------------------------------------------------------------------
&namagrif      !  AGRIF zoom                                            ("key_agrif")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_tide      !   tide parameters
!-----------------------------------------------------------------------
   ln_tide     = .true.
   clname(1)     =   'Q1'   !  name of constituent
   clname(2)     =   'O1'
   clname(3)     =   'P1'
   clname(4)     =   'S1'
   clname(5)     =   'K1'
   clname(6)     =   '2N2'
   clname(7)     =   'MU2'
   clname(8)     =   'N2'
   clname(9)     =   'NU2'
   clname(10)    =   'M2'
   clname(11)    =   'L2'
   clname(12)    =   'T2'
   clname(13)    =   'S2'
   clname(14)    =   'K2'
   clname(15)    =   'M4'
/
!-----------------------------------------------------------------------
&nambdy        !  unstructured open boundaries
    ln_bdy         = .true.
    nb_bdy         =  1
    cn_dyn2d       = 'flather'
    nn_dyn2d_dta   =  3
    cn_tra         =  'frs'
    nn_tra_dta    =   1 
/
!-----------------------------------------------------------------------
&nambdy_dta      !  open boundaries - external data
!-----------------------------------------------------------------------
!          !  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      !
   bn_ssh =     'amm12_bdyT_dyn2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
   bn_u2d =     'amm12_bdyU_dyn2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
   bn_v2d =     'amm12_bdyV_dyn2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
   bn_u3d  =    'amm12_bdyU_dyn3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
   bn_v3d  =    'amm12_bdyV_dyn3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
   bn_tem  =    'amm12_bdyT_tra'   ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
   bn_sal  =    'amm12_bdyT_tra'   ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
   cn_dir  =    './bdydta/'
   ln_full_vel = .false.
/
!-----------------------------------------------------------------------
&nambdy_tide     ! tidal forcing at open boundaries
!-----------------------------------------------------------------------
   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files
/
!-----------------------------------------------------------------------
&nambfr        !   bottom friction
!-----------------------------------------------------------------------
   nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
                           !                              = 2 : nonlinear friction
   rn_bfri2    =    2.5e-3 !  bottom drag coefficient (non linear case)
   rn_bfeb2    =    0.0e0  !  bottom turbulent kinetic energy background  (m2/s2)
   ln_loglayer =    .true. !  loglayer bottom friction (only effect when nn_bfr = 2)
   rn_bfrz0    =    0.003  !  bottom roughness (only effect when ln_loglayer = .true.)
/
!-----------------------------------------------------------------------
&nambbc        !   bottom temperature boundary condition                (default: NO)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nambbl        !   bottom boundary layer scheme
!-----------------------------------------------------------------------
   nn_bbl_ldf  =  0      !  diffusive bbl (=1)   or not (=0)
/
!-----------------------------------------------------------------------
&nameos        !   ocean physical parameters
!-----------------------------------------------------------------------
   ln_teos10   = .true.         !  = Use TEOS-10 equation of state
/
!-----------------------------------------------------------------------
&namtra_adv    !   advection scheme for tracer
!-----------------------------------------------------------------------
   ln_traadv_fct =  .true.   !  FCT scheme
      nn_fct_h   =  2               !  =2/4, horizontal 2nd / 4th order 
      nn_fct_v   =  2               !  =2/4, vertical   2nd / COMPACT 4th order 
      nn_fct_zts =  0               !  >=1,  2nd order FCT scheme with vertical sub-timestepping
      !                             !        (number of sub-timestep = nn_fct_zts)
/
!-----------------------------------------------------------------------
&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
!-----------------------------------------------------------------------
/
!----------------------------------------------------------------------------------
&namtra_ldf    !   lateral diffusion scheme for tracers
!----------------------------------------------------------------------------------
   !                       !  Operator type:
   ln_traldf_lap   =  .true.   !    laplacian operator
   ln_traldf_blp   =  .false.  !  bilaplacian operator
   !                       !  Direction of action:
   ln_traldf_lev   =  .false.  !  iso-level
   ln_traldf_hor   =  .true.   !  horizontal (geopotential)
   ln_traldf_iso   =  .false.  !  iso-neutral
   ln_traldf_triad =  .false.  !  iso-neutral using Griffies triads
   !
   !		       	         !  iso-neutral options:        
   ln_traldf_msc   =  .true.   !  Method of Stabilizing Correction (both operators)
   rn_slpmax       =   0.01    !  slope limit                      (both operators)
   ln_triad_iso    =  .false.  !  pure horizontal mixing in ML     (triad only)
   rn_sw_triad     =  1        !  =1 switching triad ; =0 all 4 triads used (triad only)
   ln_botmix_triad =  .false.  !  lateral mixing on bottom         (triad only)
   !
   !                       !  Coefficients:
   nn_aht_ijk_t    = 0         !  space/time variation of eddy coef
   !                                !   =-20 (=-30)    read in eddy_diffusivity_2D.nc (..._3D.nc) file
   !                                !   =  0           constant 
   !                                !   = 10 F(k)      =ldf_c1d 
   !                                !   = 20 F(i,j)    =ldf_c2d 
   !                                !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation
   !                                !   = 30 F(i,j,k)  =ldf_c2d + ldf_c1d
   !                                !   = 31 F(i,j,k,t)=F(local velocity)
   rn_aht_0        =   50.     !  lateral eddy diffusivity   (lap. operator) [m2/s]
   rn_bht_0        = 1.e+12    !  lateral eddy diffusivity (bilap. operator) [m4/s]
/
!----------------------------------------------------------------------------------
&namtra_ldfeiv !   eddy induced velocity param.
!----------------------------------------------------------------------------------
   ln_ldfeiv     =.false.   ! use eddy induced velocity parameterization
/
!-----------------------------------------------------------------------
&namtra_dmp    !   tracer: T & S newtonian damping
!-----------------------------------------------------------------------
   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F)
/
!-----------------------------------------------------------------------
&namdyn_adv    !   formulation of the momentum advection
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&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
      nn_een_e3f = 1             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1)
/
!-----------------------------------------------------------------------
&namdyn_hpg    !   Hydrostatic pressure gradient option
!-----------------------------------------------------------------------
   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
   ln_hpg_prj  = .true.   !  s-coordinate (Pressure Jacobian scheme)
/
!-----------------------------------------------------------------------
&namdyn_spg    !   surface pressure gradient 
!-----------------------------------------------------------------------
   ln_dynspg_ts = .true.    ! split-explicit free surface
      ln_bt_auto    = .false.  ! Number of sub-step defined from:
         nn_baro       = 30       ! =F : the number of sub-step in rn_rdt seconds
/
!-----------------------------------------------------------------------
&namdyn_ldf    !   lateral diffusion on momentum
!-----------------------------------------------------------------------
   !                       !  Type of the operator :
   !                           !  no diffusion: set ln_dynldf_lap=..._blp=F 
   ln_dynldf_lap =  .false.    !    laplacian operator
   ln_dynldf_blp =  .true.     !  bilaplacian operator
   !                       !  Direction of action  :
   ln_dynldf_lev =  .true.     !  iso-level
   ln_dynldf_hor =  .false.    !  horizontal (geopotential)
   ln_dynldf_iso =  .false.    !  iso-neutral
   !                       !  Coefficient
   nn_ahm_ijk_t  = 0           !  space/time variation of eddy coef
   !                                !  =-30  read in eddy_viscosity_3D.nc file
   !                                !  =-20  read in eddy_viscosity_2D.nc file
   !                                !  =  0  constant 
   !                                !  = 10  F(k)=c1d
   !                                !  = 20  F(i,j)=F(grid spacing)=c2d
   !                                !  = 30  F(i,j,k)=c2d*c1d
   !                                !  = 31  F(i,j,k)=F(grid spacing and local velocity)
   rn_ahm_0      =     60.     !  horizontal laplacian eddy viscosity   [m2/s]
   rn_ahm_b      =      0.     !  background eddy viscosity for ldf_iso [m2/s]
   rn_bhm_0      = 1.0e+10     !  horizontal bilaplacian eddy viscosity [m4/s]
   !
   ! Caution in 20 and 30 cases the coefficient have to be given for a 1 degree grid (~111km)
/
!-----------------------------------------------------------------------
&namzdf        !   vertical physics
!-----------------------------------------------------------------------
   rn_avm0     =   0.1e-6  !  vertical eddy viscosity   [m2/s]          (background Kz if not "key_zdfcst")
   rn_avt0     =   0.1e-6  !  vertical eddy diffusivity [m2/s]          (background Kz if not "key_zdfcst")
   ln_zdfevd   = .false.   !  enhanced vertical diffusion (evd) (T) or not (F)
   nn_evdm     =    1      !  evd apply on tracer (=0) or on tracer and momentum (=1)
/
!-----------------------------------------------------------------------
&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
!-----------------------------------------------------------------------
   rn_charn =  100000.     !  Charnock constant for wb induced roughness length
   nn_z0_met = 1           !  Method for surface roughness computation (0/1/2)
/
!-----------------------------------------------------------------------
&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
!-----------------------------------------------------------------------
   ln_tmx_itf  = .FALSE.   !  ITF specific parameterisation
/
!-----------------------------------------------------------------------
&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namctl        !   Control prints & Benchmark
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtrd        !   diagnostics on dynamics and/or tracer trends         ("key_trddyn" and/or "key_trdtra")
!              !       or mixed-layer trends or barotropic vorticity    ("key_trdmld" or     "key_trdvor")
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&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
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&nam_diatmb  !  Top Middle Bottom Output
!-----------------------------------------------------------------------
   ln_diatmb  = .true.    !  Choose Top Middle and Bottom output or not
/
!-----------------------------------------------------------------------
&nam_dia25h  !  25h Mean Output
!-----------------------------------------------------------------------
   ln_dia25h  = .true.    ! Choose 25h mean output or not
/

