Explorar o código

Merge templates

Pierre-Yves Barriat %!s(int64=7) %!d(string=hai) anos
pai
achega
d16a8913b6

+ 31 - 0
templates/lemaitre2/data.cfg

@@ -0,0 +1,31 @@
+ini_data_dir=/scratch/barthele/NEMO
+ic_subdir=CONFIG_FILES
+nem_grid=ORCA1L75
+ic_files=(
+    "clipped_eORCA_R1_coordinates_v1.0.nc => coordinates.nc" 
+    "clipped_eORCA1_R1_bathy_meter_v2.1.nc => bathy_meter.nc" 
+    "clipped_eORCA_R1_ahmcoef_v1.0.nc => ahmcoef.nc" 
+    "clipped_eORCA_R1_maskITF_v1.0.nc => mask_itf.nc" 
+    "clipped_eORCA_R1_K1_v1.0.nc => K1rowdrg.nc" 
+    "clipped_eORCA_R1_M2_v1.0.nc => M2rowdrg.nc"
+    "clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc"
+    "conservative_temperature_WOA13_decav_Reg1L75_clim.nc"
+    "absolute_salinity_WOA13_decav_Reg1L75_clim.nc"
+    "sss_absolute_salinity_WOA13_decav_Reg1L75_clim.nc"
+    "weight_bilinear_360x180-clipped_eORCA1L75_2D.nc"
+    "weight_bilinear_360x180-clipped_eORCA1L75_3D.nc"
+)
+nem_res_hor=$(echo ${nem_grid} | sed 's:ORCA\([0-9]\+\)L[0-9]\+:\1:')
+#
+forcing_subdir=FORCINGS
+nem_forcing_set=DFS5.2
+forcing_files=(
+    "* => ."
+)
+#
+shared_files=(
+    "namelist_ice_lim3_ref => namelist_ice_ref"
+    "namelist_ref"
+    "domain_def.xml"
+    "field_def.xml"
+)

+ 22 - 0
templates/lemaitre2/experiment.cfg

@@ -0,0 +1,22 @@
+# Experience name
+exp_name=EXP0
+
+# Simulation start and end date. Use any (reasonable) syntax you want.
+run_start_date="1958-01-01"
+run_duration="50 year"
+
+# Restart frequency. Use any (reasonable) number and time unit you want.
+# For runs without restart, leave this variable empty or set to 0
+rst_freq="1 year"
+
+# Number of restart legs to be run in one go
+run_num_legs=1
+
+# Parameters
+nem_time_step_sec=3600
+lim_time_step_sec=21600
+nem_restart_offset=0
+nem_config_name=ORCA1_LIM3_REF
+
+# This file is used to store information about restarts
+info_file="nemo.info"

+ 19 - 0
templates/lemaitre2/job.cfg

@@ -0,0 +1,19 @@
+# Slurm job options
+SBATCH --job-name=${exp_name}
+SBATCH --time=04:35:00
+
+SBATCH --ntasks=${total_nb_cpu}
+SBATCH --mem-per-cpu=2048
+SBATCH --partition=Def
+#SBATCH --partition=PostP
+
+#SBATCH --mail-user=${email}
+SBATCH --mail-type=ALL
+SBATCH --open-mode=append
+
+start_dir=${SLURM_SUBMIT_DIR-$PWD}
+run_dir="$GLOBALSCRATCH/nemo/run/${exp_name}"
+archive_dir="$GLOBALSCRATCH/nemo/archive/${exp_name}"
+
+# Cancel job on error
+set -ueo pipefail

+ 403 - 0
templates/lemaitre2/namelists/build_namelist_cfg.sh

