From 10fd1134aba6ea0c748fbd47cc95a9172ac6b838 Mon Sep 17 00:00:00 2001
From: Daley Calvert <dcalve@users.noreply.github.com>
Date: Thu, 7 Nov 2024 14:07:09 +0000
Subject: [PATCH] Update for branch_5.0 (64dcb5b0)

---
 nam_asminc | 38 +++++++++++++++++++------------
 nam_tide   |  1 -
 namc1d     | 11 +++++++++
 namcfg     |  3 ---
 namctl     |  3 ++-
 namdom     |  7 +++---
 namdta_dyn |  2 +-
 namdyn_adv |  2 +-
 namdyn_hpg |  1 -
 namdyn_spg | 14 +++++++-----
 namdyn_vor |  1 -
 nameos     |  3 +++
 nammpp     |  3 ++-
 namnc4     |  6 ++---
 namobs     | 66 ++++++++----------------------------------------------
 namrun     |  1 +
 namsbc     |  6 +++--
 namsbc_abl | 12 +++++-----
 namsbc_blk | 18 ++++++++++++---
 namsbc_cpl | 29 ++++++++++++------------
 namsbc_fwb |  6 +++++
 namtra_adv |  1 +
 namtra_eiv |  4 +++-
 namtra_qsr |  6 ++---
 24 files changed, 122 insertions(+), 122 deletions(-)

diff --git a/nam_asminc b/nam_asminc
index 9b3e7f9..b3a1cd0 100644
--- a/nam_asminc
+++ b/nam_asminc
@@ -1,18 +1,28 @@
 !-----------------------------------------------------------------------
 &nam_asminc    !   assimilation increments                              ('key_asminc')
 !-----------------------------------------------------------------------
-    ln_bkgwri  = .false.   !  Logical switch for writing out background state
-    ln_trainc  = .false.   !  Logical switch for applying tracer increments
-    ln_dyninc  = .false.   !  Logical switch for applying velocity increments
-    ln_sshinc  = .false.   !  Logical switch for applying SSH increments
-    ln_asmdin  = .false.   !  Logical switch for Direct Initialization (DI)
-    ln_asmiau  = .false.   !  Logical switch for Incremental Analysis Updating (IAU)
-    nitbkg     = 0         !  Timestep of background in [0,nitend-nit000-1]
-    nitdin     = 0         !  Timestep of background for DI in [0,nitend-nit000-1]
-    nitiaustr  = 1         !  Timestep of start of IAU interval in [0,nitend-nit000-1]
-    nitiaufin  = 15        !  Timestep of end of IAU interval in [0,nitend-nit000-1]
-    niaufn     = 0         !  Type of IAU weighting function
-    ln_salfix  = .false.   !  Logical switch for ensuring that the sa > salfixmin
-    salfixmin  = -9999     !  Minimum salinity after applying the increments
-    nn_divdmp  = 0         !  Number of iterations of divergence damping operator
+   ln_bkgwri     = .false.    ! Logical switch for writing out background state
+   ln_trainc     = .false.    ! Logical switch for applying tracer increments
+   ln_dyninc     = .false.    ! Logical switch for applying velocity increments
+   ln_sshinc     = .false.    ! Logical switch for applying SSH increments
+   ln_sicinc     = .false.    ! Logical switch for applying sea ice concentration increments
+   ln_sitinc     = .false.    ! Logical switch for applying sea ice thickness increments
+   ln_asmdin     = .false.    ! Logical switch for Direct Initialization (DI)
+   ln_asmiau     = .false.    ! Logical switch for Incremental Analysis Updating (IAU)
+   nn_itbkg      = 0          ! Timestep of background in [0,nitend-nit000-1]
+   nn_itdin      = 0          ! Timestep of background for DI in [0,nitend-nit000-1]
+   nn_itiaustr   = 1          ! Timestep of start of IAU interval in [0,nitend-nit000-1]
+   nn_itiaufin   = 15         ! Timestep of end of IAU interval in [0,nitend-nit000-1]
+   nn_iaufn      = 0          ! Type of IAU weighting function
+   ln_temnofreeze=.false.     ! Don't allow the temperature to drop below freezing
+   nn_divdmp     = 0          ! Number of iterations of divergence damping operator
+   ln_bv_check   = .false.    ! Don't apply T/S increments where Brunt-Vaisala (N2) checks fail
+   rn_bv_thres   = 0.0        ! Brunt-Vaisala threshold for applying T/S increments
+   rn_zmin_bv    = 400.0      ! Min depth to verify Brunt-Vaisala (N2) values
+   rn_zmax_bv    = 1500.0     ! Max depth to verify Brunt-Vaisala (N2) values
+   ln_salfix     = .false.    ! Logical switch for ensuring that the sa > salfixmin
+   rn_salfixmin  = -9999.0    ! Minimum salinity after applying the increments
+   rn_zhi_damin  = 0.45       ! Ice thickness for new sea ice from DA increment
+   rn_ai_damin   = 0.15       ! Minimum total ice concentration to apply ice thickness increments
+   rn_acat_damin = 0.01       ! Minimum ice concentration at category level to apply ice thickness increments
 /
