!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!! SI3 namelist:  
!!              1 - Generic parameters                 (nampar)
!!              2 - Ice thickness discretization       (namitd)
!!              3 - Ice dynamics                       (namdyn)
!!              4 - Ice ridging/rafting                (namdyn_rdgrft)
!!              5 - Ice rheology                       (namdyn_rhg)
!!              6 - Ice advection                      (namdyn_adv)
!!              7 - Ice surface forcing                (namforcing)
!!              8 - Ice thermodynamics                 (namthd)
!!              9 - Ice heat diffusion                 (namthd_zdf)
!!             10 - Ice lateral melting                (namthd_da)
!!             11 - Ice growth in open water           (namthd_do)
!!             12 - Ice salinity                       (namthd_sal)
!!             13 - Ice melt ponds                     (namthd_pnd)
!!             14 - Ice initialization                 (namini)
!!             15 - Ice/snow albedos                   (namalb)
!!             16 - Ice diagnostics                    (namdia)
!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!
!------------------------------------------------------------------------------
&nampar         !   Generic parameters
!------------------------------------------------------------------------------
   jpl              =   5             !  number of ice  categories
   nlay_i           =   2             !  number of ice  layers
   nlay_s           =   1             !  number of snow layers (only 1 is working)
   nn_virtual_itd   =   0             !  virtual ITD mono-category parameterizations (1-3 => jpl = 1 only) or not (0)
                                      !     2: activate enhanced thermal conductivity only --- temporary option
                                      !     3: activate virtual thin ice melting only      ---  temporary option
   ln_icedyn        = .true.          !  ice dynamics (T) or not (F)
   ln_icethd        = .true.          !  ice thermo   (T) or not (F)
   rn_amax_n        =   0.997         !  maximum tolerated ice concentration NH
   rn_amax_s        =   0.997         !  maximum tolerated ice concentration SH
   cn_icerst_in     = "restart_ice"   !  suffix of ice restart name (input)
   cn_icerst_out    = "restart_ice"   !  suffix of ice restart name (output)
   cn_icerst_indir  = "."             !  directory to read   input ice restarts
   cn_icerst_outdir = "."             !  directory to write output ice restarts
/
!------------------------------------------------------------------------------
&namitd         !   Ice discretization
!------------------------------------------------------------------------------
   ln_cat_hfn       = .true.          !  ice categories are defined by a function following rn_himean**(-0.05)
      rn_himean     =   2.0           !  expected domain-average ice thickness (m)
   ln_cat_usr       = .false.         !  ice categories are defined by rn_catbnd below (m)
      rn_catbnd     =   0.,0.45,1.1,2.1,3.7,6.0  
   rn_himin         =   0.1           !  minimum ice thickness (m) used in remapping
/
!------------------------------------------------------------------------------
&namdyn         !   Ice dynamics
!------------------------------------------------------------------------------
   ln_dynFULL       = .true.          !  dyn.: full ice dynamics               (rheology + advection + ridging/rafting + correction)
   ln_dynRHGADV     = .false.         !  dyn.: no ridge/raft & no corrections  (rheology + advection)
   ln_dynADV        = .false.         !  dyn.: only advection w prescribed vel.(rn_uvice + advection)
      rn_uice       =   0.00001       !        prescribed ice u-velocity
      rn_vice       =   0.            !        prescribed ice v-velocity
   rn_ishlat        =   2.            !  free slip (0) ; partial slip (0-2) ; no slip (2) ; strong slip (>2)
   ln_landfast      = .false.         !  landfast ice parameterization (T or F)                           
      rn_gamma      =   0.15          !     fraction of ocean depth that ice must reach to initiate landfast
                                      !        recommended range: [0.1 ; 0.25]
      rn_icebfr     =  10.            !     maximum bottom stress per unit area of contact [N/m2]                 
                                      !        a very large value ensures ice velocity=0 even with a small contact area
                                      !        recommended range: ?? (should be greater than atm-ice stress => >0.1 N/m2)
      rn_lfrelax    =   1.e-5         !     relaxation time scale to reach static friction [s-1]