@@ -0,0 +1,403 @@
+# namelist.nemo-ORCA1L75.cfg.sh writes the NEMO namelist for ORCA1L75 in
+# This namelist will overwrite the reference namelist (namelist.nemo.ref.sh). 
+#
+if $leg_is_restart
+then
+    nemo_restart=".TRUE."
+else
+    nemo_restart=".FALSE."
+fi
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp        =  "${exp_name}" !  experience name
+   nn_it000      =  $(( leg_start_sec / nem_time_step_sec + 1 )) !  first time step
+   nn_itend      =  $(( leg_end_sec / nem_time_step_sec ))       !  last  time step (std 5475)
+   nn_date0      =  ${leg_start_date_yyyymmdd} !  date at nit_0000 (format yyyymmdd)
+                                  !    used if ln_rstart=F or
+                                  !    (ln_rstart=T and nn_rstctl=0 or 1)
+   ln_rstart     = ${nemo_restart} !  start from rest (F) or from a restart file (T)
+   nn_rstctl     =  1             !  restart control ==> activated only if ln_rstart=T
+                                  !  = 0 nn_date0 read in namelist ; nn_it000 : read in namelist
+                                  !  = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart
+                                  !  = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart
+   cn_ocerst_in  = "restart_oce"  !  suffix of ocean restart name (input)
+   cn_ocerst_out = "restart_oce"  !  suffix of ocean restart name (output)
+   nn_stock      =  0             !  frequency of creation of a restart file (modulo referenced to 1)
+   nn_write      = -1             !  frequency of write in the output file   (modulo referenced to nn_it000)
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =       1               !  resolution of the configuration
+   jpidta      =     362               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     292               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      75               !  number of levels      ( >= jpk )
+   jpiglo      =     362               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     292               !  2nd    -                  -    --> j  =jpjdta
+   jperio      =       6               !  6 cyclic East-West AND North fold F-point pivot
+   ln_use_jattr = .true.               !  use (T) the file attribute: open_ocean_jstart if present
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_msh      =    0                  !  create (=1) a mesh file or not (=0)
+   rn_hmin     =    20.                !  min depth of the ocean (>0) or min number of ocean level (<0)
+   rn_rdt      = ${nem_time_step_sec} !  time step for the dynamics (and tracer if nn_acc=0)
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             !  latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =  -3958.951371276829   !  ORCA r4, r2 and r05 coefficients
+   ppa0        =    103.95300960000000 ! (default coefficients)
+   ppa1        =      2.41595126900000 !
+   ppkth       =     15.35101370000000 !
+   ppacr       =      7.0              !
+   ppdzmin     =  999999.              !  Minimum vertical spacing
+   pphmax      =  999999.              !  Maximum depth
+   ppa2        =  100.7609285000000    !  Double tanh function parameters
+   ppkth2      =  48.02989372000000    !
+   ppacr2      =  13.00000000000       !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters  ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namc1d        !   1D configuration options                             ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+!          !  file name                                            ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights                                         ! rotation ! land/sea mask !
+!          !                                                       !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename                                        ! pairing  ! filename      !
+   sn_tem  = 'conservative_temperature_WOA13_decav_Reg1L75_clim.nc',         -1        ,'votemper' ,    .true.    , .true. , 'yearly'  ,'weight_bilinear_360x180-clipped_eORCA1L75_3D.nc',   ''     ,    ''
+   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim.nc'       ,         -1        ,'vosaline' ,    .true.    , .true. , 'yearly'  ,'weight_bilinear_360x180-clipped_eORCA1L75_3D.nc',   ''     ,    ''
+   !
+   ln_tsd_tradmp = .false.  !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = $(( lim_time_step_sec / nem_time_step_sec )) !  frequency of surface boundary condition computation
+                           !     (also = the frequency of sea-ice model call)
+   nn_isf      = 3         !  ice shelf melting/freezing                (/=0 => fill namsbc_isf)
+                           !  0 =no isf                  1 = presence of ISF
+                           !  2 = bg03 parametrisation   3 = rnf file for isf
+                           !  4 = ISF fwf specified
+                           !  option 1 and 4 need ln_isfcav = .true. (domzgr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+                           !     =2 annual global mean of e-p-r set to zero
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_utau     = 'uwnd_10m'  ,       24          , 'uwnd'    ,   .true.     , .false., 'yearly'  , ''       , ''
+   sn_vtau     = 'vwnd_10m'  ,       24          , 'vwnd'    ,   .true.     , .false., 'yearly'  , ''       , ''
+   sn_wndm     = 'ncep_bulk' ,       24          , 'wspd'    ,   .true.     , .false., 'yearly'  , ''       , ''
+   sn_tair     = 'ncep_bulk' ,       24          , 'air'     ,   .true.     , .false., 'yearly'  , ''       , ''
+   sn_humi     = 'flx_correc',       -1          , 'socliohu',   .true.     , .true. , 'yearly'  , ''       , ''
+   sn_ccov     = 'flx_correc',       -1          , 'socliocl',   .true.     , .true. , 'yearly'  , ''       , ''
+   sn_prec     = 'flx_correc',       -1          , 'socliopl',   .true.     , .true. , 'yearly'  , ''       , ''
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+!              !  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_wndi     = 'drowned_u10_DFS5.2'    ,         3         , 'u10'    ,   .true.     , .false. , 'yearly'  , 'weights_bicub_DFS5.2_to_clipped_eORCA1.nc' , 'U1'     , ''
+   sn_wndj     = 'drowned_v10_DFS5.2'    ,         3         , 'v10'    ,   .true.     , .false. , 'yearly'  , 'weights_bicub_DFS5.2_to_clipped_eORCA1.nc' , 'V1'     , ''
+   sn_qsr      = 'drowned_radsw_DFS5.2'  ,        24         , 'radsw'  ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_qlw      = 'drowned_radlw_DFS5.2'  ,        24         , 'radlw'  ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_tair     = 'drowned_t2_DFS5.2'     ,         3         , 't2'     ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_humi     = 'drowned_q2_DFS5.2'     ,         3         , 'q2'     ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_prec     = 'drowned_precip_DFS5.2' ,        24         , 'precip' ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_snow     = 'drowned_snow_DFS5.2'   ,        24         , 'snow'   ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+
+   rn_zqt      = 2.        !  Air temperature and humidity reference height (m)
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_sas    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+   nn_chldta   =      0    !  RGB : Chl data (=1) or cst value (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+!              !  file name                                              ! frequency (hours) ! variable   ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                                                         !  (if <0  months)  !   name     !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_rnf      = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc',        -1         , 'sorunoff' , .true.       , .true. , 'yearly'  , ''       , ''       , ''
+   sn_cnf      = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc',         0         , 'socoefr'  , .false.      , .true. , 'yearly'  , ''       , ''       , ''
+
+   ln_rnf_mouth = .false.   !  specific treatment at rivers mouths
+   ln_rnf_depth_ini = .true.   ! compute depth at initialisation from runoff file
+   rn_rnf_max   = 0.05      !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+/
+!-----------------------------------------------------------------------
+&namsbc_isf    !  Top boundary layer (ISF)
+!-----------------------------------------------------------------------
+!                ! file name                                                ! frequency (hours) ! variable     ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation !
+!                !                                                          !  (if <0  months)  !   name       !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  !
+   sn_rnfisf     = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sornfisf'    ,    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
+   sn_depmax_isf = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sodepmax_isf',    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
+   sn_depmin_isf = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sodepmin_isf',    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
+/
+!-----------------------------------------------------------------------
+&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !  file name                                          ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights                                         ! rotation ! land/sea mask !
+!              !                                                     !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename                                        ! pairing  ! filename      !
+   sn_sss      = 'sss_absolute_salinity_WOA13_decav_Reg1L75_clim.nc' ,        -1         , 'sosaline',    .true.    , .true. , 'yearly'  ,'weight_bilinear_360x180-clipped_eORCA1L75_2D.nc', ''       , ''
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    0.     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_tide      !   tide parameters (#ifdef key_tide)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy        !  unstructured open boundaries                          ("key_bdy")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy_dta      !  open boundaries - external data           ("key_bdy")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy_tide     ! tidal forcing at open boundaries
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+                           !                              = 2 : nonlinear friction
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   nn_geoflx   =    1      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   rn_aht_0         =  1000.     !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_aeiv_0        =  1000.     !  eddy induced velocity coefficient [m2/s]    (require "key_traldf_eiv")
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .true.    !  s-coordinate (standard jacobian formulation)
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   rn_ahm_0_lap     = 20000.    !  horizontal laplacian eddy viscosity   [m2/s]
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!------------------------------------------------------------------------
+&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
+!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx_new    !   new tidal mixing parameterization                ("key_zdftmx_new")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namc1d_uvd    !   data: U & V currents                                 ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsto       ! Stochastic parametrization of EOS
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends         ("key_trddyn" and/or "key_trdtra")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namflo       !   float parameters                                      ("key_float")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_diaharm   !   Harmonic analysis of tidal constituents ('key_diaharm')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdct        ! transports through sections
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobs       !  observation usage switch                               ('key_diaobs')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+EOF

+ 38 - 0
templates/lemaitre2/namelists/namelist_ice_cfg

@@ -0,0 +1,38 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-3 : Ice configuration namelist. Overwrites SHARED/namelist_ice_lim3_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   ln_limdiahsb  = .false.         !  check the heat and salt budgets (T) or not (F)
+   ln_limdiaout  = .false.         !  output the heat and salt budgets (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceitd     !   Ice discretization
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicehdf     !   Ice horizontal diffusion
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicesal     !   ice salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceitdme   !   parameters for mechanical redistribution of ice 
+!-----------------------------------------------------------------------
+/

+ 19 - 0
templates/lemaitre2/programs.cfg

@@ -0,0 +1,19 @@
+module_list="intel/compilerpro/12.0.0.084 openmpi/1.4.5/intel-12.0.0.084 netcdf/intel/4.1.3"
+extralibs_list=""
+
+# -----------------------------------------------------------------------------
+# *** NEMO/LIM configuration
+# -----------------------------------------------------------------------------
+
+nemo_src_dir=${HOME}/modeles/NEMO/3.6
+shared_dir=${nemo_src_dir}/CONFIG/SHARED
+nem_exe_file=${nemo_src_dir}/CONFIG/${nem_config_name}/BLD/bin/nemo.exe
+nem_numproc=32
+
+# -----------------------------------------------------------------------------
+# *** XIOS configuration
+# -----------------------------------------------------------------------------
+
+xio_exe_file=${nemo_src_dir}/EXTERNAL/xios-1.0/bin/xios_server.exe
+xio_numproc=4
+

+ 52 - 0
templates/lemaitre2/xios_config/context.xml

@@ -0,0 +1,52 @@
+<!-- =========================================================================================================== -->
+<!-- NEMO context                                                                                                -->
+<!-- =========================================================================================================== -->
+<context id="nemo" time_origin="1900-01-01 00:00:00" >    
+  <!-- $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="-"  />
+      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
+      <axis id="ncatice" long_name="Ice categories"   unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>   
+</context>

+ 532 - 0
templates/lemaitre2/xios_config/file_def.xml

@@ -0,0 +1,532 @@
+<?xml version="1.0"?>
+<!-- 
+     ============================================================================================================
+     =                                           output files definition                                        =
+     =                                            Define your own files                                         =
+     =                                         put the variables you want...                                    =
+     ============================================================================================================
+-->
+
+<file_definition type="one_file" name="@expname@_@freq@" sync_freq="1d" min_digits="4">
+  
+  <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+  <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+
+  <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+
+  <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+
+  <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+
+  <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+  
+  <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+    
+    <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+      <field field_ref="e3t"  />
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                    operation="instant" freq_op="1d" > @toce_e3t / @e3t </field>
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                                 operation="instant" freq_op="1d" > @soce_e3t / @e3t </field>
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+      <field field_ref="sst"          name="tosstd"   long_name="sea_surface_temperature_standard_deviation"         operation="instant" freq_op="1d" > sqrt( @sst2 - @sst * @sst ) </field>
+      <field field_ref="ssh"          name="zosstd"   long_name="sea_surface_height_above_geoid_standard_deviation"  operation="instant" freq_op="1d" > sqrt( @ssh2 - @ssh * @ssh ) </field>
+      <field field_ref="sst"          name="sstdcy"   long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > @sstmax - @sstmin </field>
+      <field field_ref="mldkz5"       />
+      <field field_ref="mldr10_1"     />
+      <field field_ref="mldr10_1"     name="mldr10_1dcy"  long_name="amplitude of mldr10_1 diurnal cycle" operation="average" freq_op="1d" > @mldr10_1max - @mldr10_1min </field>
+      <field field_ref="sbt"                          />
+      <field field_ref="heatc"        name="heatc"    long_name="Heat content vertically integrated"            />
+      <field field_ref="saltc"        name="saltc"    long_name="Salt content vertically integrated"            />  
+    </file>
+
+    <file id="file2" name_suffix="_scalar" description="scalar variables" enabled=".true." >
+      <field field_ref="voltot"       name="scvoltot"  />
+      <field field_ref="sshtot"       name="scsshtot"  />
+      <field field_ref="sshsteric"    name="scsshste"  />
+      <field field_ref="sshthster"    name="scsshtst"  />
+      <field field_ref="masstot"      name="scmastot"  />
+      <field field_ref="temptot"      name="sctemtot"  />
+      <field field_ref="saltot"       name="scsaltot"  />
+
+      <field field_ref="bgtemper"     name="bgtemper"    />
+      <field field_ref="bgsaline"     name="bgsaline"    />
+      <field field_ref="bgheatco"     name="bgheatco"    />
+      <field field_ref="bgsaltco"     name="bgsaltco"    />
+      <field field_ref="bgvolssh"     name="bgvolssh"    /> 
+      <field field_ref="bgvole3t"     name="bgvole3t"    />
+      <field field_ref="bgfrcvol"     name="bgfrcvol"    />
+      <field field_ref="bgfrctem"     name="bgfrctem"    />
+      <field field_ref="bgfrcsal"     name="bgfrcsal"    />
+    </file>
+
+    <file id="file3" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." >
+      <field field_ref="ibgvoltot"    name="ibgvoltot"   />
+      <field field_ref="sbgvoltot"    name="sbgvoltot"   />
+      <field field_ref="ibgarea"      name="ibgarea"     />
+      <field field_ref="ibgsaline"    name="ibgsaline"   />
+      <field field_ref="ibgtemper"    name="ibgtemper"   />
+      <field field_ref="ibgheatco"    name="ibgheatco"   />
+      <field field_ref="sbgheatco"    name="sbgheatco"   />
+      <field field_ref="ibgsaltco"    name="ibgsaltco"   />
+
+      <field field_ref="ibgvfx"       name="ibgvfx"      />
+      <field field_ref="ibgvfxbog"    name="ibgvfxbog"      />
+      <field field_ref="ibgvfxopw"    name="ibgvfxopw"      />
+      <field field_ref="ibgvfxsni"    name="ibgvfxsni"      />
+      <field field_ref="ibgvfxdyn"    name="ibgvfxdyn"      />
+      <field field_ref="ibgvfxbom"    name="ibgvfxbom"      />
+      <field field_ref="ibgvfxsum"    name="ibgvfxsum"      />
+      <field field_ref="ibgvfxres"    name="ibgvfxres"      />
+      <field field_ref="ibgvfxspr"    name="ibgvfxspr"      />
+      <field field_ref="ibgvfxsnw"    name="ibgvfxsnw"      />
+      <field field_ref="ibgvfxsub"    name="ibgvfxsub"      />
+
+      <field field_ref="ibgsfx"       name="ibgsfx"     />
+      <field field_ref="ibgsfxbri"    name="ibgsfxbri"    />
+      <field field_ref="ibgsfxdyn"    name="ibgsfxdyn" />
+      <field field_ref="ibgsfxres"    name="ibgsfxres" />
+      <field field_ref="ibgsfxbog"    name="ibgsfxbog"      />
+      <field field_ref="ibgsfxopw"    name="ibgsfxopw"      />
+      <field field_ref="ibgsfxsni"    name="ibgsfxsni"      />
+      <field field_ref="ibgsfxbom"    name="ibgsfxbom"      />
+      <field field_ref="ibgsfxsum"    name="ibgsfxsum"      />
+
+      <field field_ref="ibghfxdhc"    name="ibghfxdhc"    />
+      <field field_ref="ibghfxspr"    name="ibghfxspr"    />
+
+      <field field_ref="ibghfxres"    name="ibghfxres"    />
+      <field field_ref="ibghfxsub"    name="ibghfxsub"    />
+      <field field_ref="ibghfxdyn"    name="ibghfxdyn"    />
+      <field field_ref="ibghfxthd"    name="ibghfxthd"    />
+      <field field_ref="ibghfxsum"    name="ibghfxsum"    />
+      <field field_ref="ibghfxbom"    name="ibghfxbom"    />
+      <field field_ref="ibghfxbog"    name="ibghfxbog"    />
+      <field field_ref="ibghfxdif"    name="ibghfxdif"    />
+      <field field_ref="ibghfxopw"    name="ibghfxopw"    />
+      <field field_ref="ibghfxout"    name="ibghfxout"    />
+      <field field_ref="ibghfxin"    name="ibghfxin"    />
+      <field field_ref="ibghfxsnw"    name="ibghfxsnw"    />
+
+      <field field_ref="ibgfrcvol"    name="ibgfrcvol"   />
+      <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  />
+      <field field_ref="ibgvolgrm"    name="ibgvolgrm"    />
+
+    </file>
+    <file id="file4" name_suffix="_icemod" description="ice variables" enabled=".false." >
+      <field field_ref="snowthic_cea"     name="snthic"     long_name="surface_snow_thickness"   />
+      <field field_ref="icethic_cea"      name="sithic"     long_name="sea_ice_thickness"        />
+      <field field_ref="icevolu"          name="sivolu" />
+      <field field_ref="snowvol"          name="snvolu" />
+      <field field_ref="iceconc"          name="siconc"  />
+
+      <field field_ref="vfxbog"          name="vfxbog" />
+      <field field_ref="vfxdyn"          name="vfxdyn" />
+      <field field_ref="vfxopw"          name="vfxopw" />
+      <field field_ref="vfxsni"          name="vfxsni" />
+      <field field_ref="vfxsum"          name="vfxsum" />
+      <field field_ref="vfxbom"          name="vfxbom" />
+      <field field_ref="vfxres"          name="vfxres" />
+      <field field_ref="vfxice"          name="vfxice" />
+      <field field_ref="vfxsnw"          name="vfxsnw" />
+      <field field_ref="vfxsub"          name="vfxsub" />
+      <field field_ref="vfxspr"          name="vfxspr" />
+
+      <field field_ref="icetrp"          name="sivtrp" />
+      <field field_ref="snwtrp"          name="snvtrp" />
+      <field field_ref="saltrp"          name="saltrp" />
+      <field field_ref="deitrp"          name="deitrp" />
+      <field field_ref="destrp"          name="destrp" />
+
+      <field field_ref="sfxbri"           name="sfxbri" />
+      <field field_ref="sfxdyn"           name="sfxdyn" />
+      <field field_ref="sfxres"           name="sfxres" />
+      <field field_ref="sfxbog"           name="sfxbog" />
+      <field field_ref="sfxbom"           name="sfxbom" />
+      <field field_ref="sfxsum"           name="sfxsum" />
+      <field field_ref="sfxsni"           name="sfxsni" />
+      <field field_ref="sfxopw"           name="sfxopw" />
+      <field field_ref="sfx"              name="sfx" />
+
+      <field field_ref="hfxsum"          name="hfxsum"    />
+      <field field_ref="hfxbom"          name="hfxbom"    />
+      <field field_ref="hfxbog"          name="hfxbog"    />
+      <field field_ref="hfxdif"          name="hfxdif"    />
+      <field field_ref="hfxopw"          name="hfxopw"    />
+      <field field_ref="hfxout"          name="hfxout"    />
+      <field field_ref="hfxin"           name="hfxin"    />
+      <field field_ref="hfxsnw"          name="hfxsnw"    />
+      <field field_ref="hfxerr"          name="hfxerr"    />
+      <field field_ref="hfxerr_rem"      name="hfxerr_rem"    />
+
+      <!-- ice-ocean heat flux from mass exchange -->
+      <field field_ref="hfxdyn"          name="hfxdyn"    />
+      <field field_ref="hfxres"          name="hfxres"    />
+      <field field_ref="hfxthd"          name="hfxthd"    />
+      <!-- ice-atm. heat flux from mass exchange -->
+      <field field_ref="hfxsub"          name="hfxsub"    />
+      <field field_ref="hfxspr"          name="hfxspr"    />
+
+      <!-- diags -->
+      <field field_ref="hfxdhc"          name="hfxdhc"    />
+      <field field_ref="hfxtur"          name="hfxtur"    />
+
+      <field field_ref="isst"             name="sst" />
+      <field field_ref="isss"             name="sss" />
+      <field field_ref="micesalt"         name="sisali" />
+      <field field_ref="micet"            name="sitemp" />
+      <field field_ref="icest"            name="sistem" />
+      <field field_ref="icehc"            name="siheco" />
+      <field field_ref="isnowhc"          name="snheco" />
+      <field field_ref="miceage"          name="siages" />
+
+      <field field_ref="uice_ipa"         name="sivelu" />
+      <field field_ref="vice_ipa"         name="sivelv" />
+      <field field_ref="icevel"           name="sivelo" />
+      <field field_ref="idive"            name="sidive" />
+      <field field_ref="ishear"           name="sishea" />
+      <field field_ref="icestr"           name="sistre" />
+
+      <field field_ref="ibrinv"           name="sibrin" />
+      <field field_ref="icecolf"          name="sicolf" />
+
+      <field field_ref="iceage_cat"       name="siagecat"/>
+      <field field_ref="iceconc_cat"      name="siconcat"/>
+      <field field_ref="icethic_cat"      name="sithicat"/>
+      <field field_ref="snowthic_cat"     name="snthicat"/>
+      <field field_ref="salinity_cat"     name="salincat"/>
+      <field field_ref="brinevol_cat"     name="sibricat"/>
+
+    </file>
+
+    <file id="file5" name_suffix="_SBC" description="surface fluxes variables" > <!-- time step automaticaly defined based on nn_fsbc -->
+      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+      <field field_ref="qsr_oce"      name="qsr_oce"  long_name="downward shortwave flux at ocean surface"           />
+      <field field_ref="qns_oce"      name="qns_oce"  long_name="downward non solar flux at ocean surface"           />
+      <field field_ref="qt_oce"       name="qt_oce"   long_name="downward total flux at ocean surface"           />
+      <field field_ref="qsr_ice"      name="qsr_ice"  long_name="downward shortwave flux at ice surface"           />
+      <field field_ref="qns_ice"      name="qns_ice"  long_name="downward non solar flux at ice surface"           />
+      <field field_ref="qtr_ice"      name="qtr_ice"  long_name="shortwave flux transmitted thru the ice"           />
+      <field field_ref="qt_ice"       name="qt_ice"   long_name="downward total flux at ice surface"           />
+      <field field_ref="saltflx"      name="sfx"  />
+      <field field_ref="taum"         name="taum" />
+      <field field_ref="wspd"         name="windsp"  />
+      <field field_ref="precip"       name="precip" />
+      <!-- ice and snow -->
+      <field field_ref="snowpre"      />
+      <field field_ref="utau_ice"         name="utau_ice" />
+      <field field_ref="vtau_ice"         name="vtau_ice" />
+    </file>
+  </file_group> 
+
+
+  <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files -->
+
+    <file id="file10" name_suffix="_grid_T" >
+      <field field_ref="e3t" long_name="T-cell thickness" />
+      <field field_ref="botpres"      name="pbo"      long_name="Pressure_at_sea_floor"                                          />
+      <!-- pso : sea_water_pressure_at_sea_water_surface = 0 -->
+      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                                 />
+      <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"             level="2" />
+
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"   operation="instant" freq_op="1mo" > @toce_e3t / @e3t </field>      
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                              level="1" />
+      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"                    level="2" />
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                operation="instant" freq_op="1mo" > @soce_e3t / @e3t </field>       
+      <field field_ref="soce_e3t"                     long_name="salinity * e3t"                    operation="instant" freq_op="1mo" > soce * e3t </field >  
+      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                                 level="1" />
+      <field field_ref="rhop"         name="rhopoto"  long_name="sea_water_potential_density"                          level="2" />
+      <!-- no agessc : sea_water_age_since_surface_contact -->
+      <!-- no cfc11  : moles_per_unit_mass_of_cfc11_in_sea_water -->
+      <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline -->
+      <!-- mlotst    :           ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
+      <!-- mlotstsq  : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
+      <field field_ref="mldkz5"       name="omlmax"   long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" />
+      <field field_ref="mldkz5"       name="mldkz5"   level="2"  />
+      <field field_ref="mldr10_1"     name="mldr10_1" level="2" />
+      <field field_ref="mldr10_1max"  name="mldr10_1max"  long_name="max of Mixed Layer Depth 0.01 ref.10m"              operation="maximum" />
+      <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                               level="1" />
+      <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp -->
+      <field field_ref="erp"          name="wfcorr"   long_name="water_flux_correction"                                   level="1" /> <!-- usually = 0 -->
+      <field field_ref="qns"           name="nshfls"      long_name="surface_net_downward_non_solar_flux"                                         level="1" />
+      <field field_ref="qsr"           name="rsntds"      long_name="surface_net_downward_shortwave_flux"                                         level="1" />
+      <field field_ref="qsr3d"         name="rsds"        long_name="downwelling_shortwave_flux_in_sea_water"                                     level="1" />
+      <field field_ref="qrp"           name="hfcorr"      long_name="heat_flux_correction"                                                        level="1" />
+    </file>
+
+    <file id="file11" name_suffix="_grid_U" description="ocean U grid variables" >
+      <field field_ref="e3u"  />
+      <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
+      <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity" operation="instant" freq_op="5d" > @uoce_e3u / @e3u </field>
+      <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+      <!-- available with key_diaar5 -->
+      <field field_ref="u_masstr"     name="vozomatr"  />
+      <field field_ref="u_heattr"     name="sozohetr"  />
+      <field field_ref="u_salttr"     name="sozosatr"  />
+    </file>
+    
+    <file id="file12" name_suffix="_grid_V" description="ocean V grid variables" >
+      <field field_ref="e3v"  />
+      <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
+      <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity" operation="instant" freq_op="5d" > @voce_e3v / @e3v </field>
+      <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+      <!-- available with key_diaar5 -->
+      <field field_ref="v_masstr"     name="vomematr"  />
+      <field field_ref="v_heattr"     name="somehetr"  />
+      <field field_ref="v_salttr"     name="somesatr"  />
+    </file>
+    
+    <file id="file13" name_suffix="_grid_W" description="ocean W grid variables" >
+      <field field_ref="e3w"  />
+      <field field_ref="woce"         name="wo"     />
+      <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
+      <field field_ref="w_masstr"     name="vovematr"  />
+    </file>
+
+    <file id="file14" name_suffix="_icemod" description="ice variables" enabled=".true." >
+      <field field_ref="snowthic_cea"     name="snthic"     long_name="surface_snow_thickness"   />
+      <field field_ref="icethic_cea"      name="sithic"     long_name="sea_ice_thickness"        />
+      <field field_ref="icevolu"          name="sivolu" />
+      <field field_ref="snowvol"          name="snvolu" />
+      <field field_ref="iceconc"          name="siconc"  />
+
+      <field field_ref="vfxbog"          name="vfxbog" />
+      <field field_ref="vfxdyn"          name="vfxdyn" />
+      <field field_ref="vfxopw"          name="vfxopw" />
+      <field field_ref="vfxsni"          name="vfxsni" />
+      <field field_ref="vfxsum"          name="vfxsum" />
+      <field field_ref="vfxbom"          name="vfxbom" />
+      <field field_ref="vfxres"          name="vfxres" />
+      <field field_ref="vfxice"          name="vfxice" />
+      <field field_ref="vfxsnw"          name="vfxsnw" />
+      <field field_ref="vfxsub"          name="vfxsub" />
+      <field field_ref="vfxspr"          name="vfxspr" />
+
+      <field field_ref="icetrp"          name="sivtrp" />
+      <field field_ref="snwtrp"          name="snvtrp" />
+      <field field_ref="saltrp"          name="saltrp" />
+      <field field_ref="deitrp"          name="deitrp" />
+      <field field_ref="destrp"          name="destrp" />
+
+      <field field_ref="sfxbri"           name="sfxbri" />
+      <field field_ref="sfxdyn"           name="sfxdyn" />
+      <field field_ref="sfxres"           name="sfxres" />
+      <field field_ref="sfxbog"           name="sfxbog" />
+      <field field_ref="sfxbom"           name="sfxbom" />
+      <field field_ref="sfxsum"           name="sfxsum" />
+      <field field_ref="sfxsni"           name="sfxsni" />
+      <field field_ref="sfxopw"           name="sfxopw" />
+      <field field_ref="sfx"              name="sfx" />
+
+      <field field_ref="hfxsum"          name="hfxsum"    />
+      <field field_ref="hfxbom"          name="hfxbom"    />
+      <field field_ref="hfxbog"          name="hfxbog"    />
+      <field field_ref="hfxdif"          name="hfxdif"    />
+      <field field_ref="hfxopw"          name="hfxopw"    />
+      <field field_ref="hfxout"          name="hfxout"    />
+      <field field_ref="hfxin"           name="hfxin"    />
+      <field field_ref="hfxsnw"          name="hfxsnw"    />
+      <field field_ref="hfxerr"          name="hfxerr"    />
+      <field field_ref="hfxerr_rem"      name="hfxerr_rem"    />
+
+      <!-- ice-ocean heat flux from mass exchange -->
+      <field field_ref="hfxdyn"          name="hfxdyn"    />
+      <field field_ref="hfxres"          name="hfxres"    />
+      <field field_ref="hfxthd"          name="hfxthd"    />
+      <!-- ice-atm. heat flux from mass exchange -->
+      <field field_ref="hfxsub"          name="hfxsub"    />
+      <field field_ref="hfxspr"          name="hfxspr"    />
+
+      <!-- diags -->
+      <field field_ref="hfxdhc"          name="hfxdhc"    />
+      <field field_ref="hfxtur"          name="hfxtur"    />
+
+      <field field_ref="isst"             name="sst" />
+      <field field_ref="isss"             name="sss" />
+      <field field_ref="micesalt"         name="sisali" />
+      <field field_ref="micet"            name="sitemp" />
+      <field field_ref="icest"            name="sistem" />
+      <field field_ref="icehc"            name="siheco" />
+      <field field_ref="isnowhc"          name="snheco" />
+      <field field_ref="miceage"          name="siages" />
+
+      <field field_ref="uice_ipa"         name="sivelu" />
+      <field field_ref="vice_ipa"         name="sivelv" />
+      <field field_ref="icevel"           name="sivelo" />
+      <field field_ref="idive"            name="sidive" />
+      <field field_ref="ishear"           name="sishea" />
+      <field field_ref="icestr"           name="sistre" />
+
+      <field field_ref="ibrinv"           name="sibrin" />
+      <field field_ref="icecolf"          name="sicolf" />
+
+      <field field_ref="iceage_cat"       name="siagecat"/>
+      <field field_ref="iceconc_cat"      name="siconcat"/>
+      <field field_ref="icethic_cat"      name="sithicat"/>
+      <field field_ref="snowthic_cat"     name="snthicat"/>
+      <field field_ref="salinity_cat"     name="salincat"/>
+      <field field_ref="brinevol_cat"     name="sibricat"/>
+
+    </file>
+
+    <file id="file15" name_suffix="_scalar" description="scalar variables" enabled=".true." >
+      <field field_ref="voltot"       name="scvoltot"  />
+      <field field_ref="sshtot"       name="scsshtot"  />
+      <field field_ref="sshsteric"    name="scsshste"  />
+      <field field_ref="sshthster"    name="scsshtst"  />
+      <field field_ref="masstot"      name="scmastot"  />
+      <field field_ref="temptot"      name="sctemtot"  />
+      <field field_ref="saltot"       name="scsaltot"  />
+
+      <field field_ref="bgtemper"     name="bgtemper"    />
+      <field field_ref="bgsaline"     name="bgsaline"    />
+      <field field_ref="bgheatco"     name="bgheatco"    />
+      <field field_ref="bgsaltco"     name="bgsaltco"    />
+      <field field_ref="bgvolssh"     name="bgvolssh"    /> 
+      <field field_ref="bgvole3t"     name="bgvole3t"    />
+      <field field_ref="bgfrcvol"     name="bgfrcvol"    />
+      <field field_ref="bgfrctem"     name="bgfrctem"    />
+      <field field_ref="bgfrcsal"     name="bgfrcsal"    />
+
+      <field field_ref="ibgvoltot"    name="ibgvoltot"   />
+      <field field_ref="sbgvoltot"    name="sbgvoltot"   />
+      <field field_ref="ibgarea"      name="ibgarea"     />
+      <field field_ref="ibgsaline"    name="ibgsaline"   />
+      <field field_ref="ibgtemper"    name="ibgtemper"   />
+      <field field_ref="ibgheatco"    name="ibgheatco"   />
+      <field field_ref="sbgheatco"    name="sbgheatco"   />
+      <field field_ref="ibgsaltco"    name="ibgsaltco"   />
+
+      <field field_ref="ibgvfx"       name="ibgvfx"      />
+      <field field_ref="ibgvfxbog"    name="ibgvfxbog"      />
+      <field field_ref="ibgvfxopw"    name="ibgvfxopw"      />
+      <field field_ref="ibgvfxsni"    name="ibgvfxsni"      />
+      <field field_ref="ibgvfxdyn"    name="ibgvfxdyn"      />
+      <field field_ref="ibgvfxbom"    name="ibgvfxbom"      />
+      <field field_ref="ibgvfxsum"    name="ibgvfxsum"      />
+      <field field_ref="ibgvfxres"    name="ibgvfxres"      />
+      <field field_ref="ibgvfxspr"    name="ibgvfxspr"      />
+      <field field_ref="ibgvfxsnw"    name="ibgvfxsnw"      />
+      <field field_ref="ibgvfxsub"    name="ibgvfxsub"      />
+
+      <field field_ref="ibgsfx"       name="ibgsfx"     />
+      <field field_ref="ibgsfxbri"    name="ibgsfxbri"    />
+      <field field_ref="ibgsfxdyn"    name="ibgsfxdyn" />
+      <field field_ref="ibgsfxres"    name="ibgsfxres" />
+      <field field_ref="ibgsfxbog"    name="ibgsfxbog"      />
+      <field field_ref="ibgsfxopw"    name="ibgsfxopw"      />
+      <field field_ref="ibgsfxsni"    name="ibgsfxsni"      />
+      <field field_ref="ibgsfxbom"    name="ibgsfxbom"      />
+      <field field_ref="ibgsfxsum"    name="ibgsfxsum"      />
+
+      <field field_ref="ibghfxdhc"    name="ibghfxdhc"    />
+      <field field_ref="ibghfxspr"    name="ibghfxspr"    />
+
+      <field field_ref="ibghfxres"    name="ibghfxres"    />
+      <field field_ref="ibghfxsub"    name="ibghfxsub"    />
+      <field field_ref="ibghfxdyn"    name="ibghfxdyn"    />
+      <field field_ref="ibghfxthd"    name="ibghfxthd"    />
+      <field field_ref="ibghfxsum"    name="ibghfxsum"    />
+      <field field_ref="ibghfxbom"    name="ibghfxbom"    />
+      <field field_ref="ibghfxbog"    name="ibghfxbog"    />
+      <field field_ref="ibghfxdif"    name="ibghfxdif"    />
+      <field field_ref="ibghfxopw"    name="ibghfxopw"    />
+      <field field_ref="ibghfxout"    name="ibghfxout"    />
+      <field field_ref="ibghfxin"    name="ibghfxin"    />
+      <field field_ref="ibghfxsnw"    name="ibghfxsnw"    />
+
+      <field field_ref="ibgfrcvol"    name="ibgfrcvol"   />
+      <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  />
+      <field field_ref="ibgvolgrm"    name="ibgvolgrm"    />
+
+    </file>
+
+    <!--
+	<file id="file8" name_suffix="_Tides" description="tidal harmonics" >
+	<field field_ref="M2x"          name="M2x"      long_name="M2 Elevation harmonic real part"                       />
+	<field field_ref="M2y"          name="M2y"      long_name="M2 Elevation harmonic imaginary part"                  />
+	<field field_ref="M2x_u"        name="M2x_u"    long_name="M2 current barotrope along i-axis harmonic real part "       />
+	<field field_ref="M2y_u"        name="M2y_u"    long_name="M2 current barotrope along i-axis harmonic imaginary part "  />
+	<field field_ref="M2x_v"        name="M2x_v"    long_name="M2 current barotrope along j-axis harmonic real part "       />
+	<field field_ref="M2y_v"        name="M2y_v"    long_name="M2 current barotrope along j-axis harmonic imaginary part "  />
+	</file>
+    -->
+
+  </file_group>
+
+
+  <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+  <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+  <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+  <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+  <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files -->
+
+    <file id="file20" name_suffix="_grid_T" description="ocean T grid variables" >
+      <field field_ref="e3t"  />
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"      operation="instant" freq_op="1y" > @toce_e3t / @e3t </field>        
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                   operation="instant" freq_op="1y" > @soce_e3t / @e3t </field>         
+      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
+      <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
+      <field field_ref="mldr10_1"     />
+      <field field_ref="mldkz5"       name="omlmax"   long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" />
+      <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                               level="1" />
+      <field field_ref="erp"          name="wfcorr"   long_name="water_flux_correction"                                   level="1" /> <!-- usually = 0 -->
+      <field field_ref="qns"           name="nshfls"      long_name="surface_net_downward_non_solar_flux"                                         level="1" />
+      <field field_ref="qsr"           name="rsntds"      long_name="surface_net_downward_shortwave_flux"                                         level="1" />
+      <field field_ref="qsr3d"         name="rsds"        long_name="downwelling_shortwave_flux_in_sea_water"                                     level="1" />
+      <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+      <field field_ref="saltflx"      name="sosflxdo"  />
+      <field field_ref="taum"         name="taum" />
+      <field field_ref="wspd"         name="sowindsp"  />
+      <field field_ref="precip"       name="soprecip" />
+      <!-- available with ln_blk_clio or ln_blk_core -->
+      <field field_ref="qns_oce"      name="sonshdoo"  />
+      <field field_ref="qlw_oce"      name="solwhdoo"  />
+      <field field_ref="qsb_oce"      name="sosehdoo"  />
+      <field field_ref="qla_oce"      name="solahdoo"  />
+      <field field_ref="taum_oce"     name="sowndsto"  />
+      <!-- ice and snow -->
+      <field field_ref="snowpre"      name="isnowpre"/>
+      <field field_ref="utau_ice"     name="iicestru" />
+      <field field_ref="vtau_ice"     name="iicestrv" />
+    </file>
+
+    <file id="file21" name_suffix="_grid_U" description="ocean U grid variables" >
+      <field field_ref="e3u"  />
+      <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
+      <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      operation="instant" freq_op="1y" > @uoce_e3u / @e3u </field> 
+      <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+      <field field_ref="uocetr_eff"   name="uocetr_eff"  />
+    </file>
+
+    <file id="file22" name_suffix="_grid_V" description="ocean V grid variables" >
+      <field field_ref="e3v"  />
+      <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
+      <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"     operation="instant" freq_op="1y" > @voce_e3v / @e3v </field>
+      <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+      <field field_ref="vocetr_eff"   name="vocetr_eff"  />
+    </file>
+
+    <file id="file23" name_suffix="_grid_W" description="ocean W grid variables" >
+      <field field_ref="e3w"  />
+      <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
+      <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
+      <field field_ref="wocetr_eff"   name="wocetr_eff"  />
+    </file>
+
+
+  </file_group>
+
+  <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+  <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+  <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+</file_definition>
+

+ 33 - 0
templates/lemaitre2/xios_config/iodef.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- =========================================================================================================== -->
+<!-- iodef.xml : Configuration file for production of output files using XIOS                                    -->
+<!--             This file contains the context XIOS.                                                            -->
+<!--             The model components context will be add automatically by the comp.driver                       -->
+<!-- =========================================================================================================== -->
+
+<simulation>
+
+  <!-- =========================================================================================================== -->
+  <!-- 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="buffer_size"               type="integer">50000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">1</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >LMDZ,oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+
+  <!-- =========================================================================================================== -->
+  <!-- COMPONENT CONTEXT : the model components context will be add automatically by the comp.driver               -->
+  <context id="nemo" src="./context.xml"/>
+  
+</simulation>

+ 31 - 0
templates/pingo/data.cfg

@@ -0,0 +1,31 @@
+ini_data_dir=/pfast/pbarriat/DATA/nemo
+ic_subdir=CONFIG_FILES
+nem_grid=ORCA1L75
+ic_files=(
+    "clipped_eORCA_R1_coordinates_v1.0.nc => coordinates.nc" 
+    "clipped_eORCA1_R1_bathy_meter_v2.1.nc => bathy_meter.nc" 
+    "clipped_eORCA_R1_ahmcoef_v1.0.nc => ahmcoef.nc" 
+    "clipped_eORCA_R1_maskITF_v1.0.nc => mask_itf.nc" 
+    "clipped_eORCA_R1_K1_v1.0.nc => K1rowdrg.nc" 
+    "clipped_eORCA_R1_M2_v1.0.nc => M2rowdrg.nc"
+    "clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc"
+    "conservative_temperature_WOA13_decav_Reg1L75_clim.nc"
+    "absolute_salinity_WOA13_decav_Reg1L75_clim.nc"
+    "sss_absolute_salinity_WOA13_decav_Reg1L75_clim.nc"
+    "weight_bilinear_360x180-clipped_eORCA1L75_2D.nc"
+    "weight_bilinear_360x180-clipped_eORCA1L75_3D.nc"
+)
+nem_res_hor=$(echo ${nem_grid} | sed 's:ORCA\([0-9]\+\)L[0-9]\+:\1:')
+#
+forcing_subdir=FORCINGS
+nem_forcing_set=DFS5.2
+forcing_files=(
+    "* => ."
+)
+#
+shared_files=(
+    "namelist_ice_lim3_ref => namelist_ice_ref"
+    "namelist_ref"
+    "domain_def.xml"
+    "field_def.xml"
+)

+ 22 - 0
templates/pingo/experiment.cfg

@@ -0,0 +1,22 @@
+# Experience name
+exp_name=EXP0
+
+# Simulation start and end date. Use any (reasonable) syntax you want.
+run_start_date="1958-01-01"
+run_duration="1 month"
+
+# Restart frequency. Use any (reasonable) number and time unit you want.
+# For runs without restart, leave this variable empty or set to 0
+rst_freq="5 days"
+
+# Number of restart legs to be run in one go
+run_num_legs=2
+
+# Parameters
+nem_time_step_sec=3600
+lim_time_step_sec=21600
+nem_restart_offset=0
+nem_config_name=ORCA1_LIM3_REF
+
+# This file is used to store information about restarts
+info_file="nemo.info"

+ 7 - 0
templates/pingo/job.cfg

@@ -0,0 +1,7 @@
+#
+start_dir=${PWD}
+run_dir="/pfast/$USER/nemo/run/${exp_name}"
+archive_dir="/pfast/$USER/nemo/archive/${exp_name}"
+
+# Cancel job on error
+set -ueo pipefail

+ 403 - 0
templates/pingo/namelists/build_namelist_cfg.sh

@@ -0,0 +1,403 @@
+# namelist.nemo-ORCA1L75.cfg.sh writes the NEMO namelist for ORCA1L75 in
+# This namelist will overwrite the reference namelist (namelist.nemo.ref.sh). 
+#
+if $leg_is_restart
+then
+    nemo_restart=".TRUE."
+else
+    nemo_restart=".FALSE."
+fi
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp        =  "${exp_name}" !  experience name
+   nn_it000      =  $(( leg_start_sec / nem_time_step_sec + 1 )) !  first time step
+   nn_itend      =  $(( leg_end_sec / nem_time_step_sec ))       !  last  time step (std 5475)
+   nn_date0      =  ${leg_start_date_yyyymmdd} !  date at nit_0000 (format yyyymmdd)
+                                  !    used if ln_rstart=F or
+                                  !    (ln_rstart=T and nn_rstctl=0 or 1)
+   ln_rstart     = ${nemo_restart} !  start from rest (F) or from a restart file (T)
+   nn_rstctl     =  1             !  restart control ==> activated only if ln_rstart=T
+                                  !  = 0 nn_date0 read in namelist ; nn_it000 : read in namelist
+                                  !  = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart
+                                  !  = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart
+   cn_ocerst_in  = "restart_oce"  !  suffix of ocean restart name (input)
+   cn_ocerst_out = "restart_oce"  !  suffix of ocean restart name (output)
+   nn_stock      =  0             !  frequency of creation of a restart file (modulo referenced to 1)
+   nn_write      = -1             !  frequency of write in the output file   (modulo referenced to nn_it000)
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =       1               !  resolution of the configuration
+   jpidta      =     362               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     292               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      75               !  number of levels      ( >= jpk )
+   jpiglo      =     362               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     292               !  2nd    -                  -    --> j  =jpjdta
+   jperio      =       6               !  6 cyclic East-West AND North fold F-point pivot
+   ln_use_jattr = .true.               !  use (T) the file attribute: open_ocean_jstart if present
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_msh      =    0                  !  create (=1) a mesh file or not (=0)
+   rn_hmin     =    20.                !  min depth of the ocean (>0) or min number of ocean level (<0)
+   rn_rdt      = ${nem_time_step_sec} !  time step for the dynamics (and tracer if nn_acc=0)
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             !  latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =  -3958.951371276829   !  ORCA r4, r2 and r05 coefficients
+   ppa0        =    103.95300960000000 ! (default coefficients)
+   ppa1        =      2.41595126900000 !
+   ppkth       =     15.35101370000000 !
+   ppacr       =      7.0              !
+   ppdzmin     =  999999.              !  Minimum vertical spacing
+   pphmax      =  999999.              !  Maximum depth
+   ppa2        =  100.7609285000000    !  Double tanh function parameters
+   ppkth2      =  48.02989372000000    !
+   ppacr2      =  13.00000000000       !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters  ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namc1d        !   1D configuration options                             ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+!          !  file name                                            ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights                                         ! rotation ! land/sea mask !
+!          !                                                       !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename                                        ! pairing  ! filename      !
+   sn_tem  = 'conservative_temperature_WOA13_decav_Reg1L75_clim.nc',         -1        ,'votemper' ,    .true.    , .true. , 'yearly'  ,'weight_bilinear_360x180-clipped_eORCA1L75_3D.nc',   ''     ,    ''
+   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim.nc'       ,         -1        ,'vosaline' ,    .true.    , .true. , 'yearly'  ,'weight_bilinear_360x180-clipped_eORCA1L75_3D.nc',   ''     ,    ''
+   !
+   ln_tsd_tradmp = .false.  !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = $(( lim_time_step_sec / nem_time_step_sec )) !  frequency of surface boundary condition computation
+                           !     (also = the frequency of sea-ice model call)
+   nn_isf      = 3         !  ice shelf melting/freezing                (/=0 => fill namsbc_isf)
+                           !  0 =no isf                  1 = presence of ISF
+                           !  2 = bg03 parametrisation   3 = rnf file for isf
+                           !  4 = ISF fwf specified
+                           !  option 1 and 4 need ln_isfcav = .true. (domzgr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+                           !     =2 annual global mean of e-p-r set to zero
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_utau     = 'uwnd_10m'  ,       24          , 'uwnd'    ,   .true.     , .false., 'yearly'  , ''       , ''
+   sn_vtau     = 'vwnd_10m'  ,       24          , 'vwnd'    ,   .true.     , .false., 'yearly'  , ''       , ''
+   sn_wndm     = 'ncep_bulk' ,       24          , 'wspd'    ,   .true.     , .false., 'yearly'  , ''       , ''
+   sn_tair     = 'ncep_bulk' ,       24          , 'air'     ,   .true.     , .false., 'yearly'  , ''       , ''
+   sn_humi     = 'flx_correc',       -1          , 'socliohu',   .true.     , .true. , 'yearly'  , ''       , ''
+   sn_ccov     = 'flx_correc',       -1          , 'socliocl',   .true.     , .true. , 'yearly'  , ''       , ''
+   sn_prec     = 'flx_correc',       -1          , 'socliopl',   .true.     , .true. , 'yearly'  , ''       , ''
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+!              !  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_wndi     = 'drowned_u10_DFS5.2'    ,         3         , 'u10'    ,   .true.     , .false. , 'yearly'  , 'weights_bicub_DFS5.2_to_clipped_eORCA1.nc' , 'U1'     , ''
+   sn_wndj     = 'drowned_v10_DFS5.2'    ,         3         , 'v10'    ,   .true.     , .false. , 'yearly'  , 'weights_bicub_DFS5.2_to_clipped_eORCA1.nc' , 'V1'     , ''
+   sn_qsr      = 'drowned_radsw_DFS5.2'  ,        24         , 'radsw'  ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_qlw      = 'drowned_radlw_DFS5.2'  ,        24         , 'radlw'  ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_tair     = 'drowned_t2_DFS5.2'     ,         3         , 't2'     ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_humi     = 'drowned_q2_DFS5.2'     ,         3         , 'q2'     ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_prec     = 'drowned_precip_DFS5.2' ,        24         , 'precip' ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+   sn_snow     = 'drowned_snow_DFS5.2'   ,        24         , 'snow'   ,   .true.     , .false. , 'yearly'  , 'weights_bilin_DFS5.2_to_clipped_eORCA1.nc' , ''       , ''
+
+   rn_zqt      = 2.        !  Air temperature and humidity reference height (m)
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_sas    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+   nn_chldta   =      0    !  RGB : Chl data (=1) or cst value (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+!              !  file name                                              ! frequency (hours) ! variable   ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                                                         !  (if <0  months)  !   name     !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_rnf      = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc',        -1         , 'sorunoff' , .true.       , .true. , 'yearly'  , ''       , ''       , ''
+   sn_cnf      = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc',         0         , 'socoefr'  , .false.      , .true. , 'yearly'  , ''       , ''       , ''
+
+   ln_rnf_mouth = .false.   !  specific treatment at rivers mouths
+   ln_rnf_depth_ini = .true.   ! compute depth at initialisation from runoff file
+   rn_rnf_max   = 0.05      !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+/
+!-----------------------------------------------------------------------
+&namsbc_isf    !  Top boundary layer (ISF)
+!-----------------------------------------------------------------------
+!                ! file name                                                ! frequency (hours) ! variable     ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation !
+!                !                                                          !  (if <0  months)  !   name       !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  !
+   sn_rnfisf     = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sornfisf'    ,    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
+   sn_depmax_isf = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sodepmax_isf',    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
+   sn_depmin_isf = 'clipped_runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc' ,       -12         ,'sodepmin_isf',    .false.     , .true.  , 'yearly'  ,  ''      ,   ''
+/
+!-----------------------------------------------------------------------
+&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !  file name                                          ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights                                         ! rotation ! land/sea mask !
+!              !                                                     !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename                                        ! pairing  ! filename      !
+   sn_sss      = 'sss_absolute_salinity_WOA13_decav_Reg1L75_clim.nc' ,        -1         , 'sosaline',    .true.    , .true. , 'yearly'  ,'weight_bilinear_360x180-clipped_eORCA1L75_2D.nc', ''       , ''
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    0.     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_tide      !   tide parameters (#ifdef key_tide)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy        !  unstructured open boundaries                          ("key_bdy")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy_dta      !  open boundaries - external data           ("key_bdy")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy_tide     ! tidal forcing at open boundaries
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+                           !                              = 2 : nonlinear friction
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   nn_geoflx   =    1      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   rn_aht_0         =  1000.     !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_aeiv_0        =  1000.     !  eddy induced velocity coefficient [m2/s]    (require "key_traldf_eiv")
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .true.    !  s-coordinate (standard jacobian formulation)
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   rn_ahm_0_lap     = 20000.    !  horizontal laplacian eddy viscosity   [m2/s]
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!------------------------------------------------------------------------
+&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
+!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx_new    !   new tidal mixing parameterization                ("key_zdftmx_new")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namc1d_uvd    !   data: U & V currents                                 ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsto       ! Stochastic parametrization of EOS
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends         ("key_trddyn" and/or "key_trdtra")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namflo       !   float parameters                                      ("key_float")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_diaharm   !   Harmonic analysis of tidal constituents ('key_diaharm')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdct        ! transports through sections
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobs       !  observation usage switch                               ('key_diaobs')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+EOF

+ 38 - 0
templates/pingo/namelists/namelist_ice_cfg

@@ -0,0 +1,38 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-3 : Ice configuration namelist. Overwrites SHARED/namelist_ice_lim3_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   ln_limdiahsb  = .false.         !  check the heat and salt budgets (T) or not (F)
+   ln_limdiaout  = .false.         !  output the heat and salt budgets (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceitd     !   Ice discretization
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicehdf     !   Ice horizontal diffusion
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicesal     !   ice salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceitdme   !   parameters for mechanical redistribution of ice 
+!-----------------------------------------------------------------------
+/

+ 19 - 0
templates/pingo/programs.cfg

@@ -0,0 +1,19 @@
+module_list="netcdf/mpi/4.2.1 hdf5/mpi/1.8.10-patch1 udunits/mpi/2.1.24 nco/mpi/4.3.1 ncview/mpi/2.1.5"
+extralibs_list=""
+
+# -----------------------------------------------------------------------------
+# *** NEMO/LIM configuration
+# -----------------------------------------------------------------------------
+
+nemo_src_dir=${HOME}/modeles/NEMO/3.6
+shared_dir=${nemo_src_dir}/CONFIG/SHARED
+nem_exe_file=${nemo_src_dir}/CONFIG/${nem_config_name}/BLD/bin/nemo.exe
+nem_numproc=20
+
+# -----------------------------------------------------------------------------
+# *** XIOS configuration
+# -----------------------------------------------------------------------------
+
+xio_exe_file=${nemo_src_dir}/EXTERNAL/xios-1.0/bin/xios_server.exe
+xio_numproc=1
+

+ 52 - 0
templates/pingo/xios_config/context.xml

@@ -0,0 +1,52 @@
+<!-- =========================================================================================================== -->
+<!-- NEMO context                                                                                                -->
+<!-- =========================================================================================================== -->
+<context id="nemo" time_origin="1900-01-01 00:00:00" >    
+  <!-- $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="-"  />
+      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
+      <axis id="ncatice" long_name="Ice categories"   unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>   
+</context>

+ 532 - 0
templates/pingo/xios_config/file_def.xml

@@ -0,0 +1,532 @@
+<?xml version="1.0"?>
+<!-- 
+     ============================================================================================================
+     =                                           output files definition                                        =
+     =                                            Define your own files                                         =
+     =                                         put the variables you want...                                    =
+     ============================================================================================================
+-->
+
+<file_definition type="one_file" name="@expname@_@freq@" sync_freq="1d" min_digits="4">
+  
+  <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+  <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+
+  <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+
+  <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+
+  <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+
+  <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+  
+  <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+    
+    <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+      <field field_ref="e3t"  />
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                    operation="instant" freq_op="1d" > @toce_e3t / @e3t </field>
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                                 operation="instant" freq_op="1d" > @soce_e3t / @e3t </field>
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+      <field field_ref="sst"          name="tosstd"   long_name="sea_surface_temperature_standard_deviation"         operation="instant" freq_op="1d" > sqrt( @sst2 - @sst * @sst ) </field>
+      <field field_ref="ssh"          name="zosstd"   long_name="sea_surface_height_above_geoid_standard_deviation"  operation="instant" freq_op="1d" > sqrt( @ssh2 - @ssh * @ssh ) </field>
+      <field field_ref="sst"          name="sstdcy"   long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > @sstmax - @sstmin </field>
+      <field field_ref="mldkz5"       />
+      <field field_ref="mldr10_1"     />
+      <field field_ref="mldr10_1"     name="mldr10_1dcy"  long_name="amplitude of mldr10_1 diurnal cycle" operation="average" freq_op="1d" > @mldr10_1max - @mldr10_1min </field>
+      <field field_ref="sbt"                          />
+      <field field_ref="heatc"        name="heatc"    long_name="Heat content vertically integrated"            />
+      <field field_ref="saltc"        name="saltc"    long_name="Salt content vertically integrated"            />  
+    </file>
+
+    <file id="file2" name_suffix="_scalar" description="scalar variables" enabled=".true." >
+      <field field_ref="voltot"       name="scvoltot"  />
+      <field field_ref="sshtot"       name="scsshtot"  />
+      <field field_ref="sshsteric"    name="scsshste"  />
+      <field field_ref="sshthster"    name="scsshtst"  />
+      <field field_ref="masstot"      name="scmastot"  />
+      <field field_ref="temptot"      name="sctemtot"  />
+      <field field_ref="saltot"       name="scsaltot"  />
+
+      <field field_ref="bgtemper"     name="bgtemper"    />
+      <field field_ref="bgsaline"     name="bgsaline"    />
+      <field field_ref="bgheatco"     name="bgheatco"    />
+      <field field_ref="bgsaltco"     name="bgsaltco"    />
+      <field field_ref="bgvolssh"     name="bgvolssh"    /> 
+      <field field_ref="bgvole3t"     name="bgvole3t"    />
+      <field field_ref="bgfrcvol"     name="bgfrcvol"    />
+      <field field_ref="bgfrctem"     name="bgfrctem"    />
+      <field field_ref="bgfrcsal"     name="bgfrcsal"    />
+    </file>
+
+    <file id="file3" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." >
+      <field field_ref="ibgvoltot"    name="ibgvoltot"   />
+      <field field_ref="sbgvoltot"    name="sbgvoltot"   />
+      <field field_ref="ibgarea"      name="ibgarea"     />
+      <field field_ref="ibgsaline"    name="ibgsaline"   />
+      <field field_ref="ibgtemper"    name="ibgtemper"   />
+      <field field_ref="ibgheatco"    name="ibgheatco"   />
+      <field field_ref="sbgheatco"    name="sbgheatco"   />
+      <field field_ref="ibgsaltco"    name="ibgsaltco"   />
+
+      <field field_ref="ibgvfx"       name="ibgvfx"      />
+      <field field_ref="ibgvfxbog"    name="ibgvfxbog"      />
+      <field field_ref="ibgvfxopw"    name="ibgvfxopw"      />
+      <field field_ref="ibgvfxsni"    name="ibgvfxsni"      />
+      <field field_ref="ibgvfxdyn"    name="ibgvfxdyn"      />
+      <field field_ref="ibgvfxbom"    name="ibgvfxbom"      />
+      <field field_ref="ibgvfxsum"    name="ibgvfxsum"      />
+      <field field_ref="ibgvfxres"    name="ibgvfxres"      />
+      <field field_ref="ibgvfxspr"    name="ibgvfxspr"      />
+      <field field_ref="ibgvfxsnw"    name="ibgvfxsnw"      />
+      <field field_ref="ibgvfxsub"    name="ibgvfxsub"      />
+
+      <field field_ref="ibgsfx"       name="ibgsfx"     />
+      <field field_ref="ibgsfxbri"    name="ibgsfxbri"    />
+      <field field_ref="ibgsfxdyn"    name="ibgsfxdyn" />
+      <field field_ref="ibgsfxres"    name="ibgsfxres" />
+      <field field_ref="ibgsfxbog"    name="ibgsfxbog"      />
+      <field field_ref="ibgsfxopw"    name="ibgsfxopw"      />
+      <field field_ref="ibgsfxsni"    name="ibgsfxsni"      />
+      <field field_ref="ibgsfxbom"    name="ibgsfxbom"      />
+      <field field_ref="ibgsfxsum"    name="ibgsfxsum"      />
+
+      <field field_ref="ibghfxdhc"    name="ibghfxdhc"    />
+      <field field_ref="ibghfxspr"    name="ibghfxspr"    />
+
+      <field field_ref="ibghfxres"    name="ibghfxres"    />
+      <field field_ref="ibghfxsub"    name="ibghfxsub"    />
+      <field field_ref="ibghfxdyn"    name="ibghfxdyn"    />
+      <field field_ref="ibghfxthd"    name="ibghfxthd"    />
+      <field field_ref="ibghfxsum"    name="ibghfxsum"    />
+      <field field_ref="ibghfxbom"    name="ibghfxbom"    />
+      <field field_ref="ibghfxbog"    name="ibghfxbog"    />
+      <field field_ref="ibghfxdif"    name="ibghfxdif"    />
+      <field field_ref="ibghfxopw"    name="ibghfxopw"    />
+      <field field_ref="ibghfxout"    name="ibghfxout"    />
+      <field field_ref="ibghfxin"    name="ibghfxin"    />
+      <field field_ref="ibghfxsnw"    name="ibghfxsnw"    />
+
+      <field field_ref="ibgfrcvol"    name="ibgfrcvol"   />
+      <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  />
+      <field field_ref="ibgvolgrm"    name="ibgvolgrm"    />
+
+    </file>
+    <file id="file4" name_suffix="_icemod" description="ice variables" enabled=".false." >
+      <field field_ref="snowthic_cea"     name="snthic"     long_name="surface_snow_thickness"   />
+      <field field_ref="icethic_cea"      name="sithic"     long_name="sea_ice_thickness"        />
+      <field field_ref="icevolu"          name="sivolu" />
+      <field field_ref="snowvol"          name="snvolu" />
+      <field field_ref="iceconc"          name="siconc"  />
+
+      <field field_ref="vfxbog"          name="vfxbog" />
+      <field field_ref="vfxdyn"          name="vfxdyn" />
+      <field field_ref="vfxopw"          name="vfxopw" />
+      <field field_ref="vfxsni"          name="vfxsni" />
+      <field field_ref="vfxsum"          name="vfxsum" />
+      <field field_ref="vfxbom"          name="vfxbom" />
+      <field field_ref="vfxres"          name="vfxres" />
+      <field field_ref="vfxice"          name="vfxice" />
+      <field field_ref="vfxsnw"          name="vfxsnw" />
+      <field field_ref="vfxsub"          name="vfxsub" />
+      <field field_ref="vfxspr"          name="vfxspr" />
+
+      <field field_ref="icetrp"          name="sivtrp" />
+      <field field_ref="snwtrp"          name="snvtrp" />
+      <field field_ref="saltrp"          name="saltrp" />
+      <field field_ref="deitrp"          name="deitrp" />
+      <field field_ref="destrp"          name="destrp" />
+
+      <field field_ref="sfxbri"           name="sfxbri" />
+      <field field_ref="sfxdyn"           name="sfxdyn" />
+      <field field_ref="sfxres"           name="sfxres" />
+      <field field_ref="sfxbog"           name="sfxbog" />
+      <field field_ref="sfxbom"           name="sfxbom" />
+      <field field_ref="sfxsum"           name="sfxsum" />
+      <field field_ref="sfxsni"           name="sfxsni" />
+      <field field_ref="sfxopw"           name="sfxopw" />
+      <field field_ref="sfx"              name="sfx" />
+
+      <field field_ref="hfxsum"          name="hfxsum"    />
+      <field field_ref="hfxbom"          name="hfxbom"    />
+      <field field_ref="hfxbog"          name="hfxbog"    />
+      <field field_ref="hfxdif"          name="hfxdif"    />
+      <field field_ref="hfxopw"          name="hfxopw"    />
+      <field field_ref="hfxout"          name="hfxout"    />
+      <field field_ref="hfxin"           name="hfxin"    />
+      <field field_ref="hfxsnw"          name="hfxsnw"    />
+      <field field_ref="hfxerr"          name="hfxerr"    />
+      <field field_ref="hfxerr_rem"      name="hfxerr_rem"    />
+
+      <!-- ice-ocean heat flux from mass exchange -->
+      <field field_ref="hfxdyn"          name="hfxdyn"    />
+      <field field_ref="hfxres"          name="hfxres"    />
+      <field field_ref="hfxthd"          name="hfxthd"    />
+      <!-- ice-atm. heat flux from mass exchange -->
+      <field field_ref="hfxsub"          name="hfxsub"    />
+      <field field_ref="hfxspr"          name="hfxspr"    />
+
+      <!-- diags -->
+      <field field_ref="hfxdhc"          name="hfxdhc"    />
+      <field field_ref="hfxtur"          name="hfxtur"    />
+
+      <field field_ref="isst"             name="sst" />
+      <field field_ref="isss"             name="sss" />
+      <field field_ref="micesalt"         name="sisali" />
+      <field field_ref="micet"            name="sitemp" />
+      <field field_ref="icest"            name="sistem" />
+      <field field_ref="icehc"            name="siheco" />
+      <field field_ref="isnowhc"          name="snheco" />
+      <field field_ref="miceage"          name="siages" />
+
+      <field field_ref="uice_ipa"         name="sivelu" />
+      <field field_ref="vice_ipa"         name="sivelv" />
+      <field field_ref="icevel"           name="sivelo" />
+      <field field_ref="idive"            name="sidive" />
+      <field field_ref="ishear"           name="sishea" />
+      <field field_ref="icestr"           name="sistre" />
+
+      <field field_ref="ibrinv"           name="sibrin" />
+      <field field_ref="icecolf"          name="sicolf" />
+
+      <field field_ref="iceage_cat"       name="siagecat"/>
+      <field field_ref="iceconc_cat"      name="siconcat"/>
+      <field field_ref="icethic_cat"      name="sithicat"/>
+      <field field_ref="snowthic_cat"     name="snthicat"/>
+      <field field_ref="salinity_cat"     name="salincat"/>
+      <field field_ref="brinevol_cat"     name="sibricat"/>
+
+    </file>
+
+    <file id="file5" name_suffix="_SBC" description="surface fluxes variables" > <!-- time step automaticaly defined based on nn_fsbc -->
+      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+      <field field_ref="qsr_oce"      name="qsr_oce"  long_name="downward shortwave flux at ocean surface"           />
+      <field field_ref="qns_oce"      name="qns_oce"  long_name="downward non solar flux at ocean surface"           />
+      <field field_ref="qt_oce"       name="qt_oce"   long_name="downward total flux at ocean surface"           />
+      <field field_ref="qsr_ice"      name="qsr_ice"  long_name="downward shortwave flux at ice surface"           />
+      <field field_ref="qns_ice"      name="qns_ice"  long_name="downward non solar flux at ice surface"           />
+      <field field_ref="qtr_ice"      name="qtr_ice"  long_name="shortwave flux transmitted thru the ice"           />
+      <field field_ref="qt_ice"       name="qt_ice"   long_name="downward total flux at ice surface"           />
+      <field field_ref="saltflx"      name="sfx"  />
+      <field field_ref="taum"         name="taum" />
+      <field field_ref="wspd"         name="windsp"  />
+      <field field_ref="precip"       name="precip" />
+      <!-- ice and snow -->
+      <field field_ref="snowpre"      />
+      <field field_ref="utau_ice"         name="utau_ice" />
+      <field field_ref="vtau_ice"         name="vtau_ice" />
+    </file>
+  </file_group> 
+
+
+  <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files -->
+
+    <file id="file10" name_suffix="_grid_T" >
+      <field field_ref="e3t" long_name="T-cell thickness" />
+      <field field_ref="botpres"      name="pbo"      long_name="Pressure_at_sea_floor"                                          />
+      <!-- pso : sea_water_pressure_at_sea_water_surface = 0 -->
+      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                                 />
+      <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"             level="2" />
+
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"   operation="instant" freq_op="1mo" > @toce_e3t / @e3t </field>      
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                              level="1" />
+      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"                    level="2" />
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                operation="instant" freq_op="1mo" > @soce_e3t / @e3t </field>       
+      <field field_ref="soce_e3t"                     long_name="salinity * e3t"                    operation="instant" freq_op="1mo" > soce * e3t </field >  
+      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                                 level="1" />
+      <field field_ref="rhop"         name="rhopoto"  long_name="sea_water_potential_density"                          level="2" />
+      <!-- no agessc : sea_water_age_since_surface_contact -->
+      <!-- no cfc11  : moles_per_unit_mass_of_cfc11_in_sea_water -->
+      <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline -->
+      <!-- mlotst    :           ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
+      <!-- mlotstsq  : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
+      <field field_ref="mldkz5"       name="omlmax"   long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" />
+      <field field_ref="mldkz5"       name="mldkz5"   level="2"  />
+      <field field_ref="mldr10_1"     name="mldr10_1" level="2" />
+      <field field_ref="mldr10_1max"  name="mldr10_1max"  long_name="max of Mixed Layer Depth 0.01 ref.10m"              operation="maximum" />
+      <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                               level="1" />
+      <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp -->
+      <field field_ref="erp"          name="wfcorr"   long_name="water_flux_correction"                                   level="1" /> <!-- usually = 0 -->
+      <field field_ref="qns"           name="nshfls"      long_name="surface_net_downward_non_solar_flux"                                         level="1" />
+      <field field_ref="qsr"           name="rsntds"      long_name="surface_net_downward_shortwave_flux"                                         level="1" />
+      <field field_ref="qsr3d"         name="rsds"        long_name="downwelling_shortwave_flux_in_sea_water"                                     level="1" />
+      <field field_ref="qrp"           name="hfcorr"      long_name="heat_flux_correction"                                                        level="1" />
+    </file>
+
+    <file id="file11" name_suffix="_grid_U" description="ocean U grid variables" >
+      <field field_ref="e3u"  />
+      <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
+      <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity" operation="instant" freq_op="5d" > @uoce_e3u / @e3u </field>
+      <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+      <!-- available with key_diaar5 -->
+      <field field_ref="u_masstr"     name="vozomatr"  />
+      <field field_ref="u_heattr"     name="sozohetr"  />
+      <field field_ref="u_salttr"     name="sozosatr"  />
+    </file>
+    
+    <file id="file12" name_suffix="_grid_V" description="ocean V grid variables" >
+      <field field_ref="e3v"  />
+      <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
+      <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity" operation="instant" freq_op="5d" > @voce_e3v / @e3v </field>
+      <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+      <!-- available with key_diaar5 -->
+      <field field_ref="v_masstr"     name="vomematr"  />
+      <field field_ref="v_heattr"     name="somehetr"  />
+      <field field_ref="v_salttr"     name="somesatr"  />
+    </file>
+    
+    <file id="file13" name_suffix="_grid_W" description="ocean W grid variables" >
+      <field field_ref="e3w"  />
+      <field field_ref="woce"         name="wo"     />
+      <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
+      <field field_ref="w_masstr"     name="vovematr"  />
+    </file>
+
+    <file id="file14" name_suffix="_icemod" description="ice variables" enabled=".true." >
+      <field field_ref="snowthic_cea"     name="snthic"     long_name="surface_snow_thickness"   />
+      <field field_ref="icethic_cea"      name="sithic"     long_name="sea_ice_thickness"        />
+      <field field_ref="icevolu"          name="sivolu" />
+      <field field_ref="snowvol"          name="snvolu" />
+      <field field_ref="iceconc"          name="siconc"  />
+
+      <field field_ref="vfxbog"          name="vfxbog" />
+      <field field_ref="vfxdyn"          name="vfxdyn" />
+      <field field_ref="vfxopw"          name="vfxopw" />
+      <field field_ref="vfxsni"          name="vfxsni" />
+      <field field_ref="vfxsum"          name="vfxsum" />
+      <field field_ref="vfxbom"          name="vfxbom" />
+      <field field_ref="vfxres"          name="vfxres" />
+      <field field_ref="vfxice"          name="vfxice" />
+      <field field_ref="vfxsnw"          name="vfxsnw" />
+      <field field_ref="vfxsub"          name="vfxsub" />
+      <field field_ref="vfxspr"          name="vfxspr" />
+
+      <field field_ref="icetrp"          name="sivtrp" />
+      <field field_ref="snwtrp"          name="snvtrp" />
+      <field field_ref="saltrp"          name="saltrp" />
+      <field field_ref="deitrp"          name="deitrp" />
+      <field field_ref="destrp"          name="destrp" />
+
+      <field field_ref="sfxbri"           name="sfxbri" />
+      <field field_ref="sfxdyn"           name="sfxdyn" />
+      <field field_ref="sfxres"           name="sfxres" />
+      <field field_ref="sfxbog"           name="sfxbog" />
+      <field field_ref="sfxbom"           name="sfxbom" />
+      <field field_ref="sfxsum"           name="sfxsum" />
+      <field field_ref="sfxsni"           name="sfxsni" />
+      <field field_ref="sfxopw"           name="sfxopw" />
+      <field field_ref="sfx"              name="sfx" />
+
+      <field field_ref="hfxsum"          name="hfxsum"    />
+      <field field_ref="hfxbom"          name="hfxbom"    />
+      <field field_ref="hfxbog"          name="hfxbog"    />
+      <field field_ref="hfxdif"          name="hfxdif"    />
+      <field field_ref="hfxopw"          name="hfxopw"    />
+      <field field_ref="hfxout"          name="hfxout"    />
+      <field field_ref="hfxin"           name="hfxin"    />
+      <field field_ref="hfxsnw"          name="hfxsnw"    />
+      <field field_ref="hfxerr"          name="hfxerr"    />
+      <field field_ref="hfxerr_rem"      name="hfxerr_rem"    />
+
+      <!-- ice-ocean heat flux from mass exchange -->
+      <field field_ref="hfxdyn"          name="hfxdyn"    />
+      <field field_ref="hfxres"          name="hfxres"    />
+      <field field_ref="hfxthd"          name="hfxthd"    />
+      <!-- ice-atm. heat flux from mass exchange -->
+      <field field_ref="hfxsub"          name="hfxsub"    />
+      <field field_ref="hfxspr"          name="hfxspr"    />
+
+      <!-- diags -->
+      <field field_ref="hfxdhc"          name="hfxdhc"    />
+      <field field_ref="hfxtur"          name="hfxtur"    />
+
+      <field field_ref="isst"             name="sst" />
+      <field field_ref="isss"             name="sss" />
+      <field field_ref="micesalt"         name="sisali" />
+      <field field_ref="micet"            name="sitemp" />
+      <field field_ref="icest"            name="sistem" />
+      <field field_ref="icehc"            name="siheco" />
+      <field field_ref="isnowhc"          name="snheco" />
+      <field field_ref="miceage"          name="siages" />
+
+      <field field_ref="uice_ipa"         name="sivelu" />
+      <field field_ref="vice_ipa"         name="sivelv" />
+      <field field_ref="icevel"           name="sivelo" />
+      <field field_ref="idive"            name="sidive" />
+      <field field_ref="ishear"           name="sishea" />
+      <field field_ref="icestr"           name="sistre" />
+
+      <field field_ref="ibrinv"           name="sibrin" />
+      <field field_ref="icecolf"          name="sicolf" />
+
+      <field field_ref="iceage_cat"       name="siagecat"/>
+      <field field_ref="iceconc_cat"      name="siconcat"/>
+      <field field_ref="icethic_cat"      name="sithicat"/>
+      <field field_ref="snowthic_cat"     name="snthicat"/>
+      <field field_ref="salinity_cat"     name="salincat"/>
+      <field field_ref="brinevol_cat"     name="sibricat"/>
+
+    </file>
+
+    <file id="file15" name_suffix="_scalar" description="scalar variables" enabled=".true." >
+      <field field_ref="voltot"       name="scvoltot"  />
+      <field field_ref="sshtot"       name="scsshtot"  />
+      <field field_ref="sshsteric"    name="scsshste"  />
+      <field field_ref="sshthster"    name="scsshtst"  />
+      <field field_ref="masstot"      name="scmastot"  />
+      <field field_ref="temptot"      name="sctemtot"  />
+      <field field_ref="saltot"       name="scsaltot"  />
+
+      <field field_ref="bgtemper"     name="bgtemper"    />
+      <field field_ref="bgsaline"     name="bgsaline"    />
+      <field field_ref="bgheatco"     name="bgheatco"    />
+      <field field_ref="bgsaltco"     name="bgsaltco"    />
+      <field field_ref="bgvolssh"     name="bgvolssh"    /> 
+      <field field_ref="bgvole3t"     name="bgvole3t"    />
+      <field field_ref="bgfrcvol"     name="bgfrcvol"    />
+      <field field_ref="bgfrctem"     name="bgfrctem"    />
+      <field field_ref="bgfrcsal"     name="bgfrcsal"    />
+
+      <field field_ref="ibgvoltot"    name="ibgvoltot"   />
+      <field field_ref="sbgvoltot"    name="sbgvoltot"   />
+      <field field_ref="ibgarea"      name="ibgarea"     />
+      <field field_ref="ibgsaline"    name="ibgsaline"   />
+      <field field_ref="ibgtemper"    name="ibgtemper"   />
+      <field field_ref="ibgheatco"    name="ibgheatco"   />
+      <field field_ref="sbgheatco"    name="sbgheatco"   />
+      <field field_ref="ibgsaltco"    name="ibgsaltco"   />
+
+      <field field_ref="ibgvfx"       name="ibgvfx"      />
+      <field field_ref="ibgvfxbog"    name="ibgvfxbog"      />
+      <field field_ref="ibgvfxopw"    name="ibgvfxopw"      />
+      <field field_ref="ibgvfxsni"    name="ibgvfxsni"      />
+      <field field_ref="ibgvfxdyn"    name="ibgvfxdyn"      />
+      <field field_ref="ibgvfxbom"    name="ibgvfxbom"      />
+      <field field_ref="ibgvfxsum"    name="ibgvfxsum"      />
+      <field field_ref="ibgvfxres"    name="ibgvfxres"      />
+      <field field_ref="ibgvfxspr"    name="ibgvfxspr"      />
+      <field field_ref="ibgvfxsnw"    name="ibgvfxsnw"      />
+      <field field_ref="ibgvfxsub"    name="ibgvfxsub"      />
+
+      <field field_ref="ibgsfx"       name="ibgsfx"     />
+      <field field_ref="ibgsfxbri"    name="ibgsfxbri"    />
+      <field field_ref="ibgsfxdyn"    name="ibgsfxdyn" />
+      <field field_ref="ibgsfxres"    name="ibgsfxres" />
+      <field field_ref="ibgsfxbog"    name="ibgsfxbog"      />
+      <field field_ref="ibgsfxopw"    name="ibgsfxopw"      />
+      <field field_ref="ibgsfxsni"    name="ibgsfxsni"      />
+      <field field_ref="ibgsfxbom"    name="ibgsfxbom"      />
+      <field field_ref="ibgsfxsum"    name="ibgsfxsum"      />
+
+      <field field_ref="ibghfxdhc"    name="ibghfxdhc"    />
+      <field field_ref="ibghfxspr"    name="ibghfxspr"    />
+
+      <field field_ref="ibghfxres"    name="ibghfxres"    />
+      <field field_ref="ibghfxsub"    name="ibghfxsub"    />
+      <field field_ref="ibghfxdyn"    name="ibghfxdyn"    />
+      <field field_ref="ibghfxthd"    name="ibghfxthd"    />
+      <field field_ref="ibghfxsum"    name="ibghfxsum"    />
+      <field field_ref="ibghfxbom"    name="ibghfxbom"    />
+      <field field_ref="ibghfxbog"    name="ibghfxbog"    />
+      <field field_ref="ibghfxdif"    name="ibghfxdif"    />
+      <field field_ref="ibghfxopw"    name="ibghfxopw"    />
+      <field field_ref="ibghfxout"    name="ibghfxout"    />
+      <field field_ref="ibghfxin"    name="ibghfxin"    />
+      <field field_ref="ibghfxsnw"    name="ibghfxsnw"    />
+
+      <field field_ref="ibgfrcvol"    name="ibgfrcvol"   />
+      <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  />
+      <field field_ref="ibgvolgrm"    name="ibgvolgrm"    />
+
+    </file>
+
+    <!--
+	<file id="file8" name_suffix="_Tides" description="tidal harmonics" >
+	<field field_ref="M2x"          name="M2x"      long_name="M2 Elevation harmonic real part"                       />
+	<field field_ref="M2y"          name="M2y"      long_name="M2 Elevation harmonic imaginary part"                  />
+	<field field_ref="M2x_u"        name="M2x_u"    long_name="M2 current barotrope along i-axis harmonic real part "       />
+	<field field_ref="M2y_u"        name="M2y_u"    long_name="M2 current barotrope along i-axis harmonic imaginary part "  />
+	<field field_ref="M2x_v"        name="M2x_v"    long_name="M2 current barotrope along j-axis harmonic real part "       />
+	<field field_ref="M2y_v"        name="M2y_v"    long_name="M2 current barotrope along j-axis harmonic imaginary part "  />
+	</file>
+    -->
+
+  </file_group>
+
+
+  <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+  <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+  <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+  <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+  <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files -->
+
+    <file id="file20" name_suffix="_grid_T" description="ocean T grid variables" >
+      <field field_ref="e3t"  />
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"      operation="instant" freq_op="1y" > @toce_e3t / @e3t </field>        
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                   operation="instant" freq_op="1y" > @soce_e3t / @e3t </field>         
+      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
+      <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
+      <field field_ref="mldr10_1"     />
+      <field field_ref="mldkz5"       name="omlmax"   long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" />
+      <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                               level="1" />
+      <field field_ref="erp"          name="wfcorr"   long_name="water_flux_correction"                                   level="1" /> <!-- usually = 0 -->
+      <field field_ref="qns"           name="nshfls"      long_name="surface_net_downward_non_solar_flux"                                         level="1" />
+      <field field_ref="qsr"           name="rsntds"      long_name="surface_net_downward_shortwave_flux"                                         level="1" />
+      <field field_ref="qsr3d"         name="rsds"        long_name="downwelling_shortwave_flux_in_sea_water"                                     level="1" />
+      <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+      <field field_ref="saltflx"      name="sosflxdo"  />
+      <field field_ref="taum"         name="taum" />
+      <field field_ref="wspd"         name="sowindsp"  />
+      <field field_ref="precip"       name="soprecip" />
+      <!-- available with ln_blk_clio or ln_blk_core -->
+      <field field_ref="qns_oce"      name="sonshdoo"  />
+      <field field_ref="qlw_oce"      name="solwhdoo"  />
+      <field field_ref="qsb_oce"      name="sosehdoo"  />
+      <field field_ref="qla_oce"      name="solahdoo"  />
+      <field field_ref="taum_oce"     name="sowndsto"  />
+      <!-- ice and snow -->
+      <field field_ref="snowpre"      name="isnowpre"/>
+      <field field_ref="utau_ice"     name="iicestru" />
+      <field field_ref="vtau_ice"     name="iicestrv" />
+    </file>
+
+    <file id="file21" name_suffix="_grid_U" description="ocean U grid variables" >
+      <field field_ref="e3u"  />
+      <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
+      <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      operation="instant" freq_op="1y" > @uoce_e3u / @e3u </field> 
+      <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+      <field field_ref="uocetr_eff"   name="uocetr_eff"  />
+    </file>
+
+    <file id="file22" name_suffix="_grid_V" description="ocean V grid variables" >
+      <field field_ref="e3v"  />
+      <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
+      <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"     operation="instant" freq_op="1y" > @voce_e3v / @e3v </field>
+      <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+      <field field_ref="vocetr_eff"   name="vocetr_eff"  />
+    </file>
+
+    <file id="file23" name_suffix="_grid_W" description="ocean W grid variables" >
+      <field field_ref="e3w"  />
+      <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
+      <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
+      <field field_ref="wocetr_eff"   name="wocetr_eff"  />
+    </file>
+
+
+  </file_group>
+
+  <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+  <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+  <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+</file_definition>
+

+ 33 - 0
templates/pingo/xios_config/iodef.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- =========================================================================================================== -->
+<!-- iodef.xml : Configuration file for production of output files using XIOS                                    -->
+<!--             This file contains the context XIOS.                                                            -->
+<!--             The model components context will be add automatically by the comp.driver                       -->
+<!-- =========================================================================================================== -->
+
+<simulation>
+
+  <!-- =========================================================================================================== -->
+  <!-- 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="buffer_size"               type="integer">50000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">1</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >LMDZ,oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+
+  <!-- =========================================================================================================== -->
+  <!-- COMPONENT CONTEXT : the model components context will be add automatically by the comp.driver               -->
+  <context id="nemo" src="./context.xml"/>
+  
+</simulation>