diff --git a/nam_tide b/nam_tide
index 969621f..5e1aa1e 100644
--- a/nam_tide
+++ b/nam_tide
@@ -4,7 +4,6 @@
    ln_tide     = .false.      ! Activate tides
       nn_tide_var   = 1          !  Variant of tidal parameter set and tide-potential computation
       !                          !     (1: default; 0: compatibility with previous versions)
-      ln_tide_dia   = .false.    !  Enable tidal diagnostic output
       ln_tide_pot   = .false.               !  use tidal potential forcing
          rn_tide_gamma = 0.7                   ! Tidal tilt factor
          ln_scal_load  = .false.               ! Use scalar approximation for
diff --git a/namc1d b/namc1d
index 6bdcd38..c923251 100644
--- a/namc1d
+++ b/namc1d
@@ -3,4 +3,15 @@
 !-----------------------------------------------------------------------
    rn_lat1d    =    50.1   !  Column latitude
    rn_lon1d    =  -144.9   !  Column longitude
+   ln_dyndmp   =  .false.  !  add a  U & V newtonian damping term (T) or not (F)
+   !                       !  =T read U-V fields for:
+   ln_uvd_init   = .false.       !  ocean initialisation
+   ln_uvd_dyndmp = .false.       !  U-V restoring
+
+   cn_dir      = './'      !  root directory for the U-V data location
+   !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________!
+   !           !  file name              ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
+   !           !                         !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' !                  ! pairing  !    filename   !
+   sn_ucur     = 'ucurrent'              ,         -1.       ,'u_current',   .false.   , .true. , 'monthly' ,  ''              ,  'Ume'   , ''
+   sn_vcur     = 'vcurrent'              ,         -1.       ,'v_current',   .false.   , .true. , 'monthly' ,  ''              ,  'Vme'   , ''
 /
diff --git a/namcfg b/namcfg
index 7272a36..ca528e2 100644
--- a/namcfg
+++ b/namcfg
@@ -10,7 +10,4 @@
       !
    ln_write_cfg = .false.    !  (=T) create the domain configuration file
       cn_domcfg_out = "domain_cfg_out" ! newly created domain configuration filename
-      !
-   ln_use_jattr = .false.    !  use (T) the file attribute: open_ocean_jstart, if present
-   !                         !  in netcdf input files, as the start j-row for reading
 /
diff --git a/namctl b/namctl
index 299048d..dee2c14 100644
--- a/namctl
+++ b/namctl
@@ -1,13 +1,14 @@
 !-----------------------------------------------------------------------
 &namctl        !   Control prints                                       (default: OFF)
 !-----------------------------------------------------------------------
-   sn_cfctl%l_runstat = .TRUE.    ! switches and which areas produce reports with the proc integer settings.
+   sn_cfctl%l_runstat = .FALSE.    ! switches and which areas produce reports with the proc integer settings.
    sn_cfctl%l_trcstat = .FALSE.   ! The default settings for the proc integers should ensure
    sn_cfctl%l_oceout  = .FALSE.   ! that  all areas report.
    sn_cfctl%l_layout  = .FALSE.   !
    sn_cfctl%l_prtctl  = .FALSE.   !
    sn_cfctl%l_prttrc  = .FALSE.   !
    sn_cfctl%l_oasout  = .FALSE.   !
+   sn_cfctl%l_obsstat = .FALSE.   !
    sn_cfctl%procmin   = 0         ! Minimum area number for reporting [default:0]
    sn_cfctl%procmax   = 1000000   ! Maximum area number for reporting [default:1000000]
    sn_cfctl%procincr  = 1         ! Increment for optional subsetting of areas [default:1]