/
!------------------------------------------------------------------------------
&namdyn_rdgrft  !   Ice ridging/rafting
!------------------------------------------------------------------------------
          ! -- ice_rdgrft_strength -- !
   ln_str_H79       = .true.          !  ice strength param.: Hibler_79   => P = pstar*<h>*exp(-c_rhg*A)                      
      rn_pstar      =   2.0e+04       !     ice strength thickness parameter [N/m2]
      rn_crhg       =   20.0          !     ice strength conc. parameter (-)
                   ! -- ice_rdgrft -- !
   rn_csrdg         =   0.5           !  fraction of shearing energy contributing to ridging
              ! -- ice_rdgrft_prep -- !
   ln_partf_lin     = .false.         !  Linear ridging participation function (Thorndike et al, 1975)
      rn_gstar      =   0.15          !     fractional area of thin ice being ridged 
   ln_partf_exp     = .true.          !  Exponential ridging participation function (Lipscomb, 2007)
      rn_astar      =   0.03          !     exponential measure of ridging ice fraction [set to 0.05 if hstar=100]
   ln_ridging       = .true.          !  ridging activated (T) or not (F)
      rn_hstar      =  25.0           !     determines the maximum thickness of ridged ice [m] (Hibler, 1980)
      rn_porordg    =   0.3           !     porosity of newly ridged ice (Lepparanta et al., 1995)
      rn_fsnwrdg    =   0.5           !     snow volume fraction that survives in ridging
      rn_fpndrdg    =   1.0           !     pond fraction that survives in ridging (small a priori)
   ln_rafting       = .true.          !  rafting activated (T) or not (F)
      rn_hraft      =   0.75          !     threshold thickness for rafting [m]
      rn_craft      =   5.0           !     squeezing coefficient used in the rafting function
      rn_fsnwrft    =   0.5           !     snow volume fraction that survives in rafting
      rn_fpndrft    =   1.0           !     pond fraction that survives in rafting (0.5 a priori)
/
!------------------------------------------------------------------------------
&namdyn_rhg     !   Ice rheology
!------------------------------------------------------------------------------
   ln_rhg_EVP       = .true.          !  EVP rheology
      ln_aEVP       = .true.          !     adaptive rheology (Kimmritz et al. 2016 & 2017)
      rn_creepl     =   2.0e-9        !     creep limit [1/s]
      rn_ecc        =   2.0           !     eccentricity of the elliptical yield curve          
      nn_nevp       = 120             !     number of EVP subcycles                             
      rn_relast     =   0.333         !     ratio of elastic timescale to ice time step: Telast = dt_ice * rn_relast 
                                      !        advised value: 1/3 (rn_nevp=120) or 1/9 (rn_nevp=300)
/
!------------------------------------------------------------------------------
&namdyn_adv     !   Ice advection
!------------------------------------------------------------------------------
   ln_adv_Pra       = .false.         !  Advection scheme (Prather)
   ln_adv_UMx       = .true.          !  Advection scheme (Ultimate-Macho)
      nn_UMx        =   5             !     order of the scheme for UMx (1-5 ; 20=centered 2nd order)
/
!------------------------------------------------------------------------------
&namforcing     !   Ice surface forcing
!------------------------------------------------------------------------------
   rn_cio           =   5.0e-03       !  ice-ocean drag coefficient (-)
   rn_blow_s        =   0.66          !  mesure of snow blowing into the leads
                                      !     = 1 => no snow blowing, < 1 => some snow blowing
   nn_flxdist       =  -1             !  Redistribute heat flux over ice categories
                                      !     =-1  Do nothing (needs N(cat) fluxes)
                                      !     = 0  Average N(cat) fluxes then apply the average over the N(cat) ice
                                      !     = 1  Average N(cat) fluxes then redistribute over the N(cat) ice using T-ice and albedo sensitivity
                                      !     = 2  Redistribute a single flux over categories
   nice_jules       = 0               !  Jules coupling (0=OFF, 1=EMULATED, 2=ACTIVE)
