Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namage
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namage	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namage	(revision 10345)
@@ -0,0 +1,6 @@
+!-----------------------------------------------------------------------
+&namage          !   AGE 
+!-----------------------------------------------------------------------
+   rn_age_depth      = 10            ! depth over which age tracer reset to zero
+   rn_age_kill_rate  = -0.000138888  !  = -1/7200 recip of relaxation timescale (s) for  age tracer shallower than age_depth
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namalb
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namalb	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namalb	(revision 10345)
@@ -0,0 +1,10 @@
+!------------------------------------------------------------------------------
+&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 
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdia
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdia	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdia	(revision 10345)
@@ -0,0 +1,9 @@
+!------------------------------------------------------------------------------
+&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
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn	(revision 10345)
@@ -0,0 +1,17 @@
+!------------------------------------------------------------------------------
+&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]
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn_rdgrft
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn_rdgrft	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn_rdgrft	(revision 10345)
@@ -0,0 +1,25 @@
+!------------------------------------------------------------------------------
+&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)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn_rhg
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn_rhg	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namdyn_rhg	(revision 10345)
@@ -0,0 +1,11 @@
+!------------------------------------------------------------------------------
+&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)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namforcing
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namforcing	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namforcing	(revision 10345)
@@ -0,0 +1,13 @@
+!------------------------------------------------------------------------------
+&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)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namini
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namini	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namini	(revision 10345)
@@ -0,0 +1,25 @@
+!------------------------------------------------------------------------------
+&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 ='./'
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namitd
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namitd	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namitd	(revision 10345)
@@ -0,0 +1,9 @@
+!------------------------------------------------------------------------------
+&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
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/nampar
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/nampar	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/nampar	(revision 10345)
@@ -0,0 +1,18 @@
+!------------------------------------------------------------------------------
+&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
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd	(revision 10345)
@@ -0,0 +1,8 @@
+!------------------------------------------------------------------------------
+&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)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_da
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_da	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_da	(revision 10345)
@@ -0,0 +1,11 @@
+!------------------------------------------------------------------------------
+&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
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_do
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_do	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_do	(revision 10345)
@@ -0,0 +1,9 @@
+!------------------------------------------------------------------------------
+&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
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_pnd
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_pnd	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_pnd	(revision 10345)
@@ -0,0 +1,10 @@
+!------------------------------------------------------------------------------
+&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
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_sal
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_sal	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_sal	(revision 10345)
@@ -0,0 +1,15 @@
+!------------------------------------------------------------------------------
+&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)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_zdf
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_zdf	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namthd_zdf	(revision 10345)
@@ -0,0 +1,10 @@
+!------------------------------------------------------------------------------
+&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]
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc	(revision 10345)
@@ -0,0 +1,23 @@
+!-----------------------------------------------------------------------
+&namtrc          !   tracers definition
+!-----------------------------------------------------------------------
+   jp_bgc        =  0           !  Number of passive tracers of the BGC model
+   !
+   ln_pisces     =  .false.     !  Run PISCES BGC model 
+   ln_my_trc     =  .false.     !  Run MY_TRC BGC model
+   ln_age        =  .false.     !  Run the sea water age tracer
+   ln_cfc11      =  .false.     !  Run the CFC11 passive tracer
+   ln_cfc12      =  .false.     !  Run the CFC12 passive tracer
+   ln_sf6        =  .false.     !  Run the SF6 passive tracer
+   ln_c14        =  .false.     !  Run the Radiocarbon passive tracer
+   !
+   ln_trcdta     =  .false.  !  Initialisation from data input file (T) or not (F)
+   ln_trcdmp     =  .false.  !  add a damping termn (T) or not (F)
+   ln_trcdmp_clo =  .false.  !  damping term (T) or not (F) on closed seas
+   !
+   jp_dia3d      = 0         ! Number of 3D diagnostic variables
+   jp_dia2d      = 0         ! Number of 2D diagnostic variables
+   !_____________!___________!_________________________________________!____________!________________!
+   !             !    name   !           title of the field            !   units    ! init from file ! 
+!  sn_tracer(1)  = 'tracer  ', 'Tracer  Concentration                 ',   ' - '    ,   .false.
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_adv
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_adv	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_adv	(revision 10345)
@@ -0,0 +1,16 @@
+!-----------------------------------------------------------------------
+&namtrc_adv      !   advection scheme for passive tracer                (default: NO selection)
+!-----------------------------------------------------------------------
+   ln_trcadv_OFF =  .false.  !  No passive tracer advection
+   ln_trcadv_cen =  .false.  !  2nd order centered scheme
+      nn_cen_h   =  4               !  =2/4, horizontal 2nd order CEN / 4th order CEN
+      nn_cen_v   =  4               !  =2/4, vertical   2nd order CEN / 4th order COMPACT
+   ln_trcadv_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 
+   ln_trcadv_mus =  .false.  !  MUSCL scheme
+      ln_mus_ups =  .false.         !  use upstream scheme near river mouths
+   ln_trcadv_ubs =  .false.  !  UBS scheme
+      nn_ubs_v   =  2               !  =2  , vertical 2nd order FCT
+   ln_trcadv_qck =  .false.  !  QUICKEST scheme
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_bc
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_bc	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_bc	(revision 10345)
@@ -0,0 +1,9 @@
+!----------------------------------------------------------------------
+&namtrc_bc       !   data for boundary conditions
+!-----------------------------------------------------------------------
+   cn_dir_sbc    =  './'     !  root directory for the location of SURFACE data files
+   cn_dir_cbc    =  './'     !  root directory for the location of COASTAL data files
+   cn_dir_obc    =  './'     !  root directory for the location of OPEN data files
+   ln_rnf_ctl    = .false.   !  Remove runoff dilution on tracers with absent river load
+   rn_bc_time    =  86400.   !  Time scaling factor for SBC and CBC data (seconds in a day)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_bdy
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_bdy	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_bdy	(revision 10345)
@@ -0,0 +1,11 @@
+!----------------------------------------------------------------------
+&namtrc_bdy      !   Setup of tracer boundary conditions
+!-----------------------------------------------------------------------
+   cn_trc_dflt   = 'neumann' !  OBC applied by default to all tracers
+   cn_trc        = 'none'    !  Boundary conditions used for tracers with data files (selected in namtrc)
+
+   nn_trcdmp_bdy = 0         !  Use damping timescales defined in nambdy of namelist
+                             !  = 0 NO damping of tracers at open boudaries
+                             !  = 1 Only for tracers forced with external data
+                             !  = 2 Damping applied to all tracers
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_dmp
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_dmp	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_dmp	(revision 10345)
@@ -0,0 +1,8 @@
+!-----------------------------------------------------------------------
+&namtrc_dmp      !   passive tracer newtonian damping                   (ln_trcdmp=T)
+!-----------------------------------------------------------------------
+   nn_zdmp_tr    =    1      !  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_tr   = 'resto_tr.nc'    !  create a damping.coeff NetCDF file (=1) or not (=0)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_dta
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_dta	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_dta	(revision 10345)
@@ -0,0 +1,9 @@
+!-----------------------------------------------------------------------
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+!                !  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_trcdta(1)  = 'data_TRC_nomask' ,        -12        ,  'TRC'    ,    .false.   , .true. , 'yearly'  , ''       , ''       , ''
+   !
+   cn_dir        =  './'     !  root directory for the location of the data files
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_ice
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_ice	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_ice	(revision 10345)
@@ -0,0 +1,8 @@
+!-----------------------------------------------------------------------
+&namtrc_ice      !    Representation of sea ice growth & melt effects
+!-----------------------------------------------------------------------
+   nn_ice_tr     =  -1       !  tracer concentration in sea ice 
+                             !    =-1 (no vvl: identical cc in ice and ocean / vvl: cc_ice = 0)
+                             !    = 0 (no vvl: cc_ice = zero / vvl: cc_ice = )
+                             !    = 1 prescribed to a namelist value (implemented in pisces only)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_ldf
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_ldf	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_ldf	(revision 10345)
@@ -0,0 +1,10 @@
+!-----------------------------------------------------------------------
+&namtrc_ldf      !   lateral diffusion scheme for passive tracer        (default: NO selection)
+!-----------------------------------------------------------------------
+!                            !  Type of the operator:
+   ln_trcldf_OFF   =  .false.    !  No explicit diffusion
+   ln_trcldf_tra   =  .false.    !  use active tracer setting
+   !                         !  Coefficient (defined with namtra_ldf coefficient)
+   rn_ldf_multi    = 1.          !  multiplier of aht for TRC mixing coefficient
+   rn_fact_lap     = 1.          !  Equatorial enhanced zonal eddy diffusivity (lap only)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_rad
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_rad	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_rad	(revision 10345)
@@ -0,0 +1,5 @@
+!-----------------------------------------------------------------------
+&namtrc_rad      !  treatment of negative concentrations 
+!-----------------------------------------------------------------------
+   ln_trcrad     =  .true.   !  artificially correct negative concentrations (T) or not (F)
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_run
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_run	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_run	(revision 10345)
@@ -0,0 +1,14 @@
+!-----------------------------------------------------------------------
+&namtrc_run      !   run information
+!-----------------------------------------------------------------------
+   nn_dttrc      =  1        !  time step frequency for passive sn_tracers
+   ln_top_euler  = .false.   !  use Euler time-stepping for TOP
+   ln_rsttr      = .false.   !  start from a restart file (T) or not (F)
+   nn_rsttr      =   0       !  restart control = 0 initial time step is not compared to the restart file value
+                             !                  = 1 do not use the value in the restart file
+                             !                  = 2 calendar parameters read in the restart file
+   cn_trcrst_in  = "restart_trc"   !  suffix of pass. sn_tracer restart name (input)
+   cn_trcrst_indir = "."           !  directory from which to read input passive tracer restarts
+   cn_trcrst_out = "restart_trc"   !  suffix of pass. sn_tracer restart name (output)
+   cn_trcrst_outdir = "."          !  directory to which to write output passive tracer restarts
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_trd
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_trd	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/namelists/namtrc_trd	(revision 10345)
@@ -0,0 +1,13 @@
+!-----------------------------------------------------------------------
+&namtrc_trd      !   diagnostics on tracer trends                       ('key_trdtrc')
+!                          or mixed-layer trends                        ('key_trdmld_trc')
+!----------------------------------------------------------------------
+   nn_trd_trc    =  5475     !  time step frequency and tracers trends
+   nn_ctls_trc   =   0       !  control surface type in mixed-layer trends (0,1 or n<jpk)
+   rn_ucf_trc    =   1       !  unit conversion factor (=1 -> /seconds ; =86400. -> /day)
+   ln_trdmld_trc_restart = .false. !  restart for ML diagnostics
+   ln_trdmld_trc_instant = .true.  !  flag to diagnose trends of instantantaneous or mean ML T/S
+   ln_trdtrc( 1) = .true.
+   ln_trdtrc( 2) = .true.
+   ln_trdtrc(23) = .true.
+/
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/Makefile
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/Makefile	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/Makefile	(revision 10345)
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+SPHINXPROJ    = NEMO
+SOURCEDIR     = source
+BUILDDIR      = build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/NEMO_guide.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/NEMO_guide.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/NEMO_guide.rst	(revision 10345)
@@ -0,0 +1,74 @@
+#################
+Quick Start Guide
+#################
+
+..
+	For headings markup, this convention is recommended from Python’s Style Guide
+	# with overline, for parts
+	* with overline, for chapters
+	=, for sections
+	-, for subsections
+	^, for subsubsections
+	", for paragraphs
+
+	'global.rst' contains a list of common directives (roles, substitutions and URL links)
+	It is loaded for each file thanks to 'rst_epilog' setting in 'conf.py'
+
+.. toctree::
+	:hidden:
+
+	release_notes.rst
+
+.. toctree::
+	:hidden:
+	:caption: Getting started
+
+	install
+	configurations
+	test_cases
+
+.. toctree::
+	:hidden:
+	:caption: Setup your configuration
+
+	setup
+	diagnostics
+	tools
+
+.. toctree::
+	:hidden:
+	:caption: Advanced use
+
+	zooms
+	coarsening
+	coupling
+	assimilation
+	tracers
+
+.. toctree::
+	:hidden:
+	:caption: Glossary
+
+	definitions
+
+.. include:: readme.rst
+
+.. Next headings markup acording to readme.rst
+
+How to cite NEMO
+================
+
+..	bibliography:: references.bib
+	:all:
+	:style: unsrt
+	:labelprefix: R
+
+Disclaimer
+==========
+
+The NEMO source code is freely available and distributed under CeCILL license
+(GNU GPL compatible - see ``./LICENSE``).
+
+You can use, modify and/or redistribute the software under its terms,
+but users are provided only with a limited warranty and the software's authors and
+the successive licensor's have only limited liability.
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/file_crs_def.xml
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/file_crs_def.xml	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/file_crs_def.xml	(revision 10345)
@@ -0,0 +1,80 @@
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+ <file_definition type="multiple_file" name="PATH_OUT/@expname@_@freq@" sync_freq="1d" min_digits="4">
+
+    <file_group id="1d" output_freq="1d"  split_freq="1d" output_level="10" enabled=".TRUE."> <!-- 1d files -->
+
+       <file id="file1" name_suffix="_gcrsT" description="ocean T grid variables" >
+          <field field_ref="e3t"          name="e3t"       />
+          <field field_ref="toce"         name="votemper"  operation="instant" freq_op="1d" > @toce_e3t / @e3t </field>
+          <field field_ref="soce"         name="vosaline"  operation="instant" freq_op="1d" > @soce_e3t / @e3t </field>
+          <field field_ref="mldkz5"       name="somixhgt"  />
+       </file>
+
+       <file id="file2" name_suffix="_gcrsU" description="ocean T grid variables" >
+          <field field_ref="e3u"       name="e3u"           />
+          <field field_ref="uoce"      name="uo"       operation="instant" freq_op="1d" > @uoce_e3u / @e3u </field>
+       </file>
+
+       <file id="file3" name_suffix="_gcrsV" description="ocean T grid variables" >
+          <field field_ref="e3v"       name="e3v"           />
+          <field field_ref="voce"      name="vo"       operation="instant" freq_op="1d" > @voce_e3v / @e3v </field>
+       </file>
+
+       <file id="file4" name_suffix="_gcrsW" description="ocean T grid variables" >
+          <field field_ref="woce"        name="woce"        />
+          <field field_ref="avt"         name="difvho"   />
+       </file>
+
+       <file id="file5" name_suffix="_gcrsC" description="ocean T grid variables" >
+          <field field_ref="Alkalini" operation="instant" freq_op="1d" > @Alkalini_E3T / @e3t </field>
+          <field field_ref="O2"       operation="instant" freq_op="1d" > @O2_E3T / @e3t </field>
+          <field field_ref="Si"       operation="instant" freq_op="1d" > @Si_E3T / @e3t </field>
+          <field field_ref="PHY"      operation="instant" freq_op="1d" > @PHY_E3T / @e3t </field>
+          <field field_ref="ZOO"      operation="instant" freq_op="1d" > @ZOO_E3T / @e3t </field>
+          <field field_ref="DOC"      operation="instant" freq_op="1d" > @DOC_E3T / @e3t </field>
+          <field field_ref="NCHL"     operation="instant" freq_op="1d" > @NCHL_E3T / @e3t </field>
+          <field field_ref="DCHL"     operation="instant" freq_op="1d" > @DCHL_E3T / @e3t </field>
+          <field field_ref="NO3"      operation="instant" freq_op="1d" > @NO3_E3T / @e3t </field>
+       </file>
+
+    </file_group>
+
+    <file_group id="1mo" output_freq="1mo"  split_freq="1mo" output_level="10" enabled=".TRUE."> <!-- 1d files -->
+
+       <file id="file6" name_suffix="_gcrsC" description="ocean T grid variables" >
+          <field field_ref="DIC"      operation="instant" freq_op="1mo" > @DIC_E3T / @e3t </field>
+          <field field_ref="Alkalini" operation="instant" freq_op="1mo" > @Alkalini_E3T / @e3t </field>
+          <field field_ref="O2"       operation="instant" freq_op="1mo" > @O2_E3T / @e3t </field>
+          <field field_ref="CaCO3"    operation="instant" freq_op="1mo" > @CaCO3_E3T / @e3t </field>
+          <field field_ref="PO4"      operation="instant" freq_op="1mo" > @PO4_E3T / @e3t </field>
+          <field field_ref="POC"      operation="instant" freq_op="1mo" > @POC_E3T / @e3t </field>
+          <field field_ref="Si"       operation="instant" freq_op="1mo" > @Si_E3T / @e3t </field>
+          <field field_ref="PHY"      operation="instant" freq_op="1mo" > @PHY_E3T / @e3t </field>
+          <field field_ref="ZOO"      operation="instant" freq_op="1mo" > @ZOO_E3T / @e3t </field>
+          <field field_ref="DOC"      operation="instant" freq_op="1mo" > @DOC_E3T / @e3t </field>
+          <field field_ref="PHY2"     operation="instant" freq_op="1mo" > @PHY2_E3T / @e3t </field>
+          <field field_ref="ZOO2"     operation="instant" freq_op="1mo" > @ZOO2_E3T / @e3t </field>
+          <field field_ref="DSi"      operation="instant" freq_op="1mo" > @DSi_E3T / @e3t </field>
+          <field field_ref="Fer"      operation="instant" freq_op="1mo" > @Fer_E3T / @e3t </field>
+          <field field_ref="BFe"      operation="instant" freq_op="1mo" > @BFe_E3T / @e3t </field>
+          <field field_ref="GOC"      operation="instant" freq_op="1mo" > @GOC_E3T / @e3t </field>
+          <field field_ref="SFe"      operation="instant" freq_op="1mo" > @SFe_E3T / @e3t </field>
+          <field field_ref="DFe"      operation="instant" freq_op="1mo" > @DFe_E3T / @e3t </field>
+          <field field_ref="GSi"      operation="instant" freq_op="1mo" > @GSi_E3T / @e3t </field>
+          <field field_ref="NFe"      operation="instant" freq_op="1mo" > @NFe_E3T / @e3t </field>
+          <field field_ref="NCHL"     operation="instant" freq_op="1mo" > @NCHL_E3T / @e3t </field>
+          <field field_ref="DCHL"     operation="instant" freq_op="1mo" > @DCHL_E3T / @e3t </field>
+          <field field_ref="NO3"      operation="instant" freq_op="1mo" > @NO3_E3T / @e3t </field>
+          <field field_ref="NH4"      operation="instant" freq_op="1mo" > @NH4_E3T / @e3t </field>
+       </file>
+
+    </file_group>
+
+
+ </file_definition>
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/file_def.xml
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/file_def.xml	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/file_def.xml	(revision 10345)
@@ -0,0 +1,111 @@
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files        default value="9.96921e+36"                                  =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="PATH_OUT/@expname@_@freq@" sync_freq="1d" min_digits="4" >
+    
+     
+      <file_group id="1d" output_freq="1d" split_freq="1d" output_level="10" enabled=".TRUE." >  <!-- 5d files -->  
+ 
+	<file id="file1" name_suffix="_gridT" description="ocean T grid variables" >
+          <field field_ref="e3t"          name="e3t"        />
+          <field field_ref="toce"         name="votemper"   operation="instant" freq_op="1d" > @toce_e3t / @e3t </field>
+        </file>
+
+	<file id="file2" name_suffix="_gridS" description="ocean T grid variables" >
+          <field field_ref="soce"         name="vosaline"   operation="instant" freq_op="1d" > @soce_e3t / @e3t </field>
+        </file>
+
+	<file id="file3" name_suffix="_grid2D" description="ocean T grid variables" >
+	  <field field_ref="mldkz5"       name="somixhgt"   /> 
+	  <field field_ref="empmr"        name="sowaflup"   />
+          <field field_ref="empbmr"       name="sowaflupb"  />
+	  <field field_ref="fmmflx"       name="iowaflup"   />
+	  <field field_ref="ice_cover"    name="soicecov"   />
+	  <field field_ref="qsr"          name="soceshwf"   />
+	  <field field_ref="taum"         name="sowindsp"   />
+          <field field_ref="runoffs"      name="runoffs"   />
+        </file>
+	
+	<file id="file4" name_suffix="_gridU" description="ocean U grid variables" >
+          <field field_ref="e3u"          name="e3u"        />
+          <field field_ref="uocetr_eff"   name="uocetr_eff" /> 
+          <field field_ref="utau"         name="tauuo"      />
+        </file>
+	
+	<file id="file5" name_suffix="_gridV" description="ocean V grid variables" >
+          <field field_ref="e3v"          name="e3v"        />
+          <field field_ref="vocetr_eff"   name="vocetr_eff" /> 
+          <field field_ref="vtau"         name="tauvo"      />
+        </file>
+
+        <file id="file6" name_suffix="_gridW" description="ocean W grid variables" >
+          <field field_ref="e3w"          name="e3w"        />
+          <field field_ref="wocetr_eff"   name="wocetr_eff" /> 
+        </file>
+
+        <file id="file7" name_suffix="_gridKZ" description="ocean W grid variables" >
+          <field field_ref="avt"          name="voddmavs"   />
+        </file>
+
+        <file id="file8" name_suffix="_gridH" description="ocean W grid variables" >
+          <field field_ref="hdiv"      name="hdivtr"  long_name="horizontal divergence transport"   operation="average"  freq_op="1d" > @hdiv * @e3t </field> 
+        </file>
+
+      </file_group>
+
+      <file_group id="1mo" output_freq="1mo" split_freq="1mo" output_level="10" enabled=".TRUE." >  <!-- 5d files -->
+
+        <file id="file10" name_suffix="_gridT" description="ocean T grid variables" >
+          <field field_ref="e3t"          name="e3t"        />
+          <field field_ref="toce"         name="votemper"   operation="instant" freq_op="1d" > @toce_e3t / @e3t </field>
+        </file>
+
+        <file id="file11" name_suffix="_gridS" description="ocean T grid variables" >
+          <field field_ref="soce"         name="vosaline"   operation="instant" freq_op="1d" > @soce_e3t / @e3t </field>
+        </file>
+
+        <file id="file12" name_suffix="_grid2D" description="ocean T grid variables" >
+          <field field_ref="mldkz5"       name="somixhgt"   />
+          <field field_ref="empmr"        name="sowaflup"   />
+          <field field_ref="empbmr"       name="sowaflupb"  />
+          <field field_ref="fmmflx"       name="iowaflup"   />
+          <field field_ref="ice_cover"    name="soicecov"   />
+          <field field_ref="qsr"          name="soceshwf"   />
+          <field field_ref="taum"         name="sowindsp"   />
+          <field field_ref="runoffs"      name="runoffs"   />
+        </file>
+
+        <file id="file13" name_suffix="_gridU" description="ocean U grid variables" >
+          <field field_ref="e3u"          name="e3u"        />
+          <field field_ref="uocetr_eff"   name="uocetr_eff" /> 
+          <field field_ref="utau"         name="tauuo"      />
+        </file>
+
+        <file id="file14" name_suffix="_gridV" description="ocean V grid variables" >
+          <field field_ref="e3v"          name="e3v"        />
+          <field field_ref="vocetr_eff"   name="vocetr_eff" /> 
+          <field field_ref="vtau"         name="tauvo"      />
+        </file>
+
+        <file id="file15" name_suffix="_gridW" description="ocean W grid variables" >
+          <field field_ref="e3w"          name="e3w"        />
+          <field field_ref="wocetr_eff"   name="wocetr_eff" /> 
+        </file>
+
+        <file id="file16" name_suffix="_gridKZ" description="ocean W grid variables" >
+          <field field_ref="avt"          name="voddmavs"   />
+        </file>
+
+        <file id="file17" name_suffix="_gridH" description="ocean W grid variables" >
+          <field field_ref="hdiv"      name="hdivtr"  long_name="horizontal divergence transport"   operation="average"  freq_op="1d" > @hdiv * @e3t </field> 
+        </file>
+
+
+      </file_group>
+      
+   </file_definition>
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/iodef.xml
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/iodef.xml	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/iodef.xml	(revision 10345)
@@ -0,0 +1,194 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+       -->
+
+    <file_definition src="./file_def.xml"/>
+
+    <!--
+ 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" />
+      <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" />
+      <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" />
+      <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" />
+      <axis id="nfloat"  long_name="Float number"       unit="1"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 />
+      <axis id="ncatice" long_name="Ice category"       unit="1"                 />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" >
+       <domain id="grid_T" />
+     </grid>
+     <grid id="grid_T_3D" >
+       <domain id="grid_T" />
+       <axis id="deptht" />
+     </grid>
+     <grid id="grid_U_2D" >
+       <domain id="grid_U" />
+     </grid>
+     <grid id="grid_U_3D" >
+       <domain id="grid_U" />
+       <axis id="depthu" />
+     </grid>
+     <grid id="grid_V_2D" >
+       <domain id="grid_V" />
+     </grid>
+     <grid id="grid_V_3D" >
+       <domain id="grid_V" />
+       <axis id="depthv" />
+     </grid>
+     <grid id="grid_W_2D" >
+       <domain id="grid_W" />
+     </grid>
+     <grid id="grid_W_3D" >
+       <domain id="grid_W" />
+       <axis id="depthw" />
+     </grid>
+     <grid id="scalarpoint" />
+
+    </grid_definition> 
+
+  </context>
+  
+    <!-- 
+============================================================================================================
+============================================================================================================
+============================================================================================================
+=                                                    CRS context
+============================================================================================================
+============================================================================================================
+============================================================================================================
+    -->
+
+ <context id="nemo_crs" >
+
+    <!-- $id$ -->
+
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+       -->
+
+    <file_definition src="./file_crs_def.xml"/>
+
+    <!--
+ 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+
+   <axis_definition>
+      <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" />
+      <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" />
+      <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" />
+      <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" />
+      <axis id="nfloat"  long_name="Float number"       unit="1"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 />
+      <axis id="ncatice" long_name="Ice category"       unit="1"                 />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              />
+   </axis_definition>
+
+   <domain_definition src="./domain_def.xml"/>
+
+   <grid_definition>
+     <grid id="grid_T_2D" >
+       <domain id="grid_T" />
+     </grid>
+     <grid id="grid_T_3D" >
+       <domain id="grid_T" />
+       <axis id="deptht" />
+     </grid>
+     <grid id="grid_U_2D" >
+       <domain id="grid_U" />
+     </grid>
+     <grid id="grid_U_3D" >
+       <domain id="grid_U" />
+       <axis id="depthu" />
+     </grid>
+     <grid id="grid_V_2D" >
+       <domain id="grid_V" />
+     </grid>
+     <grid id="grid_V_3D" >
+       <domain id="grid_V" />
+       <axis id="depthv" />
+     </grid>
+     <grid id="grid_W_2D" >
+       <domain id="grid_W" />
+     </grid>
+     <grid id="grid_W_3D" >
+       <domain id="grid_W" />
+       <axis id="depthw" />
+     </grid>
+     <grid id="scalarpoint" />
+
+    </grid_definition>
+
+  </context>
+
+    <!-- 
+============================================================================================================
+============================================================================================================
+============================================================================================================
+=                                                    XIOS context
+============================================================================================================
+============================================================================================================
+============================================================================================================
+    -->
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="info_level"                type="int">0</variable>
+	  <variable id="using_server"              type="bool">true</variable>
+	  <variable id="using_oasis"               type="bool">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/style.css
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/style.css	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_static/style.css	(revision 10345)
@@ -0,0 +1,5 @@
+.rstblue               { color: blue    ; }
+.rstgrey , .rstgreysup { color: grey    ; }
+.rstgreen              { color: seagreen; }
+
+.logo { filter: invert(1) !important; }
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_templates/layout.html
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_templates/layout.html	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/_templates/layout.html	(revision 10345)
@@ -0,0 +1,18 @@
+{% extends "!layout.html" %}
+{% block extrahead %}
+	<link href="{{ pathto("_static/style.css", True) }}" rel="stylesheet" type="text/css">
+{% endblock %}
+
+{% block sidebartitle %}
+
+	<a href="{{ pathto(master_doc) }}">
+		<img src="{{ pathto('_static/NEMO_grey.png', 1) }}" class="logo" alt="Logo"/>
+	</a>
+
+	<p>Community ocean model for multifarious space and time scales</p>
+
+	<div class="version">{{ release }}</div>
+
+	{% include "searchbox.html" %}
+
+{% endblock %}
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/assimilation.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/assimilation.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/assimilation.rst	(revision 10345)
@@ -0,0 +1,60 @@
+**************************************
+Data assimilation (OBS/SAO, ASM & TAM)
+**************************************
+
+.. contents::
+   :local:
+
+The assimilation interface to NEMO is split into three modules.
+- OBS for the observation operator
+- ASM for the application of increments and model bias correction (based on the assimilation increments).
+- TAM the tangent linear and adjoint model.
+
+Please see the `NEMO manual`_ for more details including information about the input file formats and
+the namelist settings.
+
+Observation and model comparison (OBS)
+======================================
+
+The observation and model comparison code (OBS) reads in observation files (profile temperature and salinity,
+sea surface temperature, sea level anomaly, sea ice concentration, and velocity) and
+calculates an interpolated model equivalent value at the observation location and nearest model timestep.
+The resulting data are saved in a feedback file (or files).
+The code was originally developed for use with the NEMOVAR data assimilation code, but
+can be used for validation or verification of model or any other data assimilation system.
+This is all controlled by the namelist.
+To build with the OBS code active ``key_diaobs`` must be set. 
+
+More details in the `NEMO manual`_ chapter 12.
+
+Standalone observation operator (SAO)
+-------------------------------------
+
+The OBS code can also be run after a model run using saved NEMO model data.
+This is accomplished using the standalone observation operator (SAO)
+(previously known the offline observation operator).
+
+To build the SAO use makenemo.
+This means compiling NEMO once (in the normal way) for the chosen configuration.
+Then include ``SAO`` at the end of the relevant line in ``cfg.txt`` file.
+Then recompile with the replacement main program in ``./src/SAO``.
+This is a special version of ``nemogcm.F90`` (which doesn't run the model, but reads in the model fields, and
+observations and runs the OBS code.
+See section 12.4 of the `NEMO manual`_.
+
+Apply assimilation increments (ASM)
+===================================
+
+The ASM code adds the functionality to apply increments to the model variables:
+temperature, salinity, sea surface height, velocity and sea ice concentration.
+These are read into the model from a NetCDF file which may be produced by separate data assimilation code.
+The code can also output model background fields which are used as an input to data assimilation code.
+This is all controlled by the namelist nam_asminc.
+To build the ASM code ``key asminc`` must be set.
+
+More details in the `NEMO manual`_ chapter 13.
+
+Tangent linear and adjoint (TAM)
+================================
+
+This is the tangent linear and adjoint code of NEMO which is useful to 4D VAR assimilation.
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/coarsening.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/coarsening.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/coarsening.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../src/OCE/CRS/README.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/conf.py
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/conf.py	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/conf.py	(revision 10345)
@@ -0,0 +1,181 @@
+# -*- coding: utf-8 -*-
+#
+# Configuration file for the Sphinx documentation builder.
+#
+# This file does only contain a selection of the most common options. For a
+# full list see the documentation:
+# http://www.sphinx-doc.org/en/master/config
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+
+project = 'NEMO'
+copyright = ''
+author = 'NEMO System Team'
+
+# The short X.Y version
+version = '4.0'
+# The full version, including alpha/beta/rc tags
+release = '4.0rc'
+
+
+# -- General configuration ---------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = ['sphinx.ext.extlinks', 'sphinxcontrib.bibtex']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'NEMO_guide'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path .
+exclude_patterns = ['global.rst']
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#
+#html_theme = 'alabaster'
+html_theme = 'sphinx_rtd_theme'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#
+html_theme_options = {
+#	Alabaster theme options
+#	'logo': 'NEMO_grey.png',
+#	'description': 'Community ocean model for multifarious space and time scales',
+#	'fixed_sidebar': True,
+}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Custom sidebar templates, must be a dictionary that maps document names
+# to template names.
+#
+# The default sidebars (for documents that don't match any pattern) are
+# defined by theme itself.  Builtin themes are using these templates by
+# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
+# 'searchbox.html']``.
+#
+# html_sidebars = {}
+
+html_favicon = '_static/ORCA.ico'
+
+# -- Options for HTMLHelp output ---------------------------------------------
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'NEMOdoc'
+
+
+# -- Options for LaTeX output ------------------------------------------------
+
+latex_elements = {
+    # The paper size ('letterpaper' or 'a4paper').
+    #
+    # 'papersize': 'letterpaper',
+
+    # The font size ('10pt', '11pt' or '12pt').
+    #
+    # 'pointsize': '10pt',
+
+    # Additional stuff for the LaTeX preamble.
+    #
+    # 'preamble': '',
+
+    # Latex figure (float) alignment
+    #
+    # 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    (master_doc, 'NEMO_guide.tex', 'NEMO Quick Start Guide',
+     'NEMO System Team', 'howto'),
+]
+
+
+# -- Options for manual page output ------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    (master_doc, 'nemo', 'NEMO Documentation',
+     [author], 1)
+]
+
+
+# -- Options for Texinfo output ----------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+    (master_doc, 'NEMO', 'NEMO Documentation',
+     author, 'NEMO', 'One line description of project.',
+     'Miscellaneous'),
+]
+
+
+# -- Customisation -----------------------------------------------------------
+
+import datetime
+year = datetime.date.today().year
+copyright = '2008-' + str( year ) + ', NEMO Consortium'
+
+# Link aliases
+extlinks = {
+	'doi'    : ('http://doi.org/%s'                       , None),
+	'forge'  : ('http://forge.ipsl.jussieu.fr/nemo/%s'    , None),
+	'github' : ('http://github.com/%s'                    , None),
+	'xios'   : ('http://forge.ipsl.jussieu.fr/ioserver/%s', None),
+	'website': ('http://www.nemo-ocean.eu/%s'             , None),
+	'zenodo' : ('http://zenodo.org/publication/%s'        , None)
+}
+
+# Include common directives for every rst file
+rst_epilog = open('global.rst', 'r').read()
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/configurations.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/configurations.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/configurations.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../cfgs/README.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/coupling.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/coupling.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/coupling.rst	(revision 10345)
@@ -0,0 +1,13 @@
+**********************
+Coupling (OASIS & SAS)
+**********************
+
+NEMO currently exploits OASIS-3-MCT to implement a generalised coupled interface
+(`Coupled Formulation <http://forge.ipsl.jussieu.fr/nemo/doxygen/node50.html?doc=NEMO>`_).
+It can be used to interface with most of the European atmospheric GCM (ARPEGE, ECHAM, ECMWF, Ha- dAM, HadGAM, LMDz),
+as well as to WRF (Weather Research and Forecasting Model), and to implement the coupling of
+two independent NEMO components, ocean on one hand and sea-ice plus other surface processes on the other hand
+(`Standalone Surface Module - SAS <http://forge.ipsl.jussieu.fr/nemo/doxygen/node46.html?doc=NEMO>`_).
+
+To enable the OASIS interface the required compilation key is ``key_oasis3``.
+The parameters to set are in sections ``namsbc_cpl`` and in case of using of SAS also in section ``namsbc_sas``.
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/definitions.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/definitions.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/definitions.rst	(revision 10345)
@@ -0,0 +1,33 @@
+***********
+Definitions
+***********
+
+`AGRIF`_
+	*Adaptive Grid Refinement In Fortran*, 
+	package for the integration of full adaptive mesh refinement features within 
+	an existing multidimensional finite difference model
+
+SI\ :sup:`3`\ 
+	*Sea Ice Integrated Initiative*, 
+	unified sea ice model merging functionalities from CICE, GELATO and LIM into the NEMO framework
+
+`OASIS`_
+	*Ocean Atmosphere Sea Ice Soil*, 
+	coupling software to synchronise numerical codes representing different components of the climate system
+
+PISCES
+	*Pelagic Interactions Scheme for Carbon and Ecosystem Studies*, 
+	biogeochemical model simulating marine ecosystems, cycles of carbon and the main nutrients
+
+TAM
+	*Tangent linear and Adjoint Model*, 
+	tools to analyse and control the NEMO dynamical core for a wide range of applications such as
+	sensitivity analysis, parameter estimation, vectors computation or data assimilation.
+
+TOP
+	*Tracers in Ocean Paradigm*, 
+	on/off-line oceanic tracers transport and biogeochemistry models
+
+`XIOS`_
+	*XML Input Output Server*, 
+	library dedicated to input/output management of climate code
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/diagnostics.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/diagnostics.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/diagnostics.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../cfgs/SHARED/README.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/global.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/global.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/global.rst	(revision 10345)
@@ -0,0 +1,38 @@
+.. Roles (custom styles related to CSS classes in 'source/_static/style.css')
+
+.. role:: rstblue
+.. role:: rstgreen
+.. role:: rstgrey
+.. role:: rstgreysup(sup)
+.. role:: underline 
+   :class: underline
+
+.. Substitutions
+
+.. |OPA| replace:: :rstblue:`NEMO-OPA`
+.. |SI3| replace:: :rstgrey:`NEMO-SI`\ :rstgreysup:`3`
+.. |TOP| replace:: :rstgreen:`NEMO-TOP/PISCES`
+
+.. Institutes
+
+.. _CMCC:           http://www.cmcc.it 
+.. _CNRS:           http://www.cnrs.fr
+.. _Mercator Océan: http://www.mercator-ocean.fr
+.. _Met Office:     http://www.metoffice.gov.uk
+.. _MOI:            http://www.mercator-ocean.fr
+.. _NERC:           http://nerc.ukri.org
+
+.. Models / Softwares
+
+.. _AGRIF: http://agrif.imag.fr
+.. _OASIS: http://verc.enes.org/oasis
+.. _XIOS:  http://forge.ipsl.jussieu.fr/ioserver
+
+.. NEMO
+
+.. _NEMO:          http://www.nemo-ocean.eu
+.. _NEMO strategy: http://doi.org/10.5281/zenodo.1471663
+.. _NEMO guide:    http://doi.org/10.5281/zenodo.1475325
+.. _NEMO manual:   http://doi.org/10.5281/zenodo.1464816
+.. _SI3 manual:    http://doi.org/10.5281/zenodo.1471689
+.. _TOP manual:    http://doi.org/10.5281/zenodo.1471700
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/install.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/install.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/install.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../INSTALL.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/interfacing_options.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/interfacing_options.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/interfacing_options.rst	(revision 10345)
@@ -0,0 +1,36 @@
+===================
+Interfacing options
+===================
+
+..
+	contents::
+	:local:
+	:depth: 1
+
+.. include:: zooms.rst
+
+.. bibliography:: zooms.bib
+	:all:
+	:style: unsrt
+	:labelprefix: A
+	:keyprefix: a-
+
+----
+
+.. include:: coarsening.rst
+
+----
+
+.. include:: coupling.rst
+
+----
+
+.. include:: assimilation.rst
+
+----
+
+.. include:: input-output.rst
+
+----
+
+.. include:: tracers.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/readme.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/readme.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/readme.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../README.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/references.bib
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/references.bib	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/references.bib	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../REFERENCES.bib
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/release_notes.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/release_notes.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/release_notes.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../RELEASE_NOTES.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/setup.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/setup.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/setup.rst	(revision 10345)
@@ -0,0 +1,249 @@
+******************************
+Setting up a new configuration
+******************************
+
+.. contents::
+
+Starting from an existing configuration
+=======================================
+
+There are three options to build a new configuration from an existing one:
+
+Option 1: Duplicate an existing configuration
+---------------------------------------------
+
+The NEMO so-called Reference Configurations cover a number of major features for NEMO setup
+(global, regional, 1D, using embeded zoom with AGRIF...)
+
+One can create a new configuration by duplicating one of the reference configurations
+(``ORCA2_LIM3_PISCES`` in the following example)
+
+.. code-block:: sh
+
+	makenemo –n 'ORCA2_LIM3_PISCES_MINE' -r 'ORCA2_LIM3_PISCES'
+
+Option 2: Duplicate with differences
+------------------------------------
+
+Create and compile a new configuration based on a reference configuration
+(``ORCA2_LIM3_PISCES`` in the following example) but with different pre-processor options.
+For this either add ``add_key`` or ``del_key`` keys as required; e.g.
+
+.. code-block:: sh
+
+	makenemo –n 'ORCA2_LIM3_PISCES_MINE' -r 'ORCA2_LIM3_PISCES' del_key 'key_iomput' add_key 'key_xios'
+
+Option 3: Use the SIREN tools to subset an existing model
+---------------------------------------------------------
+
+Define a regional configuration which is a sub- or super-set of an existing configuration.
+
+This last option employs the SIREN software tools that are included in the standard distribution.
+The software is written in Fortran 95 and available in the ``./tools/SIREN`` directory.
+SIREN allows you to create your own regional configuration embedded in a wider one.
+
+SIREN is a set of programs to create all the input files you need to run a NEMO regional configuration.
+As a basic demonstrator, a set of GLORYS files (GLObal ReanalYSis on the ORCA025 grid),
+as well as examples of namelists are available `here`_.
+
+`SIREN documentation`_
+
+Any questions or comments regarding the use of SIREN should be posted in `the corresponding forum`_.
+
+Creating a completely new configuration
+=======================================
+
+From NEMO version 4.0 there are two ways to build configurations from scratch.
+The appropriate method to use depends largely on the target configuration.
+Method 1 is for more complex/realistic global or regional configurations and
+method 2 is intended for simpler, idealised configurations whose
+domains and characteristics can be described in simple geometries and formulae.
+
+Option 1: Create and use a domain configuration file
+----------------------------------------------------
+
+This method is used by each of the reference configurations,
+so that downloading their input files linked to their description can help.
+Although starting from scratch it is advisable to create the directory structure to house your new configuration by
+duplicating the closest reference configuration to your target application.
+For example, if your application requires both ocean ice and passive tracers,
+then use the ``ORCA2_LIM3_PISCES`` as template,
+and execute following command to build your ``MY_NEW_CONFIG`` configuration:
+
+.. code-block:: sh
+
+	makenemo –n 'MY_NEW_CONFIG' -r 'ORCA2_LIM3_PISCES'
+
+where ``MY_NEW_CONFIG`` can be substituted with a suitably descriptive name for your new configuration.  
+
+The purpose of this step is simply to create and populate the appropriate ``WORK``, ``MY_SRC`` and
+``EXP00`` subdirectories for your new configuration.
+Other choices for the base reference configuration might be
+
+- ``GYRE``  - If your target application is ocean-only
+- ``AMM12`` - If your target application is regional with open boundaries
+
+All the domain information for your new configuration will be contained within
+a netcdf file called ``domain_cfg.nc`` which you will need to create and
+place in the ``./cfgs/MY_NEW_CONFIG/EXP00`` sub-directory.
+Firstly though, ensure that your configuration is set to use such a file by checking that
+
+.. code-block:: fortran
+
+	ln_read_cfg = .true.
+
+in	``./cfgs/MY_NEW_CONFIG/EXP00/namelist_cfg``
+
+Create the domain_cfg.nc file which must contain the following fields
+
+.. code-block:: c++
+
+	int    ORCA, ORCA_index                  /* configuration name, configuration resolution                 */
+	int    jpiglo, jpjglo, jpkglo            /* global domain sizes                                          */
+	int    jperio                            /* lateral global domain b.c.                                   */
+	int    ln_zco, ln_zps, ln_sco            /* flags for z-coord, z-coord with partial steps and s-coord    */
+	int    ln_isfcav                         /* flag  for ice shelf cavities                                 */
+	double glamt, glamu, glamv, glamf        /* geographic position                                          */
+	double gphit, gphiu, gphiv, gphif        /* geographic position                                          */
+	double iff, ff_f, ff_t                   /* Coriolis parameter (if not on the sphere)                    */
+	double e1t, e1u, e1v, e1f                /* horizontal scale factors                                     */
+	double e2t, e2u, e2v, e2f                /* horizontal scale factors                                     */
+	double ie1e2u_v, e1e2u, e1e2v            /* U and V surfaces (if grid size reduction in some straits)    */
+	double e3t_1d, e3w_1d                    /* reference vertical scale factors at T and W points           */
+	double e3t_0, e3u_0, e3v_0, e3f_0, e3w_0 /* vertical scale factors 3D coordinate at T,U,V,F and W points */
+	double e3uw_0, e3vw_0                    /* vertical scale factors 3D coordinate at UW and VW points     */
+	int    bottom_level, top_level           /* last wet T-points, 1st wet T-points (for ice shelf cavities) */
+
+There are two options for creating a domain_cfg.nc file:
+
+- Users can use tools of their own choice to build a ``domain_cfg.nc`` with all mandatory fields.
+- Users can adapt and apply the supplied tool available in ``./tools/DOMAINcfg``.
+  This tool is based on code extracted from NEMO version 3.6 and will allow similar choices for
+  the horizontal and vertical grids that were available internally to that version.
+  See ``./tools/DOMAINcfg/README`` for details.
+
+Option 2: Adapt the usr_def configuration module of NEMO for you own purposes
+-----------------------------------------------------------------------------
+
+This method is intended for configuring easily simple/idealised configurations which
+are often used as demonstrators or for process evaluation and comparison.
+This method can be used whenever the domain geometry has a simple mathematical description and
+the ocean initial state and boundary forcing is described analytically. 
+As a start, consider the case of starting a completely new ocean-only test case based on
+the ``LOCK_EXCHANGE`` example.
+[Note: we probably need an even more basic example than this with only one namelist and
+minimal changes to the usrdef modules]
+
+Firstly, construct the directory structure, starting in the ``cfgs`` directory:
+
+.. code-block:: sh
+
+	./makenemo -n 'MY_NEW_TEST' -t 'LOCK_EXCHANGE'
+
+where the ``-t`` option has been used to locate the new configuration in the ``tests`` subdirectory
+(it is recommended practice to keep full configurations and idealised cases clearly distinguishable).
+This command will have created (amongst others) the following files and directories::
+
+	./tests/MY_NEW_TEST:
+	BLD	  MY_SRC cpp_MY_NEW_TEST.fcm
+	EXP00   WORK
+	#
+	./tests/MY_NEW_TEST/EXP00:
+	context_nemo.xml       domain_def_nemo.xml
+	field_def_nemo-opa.xml file_def_nemo-opa.xml
+	iodef.xml
+	namelist_cfg
+	namelist_ref
+	#
+	./tests/MY_NEW_TEST/MY_SRC:
+	usrdef_hgr.F90    usrdef_nam.F90 usrdef_zgr.F90
+	usrdef_istate.F90 usrdef_sbc.F90 zdfini.F90
+
+The key to setting up an idealised configuration lies in adapting a small set of short Fortran 90 modules which
+should be dropped into the ``MY_SRC`` directory.
+Here the ``LOCK_EXCHANGE`` example is using 5 such routines but the full set that is available in
+the ``src/OCE/USR`` directory is::
+
+	./src/OCE/USR:
+	usrdef_closea.F90 usrdef_istate.F90 usrdef_zgr.F90
+	usrdef_fmask.F90  usrdef_nam.F90
+	usrdef_hgr.F90    usrdef_sbc.F90
+
+Before discussing these in more detail it is worth noting the various namelist controls that
+engage the different user-defined aspects.
+These controls are set using two new logical switches or are implied by the settings of existing ones.
+For example, the mandatory requirement for an idealised configuration is to provide routines which
+define the horizontal and vertical domains.
+Templates for these are provided in the ``usrdef_hgr.F90`` and ``usrdef_zgr.F90`` modules.
+The application of these modules is activated whenever:
+
+.. code-block:: fortran
+
+	ln_read_cfg = .false.
+
+in any configuration's ``namelist_cfg`` file.
+This setting also activates the reading of an optional ``nam_usrdef`` namelist which can be used to
+supply configuration specific settings.
+These need to be declared and read in the ``usrdef_nam.F90`` module.
+
+Another explicit control is available in the ``namsbc`` namelist which activates the use of analytical forcing.
+With
+
+.. code-block:: fortran
+
+	ln_usr = .true.
+
+Other usrdef modules are activated by less explicit means.
+For example, code in ``usrdef_istate.F90`` is used to define initial temperature and salinity fields if
+
+.. code-block:: fortran
+
+	ln_tsd_init   = .false.
+
+in the ``namtsd`` namelist.
+The remaining modules, namely::
+
+	usrdef_closea.F90 usrdef_fmask.F90
+
+are specific to ORCA configurations and set local variations of some specific fields for
+the various resolutions of the global models.
+They do not need to be considered here in the context of idealised cases but it is worth noting that all
+configuration specific code has now been isolated in the usrdef modules.
+In the case of these last two modules, they are activated only if an ORCA configuration is detected.
+Currently this requires a specific integer variable named ``ORCA`` to be set in a ``domain_cfg.nc`` file.
+[Note: this would be less confusing if the cn_cfg string is read directly as a character attribue from
+the ``domain_cfg.nc`` ]
+
+So, in most cases, the set up of idealised model configurations can be completed by
+copying the template routines from ``./src/OCE/USR`` into
+your new ``./cfgs/MY_NEW_TEST/MY_SRC`` directory and editing the appropriate modules as needed.
+The default set are those used for the GYRE reference configuration.
+The contents of ``MY_SRC`` directories from other idealised configurations may provide more convenient templates if
+they share common characteristics with your target application.
+
+Whatever the starting point it should not require too many changes or additional lines of code to
+produce routines in ``./src/OCE/USR`` that define analytically the domain,
+the initial state and the surface boundary conditions for your new configuration.
+
+To summarize, the base set of modules is:
+
+- ``usrdef_hgr.F90``   : define horizontal grid
+- ``usrdef_zgr.F90``   : define vertical grid
+- ``usrdef_sbc.F90``   : provides at each time-step the surface boundary condition, i.e. the momentum, heat and freshwater fluxes
+- ``usrdef_istate.F90``: defines initialization of the dynamics and tracers
+- ``usrdef_nam.F90``   : configuration-specific namelist processing to set any associated run-time parameters
+
+with two specialised ORCA modules
+(not related to idealised configurations but used to isolate configuration specific code that is used in
+ORCA2 reference configurations and established global configurations using the ORCA tripolar grid):
+
+- ``usrdef_fmask.F90`` : only used in ORCA CONFIGURATIONS for alteration of f-point land/ocean mask in some straits
+- ``usrdef_closea.F90``: only used in ORCA CONFIGURATIONS for specific treatments associated with closed seas
+
+From version 4.0, the NEMO release includes a ``tests`` subdirectory containing available and
+up to date test cases build by the community.
+These will not be fully supported as is NEMO reference but should provide a source of raw material.
+
+.. _here:                     http://prodn.idris.fr/thredds/catalog/ipsl_public/rron463/catalog.html?dataset=DatasetScanipsl_public/rron463/INPUT_SIREN.tar
+.. _the corresponding forum:  http://forge.ipsl.jussieu.fr/nemo/discussion/forum/2
+.. _SIREN documentation:      http://forge.ipsl.jussieu.fr/nemo/doxygen/index.html
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/test_cases.bib
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/test_cases.bib	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/test_cases.bib	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../tests/test_cases.bib
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/test_cases.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/test_cases.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/test_cases.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../tests/README.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/tools.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/tools.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/tools.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../tools/README.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/tracers.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/tracers.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/tracers.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../src/TOP/README.rst
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/zooms.bib
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/zooms.bib	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/zooms.bib	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../cfgs/AGRIF_DEMO/zooms.bib
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/zooms.rst
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/zooms.rst	(revision 10345)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/doc/rst/source/zooms.rst	(revision 10345)
@@ -0,0 +1,1 @@
+link ../../../cfgs/AGRIF_DEMO/README.rst