diff --git a/namdom b/namdom
index edd958b..6e310dd 100644
--- a/namdom
+++ b/namdom
@@ -1,13 +1,12 @@
 !-----------------------------------------------------------------------
 &namdom        !   time and space domain
 !-----------------------------------------------------------------------
-   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time
-   !
    rn_Dt       = 5400.     !  time step for the dynamics and tracer
    rn_atfp     =    0.1    !  asselin time filter parameter
    !
-   ln_crs      = .false.   !  Logical switch for coarsening module      (T => fill namcrs)
    ln_c1d      = .false.   !  Single column domain (1x1pt)              (T => fill namc1d)
    !
-   ln_meshmask = .true.   !  =T create a mesh file
+   ln_meshmask = .true.    !  =T create a mesh file
+   !
+   ln_shuman   = .false.   !  =T  shuman averaging active  (RK3 only)
 /
diff --git a/namdta_dyn b/namdta_dyn
index 4a28fd0..7b8e674 100644
--- a/namdta_dyn
+++ b/namdta_dyn
@@ -12,7 +12,7 @@
    sn_sal      = 'dyna_grid_T'           ,       120.        , 'vosaline'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , ''
    sn_mld      = 'dyna_grid_T'           ,       120.        , 'somixhgt'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , ''
    sn_emp      = 'dyna_grid_T'           ,       120.        , 'sowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , ''
-   sn_fmf      = 'dyna_grid_T'           ,       120.        , 'iowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , ''
+   sn_fwf      = 'dyna_grid_T'           ,       120.        , 'iowaflup'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , ''
    sn_ice      = 'dyna_grid_T'           ,       120.        , 'soicecov'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , ''
    sn_qsr      = 'dyna_grid_T'           ,       120.        , 'soshfldo'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , ''
    sn_wnd      = 'dyna_grid_T'           ,       120.        , 'sowindsp'  ,  .true.   , .true. , 'yearly'  , ''               , ''       , ''
diff --git a/namdyn_adv b/namdyn_adv
index 99cae4a..8b96b18 100644
--- a/namdyn_adv
+++ b/namdyn_adv
@@ -5,5 +5,5 @@
    ln_dynadv_vec = .false. !  vector form - 2nd centered scheme
      nn_dynkeg     = 0        ! grad(KE) scheme: =0   C2  ;  =1   Hollingsworth correction
    ln_dynadv_cen2 = .false. !  flux form - 2nd order centered scheme
-   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+   ln_dynadv_up3 = .false. !  flux form - 3rd order UBS      scheme
 /
diff --git a/namdyn_hpg b/namdyn_hpg
index 08bab2c..2744300 100644
--- a/namdyn_hpg
+++ b/namdyn_hpg
@@ -2,7 +2,6 @@
 &namdyn_hpg    !   Hydrostatic pressure gradient option                 (default: NO selection)
 !-----------------------------------------------------------------------
    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)
diff --git a/namdyn_spg b/namdyn_spg
index 057b41f..e295d59 100644
--- a/namdyn_spg
+++ b/namdyn_spg
@@ -4,12 +4,14 @@
    ln_dynspg_exp  = .false.   ! explicit free surface
    ln_dynspg_ts   = .false.   ! split-explicit free surface
       ln_bt_fw      = .true.     ! Forward integration of barotropic Eqs.
-      ln_bt_av      = .true.     ! Time filtering of barotropic variables
-         nn_bt_flt     = 1          ! Time filter choice  = 0 None
-         !                          !                     = 1 Boxcar over   nn_e sub-steps
-         !                          !                     = 2 Boxcar over 2*nn_e  "    "
+      nn_bt_flt     = 1          ! Add dissipation with either boxcar averaging or dissipative Forward-Backward
+      !                          !                     = 0 None
+      !                          !                     = 1 Boxcar over   nn_e sub-steps
+      !                          !                     = 2 Boxcar over 2*nn_e  "    "
+      !                          !                     = 3 Temporal dissipation (Demange 2019)
+      rn_bt_alpha   =  0.           ! (if nn_bt_flt=3) ==> Temporal diffusion parameter (recommended values = 0.07-0.09)
+      !
       ln_bt_auto    = .true.     ! Number of sub-step defined from:
          rn_bt_cmax   =  0.8        ! =T : the Maximum Courant Number allowed