/
!------------------------------------------------------------------------------
&namthd         !   Ice thermodynamics
!------------------------------------------------------------------------------
   ln_icedH         = .true.          !  activate ice thickness change from growing/melting (T) or not (F)
   ln_icedA         = .true.          !  activate lateral melting param. (T) or not (F)
   ln_icedO         = .true.          !  activate ice growth in open-water (T) or not (F)
   ln_icedS         = .true.          !  activate brine drainage (T) or not (F)
/
!------------------------------------------------------------------------------
&namthd_zdf     !   Ice heat diffusion
!------------------------------------------------------------------------------
   ln_zdf_BL99      = .true.          !  Heat diffusion follows Bitz and Lipscomb 1999
   ln_cndi_U64      = .false.         !  sea ice thermal conductivity: k = k0 + beta.S/T            (Untersteiner, 1964)
   ln_cndi_P07      = .true.          !  sea ice thermal conductivity: k = k0 + beta1.S/T - beta2.T (Pringle et al., 2007)
   rn_cnd_s         =   0.31          !  thermal conductivity of the snow (0.31 W/m/K, Maykut and Untersteiner, 1971)
                                      !     Obs: 0.1-0.5 (Lecomte et al, JAMES 2013)
   rn_kappa_i       =   1.0           !  radiation attenuation coefficient in sea ice [1/m]
/
!------------------------------------------------------------------------------
&namthd_da      !   Ice lateral melting
!------------------------------------------------------------------------------
   rn_beta          =   1.0           !  coef. beta for lateral melting param. Recommended range=[0.8-1.2]
                                      !   => decrease = more melt and melt peaks toward higher concentration (A~0.5 for beta=1 ; A~0.8 for beta=0.2)
                                      !      0.3 = best fit for western Fram Strait and Antarctica
                                      !      1.4 = best fit for eastern Fram Strait      
   rn_dmin          =   8.            !  minimum floe diameter for lateral melting param. Recommended range=[6-10]
                                      !   => 6  vs 8m = +40% melting at the peak (A~0.5)
                                      !      10 vs 8m = -20% melting
/
!------------------------------------------------------------------------------
&namthd_do      !   Ice growth in open water
!------------------------------------------------------------------------------
   rn_hinew         =   0.1           !  thickness for new ice formation in open water (m), must be larger than rn_hnewice
   ln_frazil        = .false.         !  Frazil ice parameterization (ice collection as a function of wind)
      rn_maxfraz    =   1.0           !     maximum fraction of frazil ice collecting at the ice base
      rn_vfraz      =   0.417         !     thresold drift speed for frazil ice collecting at the ice bottom (m/s)
      rn_Cfraz      =   5.0           !     squeezing coefficient for frazil ice collecting at the ice bottom
/
!------------------------------------------------------------------------------
&namthd_sal     !   Ice salinity
!------------------------------------------------------------------------------
   nn_icesal        =   2             !  ice salinity option
                                      !     1: constant ice salinity (S=rn_icesal)
                                      !     2: varying salinity parameterization S(z,t)
                                      !     3: prescribed salinity profile S(z), Schwarzacher, 1959
   rn_icesal        =   4.            !    (nn_icesal=1) ice salinity (g/kg)
   rn_sal_gd        =   5.            !  restoring ice salinity, gravity drainage (g/kg)
   rn_time_gd       =   1.73e+6       !  restoring time scale, gravity drainage  (s)
   rn_sal_fl        =   2.            !  restoring ice salinity, flushing (g/kg)
   rn_time_fl       =   8.64e+5       !  restoring time scale, flushing (s)
   rn_simax         =  20.            !  maximum tolerated ice salinity (g/kg)
   rn_simin         =   0.1           !  minimum tolerated ice salinity (g/kg)