-         nn_e         = 30          ! =F : the number of sub-step in rn_Dt seconds
-      rn_bt_alpha   = 0.         ! Temporal diffusion parameter (if ln_bt_av=F)
+         nn_e         =  30         ! =F : the number of sub-step in rn_Dt seconds
 /
diff --git a/namdyn_vor b/namdyn_vor
index 9bf5ff9..8f706bf 100644
--- a/namdyn_vor
+++ b/namdyn_vor
@@ -5,7 +5,6 @@
    ln_dynvor_ens = .false. !  enstrophy conserving scheme
    ln_dynvor_mix = .false. !  mixed scheme
    ln_dynvor_enT = .false. !  energy conserving scheme (T-point)
-   ln_dynvor_eeT = .false. !  energy conserving scheme (een using e3t)
    ln_dynvor_een = .false. !  energy & enstrophy scheme
    !
    ln_dynvor_msk = .false. !  vorticity multiplied by fmask (=T)        ==>>> PLEASE DO NOT ACTIVATE
diff --git a/nameos b/nameos
index 7ed05f6..9b022fc 100644
--- a/nameos
+++ b/nameos
@@ -7,6 +7,9 @@
                                  !
    !                     ! S-EOS coefficients (ln_seos=T):
    !                             !  rd(T,S,Z)*rho0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS
+   !                             !    dT = T-rn_T0 ; dS = S-rn_S0
+   rn_T0       = 10.             !  reference temperature
+   rn_S0       = 35.             !  reference salinity
    rn_a0       =  1.6550e-1      !  thermal expension coefficient
    rn_b0       =  7.6554e-1      !  saline  expension coefficient
    rn_lambda1  =  5.9520e-2      !  cabbeling coeff in T^2  (=0 for linear eos)
diff --git a/nammpp b/nammpp
index f199b72..fec93d7 100644
--- a/nammpp
+++ b/nammpp
@@ -4,8 +4,9 @@
    ln_listonly =  .false.  !  do nothing else than listing the best domain decompositions (with land domains suppression)
    !                       !  if T: the largest number of cores tested is defined by max(mppsize, jpni*jpnj)
    ln_nnogather =  .true.  !  activate code to avoid mpi_allgather use at the northfold
+   ln_mppdelay  =  .true.  !  activate delayed global communications to go faster
    jpni        =   0       !  number of processors following i (set automatically if < 1), see also ln_listonly = T
    jpnj        =   0       !  number of processors following j (set automatically if < 1), see also ln_listonly = T
-   nn_hls      =   1       !  halo width (applies to both rows and columns)
+   nn_hls      =   2       !  halo width (applies to both rows and columns)
    nn_comm     =   1       !  comm choice
 /
diff --git a/namnc4 b/namnc4
index d614059..0ab8135 100644
--- a/namnc4
+++ b/namnc4
@@ -1,11 +1,11 @@
 !-----------------------------------------------------------------------
-&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
+&namnc4        !   netcdf4 chunking and compression settings
 !-----------------------------------------------------------------------
    nn_nchunks_i =   4       !  number of chunks in i-dimension
    nn_nchunks_j =   4       !  number of chunks in j-dimension
    nn_nchunks_k =   31      !  number of chunks in k-dimension
    !                       !  setting nn_nchunks_k = jpk will give a chunk size of 1 in the vertical which
    !                       !  is optimal for postprocessing which works exclusively with horizontal slabs
-   ln_nc4zip   = .true.    !  (T) use netcdf4 chunking and compression
-   !                       !  (F) ignore chunking information and produce netcdf3-compatible files
+   ln_nc4zip   = .false.   !  (T) use netcdf4 chunking and compression
+   !                       !  (F) ignore chunking and compression information (netcdf3 compatible file)
 /
diff --git a/namobs b/namobs
index 4c4ad00..3fe9b4a 100644
--- a/namobs
+++ b/namobs
@@ -1,60 +1,12 @@
 !-----------------------------------------------------------------------
-&namobs        !  observation usage switch                              (default: OFF)
+&namobs       !  observation and model comparison                       (default: OFF)
 !-----------------------------------------------------------------------
-   ln_diaobs   = .false.             ! Logical switch for the observation operator
-   !
-   ln_t3d      = .false.             ! Logical switch for T profile observations
-   ln_s3d      = .false.             ! Logical switch for S profile observations
-   ln_sla      = .false.             ! Logical switch for SLA observations
-   ln_sst      = .false.             ! Logical switch for SST observations
-   ln_sss      = .false.             ! Logical swithc for SSS observations
-   ln_sic      = .false.             ! Logical switch for Sea Ice observations
-   ln_vel3d    = .false.             ! Logical switch for velocity observations
-   ln_altbias  = .false.             ! Logical switch for altimeter bias correction
-   ln_sstbias  = .false.             ! Logical switch for SST bias correction
-   ln_nea      = .false.             ! Logical switch for rejection of observations near land
-   ln_grid_global = .true.           ! Logical switch for global distribution of observations
-   ln_grid_search_lookup = .false.   ! Logical switch for obs grid search w/lookup table
-   ln_ignmis   = .true.              ! Logical switch for ignoring missing files
-   ln_s_at_t   = .false.             ! Logical switch for computing model S at T obs if not there
-   ln_sstnight = .false.             ! Logical switch for calculating night-time average for SST obs
-   ln_bound_reject  = .false.        ! Logical to remove obs near boundaries in LAMs.
-   ln_default_fp_indegs = .true.     ! Logical: T=> averaging footprint is in degrees, F=> in metres
-   ln_sla_fp_indegs = .true.         ! Logical for SLA: T=> averaging footprint is in degrees, F=> in metres
-   ln_sst_fp_indegs = .true.         ! Logical for SST: T=> averaging footprint is in degrees, F=> in metres
-   ln_sss_fp_indegs = .true.         ! Logical for SSS: T=> averaging footprint is in degrees, F=> in metres
-   ln_sic_fp_indegs = .true.         ! Logical for SIC: T=> averaging footprint is in degrees, F=> in metres
-! All of the *files* variables below are arrays. Use namelist_cfg to add more files
-   cn_profbfiles = 'profiles_01.nc'  ! Profile feedback input observation file names
-   cn_slafbfiles = 'sla_01.nc'       ! SLA feedback input observation file names
-   cn_sstfbfiles = 'sst_01.nc'       ! SST feedback input observation file names
-   cn_sssfbfiles = 'sss_01.nc'       ! SSS feedback input observation file names
-   cn_sicfbfiles = 'sic_01.nc'       ! SIC feedback input observation file names
-   cn_velfbfiles = 'vel_01.nc'       ! Velocity feedback input observation file names
-   cn_altbiasfile = 'altbias.nc'     ! Altimeter bias input file name
-   cn_sstbiasfiles = 'sstbias.nc'    ! SST bias input file name
-   cn_gridsearchfile ='gridsearch.nc' ! Grid search file name
-   rn_gridsearchres = 0.5            ! Grid search resolution
-   rn_default_avglamscl = 0.         ! Default E/W diameter of observation footprint (metres/degrees)
-   rn_default_avgphiscl = 0.         ! Default N/S diameter of observation footprint (metres/degrees)
-   rn_mdtcorr  = 1.61                ! MDT  correction
-   rn_mdtcutoff = 65.0               ! MDT cutoff for computed correction
-   rn_dobsini  = 00010101.000000     ! Initial date in window YYYYMMDD.HHMMSS
-   rn_dobsend  = 00010102.000000     ! Final date in window YYYYMMDD.HHMMSS
-   rn_sla_avglamscl = 0.             ! E/W diameter of SLA observation footprint (metres/degrees)
-   rn_sla_avgphiscl = 0.             ! N/S diameter of SLA observation footprint (metres/degrees)
-   rn_sst_avglamscl = 0.             ! E/W diameter of SST observation footprint (metres/degrees)
-   rn_sst_avgphiscl = 0.             ! N/S diameter of SST observation footprint (metres/degrees)
-   rn_sss_avglamscl = 0.             ! E/W diameter of SSS observation footprint (metres/degrees)
-   rn_sss_avgphiscl = 0.             ! N/S diameter of SSS observation footprint (metres/degrees)
-   rn_sic_avglamscl = 0.             ! E/W diameter of SIC observation footprint (metres/degrees)
-   rn_sic_avgphiscl = 0.             ! N/S diameter of SIC observation footprint (metres/degrees)
-   nn_1dint = 0                      ! Type of vertical interpolation method
-   nn_2dint_default = 0              ! Default horizontal interpolation method
-   nn_2dint_sla = 0                  ! Horizontal interpolation method for SLA
-   nn_2dint_sst = 0                  ! Horizontal interpolation method for SST
-   nn_2dint_sss = 0                  ! Horizontal interpolation method for SSS
-   nn_2dint_sic = 0                  ! Horizontal interpolation method for SIC
-   nn_msshc     = 0                  ! MSSH correction scheme
-   nn_profdavtypes = -1              ! Profile daily average types - array
+   ln_diaobs             = .false.         ! Logical switch for the observation operator
+   nn_obsgroups          = 0               ! Number of observation group namelists (namobs_dta) to read in
+   ln_grid_global        = .true.          ! Logical switch for global distribution of observations
+   ln_grid_search_lookup = .false.         ! Logical switch for obs grid search w/lookup table
+   cn_gridsearchfile     = 'grid_search'   ! Grid search file name header
+   rn_gridsearchres      = 0.5             ! Grid search resolution
+   dn_dobsini            = 00010101.000000 ! Initial date in window YYYYMMDD.HHMMSS
+   dn_dobsend            = 99991231.000000 ! Final date in window YYYYMMDD.HHMMSS
 /