/
!------------------------------------------------------------------------------
&namthd_pnd     !   Melt ponds
!------------------------------------------------------------------------------
   ln_pnd_H12       = .false.         !  activate evolutive melt ponds (from Holland et al 2012)
      ln_pnd_fwb    = .false.         !     melt ponds store freshwater or not
   ln_pnd_CST       = .false.         !  activate constant melt ponds
      rn_apnd       =   0.2           !     prescribed pond fraction, at Tsu=0
      rn_hpnd       =   0.05          !     prescribed pond depth, at Tsu=0
   ln_pnd_alb       = .false.         !  melt ponds affect albedo or not
/
!------------------------------------------------------------------------------
&namini         !   Ice initialization
!------------------------------------------------------------------------------
   ln_iceini        = .true.          !  activate ice initialization (T) or not (F)
   ln_iceini_file   = .false.         !  netcdf file provided for initialization (T) or not (F)
   rn_thres_sst     =   2.0           !  max delta temp. above Tfreeze with initial ice = (sst - tfreeze)
   rn_hts_ini_n     =   0.3           !  initial real snow thickness (m), North
   rn_hts_ini_s     =   0.3           !        "            "             South
   rn_hti_ini_n     =   3.0           !  initial real ice thickness  (m), North
   rn_hti_ini_s     =   1.0           !        "            "             South
   rn_ati_ini_n     =   0.9           !  initial ice concentration   (-), North
   rn_ati_ini_s     =   0.9           !        "            "             South
   rn_smi_ini_n     =   6.3           !  initial ice salinity     (g/kg), North
   rn_smi_ini_s     =   6.3           !        "            "             South
   rn_tmi_ini_n     = 270.            !  initial ice/snw temperature (K), North
   rn_tmi_ini_s     = 270.            !        "            "             South

   sn_hti = 'Ice_initialization'    , -12 ,'hti'   ,  .false.  , .true., 'yearly'  , '' , '', ''
   sn_hts = 'Ice_initialization'    , -12 ,'hts'   ,  .false.  , .true., 'yearly'  , '' , '', ''
   sn_ati = 'Ice_initialization'    , -12 ,'ati'   ,  .false.  , .true., 'yearly'  , '' , '', ''
   sn_tsu = 'Ice_initialization'    , -12 ,'tsu'   ,  .false.  , .true., 'yearly'  , '' , '', ''
   sn_tmi = 'Ice_initialization'    , -12 ,'tmi'   ,  .false.  , .true., 'yearly'  , '' , '', ''
   sn_smi = 'Ice_initialization'    , -12 ,'smi'   ,  .false.  , .true., 'yearly'  , '' , '', ''
   cn_dir ='./'
/
!------------------------------------------------------------------------------
&namalb         !   albedo parameters
!------------------------------------------------------------------------------
   !                                  !                          !  obs range (cloud-sky)
   rn_alb_sdry      =   0.85          !  dry snow albedo         :  0.85 -- 0.87
   rn_alb_smlt      =   0.75          !  melting snow albedo     :  0.72 -- 0.82
   rn_alb_idry      =   0.60          !  dry ice albedo          :  0.54 -- 0.65
   rn_alb_imlt      =   0.50          !  bare puddled ice albedo :  0.49 -- 0.58
   rn_alb_dpnd      =   0.27          !  ponded ice albedo       :  0.10 -- 0.30 
/
!------------------------------------------------------------------------------
&namdia         !   Diagnostics
!------------------------------------------------------------------------------
   ln_icediachk     = .false.         !  check online the heat, mass & salt budgets (T) or not (F)
   ln_icediahsb     = .false.         !  output the heat, mass & salt budgets (T) or not (F)
   ln_icectl        = .false.         !  ice points output for debug (T or F)
   iiceprt          =  10             !  i-index for debug
   jiceprt          =  10             !  j-index for debug
/