diff --git a/namrun b/namrun
index eb96239..7ebb49a 100644
--- a/namrun
+++ b/namrun
@@ -33,4 +33,5 @@
    nn_chunksz  =       0   !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
    ln_xios_read = .false.  !  use XIOS to read restart file (only for a single file restart)
    nn_wxios = 0      !  use XIOS to write restart file 0 - no, 1 - single file output, 2 - multiple file output
+   ln_top      = .true.    !  Consider (T) or bypass (F) the TOP routines when the key_top is activated
 /
diff --git a/namsbc b/namsbc
index 32af4b0..2ffd800 100644
--- a/namsbc
+++ b/namsbc
@@ -26,8 +26,10 @@
    ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
    ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
    nn_fwb      = 0         !  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
+      !                    !     =1 volume set to zero at each time step
+      !                    !     =2 volume adjusted from previous year budget (uniform correction to emp)
+      !                    !     =3 volume adjusted from previous year budget (non-uniform correction - proportional to erp)
+      !                    !     =4 special treatment for ISOMIP+ test case
    ln_rnf      = .false.   !  runoffs                                   (T => fill namsbc_rnf)
    ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
    ln_wave     = .false.   !  Activate coupling with wave  (T => fill namsbc_wave)
diff --git a/namsbc_abl b/namsbc_abl
index 77d6054..ea354a9 100644
--- a/namsbc_abl
+++ b/namsbc_abl
@@ -2,7 +2,7 @@
 &namsbc_abl    !   Atmospheric Boundary Layer formulation           (ln_abl = T)
 !-----------------------------------------------------------------------
    cn_dir           = './'      !  root directory for the location of the ABL grid file
-   cn_dom           = 'dom_cfg_abl.nc'
+   cn_dom           = 'dom_cfg_abl'
 
    cn_ablrst_in     = "restart_abl"   !  suffix of abl restart name (input)
    cn_ablrst_out    = "restart_abl"   !  suffix of abl restart name (output)
@@ -11,15 +11,17 @@
 
    ln_rstart_abl  = .false.
    ln_hpgls_frc   = .false.
+      ln_pga_abl  = .false.   ! ABL pressure gradient anomaly forcing
    ln_geos_winds  = .false.
    ln_smth_pblh   = .false.
    nn_dyn_restore = 0         ! restoring option for dynamical ABL variables: = 0 no restoring
                               !                                               = 1 equatorial restoring
                               !                                               = 2 global restoring
-   rn_ldyn_min   =  4.5       ! dynamics nudging magnitude inside the ABL [hour] (~3 rn_Dt)
-   rn_ldyn_max   =  1.5       ! dynamics nudging magnitude above  the ABL [hour] (~1 rn_Dt)
-   rn_ltra_min   =  4.5       ! tracers  nudging magnitude inside the ABL [hour] (~3 rn_Dt)
-   rn_ltra_max   =  1.5       ! tracers  nudging magnitude above  the ABL [hour] (~1 rn_Dt)
+   rn_ldyn_min   =  0.        ! dynamics nudging magnitude inside the ABL [hour] (~3 rn_Dt)
+   rn_ldyn_max   =  0.        ! dynamics nudging magnitude above  the ABL [hour] (~1 rn_Dt)
+   rn_ltra_min   =  0.        ! tracers  nudging magnitude inside the ABL [hour] (~3 rn_Dt)
+   rn_ltra_max   =  0.        ! tracers  nudging magnitude above  the ABL [hour] (~1 rn_Dt)
+   rn_vfac       =  0.
    nn_amxl       =  0         ! mixing length: = 0 Deardorff 80 length-scale
                               !                = 1 length-scale based on the distance to the PBL height
                               !                = 2 Bougeault & Lacarrere 89 length-scale
diff --git a/namsbc_blk b/namsbc_blk
index ce9ff51..d114055 100644
--- a/namsbc_blk
+++ b/namsbc_blk
@@ -6,6 +6,7 @@
    ln_COARE_3p0 = .false.    ! "COARE 3.0" algorithm   (Fairall et al. 2003)
    ln_COARE_3p6 = .false.    ! "COARE 3.6" algorithm   (Edson et al. 2013)
    ln_ECMWF     = .false.    ! "ECMWF"     algorithm   (IFS cycle 45r1)
+   ln_MFS       = .false.    ! "MFS"       algorithm   (MFS/BS Copernicus, Petenuzzo et al 2010)
    ln_ANDREAS   = .false.    ! "ANDREAS"   algorithm   (Andreas et al. 2015)
       rn_zqt       = 10.     !  Air temperature & humidity reference height (m)
       rn_zu        = 10.     !  Wind vector reference height (m)
@@ -24,12 +25,23 @@
    ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K]
    ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%]
    ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.)
+   ln_prec_met = .false. !  precipitation read in "sn_prec" is in [m] 
    !!   
    !! Bulk transfer coefficients over sea-ice: (relevant IF: nn_ice >=1 )
    ln_Cx_ice_cst = .true.     ! use constant ice-air bulk transfer coefficients (value given below)
-      rn_Cd_i  = 1.4e-3       ! sea-ice drag coefficient
-      rn_Ce_i  = 1.4e-3       !    "    sublimation coefficient
-      rn_Ch_i  = 1.4e-3       !    "    sensible heat flux coefficient
+      rn_Cd_ia  = 1.4e-3      ! sea-ice drag coefficient
+      rn_Ce_ia  = 1.4e-3      !    "    sublimation coefficient
+      rn_Ch_ia  = 1.4e-3      !    "    sensible heat flux coefficient
+   ln_Cx_ice_frm = .false.    ! use form drag param from Tsamadoes et al. 2014
+      nn_frm = 2              !     = 1 : affects      momentum and heat transfer coefficient (ocean-ice and atmos-ice)
+                              !     = 2 : affects only momentum          transfer coefficient (ocean-ice and atmos-ice) (default)
+                              !     = 3 : affect       momentum and heat transfer coefficient (atmos-ice), and only momentum transfer coefficient (ocean-ice)
+      rn_Cs_io = 0.002        ! ice-ocn skin drag [0.0005,0.005]
+      rn_Cs_ia = 0.0005       ! ice-air skin drag [0.0001,0.001]
+      rn_Cr_ia = 0.2          ! ridge/keel drag coefficient [0,1]
+      rn_Cr_io = 0.2          ! ridge/keel drag coefficient [0,1]
+      rn_Cf_ia = 0.2          ! floe edge atm [0,1]
+      rn_Cf_io = 0.2          ! floe edge ocean [0,1]
    ln_Cx_ice_AN05  = .false.  !  (Andreas et al. 2005)
    ln_Cx_ice_LU12  = .false.  !  (Lupkes et al. 2012)
    ln_Cx_ice_LG15  = .false.  !  (Lupkes & Gryanik 2015)
diff --git a/namsbc_cpl b/namsbc_cpl
index 759320a..f79a4e1 100644
--- a/namsbc_cpl
+++ b/namsbc_cpl
@@ -26,7 +26,7 @@
 !***  receive  ***
    sn_rcv_w10m   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
    sn_rcv_taumod =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
-   sn_rcv_tau    =   'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward' ,  'U,V'
+   sn_rcv_tau    =   'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward' ,   ''
    sn_rcv_dqnsdt =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
    sn_rcv_qsr    =   'oce and ice'          ,    'no'    ,     ''      ,         ''           ,   ''
    sn_rcv_qns    =   'oce and ice'          ,    'no'    ,     ''      ,         ''           ,   ''
@@ -37,19 +37,20 @@
    sn_rcv_iceflx =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
    sn_rcv_mslp   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
    sn_rcv_ts_ice =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qtrice =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
    sn_rcv_isf    =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
    sn_rcv_icb    =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
-   sn_rcv_hsig   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_phioc  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_sdrfx  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_sdrfy  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_wper   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_wnum   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_wstrf  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_wdrag  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_charn  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_taw    =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'U,V'
-   sn_rcv_bhd    =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_tusd   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
-   sn_rcv_tvsd   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   'T'
+   sn_rcv_hsig   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_phioc  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_sdrfx  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_sdrfy  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_wper   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_wnum   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_wstrf  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_wdrag  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_charn  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_taw    =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_bhd    =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_tusd   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_tvsd   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
 /
diff --git a/namsbc_fwb b/namsbc_fwb
index f2ffcf5..73d7150 100644
--- a/namsbc_fwb
+++ b/namsbc_fwb
@@ -2,4 +2,10 @@
 &namsbc_fwb    !   freshwater-budget adjustment                         (nn_fwb > 0)
 !-----------------------------------------------------------------------
    rn_fwb0     = 0.0          ! Initial freshwater adjustment flux [kg/m2/s] (nn_fwb = 2)
+   nn_fwb_voltype = 1         ! = 1 : Control ICE+OCEAN volume
+      !                       ! = 2 : Control     OCEAN volume
+   ln_hvolg_var = .false.     ! = T : Set an analytical variation of volume:
+      rn_hvolg_amp = 17.e-3      ! Peak to peak seasonnal variation (m)
+      rn_hvolg_trd =  0.0        ! Trend (m/s)
+      nn_hvolg_mth = 8           ! Month when volume anomaly crosses 0 (1-12)
 /
diff --git a/namtra_adv b/namtra_adv
index 8d19936..bcefb8a 100644
--- a/namtra_adv
+++ b/namtra_adv
@@ -8,6 +8,7 @@
    ln_traadv_fct = .false. !  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_imp =  1            !  =1/2, optimized / accurate treatment of implicit part
    ln_traadv_mus = .false. !  MUSCL scheme
       ln_mus_ups = .false.       !  use upstream scheme near river mouths
    ln_traadv_ubs = .false. !  UBS scheme
diff --git a/namtra_eiv b/namtra_eiv
index 93ea23b..ff70d89 100644
--- a/namtra_eiv
+++ b/namtra_eiv
@@ -11,9 +11,11 @@
       !                             !   = 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
+      !                             !   = 32 F(i,j,t)  = GEOMETRIC parameterization        (=> fill namldf_eke)
       !                        !  time invariant coefficients:  aei0 = 1/2  Ue*Le
       rn_Ue        = 0.02           !  lateral diffusive velocity [m/s] (nn_aht_ijk_t= 0, 10, 20, 30)
       rn_Le        = 200.e+3        !  lateral diffusive length   [m]   (nn_aht_ijk_t= 0, 10)
       !
-      ln_ldfeiv_dia =.false.   ! diagnose eiv stream function and velocities
+      ln_eke_equ    =.false.   ! switch on update of GEOMETRIC eddy energy equation        (=> fill namldf_eke)
+                               ! forced to be true if nn_aei_ijk_t = 32
 /
diff --git a/namtra_qsr b/namtra_qsr
index 2fd33d6..6bd41be 100644
--- a/namtra_qsr
+++ b/namtra_qsr
@@ -6,14 +6,14 @@
    ln_qsr_2bd  = .false.      !  2BD light penetration (two bands)
    ln_qsr_5bd  = .false.      !  5BD light penetration (IR-Red-Green-Blue-UV)
    ln_qsr_bio  = .false.      !  bio-model light penetration
-   !                       !  RGB & 2BD choices:
+   !                       !  RGB, 2BD & 5BD choices:
    rn_abs      =   0.58       !  RGB & 2BD: fraction absorbed in the very near surface
    rn_si0      =   0.35       !  RGB & 2BD: shortess depth of extinction
-   nn_chldta   =      0       !  RGB : Chl data (=1) or cst value (=0)
+   nn_chldta   =      0       !  RGB : 3D Chl data (=2), Surface Chl data (=1) or Cst value (=0)
    rn_si1      =   23.0       !  2BD : longest depth of extinction
    rn_par      =   0.47       !  5BD : fraction of photosynthetically active radiation
 
-   cn_dir      = './'      !  root directory for the chlorophyl data location
+   cn_dir      = './'      !  root directory for the chlorophyll data location
    !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________!
    !           !  file name              ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
    !           !                         !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' !                  ! pairing  !    filename   !
-- 
GitLab