Browse Source

Initial fork tag 3.3.3.2

Pierre-Yves Barriat 1 year ago
commit
71250bb2a0
100 changed files with 22022 additions and 0 deletions
  1. BIN
      doc/compiling-and-running-short-guide.pdf
  2. BIN
      doc/development-guide.pdf
  3. BIN
      doc/ec-conf-manual.pdf
  4. BIN
      doc/release-notes-3.0.1.pdf
  5. BIN
      doc/release-notes-3.0.pdf
  6. BIN
      doc/release-notes-3.1.pdf
  7. 22 0
      doc/release-notes-3.3.3.1.rst
  8. 56 0
      doc/release-notes-3.3.3.2.rst
  9. BIN
      doc/src/compiling-and-running-short-guide.odt
  10. BIN
      doc/src/development-guide.odt
  11. BIN
      doc/src/ec-conf-manual.odt
  12. BIN
      doc/src/release-notes-3.0.1.odt
  13. BIN
      doc/src/release-notes-3.0.odt
  14. BIN
      doc/src/release-notes-3.1.odt
  15. 9 0
      runtime/autosubmit/.gitignore
  16. 50 0
      runtime/autosubmit/autosubmit.cfg
  17. 581 0
      runtime/autosubmit/compilation.sh
  18. 320 0
      runtime/autosubmit/config-run.xml
  19. 81 0
      runtime/autosubmit/copy-runtime.sh
  20. 1928 0
      runtime/autosubmit/ece-esm.sh.tmpl
  21. 1173 0
      runtime/autosubmit/ece-lsm.sh.tmpl
  22. 698 0
      runtime/autosubmit/ece-nemo.sh.tmpl
  23. 171 0
      runtime/autosubmit/test.sh
  24. 39 0
      runtime/autosubmit/transfer.sh
  25. 320 0
      runtime/classic/config-run.xml
  26. 35 0
      runtime/classic/ctrl/axis_def_nemo.xml
  27. 39 0
      runtime/classic/ctrl/context_nemo.xml
  28. 28 0
      runtime/classic/ctrl/context_nemo_offline.xml
  29. 194 0
      runtime/classic/ctrl/domain_def_nemo.xml
  30. 50 0
      runtime/classic/ctrl/field_def_nemo-inerttrc.xml
  31. 336 0
      runtime/classic/ctrl/field_def_nemo-lim.xml
  32. 1037 0
      runtime/classic/ctrl/field_def_nemo-opa.xml
  33. 275 0
      runtime/classic/ctrl/field_def_nemo-pisces.xml
  34. 100 0
      runtime/classic/ctrl/file_def_nemo-lim3.xml
  35. 632 0
      runtime/classic/ctrl/file_def_nemo-opa.xml
  36. 223 0
      runtime/classic/ctrl/file_def_nemo-pisces.xml
  37. 309 0
      runtime/classic/ctrl/grids_def_nemo.xml
  38. 301 0
      runtime/classic/ctrl/grids_def_nemo_with_transect.xml
  39. 17 0
      runtime/classic/ctrl/ifs-tuning-parameters-T159L62.sh
  40. 17 0
      runtime/classic/ctrl/ifs-tuning-parameters-T255L91-AerChem.sh
  41. 17 0
      runtime/classic/ctrl/ifs-tuning-parameters-T255L91.sh
  42. 23 0
      runtime/classic/ctrl/ifs-tuning-parameters-T511L91.sh
  43. 45 0
      runtime/classic/ctrl/iodef.xml.sh
  44. 174 0
      runtime/classic/ctrl/lpjg_cmip6_output.ins
  45. 1195 0
      runtime/classic/ctrl/namcouple.sh
  46. 21 0
      runtime/classic/ctrl/namelist.amip.sh
  47. 10 0
      runtime/classic/ctrl/namelist.ccycle_coupling.sh
  48. 125 0
      runtime/classic/ctrl/namelist.cosp.alldiag.sh
  49. 142 0
      runtime/classic/ctrl/namelist.cosp.sh
  50. 650 0
      runtime/classic/ctrl/namelist.ifs-lbud23-tendencies.sh
  51. 651 0
      runtime/classic/ctrl/namelist.ifs.alldiag.sh
  52. 654 0
      runtime/classic/ctrl/namelist.ifs.cloudact+diag.sh
  53. 660 0
      runtime/classic/ctrl/namelist.ifs.dblrad+diag.sh
  54. 658 0
      runtime/classic/ctrl/namelist.ifs.rlxsm.sh
  55. 643 0
      runtime/classic/ctrl/namelist.ifs.sh
  56. 43 0
      runtime/classic/ctrl/namelist.lim3-ORCA025L75.cfg.sh
  57. 48 0
      runtime/classic/ctrl/namelist.lim3-ORCA1L75.cfg.sh
  58. 148 0
      runtime/classic/ctrl/namelist.lim3.ref.sh
  59. 21 0
      runtime/classic/ctrl/namelist.lpjg.sh
  60. 11 0
      runtime/classic/ctrl/namelist.lpjg_forcing.sh
  61. 651 0
      runtime/classic/ctrl/namelist.nemo-ORCA025L75-coupled.cfg.sh
  62. 649 0
      runtime/classic/ctrl/namelist.nemo-ORCA025L75-standalone.cfg.sh
  63. 432 0
      runtime/classic/ctrl/namelist.nemo-ORCA1L75-carboncycle.cfg.sh
  64. 461 0
      runtime/classic/ctrl/namelist.nemo-ORCA1L75-coupled.cfg.sh
  65. 510 0
      runtime/classic/ctrl/namelist.nemo-ORCA1L75-standalone.cfg.sh
  66. 18 0
      runtime/classic/ctrl/namelist.nemo-runoff-JRA55_1.4.sh
  67. 18 0
      runtime/classic/ctrl/namelist.nemo-runoff-default.sh
  68. 9 0
      runtime/classic/ctrl/namelist.nemo.age.cfg.sh
  69. 11 0
      runtime/classic/ctrl/namelist.nemo.age.ref.sh
  70. 19 0
      runtime/classic/ctrl/namelist.nemo.c14b.ref.sh
  71. 15 0
      runtime/classic/ctrl/namelist.nemo.cfc.cfg.sh
  72. 43 0
      runtime/classic/ctrl/namelist.nemo.cfc.ref.sh
  73. 19 0
      runtime/classic/ctrl/namelist.nemo.forcing_CoreII.sh
  74. 19 0
      runtime/classic/ctrl/namelist.nemo.forcing_CoreII_interannual.sh
  75. 19 0
      runtime/classic/ctrl/namelist.nemo.forcing_DFS5.2.sh
  76. 19 0
      runtime/classic/ctrl/namelist.nemo.forcing_ERA5_ENDA.sh
  77. 19 0
      runtime/classic/ctrl/namelist.nemo.forcing_ERA5_HRES.sh
  78. 18 0
      runtime/classic/ctrl/namelist.nemo.forcing_JRA55_1.4.sh
  79. 19 0
      runtime/classic/ctrl/namelist.nemo.forcing_era5.sh
  80. 19 0
      runtime/classic/ctrl/namelist.nemo.forcing_eraint.sh
  81. 114 0
      runtime/classic/ctrl/namelist.nemo.pisces.cfg.sh
  82. 415 0
      runtime/classic/ctrl/namelist.nemo.pisces.ref.sh
  83. 1328 0
      runtime/classic/ctrl/namelist.nemo.ref.sh
  84. 104 0
      runtime/classic/ctrl/namelist.nemo.top.cfg.sh
  85. 135 0
      runtime/classic/ctrl/namelist.nemo.top.ref.sh
  86. 219 0
      runtime/classic/ctrl/namelist.osm.sh
  87. 9 0
      runtime/classic/ctrl/namelist.runoffmapper.sh
  88. 285 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/cmip6-data-request-varlist-AerChemMIP-hist-1950HC-EC-EARTH-AerChem.json
  89. 142 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/file_def_nemo-lim3.xml
  90. 273 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/file_def_nemo-opa.xml
  91. 202 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/file_def_nemo-pisces.xml
  92. 93 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/lpjg_cmip6_output.ins
  93. 43 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/metadata-cmip6-AerChemMIP-hist-1950HC-EC-EARTH-AerChem-ifs-template.json
  94. 43 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/metadata-cmip6-AerChemMIP-hist-1950HC-EC-EARTH-AerChem-nemo-template.json
  95. 43 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/metadata-cmip6-AerChemMIP-hist-1950HC-EC-EARTH-AerChem-tm5-template.json
  96. 23 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/ppt0000000000
  97. 11 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/pptdddddd0300
  98. 22 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/pptdddddd0600
  99. 266 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/request-overview-AerChemMIP-hist-1950HC-including-EC-EARTH-AerChem-preferences.txt
  100. 285 0
      runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-piAer/cmip6-data-request-varlist-AerChemMIP-hist-piAer-EC-EARTH-AerChem.json

BIN
doc/compiling-and-running-short-guide.pdf


BIN
doc/development-guide.pdf


BIN
doc/ec-conf-manual.pdf


BIN
doc/release-notes-3.0.1.pdf


BIN
doc/release-notes-3.0.pdf


BIN
doc/release-notes-3.1.pdf


+ 22 - 0
doc/release-notes-3.3.3.1.rst

@@ -0,0 +1,22 @@
+EC-Earth 3.3.3.1 Release notes
+==============================
+
+EC-Earth 3.3.3.1 is the latest minor release aimed at CMIP6 experiments.
+It essentially adds support for several experiments by:
+
+1. being fully compatible with ece2cmor3 1.5 and providing control 
+   output files for (#850):
+
+   - RFMIP experiments with the AerChem configuration
+   - ScenarioMIP experiments with the CC configuration
+
+2. allowing CH4 and other GHG concentrations in IFS to be fixed to different
+   years (#724), as required by histSST-piCH4 and piClim-CH4 AerChemMIP
+   experiments.
+   **Note** that this feature adds one entry in the `config-run.xml` file.
+
+In addition, this release updates:
+
+- the metadata for ece2cmor3 to include/correct model levels (#849), and
+- the platform setup for Marenostrum3 (BSC, #857, #869, #873, #887).
+

+ 56 - 0
doc/release-notes-3.3.3.2.rst

@@ -0,0 +1,56 @@
+EC-Earth 3.3.3.2 Release notes
+==============================
+
+EC-Earth 3.3.3.2 has been released. It is the latest minor release aimed at
+CMIP6 experiments. It adds support for several CMIP experiments and comes with
+several bug fixes. Here is the full list of improvements:
+
+
+UPDATED CONFIGURATIONS
+----------------------
+
+* EC-Earth3
+  - Add support for CovidMIP experiments (#847)
+
+* EC-Earth3-AerChem
+  - Fix TM5 PMx diagnostic above the surface (#877)
+
+* EC-Earth3-Veg, EC-Earth3-CC
+  - LPJG bug fix for 1pctCO2 and A4xCO2 simulations (#938)
+
+* EC-Earth3-CC
+  - Updates for C4MIP project (#908)
+
+* NEMO Standalone
+  - Add ERA5 forcing option (#931)
+  - Allow for ocean nudging (surface restoring) at ORCA025 (#925)
+  - Update default values of surface restoring, forcing, and 3D
+    nudging at ORCA025 (#974)
+
+
+OUTPUT
+------
+
+* **Important** Change in output-control-files directory structure
+* Add support for additional CMIP6 experiments (LUMIP, RFMIP, DynvarMIP and
+  CovidMIP)
+* Add fixed fields: stflf, orog and areacell
+* Add two sets of output for RCM forcing
+* Requires ece2cmor3 v1.8
+  https://github.com/EC-Earth/ece2cmor3/releases/tag/v1.8.0
+
+
+TECHNICAL
+---------
+
+* Facilitate restarting runs that crash while writing restarts (#406)
+* Add LUCIA-Lite tool for improved diagnostic of OASIS coupling (#913)
+
+* PLATFORMS
+  - Fix gribex definition path for ECMWF platform, allowing to read old
+    ICMCL files (#912, affects PRIMAVERA configurations)
+
+* TEST SUITE
+  This release has been technically validated by running a set of
+  short experiments. The list of configurations tested is available on
+  the portal: https://dev.ec-earth.org/issues/991

BIN
doc/src/compiling-and-running-short-guide.odt


BIN
doc/src/development-guide.odt


BIN
doc/src/ec-conf-manual.odt


BIN
doc/src/release-notes-3.0.1.odt


BIN
doc/src/release-notes-3.0.odt


BIN
doc/src/release-notes-3.1.odt


+ 9 - 0
runtime/autosubmit/.gitignore

@@ -0,0 +1,9 @@
+ecconf.cfg
+ece-ifs+nemo.sh
+ece-ifs+tm5.sh
+ece-ifs.sh
+ece-nemo.sh
+ece-esm.sh
+ece-lsm.sh
+../classic/ctrl/tm5-config-run.rc
+platform

+ 50 - 0
runtime/autosubmit/autosubmit.cfg

@@ -0,0 +1,50 @@
+[nemo]
+# Number of parallel cores for OGCM component. NUMERIC = 16, 24, 36
+NEM_NUMPROC = 288
+# Set timestep (in sec) w.r.t resolution. NUMERIC = 2700 (ORCA1)
+NEMO_timestep = 2700
+# OGCM grid resolution. STRING = ORCA1L46, ORCA1L75, ORCA025L46, ORCA025L75 (NEMO)
+NEMO_resolution = ORCA1L75
+# Sea-Ice Model [Default: Do set "LIM2"]. STRING = LIM2, LIM3
+ICE = LIM3
+# Ocean initial conditions ready to be used. [Default: leave empty]. 
+# STRING = ID found here : https://earth.bsc.es/wiki/doku.php?id=initial_conditions:oceanic
+OCEAN_ini = 
+# PISCES initial conditions ready to be used. [Default: leave empty]. 
+# STRING = ID found here : https://earth.bsc.es/wiki/doku.php?id=initial_conditions:biogeochemistry
+PISCES_ini =
+# Sea-ice initial conditions ready to be used. [Default: leave empty]. 
+# STRING = ID found here : https://earth.bsc.es/wiki/doku.php?id=initial_conditions:sea_ice
+ICE_ini = 
+# Required if OCEAN_ini defined. A different IC member per EXPID member ["PERT"] or which common IC member for all EXPID members ["fc0" / "fc1"]. String = PERT/fc0/fc1...
+OCEAN_ini_member = 
+# Required if ICE_ini defined. Sea-ice initial conditions ready to be used. [Default: leave empty]. 
+# STRING = ID found here : https://earth.bsc.es/wiki/doku.php?id=initial_conditions:sea_ice
+ICE_ini_member = 
+
+[ifs]
+# Number of parallel cores for AGCM component. NUMERIC = 28, 100
+IFS_NUMPROC = 320
+# AGCM grid resolution, horizontal (truncation T) and vertical (levels L). STRING = T159L62, T255L62, T255L91, T511L91, T799L62 (IFS)
+IFS_resolution = T255L91
+# Atmospheric initial conditions ready to be used. 
+# STRING = ID found here : https://earth.bsc.es/wiki/doku.php?id=initial_conditions:atmospheric
+ATM_ini = 
+# Required if ATM_ini defined. A different IC member per EXPID member ["PERT"] or which common IC member for all EXPID members ["fc0" / "fc1"]. String = PERT/fc0/fc1...
+ATM_ini_member = 
+# Atmospheric nudging towards reinterpolated ERA-Interim data. BOOLEAN = TRUE, FALSE
+ATM_NUDGING = FALSE
+# Required if ATM_NUDGING = TRUE. Atmospheric nudging reference data experiment name. [T255L91: b0ir]
+ATM_refnud = 
+
+
+[common]
+MODEL = ecearth
+VERSION = v3.2beta
+TEMPLATE_NAME = ecearth3
+# Post-procssing frequency (in hours) [Default: Do set "6"]. NUMERIC = 3, 6
+NFRP = 6
+# Select the model output control class. STRING = Option listed under the section : https://earth.bsc.es/wiki/doku.php?id=overview_outclasses
+OUTCLASS = specs
+# After transferring output at /esnas/exp remove a copy available at permanent storage of HPC [Default: Do set "TRUE"]. BOOLEAN = TRUE, FALSE
+MODEL_output_remove = TRUE

+ 581 - 0
runtime/autosubmit/compilation.sh

@@ -0,0 +1,581 @@
+#!/usr/bin/env bash
+# remote_setup.sh:
+# Extracts the sources from the Autosubmit project bundle and compiles EC-Earth
+
+set -xuve
+
+#
+# Architecture
+#
+
+HPCARCH=%HPCARCH%
+CURRENT_ROOTDIR=%CURRENT_ROOTDIR%
+PROJECT_DESTINATION=%PROJECT_DESTINATION%
+PROJECT_DIR=${CURRENT_ROOTDIR}/${PROJECT_DESTINATION}
+TEMPLATE_NAME=%TEMPLATE_NAME%
+IFS_resolution=%IFS_resolution%
+MAKE_NUMPROC=%NUMPROC%
+PROJDIR=%PROJDIR%
+BSC_OUTCLASS=%BSC_OUTCLASS%
+CMIP6_OUTCLASS=%CMIP6_OUTCLASS%
+PRODUCTION_EXP=%PRODUCTION_EXP%
+PRECOMPILED_VERSION=%PRECOMPILED_VERSION%
+TM5_NLEVS=%TM5_NLEVS%
+
+# ==================================================
+# functions
+# ==================================================
+
+function get_configuration_nemo (){
+    NEMO_resolution=%NEMO_resolution%
+    if [[ -z ${NEMO_resolution-} ]] ; then
+        echo "ERROR: nemo is requested but NEMO_resolution is not defined!"
+        exit 1
+    fi
+
+    # Select correct nemo_config
+    has_config pisces:offline ifs && echo "ERROR: cannot have pisces:offline and ifs in config!" && exit 1
+
+    # this code adheres to the conventions in ece-esm.sh
+    nem_grid=%NEMO_resolution%
+
+    nem_config=${nem_grid}
+    has_config lim3           && nem_config=${nem_config}_LIM3
+    has_config pisces:offline && nem_config=${nem_config}_OFF
+
+    if $(has_config pisces tm5:co2) ; then
+        nem_config=${nem_config}_CarbonCycle
+    elif $(has_config pisces) ; then
+        nem_config=${nem_config}_PISCES
+    fi
+
+    # TODO - nemo standalone configs are not accounted for in this script, but this would set the required nem_config
+    ! has_config ifs && nem_config=${nem_config}_standalone
+
+    NEMO_CONFIG=${nem_config}
+}
+
+
+function compile_nemo(){
+
+    ########################
+    # NEMO compilation key #
+    ########################
+
+    # Configuration to be compiled
+    nemo_config_to_compile=$1
+    new_nemo_compilation_keys=" key_init_alloc_zero ${extra_nemo_compilation_keys-}"
+    fcm_file=$(ls ${SOURCE_FOLDER}/nemo-3.6/CONFIG/${nemo_config_to_compile}/*.fcm)
+
+    for key in ${new_nemo_compilation_keys}; do
+        if [[ $(grep ${key} ${fcm_file}) == "" ]] ; then
+          echo adding ${key}
+          sed -i -e 1's/$/'" "${key}' &/' ${fcm_file}
+        fi
+    done
+
+
+    cd ${SOURCE_FOLDER}/nemo-3.6/CONFIG
+    # remove old nemo executable to make sure compilation did not fail
+    # workaround for the issue that make_nemo does not return an exit code on failure
+    rm -f ${SOURCE_FOLDER}/nemo*/CONFIG/${nemo_config_to_compile}/BLD/bin/*.exe
+    if ${MODEL_CLEAN} ; then ./makenemo -m ecconf -n ${nemo_config_to_compile} -j ${MAKE_NUMPROC} clean ; fi
+    ./makenemo -m ecconf -n ${nemo_config_to_compile} -j ${MAKE_NUMPROC}
+    [ -f ${SOURCE_FOLDER}/nemo*/CONFIG/${nemo_config_to_compile}/BLD/bin/*.exe ] || exit 1
+}
+
+function compile_tm5(){
+
+  local tm5_version=$1
+  export TM5_NLEVS=$2
+  if [[ ${tm5_version} == "co2" ]] ; then
+    ecconf_args+=" -o MOD:TM5:CO2_ONLY=True"
+  elif [[ ${tm5_version} == "cb05" ]] ; then
+    ecconf_args+=" -o MOD:TM5:CO2_ONLY=False" ;
+  fi
+  ecconf_args+=" -o MOD:TM5:NLEVS="${TM5_NLEVS}
+  export tm5_exch_nlevs=${TM5_NLEVS}
+
+  cd ${SOURCE_FOLDER}
+  util/ec-conf/ec-conf --platform ${architecture} ${ecconf_args} config-build.xml
+
+  tm5_exe_file=${SOURCE_FOLDER}/tm5mp/build-${tm5_version}-ml${tm5_exch_nlevs}/appl-tm5-${tm5_version}.x
+  cd ${SOURCE_FOLDER}/tm5mp/
+
+  if [ ! -f ${SOURCE_FOLDER}/tm5mp/setup_tm5 ] ; then
+    ln -sf ${SOURCE_FOLDER}/tm5mp/bin/pycasso_setup_tm5 ${SOURCE_FOLDER}/tm5mp/setup_tm5
+    chmod 755 setup_tm5
+  fi
+
+  if ${MODEL_CLEAN} ; then
+    ./setup_tm5 -c -n -v -j ${MAKE_NUMPROC} ecconfig-ecearth3.rc
+  else
+    ./setup_tm5       -v -j ${MAKE_NUMPROC} ecconfig-ecearth3.rc
+  fi
+  [ -f ${tm5_exe_file} ] || exit 1
+
+}
+
+function compile_lpjg(){
+    ifs_res=$1
+    lpjg_res=T$(echo ${ifs_res} | sed 's:T\([0-9]\+\)L\([0-9]\+\):\1:')
+    if [ $lpjg_res != "T255" -a $lpjg_res != "T159" ]
+    then
+      echo "LPJG not supported for ifs-grid: ${ifs_res}"
+      exit 1
+    else
+        ecconf_args+=" -o MOD:LPJG:GRID=$lpjg_res "
+    fi
+    cd ${SOURCE_FOLDER}
+    util/ec-conf/ec-conf --platform ${architecture} ${ecconf_args} config-build.xml
+    cd ${SOURCE_FOLDER}/lpjg/build
+    if ${MODEL_CLEAN} ; then
+      rm -f CMakeCache.txt ;
+    fi
+    cmake ..
+    if ${MODEL_CLEAN} ; then
+      make clean ;
+    fi
+    make -j ${MAKE_NUMPROC}
+    [ -f ${SOURCE_FOLDER}/lpjg/build/guess_${lpjg_res} ] || exit 1
+
+    cd ${SOURCE_FOLDER}/lpjg/offline
+    if ${MODEL_CLEAN} ; then
+      make clean
+    fi
+    make
+    [ -f ${SOURCE_FOLDER}/lpjg/offline/lpjg_forcing_ifs_${lpjg_res} ] || exit 1
+}
+
+
+# define which runtime we are using
+use_autosubmit=true
+[[ use_autosubmit && ${PROJECT_DESTINATION} == 'ecearth3' ]] && use_autosubmit_simple=true || use_autosubmit_simple=false
+#when using the simplified AS runtime we use the same ECEARTH_SRC_DIR definition
+#as in the full auto-ecearth AS runtime, to avoid having to change it in config-build and config-run
+#TODO set PROJECT_DIR from ECEARTH_SRC_DIR, requires writing this script as an ec-conf template
+if $use_autosubmit_simple ; then
+  SOURCE_FOLDER=${CURRENT_ROOTDIR}/auto-ecearth3/sources/sources
+else
+  SOURCE_FOLDER=${PROJECT_DIR}/sources/sources
+fi
+
+# Variables that could be used from config-build.xml should be exported
+export exp_name=%EXPID%
+
+# these variables are to be used for development, allowing to retain any local
+# changes to the sources and compile the model more quickly
+# EXTRACT : extract files from uploaded .tar.gz file and copy runtime files (default:true)
+# CLEAN   : do 'make clean' for all model components (default:true)
+[ "%MODEL_EXTRACT%" = FALSE ] && MODEL_EXTRACT=false || MODEL_EXTRACT=true
+[ "%MODEL_CLEAN%" = FALSE ] && MODEL_CLEAN=false || MODEL_CLEAN=true
+
+#
+# get model config from AS variables (for compilation only)
+#
+#ifs
+[[ "$TEMPLATE_NAME" = ecearth3* || "$TEMPLATE_NAME" = ifs3* ]] && ifs="ifs" || ifs=""
+[[ "$TEMPLATE_NAME" = ifs3* ]] && amip="amip" ||  amip=""
+#nemo
+if [[ "$TEMPLATE_NAME" = ecearth3* || "$TEMPLATE_NAME" = nemo3* ]]; then nemo="nemo"; lim3="lim3"; xios="xios:detached"; else nemo=""; lim3=""; xios=""; fi
+[[ "$TEMPLATE_NAME" = ecearth3* ]] && rnfmapper="rnfmapper" || rnfmapper=""
+[[ "%NEMO_remove_land%" = TRUE && ! -z $nemo ]] && elpin=":elpin" || elpin=""
+[[ "%PISCES%" = TRUE ]] && { if [[ "%PISCES_OFF%" = TRUE ]] ; then pisces="pisces:offline" ; lim3="" ; else pisces="pisces" ; fi } || pisces=""
+#others
+[[ "$TEMPLATE_NAME" = lsm* || "%LPJG%" = TRUE ]] && lpjg=%LPJG_CONFIG% || lpjg=""
+[[ "$TEMPLATE_NAME" = lsm* || "%OSM%" = TRUE ]] && osm="osm" || osm=""
+[[ "%TM5%" = TRUE ]] && tm5=%TM5_CONFIG% || tm5=""
+export config="${ifs} ${amip} ${nemo}${elpin} ${pisces} ${lim3} ${rnfmapper} ${xios} oasis ${lpjg} ${osm} ${tm5}"
+
+#####################################################################################
+# To re-define the components you want to build
+#####################################################################################
+# you can set here the components you want to build by uncommenting a line such as these
+#config="ifs amip nemo pisces lim3 rnfmapper xios oasis lpjg ${tm5}" # for all components (esm runtime)
+#config="osm oasis lpjg" # for lsm configuration
+
+#####################################################################################
+# 3.3.3.1 - To compile all components #
+#####################################################################################
+# Uncomment these lines to compile all components and all nemo resolutions and LPJG/TM5 versions
+#config=compile_all
+#PRECOMPILED_VERSION="NONE"
+#PRODUCTION_EXP=TRUE
+#
+
+[[ -z ${PRECOMPILED_VERSION-} ]] && PRECOMPILED_VERSION="NONE"
+
+#
+# Loading of modules
+#
+
+set +xuve
+export ecconf_args=""
+
+if [ ${HPCARCH} == 'ecmwf-xc40' ]
+then
+  export architecture=ecmwf-cca-intel-mpi
+  prgenvswitchto intel
+  module load cray-hdf5-parallel/1.8.14
+  module load cray-netcdf-hdf5parallel/4.3.3.1
+  module unload eccodes
+  module load grib_api/1.27.0
+
+  # for tm5
+  if has_config any compile_all tm5 ; then
+    module load udunits
+    module load hdf
+  fi
+
+  # for lpjg
+  if has_config any compile_all lpjg ; then
+    module load cmake
+  fi
+  rm -f ${CURRENT_ROOTDIR}/${PROJECT_DESTINATION}/sources/util/grib_table_126/define_table_126.sh
+  export ecconf_args+=" -o PLT:ACTIVE:ECEARTH_SRC_DIR=${SCRATCH}/${exp_name}/auto-ecearth3/sources/sources" ;
+
+elif [ ${HPCARCH} == 'nord3' ]
+then
+  export SCRATCH=/gpfs/scratch/`id -gn`/${USER}
+  export architecture=bsc-nord3-intel-intelmpi
+  module unload intel
+  module load intel/2017.1
+
+elif [ ${HPCARCH} == 'marenostrum4' ] ;  then
+  export SCRATCH=/gpfs/scratch/`id -gn`/${USER}
+  export architecture=bsc-marenostrum4-intel-intelmpi
+  module purge
+  module load intel/2017.4
+  module load impi/2018.4
+  module load perl/5.26
+  module load mkl/2018.4 # require by python/2.7.14
+  module load python/2.7.14
+  # for lpjg
+  if has_config any lpjg compile_all ; then
+    module load cmake
+    module load grib/1.14.0
+  fi
+ if [[ ${PRODUCTION_EXP-} == "TRUE" ]] ; then
+    ecconf_args+='-o PLT:ACTIVE:OASIS_ADD_FFLAGS="-132" -o  PLT:ACTIVE:NEMO_ADD_FFLAGS="-fpe0" '
+  fi
+else
+    error "Unsupported ec-conf architechture: ${HPCARCH}"
+    exit 0
+fi
+
+module list
+set -xuve
+
+#
+# Extract Model Sources and copy runtime, only if MODEL_EXTRACT=TRUE
+#
+
+if ${MODEL_EXTRACT} ; then
+  #
+  # Extract Model Sources
+  #
+  cd ${CURRENT_ROOTDIR}
+  if [ -f ${PROJECT_DESTINATION}.tar.gz ]; then
+    tar -xvf ${PROJECT_DESTINATION}.tar.gz
+    rm ${PROJECT_DESTINATION}.tar.gz
+    # move sources into auto-ecearth3/sources to make it consistent with ECEARTH_SRC_DIR
+    if $use_autosubmit_simple
+    then
+        mkdir -p ${CURRENT_ROOTDIR}/auto-ecearth3
+        mv ${PROJECT_DESTINATION} ${CURRENT_ROOTDIR}/auto-ecearth3/sources
+        ln -sf ${CURRENT_ROOTDIR}/auto-ecearth3 ${PROJECT_DESTINATION}
+    fi
+  fi
+
+  #
+  # Copy runtime
+  # TODO check if we can link instead of copy
+  #
+  cd ${CURRENT_ROOTDIR}
+  ln -sf ${PROJECT_DESTINATION}/sources/runtime/autosubmit/ecconf.cfg .
+  for ctrlfile in `( ls ${PROJECT_DESTINATION}/sources/runtime/classic/lib*.sh )`
+  do
+    ln -sf ${ctrlfile} .
+  done
+  ln -sf ${PROJECT_DESTINATION}/sources/runtime/classic/ctrl/ .
+
+fi # $MODEL_EXTRACT
+
+#
+# librunscript defines some helper functions
+#
+source ${CURRENT_ROOTDIR}/librunscript.sh
+# check for extra nemo compilation keys
+extra_nemo_compilation_keys=""
+
+# check for extra compilation keys for chosen BSC_OUTCLASS
+if [[ -n "${BSC_OUTCLASS-}" && -d ${PROJECT_DESTINATION}/outclass/${BSC_OUTCLASS}/ ]]; then
+    [ -f ${PROJECT_DESTINATION}/outclass/${BSC_OUTCLASS}/outclass_extra_nemo_compilation_keys.fcm ] && extra_nemo_compilation_keys+=" "$(cat ${PROJECT_DESTINATION}/outclass/${BSC_OUTCLASS}/outclass_extra_nemo_compilation_keys.fcm)
+fi
+
+# check if the experiment has an historical outclass and pisces is activated (requires key_cfc)
+has_config pisces && [[ "%CMOR_EXP%" = "historical" || "%CMOR_EXP%" = "esm-hist" ]] && extra_nemo_compilation_keys+=" key_cfc "
+
+# make sure we are not using precompiled binaries or compiling all binaries if special keys are necessary
+# or maybe ignore the keys if we are compiling all?
+if [[ "${extra_nemo_compilation_keys}" != "" ]] ; then
+    has_config compile_all && [[ "${PRECOMPILED_VERSION-}" = "NONE" ]] && DO_EXIT="TRUE"
+    if [[ "${PRECOMPILED_VERSION-}" != "NONE"  || "${DO_EXIT-}" == "TRUE" ]] ; then
+        echo "PRECOMPILED_VERSION or compile_all not compatible with pisces historical runs or BSC_OUTCLASS with extra compilation keys"
+        exit 1
+    fi
+fi
+
+# report if no outclass was chosen
+if [[ "${BSC_OUTCLASS-}" == "" ]] && [[ "${CMIP6_OUTCLASS-}" == "" ]] ; then
+    echo "WARNING: you are using the outclass from ec-earth portal"
+fi
+
+if [[ "${PRECOMPILED_VERSION-}" == "NONE" ]] ; then
+
+  cd ${SOURCE_FOLDER}
+  util/ec-conf/ec-conf --platform ${architecture} ${ecconf_args} config-build.xml
+
+  #
+  # Check bin and lib directory (git-svn issue with empty folders)
+  #
+  cd ${SOURCE_FOLDER}
+  if [ ! -d ifs-36r4/bin ]; then
+    mkdir ifs-36r4/bin
+    mkdir ifs-36r4/lib
+  fi
+  if [ ! -d runoff-mapper/bin ] ; then
+    mkdir runoff-mapper/bin
+    mkdir runoff-mapper/lib
+  fi
+  if [ ! -d amip-forcing/bin ] ; then
+    mkdir amip-forcing/bin
+    mkdir amip-forcing/lib
+  fi
+  if [ ! -d lpjg/build ] ; then
+    mkdir lpjg/build
+  fi
+
+  #
+  # Compilation of Model Sources
+  #
+
+  # 1) OASIS
+  if $(has_config any oasis compile_all) ; then
+    cd ${SOURCE_FOLDER}/oasis3-mct/util/make_dir
+    if ${MODEL_CLEAN} ; then
+      make realclean -f TopMakefileOasis3 BUILD_ARCH=ecconf ;
+    fi
+    make -f TopMakefileOasis3 -j ${MAKE_NUMPROC} BUILD_ARCH=ecconf
+    # build lucia with the ifort compiler - modify this if you use another compiler
+    cd ${SOURCE_FOLDER}/oasis3-mct/util/lucia
+    F90=ifort ./lucia -c
+    [ -f ${SOURCE_FOLDER}/oasis3-mct/util/lucia/lucia.exe ] || exit 1
+  fi
+
+  # 2) XIOS
+  if $(has_config any xios compile_all) ; then
+    cd ${SOURCE_FOLDER}/xios-2.5
+    if ${MODEL_CLEAN} ; then
+      ./make_xios --arch ecconf --use_oasis oasis3_mct --netcdf_lib netcdf4_par --job ${MAKE_NUMPROC} --full
+    else
+      ./make_xios --arch ecconf --use_oasis oasis3_mct --netcdf_lib netcdf4_par --job ${MAKE_NUMPROC}
+    fi
+    [ -f ${SOURCE_FOLDER}/xios-2.5/bin/xios_server.exe ] || exit 1
+  fi
+
+  # 3) Runoff-Mapper
+  if $(has_config any rnfmapper compile_all) ; then
+    cd ${SOURCE_FOLDER}/runoff-mapper/src
+    if ${MODEL_CLEAN} ; then
+      make clean ;
+    fi
+    make
+    [ -f ${SOURCE_FOLDER}/runoff-mapper/bin/runoff-mapper.exe ] || exit 1
+  fi
+
+  # 4) NEMO
+  if $(has_config any compile_all nemo) ; then
+
+    NEMO_resolution=%NEMO_resolution%
+    if [[ -z ${NEMO_resolution-} ]] ; then
+        echo "ERROR: nemo is requested but NEMO_resolution is not defined!"
+        exit 1
+    fi
+    has_config pisces && [[ "%CMOR_EXP%" = "historical" || "%CMOR_EXP%" = "esm-hist" ]] && new_nemo_compilation_keys+=" key_cfc "
+
+    # Select correct nemo_config
+    has_config pisces:offline ifs && echo "ERROR: cannot have pisces:offline and ifs in config!" && exit 1
+    # Determine proper NEMO configuration
+    get_configuration_nemo
+    # compilation step
+    if $(has_config compile_all) ; then
+        for NEMO_CONFIG in ORCA025L75_LIM3  ORCA025L75_LIM3_standalone  ORCA1L75_LIM3  ORCA1L75_LIM3_CarbonCycle  ORCA1L75_LIM3_PISCES  ORCA1L75_LIM3_PISCES_standalone  ORCA1L75_LIM3_standalone  ORCA1L75_OFF_PISCES_standalone ; do
+            compile_nemo $NEMO_CONFIG
+        done
+    else
+      compile_nemo $NEMO_CONFIG
+    fi
+  fi
+
+  # 5) IFS
+  if $(has_config any ifs compile_all) ; then
+    set +xuve
+    . ${SOURCE_FOLDER}/util/grib_table_126/define_table_126.sh
+    set -xuve
+    cd ${SOURCE_FOLDER}/ifs-36r4
+    if ${MODEL_CLEAN} ; then
+      make clean BUILD_ARCH=ecconf
+      make realclean BUILD_ARCH=ecconf
+      make dep-clean BUILD_ARCH=ecconf
+    fi
+    make -j ${MAKE_NUMPROC} BUILD_ARCH=ecconf lib
+    make BUILD_ARCH=ecconf master
+    [ -f ${SOURCE_FOLDER}/ifs*/bin/ifsmaster* ] || exit 1
+  fi
+
+  # 6) Amip
+  if $(has_config any amip compile_all); then
+    cd ${SOURCE_FOLDER}/amip-forcing/src
+    if ${MODEL_CLEAN} ; then
+      make clean
+    fi
+    make
+    [ -f ${SOURCE_FOLDER}/amip*/bin/amip* ] || exit 1
+  fi
+
+  # 7) LPJG component
+  if $(has_config any lpjg compile_all); then
+    if $(has_config compile_all) ; then
+      compile_lpjg "T255L91"
+      compile_lpjg "T159L91"
+    elif $(has_config lpjg) ; then
+      compile_lpjg $IFS_resolution
+    fi
+  fi
+
+  # 8) TM5
+  if $(has_config any tm5 compile_all); then
+    if $(has_config compile_all) ; then
+      compile_tm5 "co2" 10
+      compile_tm5 "cb05" 34
+    elif $(has_config tm5) ; then
+      tmversion="cb05"
+      has_config tm5:co2 && tmversion="co2"
+      compile_tm5 ${tmversion} ${TM5_NLEVS}
+    fi
+  fi
+
+  # 9) ELPiN
+  if $(has_config any elpin compile_all) ; then
+    cd ${SOURCE_FOLDER}/util/ELPiN/
+    make clean
+    make
+  fi
+
+  # 10) OSM
+  if $(has_config any osm compile_all) ; then
+    cd ${SOURCE_FOLDER}/ifs-36r4/src/surf/offline/
+    if [ ${HPCARCH} == 'marenostrum4' ] ; then
+        export PATH=/gpfs/projects/bsc32/share/fcm-2017.10.0/bin:$PATH
+    else
+        # this works on CCA...
+        module load fcm
+    fi
+    if ${MODEL_CLEAN} ; then
+        fcm make -vvv -j ${MAKE_NUMPROC} --new
+    else
+        fcm make -vvv -j ${MAKE_NUMPROC}
+    fi
+    [ -f ${SOURCE_FOLDER}/ifs*/src/surf/offline/osm/build/bin/master1s.exe ] || exit 1
+  fi
+  echo "Finished compiling"
+  set +xuve
+  #
+  # workaround for intelremotemond process started when compiling with
+  # intel compilers (maybe only on MN3 ?)
+  #
+  set +e
+  if [ ${HPCARCH} == 'nord3' ] ; then
+    (! pidof intelremotemond) || killall -u ${USER} intelremotemond ;
+  fi
+
+else
+
+   echo "Your experiment will use a precompiled binary version:" ${PRECOMPILED_VERSION-}
+
+   # create links to the binaries
+   cd ${PROJECT_DIR}/sources
+   path_to_precompiled=/gpfs/projects/bsc32/models/ecearth/${PRECOMPILED_VERSION-}/make/MN4-intel-opt/sources/sources
+   # Get defined configurations
+   arrComponents=()
+   if $(has_config nemo) ; then
+      get_configuration_nemo
+      arrComponents+=(nemo)
+      nemo_exe_file=${path_to_precompiled}/nemo-3.6/CONFIG/${NEMO_CONFIG}/BLD/bin/nemo.exe
+      nemo_dst_dir=./sources/nemo-3.6/CONFIG/${NEMO_CONFIG}/BLD/bin/
+   fi
+
+   if $(has_config ifs) ; then
+      arrComponents+=(ifs)
+      ifs_exe_file=${path_to_precompiled}/ifs-36r4/bin/ifsmaster-ecconf
+      ifs_dst_dir=./sources/ifs-36r4/bin/
+   fi
+
+   if $(has_config xios) ; then
+      arrComponents+=(xios)
+      xios_exe_file=${path_to_precompiled}/xios-2.5/bin/xios_server.exe
+      xios_dst_dir=./sources/xios-2.5/bin/
+   fi
+
+   if $(has_config osm) ; then
+      arrComponents+=(osm)
+      osm_exe_file=${path_to_precompiled}/ifs-36r4/src/surf/offline/osm/build/bin/master1s_cpl.exe
+      osm_dst_dir=./sources/ifs-36r4/src/surf/offline/osm/build/bin/
+   fi
+
+   if $(has_config elpin) ; then
+      arrComponents+=(elpin)
+      elpin_exe_file=${path_to_precompiled}/util/ELPiN/bin/mpp_domain_decomposition.exe
+      elpin_dst_dir=./sources/util/ELPiN/bin/
+   fi
+
+   if $(has_config lpjg) ; then
+      arrComponents+=(lpjg)
+      lpjg_exe_file=${path_to_precompiled}/lpjg/build/guess_T$(echo ${IFS_resolution} | sed 's:T\([0-9]\+\)L\([0-9]\+\):\1:')
+      lpjg_dst_dir=./sources/lpjg/build/
+   fi
+
+   if $(has_config tm5) ; then
+      arrComponents+=(tm5)
+      tmversion="cb05"
+      has_config tm5:co2 && tmversion="co2"
+      tm5_exe_file=${path_to_precompiled}/tm5mp/build-${tmversion}-ml${TM5_NLEVS}/appl-tm5-${tmversion}.x
+      tm5_dst_dir=./sources/tm5mp/build-${tmversion}-ml${TM5_NLEVS}/
+   fi
+
+   if $(has_config rnfmapper) ; then
+       arrComponents+=(runoff_mapper)
+       runoff_mapper_exe_file=${path_to_precompiled}/runoff-mapper/bin/runoff-mapper.exe
+       runoff_mapper_dst_dir=./sources/runoff-mapper/bin/
+   fi
+
+   if $(has_config amip) ; then
+       arrComponents+=(amip)
+       amip_exe_file=${path_to_precompiled}/amip-forcing/bin/amip-forcing.exe
+       amip_dst_dir=./sources/amip-forcing/bin/
+   fi
+
+   for component in ${arrComponents[@]} ; do
+       exe=${component}_exe_file
+       dst=${component}_dst_dir
+       # we copy only the binary
+       if [[ ! -d ${!dst} ]] ; then
+          mkdir -p ${!dst}
+       fi
+       cp -f ${!exe} ${!dst}
+       # get the enclosing folder of the target binaries folder that was just copied
+       ln -sf ${!exe} ${!dst}/$(basename ${!exe}).lnk
+   done
+
+fi

+ 320 - 0
runtime/autosubmit/config-run.xml

@@ -0,0 +1,320 @@
+<?xml version="1.0"?>
+
+<Configuration xmlns:xi="http://www.w3.org/2001/XInclude">
+
+    <Translation name="RUN_OCE">
+        <Description>Run script file (oce only run)</Description>
+        <Template>ece-nemo.sh.tmpl</Template>
+        <Target>ece-nemo.sh</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <Translation name="RUN_ESM">
+        <Description>Run script file (coupled run: atm+esm components)</Description>
+        <Template>ece-esm.sh.tmpl</Template>
+        <Target>ece-esm.sh</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <Translation name="RUN_LSM">
+        <Description>Run script file (offline land surface run)</Description>
+        <Template>ece-lsm.sh.tmpl</Template>
+        <Target>ece-lsm.sh</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <Translation name="RT_CTRL_CHE">
+        <Description>Control file for TM5</Description>
+        <Template>../classic/ctrl/tm5-config-run.rc.tmpl</Template>
+        <Target>../classic/ctrl/tm5-config-run.rc</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <xi:include href="../classic/platform/bsc-nord3.xml" />
+    <xi:include href="../classic/platform/bsc-marenostrum4.xml" />
+    <xi:include href="../classic/platform/dmi-hpcdev-intel.xml" />
+    <xi:include href="../classic/platform/ecmwf-cca-cray.xml" />
+    <xi:include href="../classic/platform/ecmwf-cca-intel.xml" />
+    <xi:include href="../classic/platform/fmi-voima.xml" />
+    <xi:include href="../classic/platform/knmi-rhino.xml" />
+    <xi:include href="../classic/platform/csc-puhti-intel-intelmpi.xml" />
+    <xi:include href="../classic/platform/nsc-bi.xml" />
+    <xi:include href="../classic/platform/nsc-tetralith.xml" />
+    <xi:include href="../classic/platform/pdc-beskow.xml" />
+    <xi:include href="../classic/platform/surfsara-cartesius.xml" />
+
+    <Model name="GENERAL">
+
+        <Parameter name="EXP_NAME">
+            <Description>Experiment name (4 letters)</Description>
+            <Type>STRING</Type>
+            <Value>%EXPID%</Value>
+        </Parameter>
+
+        <Parameter name="RUN_START_DATE">
+            <Description>Start date of the simulation. Use any reasonable syntax.</Description>
+            <Type>DATE</Type>
+            <Value>%SDATE%</Value>
+        </Parameter>
+
+        <Parameter name="RUN_END_DATE">
+            <Description>End date of the simulation. Use any reasonable syntax.</Description>
+            <Type>STRING</Type>
+            <Value>%Chunk_START_DATE% + %CHUNKSIZE% %CHUNKSIZEUNIT%</Value>
+        </Parameter>
+
+        <Parameter name="FORCE_RUN_FROM_SCRATCH">
+            <Description>Start simulation from scratch, possibly ignoring any restart files. [true/false]</Description>
+            <Type>BOOLEAN</Type>
+            <Value>%FORCE_RUN_FROM_SCRATCH%</Value>
+        </Parameter>
+
+        <Parameter name="RST_FREQ">
+            <Description>Restart frequency, e.g., 2 months</Description>
+            <Type>STRING</Type>
+            <Value>%CHUNKSIZE% %CHUNKSIZEUNIT%</Value>
+        </Parameter>
+
+        <Parameter name="RUN_NUM_LEGS">
+            <Description>Number of restart legs</Description>
+            <Type>INTEGER</Type>
+            <Value>1</Value>
+        </Parameter>
+
+        <Parameter name="OUTPUT_CONTROL_FILES_DIR">
+            <Description>The path to the IFS ppt and NEMO file_def file dir</Description>
+            <Type>PATH</Type>
+            <Value>ctrl</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="OASIS">
+
+        <Parameter name="CPL_FREQ_ATM_CHE_HRS">
+            <Description>Coupling frequency between IFS and TM5 in hours</Description>
+            <Type>INTEGER</Type>
+            <Value>6</Value>
+        </Parameter>
+
+        <Parameter name="CPL_FREQ_ATM_LPJG_HRS">
+            <Description>Coupling frequency between IFS|TM5 and LPJG in hours</Description>
+            <Type>INTEGER</Type>
+            <Value>24</Value>
+        </Parameter>
+
+        <Parameter name="LUCIA">
+            <Description>Control Lucia post-processing tool. 0 -> Deactivated, -1 -> Legacy, -2 -> Updated CERFACS tool, -3 lucia_lite BSC</Description>
+            <Type>INTEGER</Type>
+            <Value>%LUCIA%</Value>
+        </Parameter>
+
+
+    </Model>
+
+    <Model name="IFS">
+
+        <Parameter name="GRID">
+            <Description>Resolution of IFS grid</Description>
+            <Type>STRING</Type>
+            <Value>%IFS_resolution%</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors running IFS</Description>
+            <Type>INTEGER</Type>
+            <Value>%IFS_NUMPROC%</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6">
+            <Description>Use CMIP6 forcings (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>TRUE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6_SCENARIO">
+            <Description>SSP selection for 2015 onwards</Description>
+            <Type>STRING</Type>
+            <Value>%CMIP6_SCENARIO%</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6_A4xCO2">
+            <Description>Use Abrupt4xCO2 in CMIP6 DECK (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>FALSE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6_1PCTCO2">
+            <Description>Use 1pctCO2 for radiation in CMIP6 DECK (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>FALSE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6_1PCTCO2_BGC">
+            <Description>Use 1pctCO2 for BGC components (LPJ-GUESS, PISCES) in CMIP6 DECK (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>FALSE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP5">
+            <Description>Use CMIP5 forcings (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>TRUE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP5_RCP">
+            <Description>RCP selection (1-4 or 0 for historical run)</Description>
+            <Type>INTEGER</Type>
+            <Value>%CMIP5_RCP%</Value>
+        </Parameter>
+
+        <Parameter name="CMIP_FIXYEAR">
+            <Description>Fix CMIP5/CMIP6 forcings at the indicated year (or 0 to ignore for transient runs)</Description>
+            <Type>INTEGER</Type>
+            <Value>%NFIXYR%</Value>
+        </Parameter>
+
+        <Parameter name="CMIP_FIXYEAR_CH4">
+            <Description>Fix CMIP5/CMIP6 CH4 mixing ratios at the indicated year (or 0 to ignore for transient runs)</Description>
+            <Type>INTEGER</Type>
+            <Value>%NFIXYR%</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="NEM">
+
+        <Parameter name="GRID">
+            <Description>Resolution of NEMO grid</Description>
+            <Type>STRING</Type>
+            <Value>%NEMO_resolution%</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors running NEMO</Description>
+            <Type>INTEGER</Type>
+            <Value>%NEM_NUMPROC%</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="XIO">
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors running XIOS</Description>
+            <Type>INTEGER</Type>
+            <Value>%XIO_NUMPROC%</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="TM5">
+
+        <Parameter name="NLEVS">
+            <Description>Number of levels in TM5 (4, 10, 34 or 91)</Description>
+            <Type>INTEGER</Type>
+            <Value>%TM5_NLEVS%</Value>
+        </Parameter>
+
+        <Parameter name="ISTART">
+            <Description>TM5 initial tracer fields option (2,5,9,31,32 or 33)</Description>
+            <Type>INTEGER</Type>
+            <Value>%TM5_ISTART%</Value>
+        </Parameter>
+
+        <Parameter name="TIME_STEP_SEC">
+            <Description>TM5 time step in seconds</Description>
+            <Type>INTEGER</Type>
+            <Value>3600</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC_X">
+            <Description>Number of processors in the X direction running TM5 (max 4)</Description>
+            <Type>INTEGER</Type>
+            <Value>%TM5_NUMPROC_X%</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC_Y">
+            <Description>Number of processors in the Y direction running TM5 (max 45)</Description>
+            <Type>INTEGER</Type>
+            <Value>%TM5_NUMPROC_Y%</Value>
+        </Parameter>
+
+        <Parameter name="EMISS_FIXYEAR">
+            <Description>Fix EMISSIONS at the indicated year (0 to ignore, -1 to disable emissions for co2 version)</Description>
+            <Type>INTEGER</Type>
+            <Value>%TM5_EMISS_FIXYEAR%</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="LPJG">
+
+        <Parameter name="TIME_STEP_SEC">
+            <Description>LPJ-GUESS time step in seconds</Description>
+            <Type>INTEGER</Type>
+            <Value>86400</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors running LPJG (min )</Description>
+            <Type>INTEGER</Type>
+            <Value>%LPJG_NUMPROC%</Value>
+        </Parameter>
+
+        <Parameter name="LPJG_FIXNDEPAFTER">
+            <Description>Fix N-Deposition from (>=0: year, -1:off)</Description>
+            <Type>INTEGER</Type>
+            <Value>%LPJG_FIXNDEPAFTER%</Value>
+            <!-- This is a hack as the final year (2100) is missing in the dataset -->
+        </Parameter>
+
+        <Parameter name="LPJG_FIXLUAFTER">
+            <Description>Fix Land-Use from (>=0: year, -1:off)</Description>
+            <Type>INTEGER</Type>
+            <Value>%LPJG_FIXLUAFTER%</Value>
+        </Parameter>
+
+        <Parameter name="LPJG_IFS_OUTPUT_DIR">
+          <Description>IFS output directory for lpjg_forcing to find ICMGG* files</Description>
+          <Type>PATH</Type>
+          <Value>%LPJG_IFS_OUTPUT_DIR%</Value>
+        </Parameter>
+
+        <Parameter name="LPJG_FORCING_DIR">
+          <Description>LPJG directory to find forcing</Description>
+          <Type>PATH</Type>
+          <Value>%LPJG_FORCING_DIR%</Value>
+        </Parameter>
+
+    </Model>
+    
+    <Model name="OSM">
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors/threads running OSM:openMP</Description>
+            <Type>INTEGER</Type>
+            <Value>%OSM_THREADS%</Value>
+        </Parameter>
+
+        <Parameter name="OSM_FORCING_TYPE">
+          <Description>OSM forcing type, either ifs or one or the ERA reanalyses (erai, era20c, gswp3, era5)</Description>
+          <Type>STRING</Type>
+          <Value>%OSM_FORCING_TYPE%</Value>
+        </Parameter>
+
+        <Parameter name="OSM_IFS_OUTPUT_DIR">
+          <Description>IFS output directory for OSM to find ICMGG* files</Description>
+          <Type>PATH</Type>
+          <Value>%OSM_IFS_OUTPUT_DIR%</Value>
+        </Parameter>
+
+        <Parameter name="OSM_FORCING_DIR">
+          <Description>OSM directory to find forcing or save if generated</Description>
+          <Type>PATH</Type>
+          <Value>%OSM_FORCING_DIR%</Value>
+        </Parameter>
+        
+    </Model>
+
+</Configuration>

+ 81 - 0
runtime/autosubmit/copy-runtime.sh

@@ -0,0 +1,81 @@
+#!/usr/bin/env bash
+# local_setup.sh: Copies the runtime environment from the Autosubmit project
+# folder to the remote machine
+
+set -xvue
+
+PROJDEST=%PROJECT_DESTINATION%
+PROJDIR=%PROJDIR%
+HPCARCH=%HPCARCH%
+VERSION=%VERSION%
+
+how_many_retry_copy_file=5
+
+function ecaccess-file-put_with_check_and_retry(){
+
+    source=$1
+    destination=$2
+    retry=0
+
+    while [[ ${retry} -le ${how_many_retry_copy_file} ]]; do
+
+        ecaccess-file-put ${source} ${destination}
+        source_size=$(ls -lrt $source | awk '{print $5}')
+        destination_size=$(ecaccess-file-size $destination)
+        if [[ ${source_size} == ${destination_size} ]]; then
+            echo "done."
+            break
+        else
+            ((retry++))
+         fi
+    done
+    if [[ ${retry} -eq how_many_retry_copy_file ]]; then
+        echo "Transfer error: Source and destination files have not the same size. Exiting..."
+        exit 1
+    fi
+}
+
+# 
+# Run ec-conf
+# 
+cd %PROJDIR%/runtime/autosubmit
+#cd ${PROJDIR}/sources/runtime/autosubmit
+ln -sf ../classic/platform
+if [ ${HPCARCH} == 'ecmwf-xc40' ]
+then
+    architecture=ecmwf-cca-intel
+    module load ECAC
+    ../../sources/util/ec-conf/ec-conf --platform ${architecture} -o PLT:ACTIVE:ECEARTH_SRC_DIR='${SCRATCH}/${exp_name}/auto-ecearth3/sources/sources' -o PLT:ACTIVE:RUN_DIR='${SCRATCH}/${exp_name}/${run_start_date}/${member}/runtime' -o PLT:ACTIVE:INI_DATA_DIR='${SCRATCH}/${exp_name}/${run_start_date}/${member}/inidata' config-run.xml
+    #../../sources/util/ec-conf/ec-conf --platform ${architecture} -o PLT:ACTIVE:ECEARTH_SRC_DIR='${SCRATCH}/${exp_name}/auto-ecearth3/sources/sources' -o PLT:ACTIVE:RUN_DIR='${SCRATCH}/${exp_name}/${run_start_date}/${member}/runtime' -o PLT:ACTIVE:INI_DATA_DIR='/perm/ms/nl/nm6/ECE3-DATA' config-run.xml
+elif [ ${HPCARCH} == 'marenostrum4' ]
+then
+    architecture=bsc-marenostrum4
+    ../../sources/util/ec-conf/ec-conf --platform ${architecture} -o PLT:ACTIVE:INI_DATA_DIR="/gpfs/projects/bsc32/models/ecearth/${VERSION}/inidata" config-run.xml
+else
+    error "Unsupported ec-conf architechture: ${HPCARCH}"
+    exit 0
+fi
+
+# 
+# Copy Model Sources
+# 
+
+cd ${PROJDIR}; cd ..
+if [[ -d ${PROJDEST} ]]; then
+  tar -zcvf ${PROJDEST}.tar.gz ${PROJDEST}
+else
+  echo "!!! model not present !!!"
+  exit 1
+fi
+
+# transfer model
+if [ ${HPCARCH} == 'ecmwf-xc40' ] ; then
+    # ecaccess-file-mput -force ${PROJNAME}.tar.gz %HPCHOST%:%HPCROOTDIR%/
+    module load ECAC
+    ecaccess-file-mkdir %HPCHOST%:%HPCROOTDIR%/
+    ecaccess-file-put_with_check_and_retry ${PROJDEST}.tar.gz %HPCHOST%:%HPCROOTDIR%/${PROJDEST}.tar.gz
+else
+    rsync -avz ${PROJDEST}.tar.gz %HPCUSER%@%HPCHOST%:%HPCROOTDIR%/
+fi
+
+rm ${PROJDEST}.tar.gz

+ 1928 - 0
runtime/autosubmit/ece-esm.sh.tmpl

@@ -0,0 +1,1928 @@
+#!/usr/bin/env bash
+
+set -xuve
+
+cd %CURRENT_ROOTDIR%
+
+# librunscript defines some helper functions
+source ./librunscript.sh
+
+# =============================================================================
+# *** BEGIN User configuration
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# *** General configuration
+# -----------------------------------------------------------------------------
+# Component configuration (for syntax of the $config variable, see librunscript.sh)
+#
+# Currently maintained:
+#     config="ifs amip oasis"                            # "GCM forced-SST" : IFS + AMIP
+#     config="ifs amip oasis lpjg:fdbck"                 # "Veg"            : forced-GCM + LPJ-Guess
+#     config="ifs amip oasis tm5:chem,o3fb,ch4fb,aerfb"  # "AerChem"        : forced-GCM + TM5
+#
+#     config="ifs nemo lim3 rnfmapper xios:detached oasis"                                 # "GCM"     : IFS+NEMO
+#     config="ifs nemo lim3 rnfmapper xios:detached oasis lpjg:fdbck"                      # "Veg"     : GCM+LPJ-Guess
+#     config="ifs nemo lim3 rnfmapper xios:detached oasis pisces lpjg:fdbck tm5:co2,co2fb" # "C-cycle" : GCM+LPJG+TM5
+#     config="ifs nemo lim3 rnfmapper xios:detached oasis tm5:chem,o3fb,ch4fb,aerfb"       # "AerChem" : GCM+TM5
+#
+#     config="ifs nemo pisces lim3 rnfmapper xios:detached oasis"     # "GCM"     : IFS+NEMO+PISCES
+#
+
+#config="ifs nemo lim3 rnfmapper xios:detached oasis lpjg:fdbck tm5:co2"
+
+# get config from autosubmit variables
+
+#ifs
+ifs="ifs"
+TEMPLATE_NAME=%TEMPLATE_NAME%
+[[ "$TEMPLATE_NAME" = ifs3* ]] && amip="amip" || amip=""
+[ "%ATM_NUDGING%" = TRUE ] && atmnudg="atmnudg" || atmnudg=""
+[ "%LSPPT%" = TRUE ] && sppt="sppt" || sppt=""
+
+#nemo
+nemo=""; pisces=""; lim3=""; rnfmapper=""; xios=""
+[[ "$TEMPLATE_NAME" = nemo3* ]] && error "ece-esm.sh runscript does not support nemo only!"
+if [[ "$TEMPLATE_NAME" = ecearth3* ]];
+then
+  [[ "%OCEAN_ini%" = *[!\ ]* ]] && start_nemo_from_restart=":start_from_restart" || start_nemo_from_restart=""
+  [[ "%PISCES_ini%" = *[!\ ]* ]] && start_pisces_from_restart=":start_from_restart" || start_pisces_from_restart=""
+  [ "%OCE_NUDG%" = TRUE ] && ocenudg=":ocenudg" || ocenudg=""
+  [ "%SURF_RESTO%" = TRUE ] && surfresto=":surfresto" || surfresto=""
+  [ "%NEMO_remove_land%" = TRUE ] && elpin=":elpin" || elpin=""
+  nemo="nemo"${start_nemo_from_restart}${ocenudg}${surfresto}${elpin}
+  [ "%PISCES%" = TRUE ] && pisces="pisces"${start_pisces_from_restart} || pisces=""
+  lim3="lim3"; xios="xios:detached"; rnfmapper="rnfmapper"
+fi
+
+#others
+CMIP5_RCP=%CMIP5_RCP%
+[[ "%LPJG%" = TRUE ]] && lpjg=%LPJG_CONFIG% || lpjg=""
+[[ "%TM5%" = TRUE ]] && tm5=%TM5_CONFIG% || tm5=""
+[ "%NEMO_remove_land%" = TRUE ] && elpin=":elpin" || elpin=""
+[ "%IFS_VEG_SOURCE%" == "" ]  && ifs_veg_source="era20c" || ifs_veg_source="%IFS_VEG_SOURCE%"
+if [[ "%SAVE_IC%" = FALSE ]] || [[ "%SAVE_IC%" = "" ]] ; then save_ic="" ; else save_ic="save_ic:%SAVE_IC%" ; fi
+
+config="${ifs} ${amip} ${atmnudg} ${sppt} ${nemo} ${pisces} ${lim3} ${rnfmapper} ${xios} oasis ${lpjg} ${tm5} ${save_ic}"
+
+# minimum sanity
+has_config amip nemo && error "Cannot have both nemo and amip in config!!"
+! has_config ifs && error "The ESM script requires ifs in config"
+
+# Experiment name (exactly 4 letters!)
+export exp_name=[[[MOD:GENERAL:EXP_NAME]]]
+
+# Simulation start and end date. Use any (reasonable) syntax you want.
+run_start_date="[[[MOD:GENERAL:RUN_START_DATE]]]"
+# define run_start_date_as with proper format e.g. 19900101
+export run_start_date_as=$(date -u -d "${run_start_date}" +%Y%m%d)
+run_end_date="[[[MOD:GENERAL:RUN_END_DATE]]]"
+
+# Simulation member. Use any (reasonable) syntax you want.
+export member="%MEMBER%"
+
+# Set $force_run_from_scratch to 'true' if you want to force this run to start
+# from scratch, possibly ignoring any restart files present in the run
+# directory. Leave set to 'false' otherwise.
+# NOTE: If set to 'true' the run directory $run_dir is cleaned!
+CHUNK=%CHUNK%
+force_run_from_scratch=[[[MOD:GENERAL:FORCE_RUN_FROM_SCRATCH]]]
+force_run_from_scratch=${force_run_from_scratch:-false}
+force_run_from_scratch=$(echo ${force_run_from_scratch} | tr '[:upper:]' '[:lower:]')
+# we only apply this for the first chunk
+if ${force_run_from_scratch} && [[ "${CHUNK}" != "1" ]] ; then
+  force_run_from_scratch=false
+fi
+
+# Resolution (TM5 resolution is set at compilation)
+ifs_grid=[[[MOD:IFS:GRID]]]
+nem_grid=[[[MOD:NEM:GRID]]]
+
+# Restart frequency. Use any (reasonable) number and time unit you want.
+# For runs without restart, leave this variable empty
+rst_freq="[[[MOD:GENERAL:RST_FREQ]]]"
+
+# Number of restart legs to be run in one go
+run_num_legs=[[[MOD:GENERAL:RUN_NUM_LEGS]]]
+
+# Coupling frequencies
+has_config ifs tm5  && cpl_freq_atm_ctm_hrs=[[[MOD:OASIS:CPL_FREQ_ATM_CHE_HRS]]]
+has_config ifs lpjg && cpl_freq_atm_lpjg_hrs=[[[MOD:OASIS:CPL_FREQ_ATM_LPJG_HRS]]]
+
+# Don't change the coupling frequency because UPDCLIE (where SST and SIC
+# are updated) is called every 24 hours (hardcoded in ifs-36r4/src/ifs/utility/updtim.F90)
+has_config amip && cpl_freq_amip_sec=86400
+
+# Directories
+start_dir=${PWD}
+ctrl_file_dir=${start_dir}/ctrl
+output_control_files_dir=${start_dir}/[[[MOD:GENERAL:OUTPUT_CONTROL_FILES_DIR]]]
+
+# Architecture
+build_arch=[[[PLT:ACTIVE:BUILD_ARCH]]]
+use_machinefile=[[[PLT:ACTIVE:USE_MACHINEFILE]]]
+
+# This file is used to store information about restarts
+ece_info_file="ece.info"
+
+# -----------------------------------------------------------------------------
+# *** Read platform dependent configuration
+# -----------------------------------------------------------------------------
+source ./ecconf.cfg
+
+configure
+
+# -----------------------------------------------------------------------------
+# *** Time step settings
+# -----------------------------------------------------------------------------
+if has_config ifs
+then
+    case "${ifs_grid}" in
+
+        T159L*) ifs_time_step_sec=3600 ;;
+        T255L*) ifs_time_step_sec=2700 ;;
+        T511L*) ifs_time_step_sec=900  ;;
+
+        *)  error "Can't set time steps for unknown horizontal grid: ${ifs_grid}"
+            ;;
+    esac
+fi
+
+if has_config nemo
+then
+    case "${nem_grid}" in
+
+        ORCA1L*)   nem_time_step_sec=2700; lim_time_step_sec=2700 ;;
+        ORCA025L*) nem_time_step_sec=900 ; lim_time_step_sec=900  ;;
+
+        *)  error "Can't set time steps for unknown horizontal grid: ${nem_grid}"
+            ;;
+    esac
+fi
+
+if has_config ifs nemo
+then
+    case "${ifs_grid}--${nem_grid}" in
+
+        T159L*--ORCA1L*)
+            ifs_time_step_sec=3600; nem_time_step_sec=2700; lim_time_step_sec=2700; cpl_freq_atm_oce_sec=10800
+            ;;
+        T255L*--ORCA1L*)
+            ifs_time_step_sec=2700; nem_time_step_sec=2700; lim_time_step_sec=2700; cpl_freq_atm_oce_sec=2700
+            ;;
+        T511L*--ORCA025L*)
+            ifs_time_step_sec=900 ; nem_time_step_sec=900 ; lim_time_step_sec=900 ; cpl_freq_atm_oce_sec=2700
+            ;;
+
+        *)  error "Can't set time steps for unknown combination of horizontal grids: ${ifs_grid}-${nem_grid}"
+            ;;
+    esac
+fi
+
+# -----------------------------------------------------------------------------
+# *** IFS configuration
+# -----------------------------------------------------------------------------
+
+ifs_version=36r4
+
+ifs_di_freq=$(( 24 * 3600 / ifs_time_step_sec ))
+ifs_ddh_freq=$(( 120 * 3600 / ifs_time_step_sec ))
+
+export ifs_res_hor=$(echo ${ifs_grid} | sed 's:T\([0-9]\+\)L\([0-9]\+\):\1:')
+ifs_res_ver=$(echo ${ifs_grid} | sed 's:T\([0-9]\+\)L\([0-9]\+\):\2:')
+
+export ifs_numproc=[[[MOD:IFS:NUMPROC]]]
+
+ifs_exe_file=${ecearth_src_dir}/ifs-${ifs_version}/bin/ifsmaster-${build_arch}
+
+ifs_lastout=false
+
+ifs_cmip5=[[[MOD:IFS:CMIP5]]]
+ifs_cmip5_rcp=[[[MOD:IFS:CMIP5_RCP]]]
+export ifs_cmip_fixyear=[[[MOD:IFS:CMIP_FIXYEAR]]]
+[ -z "${ifs_cmip_fixyear}" ] && ifs_cmip_fixyear=0
+export ifs_cmip_fixyear_ch4=[[[MOD:IFS:CMIP_FIXYEAR]]]
+[ -z "${ifs_cmip_fixyear_ch4}" ] && ifs_cmip_fixyear_ch4=0
+
+# Repeat trap from ifs/suecrad.F90 for early catch
+if ! has_config tm5:ch4fb && (( $ifs_cmip_fixyear != $ifs_cmip_fixyear_ch4 ))
+then
+    error 'CH4 in IFS is not provided by TM5, NCMIPFIXYR_CH4 should be set equal to NCMIPFIXYR'
+fi
+
+ifs_cmip6=[[[MOD:IFS:CMIP6]]]
+ifs_mac2sp=[[[MOD:IFS:CMIP6]]]
+ifs_cmip6piaer=[[[MOD:IFS:CMIP6]]]
+ifs_cmip6_scenario=[[[MOD:IFS:CMIP6_SCENARIO]]]
+
+# enable optional COVID-19 scenarios, requires ifs_cmip6_scenario=SSP2-4.5
+ifs_covid19=FALSE
+# choose one scenario : Base TwoYearBlip ModerateGreen StrongGreen FossilFuel
+ifs_covid19scen=Base
+# basic sanity checks when covid19 is activated (SSP scenario and no support for LPJ-GUESS, PISCES nor TM5)
+if [ ${ifs_covid19} == TRUE ] ; then
+    [ ${ifs_cmip6_scenario} != SSP2-4.5 ] && info "with ifs_covid19=TRUE IFS uses ifs_cmip6_scenario=SSP2-4.5 not ${ifs_cmip6_scenario}"
+    has_config any lpjg pisces tm5 && error "ifs_covid19=TRUE is not supported with LPJ-GUESS, PISCES nor TM5"
+fi
+
+lcmip6_strataer_simp=FALSE
+lcmip6_strataer_full=[[[MOD:IFS:CMIP6]]]
+lcmip6_strataer_bckgd=FALSE
+
+export ifs_A4xCO2=[[[MOD:IFS:CMIP6_A4xCO2]]]
+export ifs_1PCTCO2=[[[MOD:IFS:CMIP6_1PCTCO2]]]
+export bgc_1PCTCO2=[[[MOD:IFS:CMIP6_1PCTCO2_BGC]]]
+
+# Time-varying orbital forcing (Qiong Zhang, SU-2013-09)
+# https://dev.ec-earth.org/projects/ecearth3/wiki/Orbital_forcing_in_EC-Earth_3
+#
+#   ifs_orb_switch=false, no orbital calculations applied
+#   ifs_orb_switch=true, use orbital calculations according to ifs_orb_mode
+#   ifs_orb_mode="fixed_year", or "variable_year", or "fixed_parameters"
+#     fixed_year: calculate the orbital parameters at ifs_orb_iyear, e.g.,1850
+#     variable_year: calculate orbital parameters annually start from ifs_orb_iyear
+#     fixed_parameters: prescribe orbital parameters for given year
+case "${ifs_grid}" in
+    T159*) ifs_orb_switch=true ;;
+    *)     ifs_orb_switch=false ;;
+esac
+ifs_orb_mode="variable_year"
+ifs_orb_iyear=$(date -u -d "${run_start_date}" +%Y)
+
+# Relaxation of soil moisture (Wilhelm May, LU; October 2017)
+#  
+# LRXSM: Parameter indicating the levels to be nudged 
+#
+#   LRXSM =  0: no nudging 
+#   LRXSM = 12: 4xdaily data and 3 levels (excluding level 1)      
+#   LRXSM = 13: 4xdaily data and 4 levels
+#
+# LRXSMTx: time scale of the relaxation for level X (in hours)
+#  
+#   LRXSMTx =   0: actual values relpaced by external ones 
+#   LRXSMTx =  24: 1 day
+#   LRXSMTx = 120: 5 days
+#
+# LRXSMS: indicates when the relaxation is done 
+#
+#   LRXSMS = 0: before the time step
+#   LRXSMS = 1:  after the time step
+#
+has_config soilnudg && ifs_lrxsm=13 || ifs_lrxsm=0
+ifs_lrxsmt1=96
+ifs_lrxsmt2=72
+ifs_lrxsmt3=48
+ifs_lrxsmt4=24
+ifs_lrxsms=1
+
+# IFS tuning parameters
+variant=
+has_config tm5:chem && variant=-AerChem
+ifs_tuning_parameter_file=${ctrl_file_dir}/ifs-tuning-parameters-${ifs_grid}${variant}.sh
+if [ -f ${ifs_tuning_parameter_file} ]
+then
+    source ${ifs_tuning_parameter_file}
+else
+    error "Sorry, ${ifs_tuning_parameter_file} not found, exiting."
+fi
+
+
+# Select source of vegetation data:
+#  ifs       climatology from IFS
+#  era20c    vegetation from an off-line LPJ-Guess run forced with ERA20C
+#            (currently available only for T255 and T159)
+#  cmip6     vegetation from an EC-Earth3-Veg (interactive LPJ-Guess) run 
+#            (currently available only for T255)
+#  custom_exp vegetation from any EC-Earth3-Veg run exp
+#            (must contain same variables as era20c & cmip6 and located in icmcl_exp folder)
+#  none      don't create an ICMCL file with vegetation data (this is set
+#            automatically if LPJG is used with feedback)
+#
+# set above in AS runtime
+
+has_config lpjg:fdbck && ifs_veg_source="none"
+
+case ${ifs_veg_source} in
+"ifs" )
+    # Use Lambert-Beer to compute effective vegetation cover
+    n_compute_eff_veg_fraction=2
+    ;;
+"era20c" )
+    # LPJG vegetation is provided as effective cover
+    # Don't use Lambert-Beer
+    n_compute_eff_veg_fraction=0
+
+    case "${ifs_grid}" in
+        T159L*) veg_version=v29 ;;
+        T255L*) veg_version=v16 ;;
+        *)  error "Vegetation from off-line LPJ-Guess not available for ${ifs_grid}" ;;
+    esac    
+    ;;
+"cmip6" )
+    # LPJG vegetation is provided as effective cover
+    # Don't use Lambert-Beer
+    n_compute_eff_veg_fraction=0
+
+    case "${ifs_grid}" in
+        T255L*) veg_version=v32 ;;
+        *)  error "Vegetation from CMIP6 EC-Earth3-Veg not available for ${ifs_grid}" ;;
+    esac    
+    ;;
+"custom_"* )
+    # LPJG vegetation is provided as effective cover
+    # Don't use Lambert-Beer
+    n_compute_eff_veg_fraction=0
+
+    veg_version=${ifs_veg_source:7}
+    if [ ! -d ${ini_data_dir}/ifs/${ifs_grid}/icmcl_${veg_version} ]
+    then
+        error "requested IFS_VEG_SOURCE = ${ifs_veg_source} but not found in ${ini_data_dir}/ifs/${ifs_grid}/icmcl_${veg_version}"
+    fi
+    ;;
+"none" )
+    # LPJG with feedback
+    n_compute_eff_veg_fraction=0
+    ! has_config lpjg:fdbck && error "IFS requires an offline source of vegetation"
+    ;;
+* )
+    error "Vegetation from ${ifs_veg_source} not implemented"
+    ;;
+esac
+
+# use DMI land ice physics and varying snow albedo
+case "${ifs_grid}" in
+    T159*) ifs_landice=true ;;
+    *)     ifs_landice=false ;;
+esac
+
+# -----------------------------------------------------------------------------
+# *** NEMO/LIM configuration
+# -----------------------------------------------------------------------------
+
+# This is only needed if the experiment is started from an existing set of NEMO
+# restart files
+nem_restart_file_path=${ini_data_dir}
+
+nem_restart_offset=0
+
+nem_res_hor=$(echo ${nem_grid} | sed 's:ORCA\([0-9]\+\)L[0-9]\+:\1:')
+
+nem_config=${nem_grid}
+has_config lim3           && nem_config=${nem_config}_LIM3
+
+if has_config pisces tm5:co2
+then
+    nem_config=${nem_config}_CarbonCycle
+elif has_config pisces
+then
+    nem_config=${nem_config}_PISCES
+fi
+
+# TODO - nemo standalone configs are not accounted for in this script, but this would set the required nem_config
+! has_config ifs && nem_config=${nem_config}_standalone
+
+nem_exe_file=${ecearth_src_dir}/nemo-3.6/CONFIG/${nem_config}/BLD/bin/nemo.exe
+
+nem_numproc=[[[MOD:NEM:NUMPROC]]]
+
+# Thermal conductivity of snow, see comment in ctrl/namelist.lim3.ref.sh
+case "${ifs_grid}" in
+    T159L* ) nem_rn_cdsn=0.25 ;;
+    * )      nem_rn_cdsn=0.27 ;;
+esac
+
+# -----------------------------------------------------------------------------
+# *** Runoff mapper configuration
+# -----------------------------------------------------------------------------
+
+rnf_exe_file=${ecearth_src_dir}/runoff-mapper/bin/runoff-mapper.exe
+rnf_numproc=1
+
+# -----------------------------------------------------------------------------
+# *** LPJ-GUESS configuration
+# -----------------------------------------------------------------------------
+
+lpjg_time_step_sec=[[[MOD:LPJG:TIME_STEP_SEC]]]
+lpjg_numproc=[[[MOD:LPJG:NUMPROC]]]
+
+has_config lpjg       && lpjg_on=1
+has_config lpjg:fdbck && lpjg_fdbck=1
+has_config tm5:co2    && lpjg_fdbck_tm5=1 || lpjg_fdbck_tm5=0
+
+lpjg_fixNdepafter=[[[MOD:LPJG:LPJG_FIXNDEPAFTER]]]
+lpjg_fixLUafter=[[[MOD:LPJG:LPJG_FIXLUAFTER]]]
+[ -z "${lpjg_fixNdepafter}" ] && lpjg_fixNdepafter=-1
+[ -z "${lpjg_fixLUafter}" ] && lpjg_fixLUafter=-1
+export lpjg_fixNdepafter lpjg_fixLUafter
+
+info '!!!! CMIP FIX YEAR SETTINGS:'
+info "ifs_cmip_fixyear:  $ifs_cmip_fixyear"
+info "lpjg_fixNDepAfter: $lpjg_fixNdepafter"
+info "lpjg_fixLUAfter:   $lpjg_fixLUafter"
+info '!!!!'  
+
+lpjg_res=T${ifs_res_hor}
+lpjg_exe_file=${ecearth_src_dir}/lpjg/build/guess_${lpjg_res}
+
+# -----------------------------------------------------------------------------
+# *** AMIP-reader configuration
+# -----------------------------------------------------------------------------
+
+amip_exe_file=${ecearth_src_dir}/amip-forcing/bin/amip-forcing.exe
+amip_numproc=1
+
+# -----------------------------------------------------------------------------
+# *** TM5 configuration
+# -----------------------------------------------------------------------------
+
+if $(has_config tm5)
+then
+    # With TM5, NPRTRV is set to 1 in the namelist. To avoid some out-of-bound
+    # arrays in IFS, we must limit the number of cores for IFS
+    if (( ifs_numproc > (ifs_res_hor+1) ))
+    then
+        error "too much cores requested for IFS, max is $((ifs_res_hor+1))"
+    fi
+
+    # TM5 settings
+    has_config tm5:co2 && tmversion="co2" || tmversion="cb05"
+    has_config tm5:co2 && export tm5_co2=1 || export tm5_co2=0
+    export tm5_exch_nlevs=[[[MOD:TM5:NLEVS]]]
+    tm5_time_step_sec=[[[MOD:TM5:TIME_STEP_SEC]]]
+    export tm5_numproc_x=[[[MOD:TM5:NUMPROC_X]]]
+    export tm5_numproc_y=[[[MOD:TM5:NUMPROC_Y]]]
+    tm5_numproc=$(( tm5_numproc_x * tm5_numproc_y ))
+    export tm5_emiss_fixyear=[[[MOD:TM5:EMISS_FIXYEAR]]]
+
+    # limited number of levels for feedback (aerosols, currently set to lmax_conv in TM5)
+    case ${tm5_exch_nlevs} in
+        34) export tm5_exch_nlevs_cutoff=23 ;;
+        10) export tm5_exch_nlevs_cutoff=10 ;;
+         4) export tm5_exch_nlevs_cutoff=4  ;;
+         *) error "not supported number of levels for TM5"
+    esac
+
+    # executable
+    tm5_exe_file=${ecearth_src_dir}/tm5mp/build-${tmversion}-ml${tm5_exch_nlevs}/appl-tm5-${tmversion}.x
+
+    # path to initial conditions, modify as needed
+    tm5_restart_file_path=${ini_data_dir}/tm5/restart/${tmversion}-ml${tm5_exch_nlevs}
+
+    # fields sent back to IFS
+    has_config tm5:o3fb   && tm5_to_ifs=O3 || tm5_to_ifs=
+    has_config tm5:ch4fb  && tm5_to_ifs=${tm5_to_ifs},CH4
+    has_config tm5:aerfb && tm5_to_ifs=${tm5_to_ifs},"\
+N2,SU2,BC2,OC2,N3,SU3,BC3,OC3,SS3,DU3,\
+N4,SU4,BC4,OC4,SS4,DU4,N5,BC5,OC5,N6,DU6,N7,DU7,\
+NO3,MSA,\
+AOD_01,AOD_02,AOD_03,AOD_04,AOD_05,AOD_06,AOD_07,AOD_08,AOD_09,AOD_10,AOD_11,AOD_12,AOD_13,AOD_14,\
+SSA_01,SSA_02,SSA_03,SSA_04,SSA_05,SSA_06,SSA_07,SSA_08,SSA_09,SSA_10,SSA_11,SSA_12,SSA_13,SSA_14,\
+ASF_01,ASF_02,ASF_03,ASF_04,ASF_05,ASF_06,ASF_07,ASF_08,ASF_09,ASF_10,ASF_11,ASF_12,ASF_13,ASF_14"
+    has_config tm5:co2fb && tm5_to_ifs=${tm5_to_ifs},CO2
+
+    export tm5_to_ifs=$(echo ${tm5_to_ifs} | sed "s/^,//")
+
+    # coupled to LPJ-Guess and/or PISCES?
+    has_config tm5:co2 lpjg   && export cpl_tm_guess=T  || export cpl_tm_guess=F
+    has_config tm5:co2 pisces && export cpl_tm_pisces=T || export cpl_tm_pisces=F
+fi
+
+# -----------------------------------------------------------------------------
+# *** OASIS configuration
+# -----------------------------------------------------------------------------
+
+# Restart files for the coupling fields (note 8 character limit in OASIS)
+#   rstas.nc : atmosphere single-category fields
+#   rstam.nc : atmosphere multi-category fields
+#   rstos.nc : ocean single-category fields
+#   rstom.nc : ocean multi-category fields
+oas_rst_ifs_nemo="rstas.nc rstos.nc"
+
+oas_rst_ifs_lpjg="vegin.nc lpjgv.nc"
+
+# Met fields from IFS to TM (always required)
+oas_rst_ifs_tm5="r_hum.nc r_g2d.nc r_udr.nc r_div.nc r_vor.nc \
+                 r_ddr.nc r_tmp.nc r_dmf.nc r_s2d.nc r_umf.nc"
+
+has_config tm5:chem && \
+    oas_rst_ifs_tm5=${oas_rst_ifs_tm5}' r_cc_.nc r_clw.nc r_cco.nc r_ciw.nc r_ccu.nc'
+
+has_config tm5:o3fb || has_config tm5:ch4fb && oas_rst_ifs_tm5=$oas_rst_ifs_tm5' o3ch4.nc'
+has_config tm5:aerfb && oas_rst_ifs_tm5=$oas_rst_ifs_tm5' C???????'
+
+# C-cycle configuration
+has_config tm5:co2 lpjg   && oas_rst_ifs_tm5=$oas_rst_ifs_tm5' l_co2.nc rlpjg.nc'
+has_config tm5:co2 pisces && oas_rst_ifs_tm5=$oas_rst_ifs_tm5' o_co2.nc pisce.nc'
+has_config tm5:co2fb      && oas_rst_ifs_tm5=$oas_rst_ifs_tm5' co2mx.nc'
+
+# final list of files depends on the activated components - this is used in save_ic as well
+#oas_rst_files="${oas_rst_ifs_nemo} ${oas_rst_ifs_tm5} vegin.nc lpjgv.nc"
+oas_rst_files=""
+has_config ifs nemo && oas_rst_files+=" ${oas_rst_ifs_nemo}"
+has_config ifs lpjg && oas_rst_files+=" ${oas_rst_ifs_lpjg}"
+has_config ifs tm5 && oas_rst_files+=" ${oas_rst_ifs_tm5}"
+
+# Decide whether the OASIS weight files for interpolation should be linked from
+# the setup directory (true) or not (false). In the latter case, the weights
+# are re-computed at the start of the run.
+oas_link_weights=true
+
+# Flux correction for runoff (not calving) sent from Oasis to ocean.
+# 1.07945 is computed to compensate for a P-E=-0.016 mm/day (valid for std res)
+case "${ifs_grid}" in
+    T159L* ) has_config nemo && oas_mb_fluxcorr=1.08652 ;;
+    * ) has_config nemo && oas_mb_fluxcorr=1.07945 ;;
+esac
+
+# -----------------------------------------------------------------------------
+# *** XIOS configuration
+# -----------------------------------------------------------------------------
+
+xio_exe_file=${ecearth_src_dir}/xios-2.5/bin/xios_server.exe
+
+xio_numproc=[[[MOD:XIO:NUMPROC]]]
+
+# -----------------------------------------------------------------------------
+# *** Extra initial conditions saved during the run
+# -----------------------------------------------------------------------------
+if has_config save_ic
+then
+    source ./libsave_ic.sh
+    declare -a save_ic_date save_ic_date1 save_ic_sec save_ic_day save_ic_ppt_file save_ic_nemo_ts
+    oas_rst_files="${oas_rst_ifs_nemo} ${oas_rst_ifs_tm5} vegin.nc lpjgv.nc"
+fi
+
+# -----------------------------------------------------------------------------
+# *** Carbon cycle configuration
+# -----------------------------------------------------------------------------
+# set to true to write co2 fluxes sent to TM5
+ccycle_debug_fluxes=true
+
+# =============================================================================
+# *** END of User configuration
+# =============================================================================
+
+# =============================================================================
+# *** This is where the code begins ...
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# *** Create the run dir if necessary and go there
+#     Everything is done from here.
+# -----------------------------------------------------------------------------
+if [ ! -d ${run_dir} ]
+then
+    mkdir -p ${run_dir}
+fi
+cd ${run_dir}
+
+# -----------------------------------------------------------------------------
+# Autosubmit sanity check
+# -----------------------------------------------------------------------------
+CHUNK=%CHUNK%
+if [ -f ece.info ]; then
+  ece_info_leg_number=$(grep leg_number ece.info | tail -n 1 | awk -F"=" '{print $2}')
+  current_leg_number=$((ece_info_leg_number + 1))
+  if [[ "${CHUNK}" != "${current_leg_number}" ]]; then
+    echo "Runscript leg_number" $current_leg_number
+    echo "Don't match with Autosubmit CHUNK" ${CHUNK}
+    exit 1
+  fi
+fi
+
+# -----------------------------------------------------------------------------
+# *** Determine the time span of this run and whether it's a restart leg
+# -----------------------------------------------------------------------------
+
+# Regularise the format of the start and end date of the simulation
+run_start_date=$(date -uR -d "${run_start_date}")
+run_end_date=$(date -uR -d "${run_end_date}")
+
+
+# -----------------------------------------------------------------------------
+# *** Set path to grib_set
+# -----------------------------------------------------------------------------
+
+grib_set=${GRIB_BIN_PATH}${GRIB_BIN_PATH:+/}grib_set
+
+# Loop over the number of legs
+for (( ; run_num_legs>0 ; run_num_legs-- ))
+do
+
+    # Check for restart information file and set the current leg start date
+    #   Ignore restart information file if force_run_from_scratch is true
+    if ${force_run_from_scratch} || ! [ -r ${ece_info_file} ]
+    then
+        leg_is_restart=false
+        leg_start_date=${run_start_date}
+        leg_number=1
+    else
+        leg_is_restart=true
+        . ./${ece_info_file}
+        leg_start_date=${leg_end_date}
+        leg_number=$((leg_number+1))
+    fi
+
+    # Compute the end date of the current leg
+    if [ -n "${rst_freq}" ]
+    then
+        leg_end_date=$(date -uR -d "${leg_start_date} + ${rst_freq}")
+    else
+        leg_end_date=${run_end_date}
+    fi
+
+    # Check if legs are integer multiples of full years if LPJG is used
+    if has_config lpjg
+    then
+        
+        if [[ $(date +%m%d%T -u -d "${leg_start_date}") != "010100:00:00" || \
+            $(date +%m%d%T -u -d "${leg_start_date} + ${rst_freq}") != "010100:00:00" ]]
+        then
+            error "LPJ-GUESS runs must start on Jan 1 and end on Dec 31. Multi-year legs are allowed."
+        fi
+    fi              
+
+    if [[ "%Chunk_LAST%" == "TRUE" ]]
+    then
+        leg_end_date=${run_end_date}
+        ifs_lastout=true
+    fi
+
+    # Some time variables needed later
+    leg_length_sec=$(( $(date -u -d "${leg_end_date}" +%s) - $(date -u -d "${leg_start_date}" +%s) ))
+    leg_start_sec=$(( $(date -u -d "${leg_start_date}" +%s) - $(date -u -d "${run_start_date}" +%s) ))
+    leg_end_sec=$(( $(date -u -d "${leg_end_date}" +%s) - $(date -u -d "${run_start_date}" +%s) ))
+    leg_start_date_yyyymmdd=$(date -u -d "${leg_start_date}" +%Y%m%d)
+    leg_start_date_yyyy=$(date -u -d "${leg_start_date}" +%Y)
+    leg_end_date_yyyy=$(date -u -d "${leg_end_date}" +%Y)
+
+    # Check whether there's actually time left to simulate - exit otherwise
+    if [ ${leg_length_sec} -le 0 ]
+    then
+        info "Leg start date equal to or after end of simulation."
+        info "Nothing left to do. Exiting."
+        exit 0
+    fi
+
+    # Initial conditions saved during the run
+    do_save_ic=false
+    save_ic_custom=false
+    has_config save_ic && save_ic_get_config
+    # if you do not use an option with save_ic, you must define 'do_save_ic' and
+    # 'save_ic_date_offset' here or in ../libsave_ic.sh/save_ic_get_config()
+    # with AS runtime, no need to edit the script, set SAVE_IC_OFFSET (and optionally SAVE_IC_COND)
+    if $save_ic_custom
+    then
+        [[ "%SAVE_IC_COND%" = "" ]] && save_ic_cond=true || save_ic_cond='%SAVE_IC_COND%'
+        if eval $save_ic_cond ; then do_save_ic=true ; else do_save_ic=false ; fi
+        save_ic_date_offset=( %SAVE_IC_OFFSET% )
+    fi
+    ${do_save_ic} && save_ic_define_vars
+
+    # -------------------------------------------------------------------------
+    # *** Prepare the run directory for a run from scratch
+    # -------------------------------------------------------------------------
+    if ! $leg_is_restart
+    then
+        # ---------------------------------------------------------------------
+        # *** Check if run dir is empty. If not, and if we are allowed to do so
+        #     by ${force_run_from_scratch}, remove everything
+        # ---------------------------------------------------------------------
+        if $(ls * >& /dev/null)
+        then
+            if ${force_run_from_scratch}
+            then
+                rm -fr ${run_dir}/*
+            else
+                error "Run directory not empty and \$force_run_from_scratch not set."
+            fi
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Copy executables of model components
+        # *** Additionally, create symlinks to the original place for reference
+        # ---------------------------------------------------------------------
+        cp    ${ifs_exe_file} .
+        ln -s ${ifs_exe_file} $(basename ${ifs_exe_file}).lnk
+
+        if $(has_config amip)
+        then
+            cp    ${amip_exe_file} .
+            ln -s ${amip_exe_file} $(basename ${amip_exe_file}).lnk
+        fi
+
+        if $(has_config nemo)
+        then
+            cp    ${nem_exe_file} .
+            ln -s ${nem_exe_file} $(basename ${nem_exe_file}).lnk
+
+            cp    ${rnf_exe_file} .
+            ln -s ${rnf_exe_file} $(basename ${rnf_exe_file}).lnk
+
+            cp    ${xio_exe_file} .
+            ln -s ${xio_exe_file} $(basename ${xio_exe_file}).lnk
+        fi
+
+        if $(has_config lpjg)
+        then
+            cp    ${lpjg_exe_file} .
+            ln -s ${lpjg_exe_file} $(basename ${lpjg_exe_file}).lnk
+        fi
+
+        if $(has_config tm5)
+        then
+            cp    ${tm5_exe_file} .
+            ln -s ${tm5_exe_file} $(basename ${tm5_exe_file}).lnk
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for IFS (linked)
+        # ---------------------------------------------------------------------
+
+        # Initial data
+        ln -s \
+        ${ini_data_dir}/ifs/${ifs_grid}/${leg_start_date_yyyymmdd}/ICMGGECE3INIUA \
+                                                            ICMGG${exp_name}INIUA
+        ln -s \
+        ${ini_data_dir}/ifs/${ifs_grid}/${leg_start_date_yyyymmdd}/ICMSHECE3INIT \
+                                                            ICMSH${exp_name}INIT
+        rm -f ICMGG${exp_name}INIT
+        cp ${ini_data_dir}/ifs/${ifs_grid}/${leg_start_date_yyyymmdd}/ICMGGECE3INIT \
+                                                            ICMGG${exp_name}INIT
+
+        # add bare_soil_albedo to ICMGG*INIT
+        tempfile=tmp.$$
+        ${grib_set} -s dataDate=$(date -u -d "$run_start_date" +%Y%m%d) \
+            ${ini_data_dir}/ifs/${ifs_grid}/climate/bare_soil_albedos.grb \
+            ${tempfile}
+
+        cat ${tempfile} >> ICMGG${exp_name}INIT
+        rm -f ${tempfile}
+
+        # add land ice mask if needed
+        if ${ifs_landice}
+        then
+            tempfile=tmp.$$
+            cdo divc,10 -setcode,82 -selcode,141 ICMGG${exp_name}INIT ${tempfile}
+            ${grib_set} -s gridType=reduced_gg ${tempfile} ${tempfile}
+            cat ${tempfile} >> ICMGG${exp_name}INIT
+            rm -f ${tempfile}
+        fi
+
+        # Other stuff
+        ln -s ${ini_data_dir}/ifs/rtables/* .
+      
+        if $(has_config atmnudg) ; then
+            ln -s ${ini_data_dir}/rlxml* .
+        fi
+        
+        # Output control (ppt files)
+        if [ ! -f ${output_control_files_dir}/pptdddddd0600 ] &&  [ ! -f ${output_control_files_dir}/pptdddddd0300 ];then
+           echo "Error from ece-esm.sh: Neither the file pptdddddd0600 or pptdddddd0300 exists in the directory:"
+           echo " " ${output_control_files_dir}
+           exit -1
+        fi
+        mkdir postins
+        cp ${output_control_files_dir}/ppt* postins/
+        if [ -f postins/pptdddddd0600 ];then
+           ln -s pptdddddd0600 postins/pptdddddd0000
+           ln -s pptdddddd0600 postins/pptdddddd1200
+           ln -s pptdddddd0600 postins/pptdddddd1800
+        fi
+        if [ -f postins/pptdddddd0300 ];then
+           ln -s pptdddddd0300 postins/pptdddddd0900
+           ln -s pptdddddd0300 postins/pptdddddd1500
+           ln -s pptdddddd0300 postins/pptdddddd2100
+           if [ ! -f postins/pptdddddd0600 ];then
+               ln -s pptdddddd0300 postins/pptdddddd0000
+               ln -s pptdddddd0300 postins/pptdddddd0600
+               ln -s pptdddddd0300 postins/pptdddddd1200
+               ln -s pptdddddd0300 postins/pptdddddd1800
+           fi
+        fi
+        /bin/ls -1 postins/* > dirlist
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for LPJ-GUESS
+        # ---------------------------------------------------------------------
+        if $(has_config lpjg)
+        then
+            # Check for valid grid
+            if [ $lpjg_res != "T255" -a $lpjg_res != "T159" ]
+            then
+                error "LPJG-gridlist doesn't exist for ifs-grid: ${ifs_grid}" 
+            fi
+            # Initial data - saved state for LPJ-GUESS (.bin format)
+            lpjgstartdir=$(printf "lpjg_state_%04d" $leg_start_date_yyyy)
+            ln -sf ${ini_data_dir}/lpjg/ini_state/${lpjg_res}/${lpjgstartdir} ${run_dir}/${lpjgstartdir}
+
+            # Control files (i.e. .ins, landuse, N deposition, soil type files etc.)
+            cp  -f ${ecearth_src_dir}/lpjg/data/ins/*.ins .
+            # activate the new litterfall scheme for C4MIP - for the coupled model this is done when both pisces and lpjg are activated
+            has_config pisces lpjg && echo -e "!override for EC-Earth-CC in runscript\nifpftlitterfall 1\ncalc_phen_after_restart 0" >> global.ins
+            mkdir -p ${run_dir}/landuse
+
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for NEMO (linked)
+        # ---------------------------------------------------------------------
+        if $(has_config nemo)
+        then
+            # Link initialisation files for matching ORCA grid
+            for f in \
+                bathy_meter.nc coordinates.nc \
+                ahmcoef.nc \
+                K1rowdrg.nc M2rowdrg.nc mask_itf.nc \
+                decay_scale_bot.nc decay_scale_cri.nc \
+                mixing_power_bot.nc mixing_power_cri.nc mixing_power_pyc.nc \
+                runoff_depth.nc subbasins.nc
+            do
+                [ -f ${ini_data_dir}/nemo/initial/${nem_grid}/$f ] && ln -s ${ini_data_dir}/nemo/initial/${nem_grid}/$f
+            done
+
+            # Copying the time independent NEMO files for the matching ORCA grid in order to facilitate cmorisation:
+            for f in \
+                bathy_meter.nc subbasins.nc
+            do
+                mkdir -p output/nemo/ofx-data
+                [ -f ${ini_data_dir}/nemo/initial/${nem_grid}/$f ] && cp -f ${ini_data_dir}/nemo/initial/${nem_grid}/$f output/nemo/ofx-data/
+            done
+
+            # Link geothermal heating file (independent of grid) and matching weight file
+            ln -s ${ini_data_dir}/nemo/initial/Goutorbe_ghflux.nc
+            ln -s ${ini_data_dir}/nemo/initial/weights_Goutorbe1_2_orca${nem_res_hor}_bilinear.nc
+
+            # Link the salinity climatology file (needed for diagnostics)
+            ln -s ${ini_data_dir}/nemo/climatology/${nem_grid}/sali_ref_clim_monthly.nc
+
+            # Link either restart files or climatology files for the initial state
+            if $(has_config nemo:start_from_restart)
+            then
+                # When linking restart files, we accept three options:
+                # (1) Merged files for ocean and ice, i.e.
+                #     restart_oce.nc and restart_ice.nc
+                # (2) One-file-per-MPI-rank, i.e.
+                #     restart_oce_????.nc and restart_ice_????.nc
+                #     No check is done whether the number of restart files agrees
+                #     with the number of MPI ranks for NEMO!
+                # (3) One-file-per-MPI-rank with a prefix, i.e.
+                #     <exp_name>_<time_step>_restart_oce_????.nc (similar for the ice)
+                #     The prefix is ignored.
+                # The code assumes that one of the options can be applied! If more
+                # options are applicable, the first is chosen. If none of the
+                # options apply, NEMO will crash with missing restart file.
+                if   ls -U ${nem_restart_file_path}/restart_[oi]ce.nc > /dev/null 2>&1
+                then
+                    ln -s ${nem_restart_file_path}/restart_[oi]ce.nc ./
+
+                elif ls -U ${nem_restart_file_path}/restart_[oi]ce_????.nc > /dev/null 2>&1
+                then
+                    ln -s ${nem_restart_file_path}/restart_[oi]ce_????.nc ./
+
+                else
+                    for f in ${nem_restart_file_path}/????_????????_restart_[oi]ce_????.nc
+                    do
+                        ln -s $f $(echo $f | sed 's/.*_\(restart_[oi]ce_....\.nc\)/\1/')
+                    done
+                fi
+            else
+
+                # Temperature and salinity files for initialisation
+                ln -s ${ini_data_dir}/nemo/climatology/absolute_salinity_WOA13_decav_Reg1L75_clim.nc
+                ln -s ${ini_data_dir}/nemo/climatology/conservative_temperature_WOA13_decav_Reg1L75_clim.nc
+                ln -s ${ini_data_dir}/nemo/climatology/weights_WOA13d1_2_orca${nem_res_hor}_bilinear.nc
+
+                # Grid dependent runoff files
+                case ${nem_grid} in
+                    ORCA1*)   ln -s ${ini_data_dir}/nemo/climatology/runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc ;;
+                    ORCA025*) ln -s ${ini_data_dir}/nemo/climatology/ORCA_R025_runoff_v1.1.nc ;;
+                esac
+            fi
+
+            # for ocean_nudging
+            if $(has_config nemo:ocenudg) ; then
+                ln -s ${ini_data_dir}/nemo/oce_nudg/resto.nc
+            fi
+
+            # XIOS files
+            . ${ctrl_file_dir}/iodef.xml.sh > iodef.xml
+            ln -s ${ctrl_file_dir}/context_nemo.xml
+            ln -s ${ctrl_file_dir}/domain_def_nemo.xml
+            ln -s ${ctrl_file_dir}/axis_def_nemo.xml
+            ln -s ${ctrl_file_dir}/grids_def_nemo.xml
+            ln -s ${ctrl_file_dir}/field_def_nemo-lim.xml
+            ln -s ${ctrl_file_dir}/field_def_nemo-opa.xml
+            ln -s ${ctrl_file_dir}/field_def_nemo-pisces.xml
+            ln -s ${ctrl_file_dir}/field_def_nemo-inerttrc.xml
+            ln -s ${output_control_files_dir}/file_def_nemo-lim3.xml file_def_nemo-lim.xml
+            ln -s ${output_control_files_dir}/file_def_nemo-opa.xml
+            ln -s ${output_control_files_dir}/file_def_nemo-pisces.xml
+
+            if [ -f ${ini_data_dir}/xios/ORCA${nem_res_hor}/coordinates_xios.nc ]
+            then
+                cp ${ini_data_dir}/xios/ORCA${nem_res_hor}/coordinates_xios.nc ./
+            else
+                info "File 'coordinates_xios.nc' not found. NEMO can not be run with land domain removal!"
+            fi
+
+            # Files needed for TOP/PISCES
+            if $(has_config pisces)
+            then
+                ln -fs ${ini_data_dir}/nemo/pisces/dust_INCA_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/ndeposition_Duce_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/pmarge_etopo_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/river_global_news_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/Solubility_T62_Mahowald_ORCA_R1.nc
+
+                ln -fs ${ini_data_dir}/nemo/pisces/par_fraction_gewex_clim90s00s_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/DIC_GLODAP_annual_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/Alkalini_GLODAP_annual_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/O2_WOA2009_monthly_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/PO4_WOA2009_monthly_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/Si_WOA2009_monthly_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/DOC_PISCES_monthly_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/Fer_PISCES_monthly_ORCA_R1.nc
+                ln -fs ${ini_data_dir}/nemo/pisces/NO3_WOA2009_monthly_ORCA_R1.nc
+
+                # create co2 concentration file atcco2.txt if required
+                if { [ $ifs_cmip_fixyear -gt 0 ] || [[ "${ifs_A4xCO2}" = "TRUE" ]]; } && [[ "${bgc_1PCTCO2}" = "FALSE" ]]
+                then
+                    rm -f atcco2.txt
+                elif [[ "${bgc_1PCTCO2}" = "TRUE" ]]
+                then
+                    cp -f ${ini_data_dir}/nemo/pisces/mole-fraction-of-carbon-dioxide-in-air_1pctCO2_1849-2016.txt atcco2.txt
+                else
+                    # determine scenario-name and co2-file middle-fix
+                    case $(echo ${ifs_cmip6_scenario} | tr '[:upper:]' '[:lower:]') in
+                        hist*)     pis_scen="ssp585"; pis_sco2_mfix="REMIND-MAGPIE-ssp585-1-2-1";;
+                        ssp2-4.5*) pis_scen="ssp245"; pis_sco2_mfix="MESSAGE-GLOBIOM-ssp245-1-2-1";;
+                        ssp5-3.4*) pis_scen="ssp534os"; pis_sco2_mfix="REMIND-MAGPIE-ssp534-over-1-2-1";;
+                        ssp5-8.5*) pis_scen="ssp585"; pis_sco2_mfix="REMIND-MAGPIE-ssp585-1-2-1";;
+                        *)  error "Scenario ${ifs_cmip6_scenario} not defined for PISCES" ;;
+                    esac
+
+                    # concatenate historic and scenario (2015+) co2 concentration file
+                    pis_sco2_pfix="${ini_data_dir}/nemo/pisces/mole-fraction-of-carbon-dioxide-in-air_input4MIPs_GHGConcentrations"
+                    cat ${pis_sco2_pfix}_CMIP_UoM-CMIP-1-2-0_gr1-GMNHSH_1849-2014.txt ${pis_sco2_pfix}_ScenarioMIP_UoM-${pis_sco2_mfix}_gr1-GMNHSH_2015-2500.txt > atcco2.txt
+                fi
+            fi
+
+            #linking surface boundary conditions for CFCs (even if CFCs are not included)
+            ln -fs ${ini_data_dir}/nemo/cfc/CFCs_CDIAC_extension_1637_2019.dat CFCs_CDIAC.dat
+
+            if $(has_config pisces:start_from_restart)
+            then
+            # Same three options as for nemo:start_from_restart
+                if   ls -U ${nem_restart_file_path}/restart_trc.nc > /dev/null 2>&1
+                then
+                    ln -s ${nem_restart_file_path}/restart_trc.nc ./
+
+                elif ls -U ${nem_restart_file_path}/restart_trc_????.nc > /dev/null 2>&1
+                then
+                    ln -s ${nem_restart_file_path}/restart_trc_????.nc ./
+
+                else
+                    for f in ${nem_restart_file_path}/????_????????_restart_trc_????.nc
+                    do
+                        ln -s $f $(echo $f | sed 's/.*_\(restart_trc_....\.nc\)/\1/')
+                    done
+                fi
+            fi
+
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for the Runoff mapper (linked)
+        # ---------------------------------------------------------------------
+
+        has_config rnfmapper && \
+            ln -s ${ini_data_dir}/runoff-mapper/runoff_maps.nc
+
+        # -------------------------------------------------------------------------
+        # *** File and dir needed for TM5
+        # -------------------------------------------------------------------------
+        if $(has_config tm5)
+        then
+            tm5_istart=[[[MOD:TM5:ISTART]]]
+
+            case ${tm5_istart} in
+                33|32) ln -s \
+                    ${tm5_restart_file_path}/TM5_restart_${leg_start_date_yyyymmdd}_0000_glb300x200.nc
+                    ;;
+                31) ln -s ${tm5_restart_file_path}/tm5_save.hdf
+                    ;;
+                5)  ln -s ${tm5_restart_file_path}/tm5_mmix.hdf
+                    ;;
+                2|9) 
+                    ;;
+                *)  error "Unsupported initial fields option (TM5): ${tm5_istart}"
+                    ;;
+            esac
+
+            # spectral info
+            ln -s ${ini_data_dir}/tm5/TM5_INPUT/T${ifs_res_hor}_info.txt
+
+            # Profiling dir for TM5
+            mkdir -p ${run_dir}/tm5_profile
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for OASIS (linked)
+        # ---------------------------------------------------------------------
+
+        # Name table file
+        ln -s ${ini_data_dir}/oasis/cf_name_table.txt
+
+        # -- Get grid definition and weight files for IFS/NEMO or IFS/AMIP coupling
+        has_config nemo && \
+            oas_grid_dir=${ini_data_dir}/oasis/T${ifs_res_hor}-ORCA${nem_res_hor} && \
+            mycp='cp'
+
+        has_config amip && \
+            oas_grid_dir=${ini_data_dir}/oasis/AMIP && \
+            mycp='cdo -f nc copy' # to enforce nc format, needed for 'cdo merge' to work (have nc4c with Primavera files)
+
+        # Grid definition files
+        if $(has_config tm5)
+        then
+            ${mycp} ${oas_grid_dir}/areas.nc gcm_areas.nc
+            ${mycp} ${oas_grid_dir}/grids.nc gcm_grids.nc
+            ${mycp} ${oas_grid_dir}/masks.nc gcm_masks.nc
+        else
+            ln -s ${oas_grid_dir}/areas.nc
+            ln -s ${oas_grid_dir}/grids.nc
+            ln -s ${oas_grid_dir}/masks.nc
+        fi
+
+        # Weight files
+        case ${ifs_res_hor} in
+            159)  oas_agrd=080
+                  ;;
+            255)  oas_agrd=128
+                  ;;
+            511)  oas_agrd=256
+                  ;;
+            799)  oas_agrd=400
+                  ;;
+            *)    error "Unsupported horizontal resolution (IFS): ${ifs_res_hor}"
+                  ;;
+        esac
+
+        if $(has_config nemo)
+        then
+            case ${nem_res_hor} in
+                1)  oas_ogrd=O1t0
+                    ;;
+                025)  oas_ogrd=Ot25
+                    ;;
+                *)  error "Unsupported horizontal resolution (NEMO): ${nem_res_hor}"
+                    ;;
+            esac
+        fi
+
+        if ${oas_link_weights}
+        then
+            for f in ${oas_grid_dir}/rmp_????_to_????_GAUSWGT.nc
+            do
+                ln -s $f
+            done
+        fi
+
+        if $(has_config ifs nemo)
+        then
+            for f in ${oas_rst_ifs_nemo}
+            do
+                cp ${oas_grid_dir}/rst/$f .
+            done
+        fi
+
+        # -- Get grid definition, weight and restart files for TM5 coupling
+        if $(has_config tm5)
+        then
+            oas_grid_dir=${ini_data_dir}/oasis/T${ifs_res_hor}-TM5-LPJG
+
+            cp ${oas_grid_dir}/tm5_areas.nc .
+            cp ${oas_grid_dir}/tm5_grids.nc .
+            cp ${oas_grid_dir}/tm5_masks.nc .
+
+            if ${oas_link_weights}
+            then
+                for f in ${oas_grid_dir}/rmp_????_to_????_*.nc
+                do
+                    ln -s $f
+                done
+            fi
+
+            # -- Get restart files for TM5-IFS/LPJG/PISCES 
+            for f in ${oas_rst_ifs_tm5}
+            do
+                cp ${oas_grid_dir}/rst/${tm5_exch_nlevs}-levels/$f .
+            done
+
+            # -- Merge grid definition files
+            cdo merge gcm_areas.nc tm5_areas.nc areas.nc
+            cdo merge gcm_grids.nc tm5_grids.nc grids.nc
+            cdo merge gcm_masks.nc tm5_masks.nc masks.nc
+        fi
+
+    else # i.e. $leg_is_restart == true
+
+        # ---------------------------------------------------------------------
+        # *** Remove all leftover output files from previous legs
+        # ---------------------------------------------------------------------
+
+        # IFS files
+        rm -f ICM{SH,GG}${exp_name}+??????
+
+        # NEMO files
+        rm -f ${exp_name}_??_????????_????????_{grid_U,grid_V,grid_W,grid_T,icemod,SBC,scalar,SBC_scalar,diad_T}.nc
+
+        # TM5 restart file type
+        tm5_istart=33
+
+        if [ $tm5_istart -eq 31 ] && $(has_config tm5)
+        then
+            ln -sf save_${leg_start_date_yyyymmdd}00_glb300x200.hdf tm5_save.hdf
+        fi
+
+    fi # ! $leg_is_restart
+
+    #--------------------------------------------------------------------------
+    # *** Surface restoring and ocean nudging options
+    #--------------------------------------------------------------------------
+    if $(has_config nemo:ocenudg) ; then
+        ln -fs ${ini_data_dir}/nemo/oce_nudg/temp_sal*.nc ./
+    fi
+
+    if $(has_config nemo:surfresto) ; then
+        ln -fs ${ini_data_dir}/nemo/surface_restoring/sss_restore_data*.nc  ./
+        ln -fs ${ini_data_dir}/nemo/surface_restoring/sst_restore_data*.nc  ./
+        ln -fs ${ini_data_dir}/nemo/surface_restoring/mask_restore*.nc ./
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Remove land grid-points
+    # -------------------------------------------------------------------------
+    if $(has_config nemo:elpin)
+    then
+        if [ ! -f coordinates_xios.nc ]
+        then
+            error "ELpIN requested, but file 'coordinates_xios.nc' was not found"
+        fi
+        jpns=($(${ecearth_src_dir}/util/ELPiN/ELPiNv2.cmd ${nem_numproc}))
+        info "nemo domain decompostion from ELpIN: ${jpns[@]}"
+        nem_numproc=${jpns[0]}
+        nem_jpni=${jpns[1]}
+        nem_jpnj=${jpns[2]}
+    elif has_config nemo
+    then
+        info "nemo original domain decomposition (not using ELPiN)"
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Initial conditions saved during the run
+    # -------------------------------------------------------------------------
+    ${do_save_ic} && save_ic_prepare_output
+
+    # -------------------------------------------------------------------------
+    # *** Create some control files
+    # -------------------------------------------------------------------------
+
+    # Create TM5 runtime rcfile
+    tm5_start_date=$(date -u -d "${leg_start_date}" +%F\ %T)
+    tm5_end_date=$(date -u -d "${leg_end_date}" +%F\ %T)
+
+    if $(has_config tm5)
+    then
+        cp -f ${ctrl_file_dir}/tm5-config-run.rc ${run_dir}
+        ${ecearth_src_dir}/tm5mp/setup_tm5 --no-compile \
+            --time-start="${tm5_start_date}" --time-final="${tm5_end_date}" \
+            --istart=${tm5_istart} ${run_dir}/tm5-config-run.rc
+    fi
+
+    # IFS frequency output for namelist
+    if [ -f postins/pptdddddd0300 ]
+    then
+        ifs_output_freq=$(( 3 * 3600 / ifs_time_step_sec ))
+    elif [ -f postins/pptdddddd0600 ]
+    then
+        ifs_output_freq=$(( 6 * 3600 / ifs_time_step_sec ))
+    else
+        error "IFS output frequency undefined."
+    fi
+
+    # IFS, NEMO, LIM, AMIP namelist and OASIS namcouple files
+    has_config ifs       && . ${ctrl_file_dir}/namelist.ifs.sh                          > fort.4
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.ref.sh                     > namelist_ref
+    has_config ifs nemo  && . ${ctrl_file_dir}/namelist.nemo-${nem_grid}-coupled.cfg.sh > namelist_cfg
+    has_config lim3      && . ${ctrl_file_dir}/namelist.lim3.ref.sh                     > namelist_ice_ref
+    has_config lim3      && . ${ctrl_file_dir}/namelist.lim3-${nem_grid}.cfg.sh         > namelist_ice_cfg
+    has_config rnfmapper && . ${ctrl_file_dir}/namelist.runoffmapper.sh                 > namelist.runoffmapper
+    has_config amip      && . ${ctrl_file_dir}/namelist.amip.sh                         > namelist.amip
+    has_config pisces    && . ${ctrl_file_dir}/namelist.nemo.top.ref.sh                 > namelist_top_ref
+    has_config pisces    && . ${ctrl_file_dir}/namelist.nemo.top.cfg.sh                 > namelist_top_cfg
+    has_config pisces    && . ${ctrl_file_dir}/namelist.nemo.pisces.ref.sh              > namelist_pisces_ref
+    has_config pisces    && . ${ctrl_file_dir}/namelist.nemo.pisces.cfg.sh              > namelist_pisces_cfg
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.age.ref.sh                 > namelist_age_ref
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.age.cfg.sh                 > namelist_age_cfg
+    #include CFCs namelist even if CFCs are not included
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.cfc.ref.sh                 > namelist_cfc_ref
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.cfc.cfg.sh                 > namelist_cfc_cfg
+    # C-cycle - overwrite coupled nemo namelist
+    has_config pisces tm5:co2  && \
+        . ${ctrl_file_dir}/namelist.nemo-${nem_grid}-carboncycle.cfg.sh > namelist_cfg
+
+    lucia=%LUCIA%
+    . ${ctrl_file_dir}/namcouple.sh > namcouple
+
+    # -------------------------------------------------------------------------
+    # *** LPJ-GUESS initial data
+    # -------------------------------------------------------------------------
+    if $(has_config lpjg)
+    then
+        # LPJG runtime rcfile - update with leg dates
+        . ${ctrl_file_dir}/namelist.lpjg.sh > lpjg_steps.rc
+
+        # determine lpjg scenario-name and co2-file middle-fix
+        case $(echo ${ifs_cmip6_scenario} | tr '[:upper:]' '[:lower:]') in
+            hist*)     lpjg_scen="ssp370"; lu_src="AIM"    ; lpjg_sco2_mfix="AIM-ssp370-1-2-1"            ; lu_file_posfix="2018_10_08.txt";;
+            ssp1-1.9*) lpjg_scen="ssp119"; lu_src="IMAGE"  ; lpjg_sco2_mfix="IMAGE-ssp119-1-2-1"          ; lu_file_posfix="2019_03_13.txt";;
+            ssp1-2.6*) lpjg_scen="ssp126"; lu_src="IMAGE"  ; lpjg_sco2_mfix="IMAGE-ssp126-1-2-1"          ; lu_file_posfix="2018_10_08.txt";;
+            ssp2-4.5*) lpjg_scen="ssp245"; lu_src="MESSAGE"; lpjg_sco2_mfix="MESSAGE-GLOBIOM-ssp245-1-2-1"; lu_file_posfix="2018_10_08.txt";;
+            ssp3-7.0*) lpjg_scen="ssp370"; lu_src="AIM"    ; lpjg_sco2_mfix="AIM-ssp370-1-2-1"            ; lu_file_posfix="2018_10_08.txt";;
+            ssp4-3.4*) lpjg_scen="ssp434"; lu_src="GCAM"   ; lpjg_sco2_mfix="GCAM4-ssp434-1-2-1"            ; lu_file_posfix="2018_10_08.txt";;
+            ssp5-3.4*) lpjg_scen="ssp534os"; lu_src="MAGPIE"; lpjg_sco2_mfix="REMIND-MAGPIE-ssp534-over-1-2-1"            ; lu_file_posfix="2019_05_10.txt";;
+            ssp5-8.5*) lpjg_scen="ssp585"; lu_src="MAGPIE" ; lpjg_sco2_mfix="REMIND-MAGPIE-ssp585-1-2-1"  ; lu_file_posfix="2018_10_08.txt";;
+            *)  error "Scenario ${ifs_cmip6_scenario} not defined for LPJ-GUESS" ;;
+        esac
+
+        lpjg_scenario_new="historical + $lpjg_sco2_mfix"
+        lpjg_scenario_info=${run_dir}/lpjg_scenario.info
+
+        if [ -f $lpjg_scenario_info ]
+        then
+            source $lpjg_scenario_info
+            if [ "$lpjg_scenario_new" = "$lpjg_scenario" ]
+            then
+                lpjg_copy_rte=false
+            else
+                lpjg_copy_rte=true
+            fi
+        else
+            lpjg_copy_rte=true
+        fi
+
+        # copy RTE only if necessary (at beginning of a run or when scenario changes)
+        if $lpjg_copy_rte
+        then
+            # write info about installed scenarios to file
+            echo "lpjg_scenario=\"historical + $lpjg_sco2_mfix\"" > $lpjg_scenario_info
+            # set file prefixes depending on scenario
+            lu_file_prefix="1850_2100_luh2_Hist_ScenarioMIP_UofMD"
+            lu_file_midfix="2_1_f"
+
+            lu_path="${ini_data_dir}/lpjg/landuse/${lpjg_res}/${lpjg_scen}"
+
+            # copy and reference-link landuse,  gross transitions, crops, n-fertilisation
+            for inp in lu gross crop nfert
+            do
+                if [ $inp == "crop" -o $inp == "nfert" ]
+                then
+                    lu_src_file="${lu_path}/${inp}_rfirr_${lu_file_prefix}_${lu_src}_${lpjg_scen}_${lu_file_midfix}_${lpjg_res}_${lu_file_posfix}"
+                else
+                    lu_src_file="${lu_path}/${inp}_${lu_file_prefix}_${lu_src}_${lpjg_scen}_${lu_file_midfix}_${lpjg_res}_${lu_file_posfix}"
+                fi
+                cp -f $lu_src_file ${run_dir}/landuse/${inp}_luh2.txt
+                ln -fs $lu_src_file ${run_dir}/landuse/${inp}_luh2.txt.lnk
+            done
+            
+            # nitrogen deposition files
+            mkdir -p ${run_dir}/ndep
+            for inp in drynhx2 drynoy2 wetnhx2 wetnoy2
+            do
+                ndep_src_file="${ini_data_dir}/lpjg/ndep/${lpjg_res}/${lpjg_scen}/${lpjg_scen}_${lpjg_res}_${inp}.nc"
+                cp -f  $ndep_src_file ${run_dir}/ndep/${inp}.nc
+                ln -fs  $ndep_src_file ${run_dir}/ndep/${inp}.nc.lnk
+            done
+
+            # concatenate historic and scenario (2015+) co2 concentration file
+            # hist co2 file 
+            lpjg_hco2_file="${ini_data_dir}/ifs/cmip6-data/mole-fraction-of-carbon-dioxide-in-air_input4MIPs_GHGConcentrations_CMIP_UoM-CMIP-1-2-0_gr1-GMNHSH_0000-2014.nc"
+            # scenario co2 file 
+            lpjg_sco2_file="${ini_data_dir}/ifs/cmip6-data/mole-fraction-of-carbon-dioxide-in-air_input4MIPs_GHGConcentrations_ScenarioMIP_UoM-${lpjg_sco2_mfix}_gr1-GMNHSH_2015-2500.nc"
+            # combined file
+            lpjg_co2_file="${run_dir}/mole_fraction_of_carbon_dioxide_in_air_input4MIPs_lpjg.nc"
+            rm -f $lpjg_co2_file
+            cdo mergetime $lpjg_hco2_file $lpjg_sco2_file $lpjg_co2_file
+        fi
+
+        # Populate or update LPJG run directories
+        for (( n=1; n<=${lpjg_numproc}; n++ ))
+        do
+            # if run from scratch or number of procs has been extended
+            if ! $leg_is_restart || [ ! -d ${run_dir}/run${n} ]
+            then
+                # Make output directories
+                mkdir -p ${run_dir}/run${n}/output
+
+                # Copy *.ins, lpjg_steps.rc and OASIS-MCT restart files
+                cp ${run_dir}/*.ins ${run_dir}/run${n}
+
+                # Copy output control files
+                cp ${output_control_files_dir}/lpjg_cmip6_output.ins ${run_dir}/run${n}
+                ln -s ${output_control_files_dir}/lpjg_cmip6_output.ins ${run_dir}/run${n}/lpjg_cmip6_output.ins.lnk
+
+                cp ${ini_data_dir}/lpjg/oasismct/ghg*.txt ${run_dir}/run${n}
+                cp ${ini_data_dir}/lpjg/oasismct/${lpjg_res}/ece_gridlist_${lpjg_res}.txt ${run_dir}/run${n}/ece_gridlist.txt
+                ln -s ${ini_data_dir}/lpjg/oasismct/${lpjg_res}/ece_gridlist_${lpjg_res}.txt ${run_dir}/run${n}/ece_gridlist.txt.lnk
+
+                # Data only needed by master
+                if [ $n == 1 ]
+                then
+                    cp ${ini_data_dir}/lpjg/oasismct/${lpjg_res}/*.nc ${run_dir}
+                    cp ${ini_data_dir}/lpjg/oasismct/lpjgv.txt ${run_dir}/run${n}
+                fi
+            fi
+            # Refresh output-dirs after they hav been removed at end of the last leg
+            mkdir -p ${run_dir}/run${n}/output/CMIP6
+            mkdir -p ${run_dir}/run${n}/output/CRESCENDO
+        done
+
+        if $leg_is_restart
+        then
+            lpjg_restart_dir="restart/lpjg/$(printf %03d $((leg_number-1)))"
+            lpjg_rst_state="${lpjg_restart_dir}/lpjg_state_${leg_start_date_yyyy}"
+            if [ -d "$lpjg_rst_state" ]
+            then
+                ln -sf $lpjg_rst_state
+            else
+                echo "lpjg restart dir $lpjg_rst_state not available"
+                exit -1
+            fi
+        fi
+    fi
+
+
+    # -------------------------------------------------------------------------
+    # *** Create ICMCL file with vegetation fields
+    #     not needed if LPJG is used with feedback
+    # -------------------------------------------------------------------------
+    tempfile=tmp.$$
+
+    case ${ifs_veg_source} in
+    "ifs" )
+        # Vegetation from IFS (climatology)
+
+        icmclfile=${ini_data_dir}/ifs/${ifs_grid}/climate/ICMCL_ONLY_VEG_PD
+
+        # Create data for december, the year before the leg starts
+        ${grib_set} \
+            -s dataDate=$(printf "%04d" $((leg_start_date_yyyy-1)))1215 \
+            ${icmclfile}-12 ICMCL${exp_name}INIT
+
+        # Create data for all month in the years of the leg
+        for (( y=${leg_start_date_yyyy} ; y<=${leg_end_date_yyyy} ; y++ ))
+        do
+            yy=$(printf "%04d" $y)
+            for m in {1..12}
+            do
+                mm=$(printf "%02d" $m)
+                ${grib_set} -s dataDate=${yy}${mm}15 ${icmclfile}-${mm} ${tempfile}
+                cat ${tempfile} >> ICMCL${exp_name}INIT
+            done
+        done
+
+        # Create data for january, the year after the leg ends
+        ${grib_set} \
+            -s dataDate=$(printf "%04d" $((leg_end_date_yyyy+1)))0115 \
+            ${icmclfile}-01 ${tempfile}
+        cat ${tempfile} >> ICMCL${exp_name}INIT
+        ;;
+    "era20c"|"cmip6"|"custom_"* )
+        # Vegetation from a LPJG run (off-line or EC-Earth3-Veg)
+
+        rm -f ICMCL${exp_name}INIT
+
+        # Create data for all years of the leg, including one year
+        # before and one year after
+        for (( yr=leg_start_date_yyyy-1 ; yr<=leg_end_date_yyyy+1 ; yr+=1 ))
+        do
+
+            case ${ifs_veg_source} in
+            'era20c' )
+                # no scenario needed with era20c
+                icmcl_scenario="" ;;
+            'custom_'* )
+                # no scenario implemented yet with custom_dir
+                icmcl_scenario="" ;;
+            'cmip6' )
+                # select scenario, use SSP3-7.0 as default
+                # if not otherwise specified
+                icmcl_scenario="historical"
+                if ( [ $ifs_cmip_fixyear -le 0 ] && [ $yr -ge 2015 ] ) || \
+                     [ $ifs_cmip_fixyear -ge 2015 ]
+                then
+                    [[ ${ifs_cmip6_scenario} =~ ^SSP ]] \
+                        && icmcl_scenario=${ifs_cmip6_scenario} \
+                        || if [ ${ifs_covid19}  == TRUE ]
+                           then
+                               icmcl_scenario='SSP2-4.5'
+                           else
+                               icmcl_scenario='SSP3-7.0'
+                           fi
+                fi ;;
+            esac
+            
+            if [ $ifs_cmip_fixyear -le 0 ] || [[ ${ifs_veg_source} == custom_* ]]
+            then
+                cat ${ini_data_dir}/ifs/${ifs_grid}/icmcl_${veg_version}/${icmcl_scenario}/icmcl_$yr.grb >> ICMCL${exp_name}INIT
+            else
+                # Fixed year forcing, requires cdo! (only when not using ifs_veg_source=custom_exp*)
+                # If cdo is not available at runtime you need to fix proper
+                # icmcl files beforehand and use them here
+                cdo setyear,$yr ${ini_data_dir}/ifs/${ifs_grid}/icmcl_${veg_version}/${icmcl_scenario}/icmcl_${ifs_cmip_fixyear}.grb ${tempfile}
+                cat ${tempfile} >> ICMCL${exp_name}INIT
+            fi
+        done
+        ;;
+    "none" )
+        info "no ICMCL file is created"
+        ;;
+    * )
+        error "Vegetation from ${ifs_veg_source} not implemented"
+        ;;
+    esac
+
+    # Clean up
+    rm -f ${tempfile}
+
+    # -------------------------------------------------------------------------
+    # *** Link the appropriate NEMO restart files of the previous leg
+    # -------------------------------------------------------------------------
+    if $leg_is_restart && $(has_config nemo)
+    then
+        ns=$(printf %08d $(( leg_start_sec / nem_time_step_sec - nem_restart_offset )))
+        for (( n=0 ; n<nem_numproc ; n++ ))
+        do
+            np=$(printf %04d ${n})
+            ln -fs ${exp_name}_${ns}_restart_oce_${np}.nc restart_oce_${np}.nc
+            ln -fs ${exp_name}_${ns}_restart_ice_${np}.nc restart_ice_${np}.nc
+            has_config pisces && \
+                ln -fs ${exp_name}_${ns}_restart_trc_${np}.nc restart_trc_${np}.nc
+        done
+
+        # Make sure there are no global restart files
+        # If links are found, they will be removed. We are cautious and do
+        # _not_ remove real files! However, if real global restart files are
+        # present, NEMO/LIM will stop because time stamps will not match.
+        [ -h restart_oce.nc ] && rm restart_oce.nc
+        [ -h restart_ice.nc ] && rm restart_ice.nc
+        [ -h restart_trc.nc ] && rm restart_trc.nc
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Remove some OASIS files of the previous leg
+    # -------------------------------------------------------------------------
+    if $leg_is_restart
+    then
+        rm -f anaisout_*
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Remove any ccycle debug output files
+    # -------------------------------------------------------------------------
+    if ${ccycle_debug_fluxes} && $leg_is_restart && $(has_config tm5:co2)
+    then
+      if $(has_config lpjg)
+      then
+          rm -f GUE_{CNAT,CANT,CNPP}_*.nc run1/GUE_{CNAT,CANT,CNPP}_*.nc
+          rm -f TM5_Land{CNAT,CANT,CNPP}_*.nc
+      fi
+      if $(has_config pisces)
+      then
+          rm -f O_CO2FLX_*.nc
+          rm -f TM5_OceCFLX_*.nc
+      fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Restart sanity check before launch
+    # -------------------------------------------------------------------------
+    # This code must run before launch command don't put anything in between
+
+    echo "Restart files sanity check before launch:"
+    if $leg_is_restart  ; then
+      # oasis
+      for oasis_restart_file in $(ls restart/oasis/$(printf %03d $((leg_number)))/*); do
+        [ -n "$( diff $(basename ${oasis_restart_file}) ${oasis_restart_file} -q )" ] && \
+        cp -f ${oasis_restart_file} . || true
+      done
+      # ifs rcf
+      rcf_restart_file=restart/ifs/$(printf %03d $((leg_number)))/rcf
+      [ -n "$(diff $(basename ${rcf_restart_file}) ${rcf_restart_file} -q )" ] && \
+      cp -f ${rcf_restart_file} . || true
+    fi
+    # -------------------------------------------------------------------------
+    # *** End restart sanity check before launch
+    # -------------------------------------------------------------------------
+    # -------------------------------------------------------------------------
+    # *** Start the run
+    # -------------------------------------------------------------------------
+    export DR_HOOK_IGNORE_SIGNALS='-1'
+    export CPLNG='active'
+
+    # Use the launch function from the platform configuration file
+    has_config nemo && \
+        cmd="${xio_numproc} ${xio_exe_file} -- \
+             ${nem_numproc} ${nem_exe_file} -- \
+             ${ifs_numproc} ${ifs_exe_file} -v ecmwf -e ${exp_name}" || \
+        cmd="${ifs_numproc} ${ifs_exe_file} -v ecmwf -e ${exp_name}"
+
+    has_config lpjg && cmd=${cmd}" -- ${lpjg_numproc} ${lpjg_exe_file} guess.ins -parallel"
+    has_config tm5  && cmd=${cmd}" -- ${tm5_numproc}  ${tm5_exe_file} tm5-run.rc"
+    has_config amip && cmd=${cmd}" -- ${amip_numproc} ${amip_exe_file}"
+    has_config nemo && cmd=${cmd}" -- ${rnf_numproc} ${rnf_exe_file}" 
+
+    t1=$(date +%s)
+    launch $cmd
+    t2=$(date +%s)
+
+    tr=$(date -d "0 -$t1 sec + $t2 sec" +%T)
+
+    # -------------------------------------------------------------------------
+    # *** Check for signs of success
+    #     Note the tests provide no guarantee that things went fine! They are
+    #     just based on the IFS, NEMO and TM5 log files. More tests (e.g. checking
+    #     restart files) could be implemented.
+    # -------------------------------------------------------------------------
+
+    # Checking for IFS success
+    if [ -f ifs.stat ]
+    then
+        if [ "$(awk 'END{print $3}' ifs.stat)" == "CNT0" ]
+        then
+            info "Leg successfully completed according to IFS log file 'ifs.stat'."
+        else
+            error "Leg not completed according to IFS log file 'ifs.stat'."
+        fi
+    else
+        error "IFS log file 'ifs.stat' not found after run."
+    fi
+
+    # Check for NEMO success
+    if $(has_config nemo)
+    then
+        if [ -f ocean.output ]
+        then
+            if [ "$(sed -n '/New day/h; ${g;s:.*\([0-9/]\{10\}\).*:\1:;p;}' ocean.output)" == "$(date -u -d "${leg_end_date} - 1 day" +%Y/%m/%d)" ]
+            then
+                info "Leg successfully completed according to NEMO log file 'ocean.output'."
+            else
+                error "Leg not completed according to NEMO log file 'ocean.output'."
+            fi
+        else
+            error "NEMO log file 'ocean.output' not found after run."
+        fi
+    fi
+
+    # Check for TM5 success
+    if $(has_config tm5)
+    then
+        if [ -f tm5.ok ]
+        then
+            info "Leg successfully completed according to existing TM5 file 'tm5.ok'."
+        else
+            error "Leg not completed according to non-existing TM5 file 'tm5.ok'."
+        fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Post-process initial conditions saved during the run if requested
+    # -------------------------------------------------------------------------
+    ${do_save_ic} && save_ic_postproc
+
+    # -------------------------------------------------------------------------
+    # *** Move IFS output files to archive directory
+    # -------------------------------------------------------------------------
+    outdir="output/ifs/$(printf %03d $((leg_number)))"
+    mkdir -p ${outdir}
+
+    prv_leg=$(printf %03d $((leg_number-1)))
+
+    # This takes care of a special IFS feature: The output for the last time
+    # step of each leg is written at the first time step of the new leg. The
+    # following code makes sure that the output is appended to the appropriate
+    # file. Since GRIB files are just streams, its done with a simple cat
+    # command.
+    for f in ICMSH${exp_name}+?????? ICMGG${exp_name}+??????
+    do
+        if [ -f output/ifs/${prv_leg}/${f} ]
+        then
+            cat ${f} >> output/ifs/${prv_leg}/${f}
+            rm -f ${f}
+        else
+            mv ${f} ${outdir}
+        fi
+    done
+
+    # -------------------------------------------------------------------------
+    # *** Move NEMO output files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config nemo)
+    then
+        outdir="output/nemo/$(printf %03d $((leg_number)))"
+        mkdir -p ${outdir}
+
+        for v in grid_U grid_V grid_W grid_T icemod SBC scalar SBC_scalar diad_T ptrc_T bioscalar \
+                 grid_T_2D grid_U_2D grid_V_2D grid_W_2D grid_T_3D grid_U_3D grid_V_3D grid_W_3D \
+                 grid_T_SFC grid_1point grid_T_3D_ncatice vert_sum \
+                 grid_ptr_W_3basin_3D grid_ptr_T_3basin_2D grid_ptr_T_2D \
+                 zoom_700_sum zoom_300_sum zoom_2000_sum
+        do
+            for f in ${exp_name}_*_????????_????????_*${v}.nc
+            do
+                test -f $f && mv $f $outdir/
+            done
+        done
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move LPJ-GUESS output files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config lpjg)
+    then
+        outdir="output/lpjg/$(printf %03d $((leg_number)))"
+        if [ -d ${outdir} ]
+        then
+            rm -rf  ${outdir}
+        fi
+        mkdir -p ${outdir}
+
+        # LPJG run directories
+        # concatenate *.out (or compressed *.out.gz) files from each run* into output dir
+        flist=$(cd ${run_dir}/run1/output && find *.out.gz -type f 2>/dev/null || true)
+        if [ "$flist" = "" ]
+        then
+            lpjg_compress_output=false
+            flist=$(cd ${run_dir}/run1/output && find *.out -type f 2>/dev/null)
+        else
+            lpjg_compress_output=true
+        fi
+
+        mkdir ${outdir}/CMIP6
+
+        for (( n=1; n<=${lpjg_numproc}; n++ ))
+        do
+            for ofile in $flist
+            do
+                if $lpjg_compress_output
+                then
+                    [ $n == 1 ] && gzip -c ${run_dir}/run${n}/output/`basename ${ofile} .gz`.hdr > ${outdir}/$ofile
+                    cat ${run_dir}/run${n}/output/${ofile} >> ${outdir}/$ofile
+                else
+                    if (( n == 1 ))
+                    then
+                        cat ${run_dir}/run${n}/output/${ofile} > ${outdir}/$ofile
+                    else
+                        awk '(FNR!=1){print $0}' ${run_dir}/run${n}/output/${ofile} >> ${outdir}/$ofile
+                    fi
+                fi
+            done
+            rm -rf ${run_dir}/run${n}/output
+        done
+        
+        # move monthly file if available
+        if [ -f ${run_dir}/LPJ-GUESS_monthlyoutput.txt ]
+        then
+            mv ${run_dir}/LPJ-GUESS_monthlyoutput.txt ${outdir}
+        fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move TM5 output files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config tm5)
+    then
+        outdir="output/tm5/$(printf %03d $((leg_number)))"
+        mkdir -p ${outdir}
+
+        set +e
+        mv budget_??????????_??????????_global.hdf      ${outdir}
+        mv j_statistics_??????????_??????????.hdf       ${outdir}
+        mv mmix_??????????_??????????_glb???x???.hdf    ${outdir}
+        mv aerocom?_TM5_*_????????_daily.nc             ${outdir}
+        mv aerocom?_TM5_*_??????_monthly.nc             ${outdir}
+        mv AOD_????_??_??.nc                            ${outdir}
+        mv -f TM5MP_${exp_name}_griddef.nc              ${outdir}
+        mv TM5MP_${exp_name}_TP_????_??_??.nc           ${outdir}
+        mv TM5MP_${exp_name}_vmr3_????_??_??.nc         ${outdir}
+        mv general_TM5_${exp_name}_??????????_hourly.nc ${outdir}
+        mv general_TM5_${exp_name}_??????_monthly.nc    ${outdir}
+        mv *EC-Earth3-*_${exp_name}_*.nc                ${outdir}
+        set -e
+
+        # move profiling files if any
+        if [ "$(ls -A ${run_dir}/tm5_profile)" ]
+        then
+            outdir="output/tm5/profile_$(printf %03d $((leg_number)))"
+            mkdir -p ${outdir}
+
+            for f in ${run_dir}/tm5_profile/*
+            do
+                test -f ${f} && mv $f ${outdir}
+            done
+        fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move IFS restart files to archive directory
+    # -------------------------------------------------------------------------
+    if $leg_is_restart
+    then
+        outdir="restart/ifs/$(printf %03d $((leg_number)))"
+        mkdir -p ${outdir}
+
+        # Figure out the time part of the restart files (cf. CTIME on rcf files)
+        # NOTE: Assuming that restarts are at full days (time=0000) only!
+        nd="$(printf %06d $((leg_start_sec/(24*3600))))0000"
+
+        mv srf${nd}.???? ${outdir}
+
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move ccycle debug output files to archive directory
+    # -------------------------------------------------------------------------
+    if ${ccycle_debug_fluxes} && $(has_config tm5:co2)
+    then
+      outdir="output/tm5/$(printf %03d $((leg_number)))"
+      mkdir -p ${outdir}
+      if $(has_config lpjg)
+      then
+          for f in CNAT CANT CNPP ; do
+              mv TM5_Land${f}_*.nc ${outdir}
+              rm -f GUE_${f}_*.nc run1/GUE_${f}_*.nc
+              #gf=`ls -1 GUE_${f}_*.nc | head -n 1`
+              #cdo mergetime ${gf} run1/${gf} ${outdir}/${gf}
+          done
+      fi
+      if $(has_config pisces)
+      then
+          mv TM5_OceCFLX_*.nc ${outdir}
+          rm -f O_CO2FLX_*.nc
+          #mv O_CO2FLX_*.nc ${outdir}
+      fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move LPJ-GUESS restart files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config lpjg)
+    then
+        outdir="restart/lpjg/$(printf %03d $((leg_number)))"
+        if [ -d ${outdir} ]
+        then
+            rm -rf  ${outdir}
+        fi
+        mkdir -p ${outdir}
+
+        state_dir="./lpjg_state_$(printf %04d $((leg_end_date_yyyy)))"
+        mv ${state_dir} ${outdir}
+        # LPJG writes into run1 dir, so mv to main rundir
+        mv -f run1/lpjgv.nc .
+        has_config tm5:co2 lpjg && mv -f run1/rlpjg.nc .
+
+        # remove restart link
+        if $leg_is_restart
+        then
+            old_state_dir="./lpjg_state_$(printf %04d $((leg_start_date_yyyy)))"
+            if [ -L $old_state_dir ]
+            then
+                rm -f "$old_state_dir"
+            fi
+        fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move NEMO restart files to archive directory
+    # -------------------------------------------------------------------------
+    if $leg_is_restart && $(has_config nemo)
+    then
+        outdir="restart/nemo/$(printf %03d $((leg_number)))"
+        mkdir -p ${outdir}
+
+        ns=$(printf %08d $(( leg_start_sec / nem_time_step_sec - nem_restart_offset )))
+        for f in oce ice
+        do
+            mv ${exp_name}_${ns}_restart_${f}_????.nc ${outdir}
+        done
+
+        if has_config pisces
+        then
+            mv ${exp_name}_${ns}_restart_trc_????.nc ${outdir}
+        fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move TM5 restart file to archive directory
+    # -------------------------------------------------------------------------
+    if $leg_is_restart && $(has_config tm5)
+    then
+        outdir="restart/tm5/$(printf %03d $((leg_number)))"
+        mkdir -p ${outdir}
+
+        case ${tm5_istart} in
+            33|32) f=TM5_restart_${leg_start_date_yyyymmdd}_0000_glb300x200.nc
+                ;;
+            31) f=save_${leg_start_date_yyyymmdd}00_glb300x200.hdf
+                ;;
+        esac
+
+        mv $f ${outdir}
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Copy OASIS restart files to archive directory
+    #     NOTE: These files are copied and not moved as they are used in the
+    #           next leg!
+    #           Note also that the OASIS restart files present at the end of
+    #           the leg correspond to the start of the next leg!
+    # -------------------------------------------------------------------------
+    outdir="restart/oasis/$(printf %03d $((leg_number+1)))"
+    mkdir -p ${outdir}
+
+    for f in ${oas_rst_files}
+    do
+        test -f ${f} && cp ${f} ${outdir}
+    done
+
+    # -------------------------------------------------------------------------
+    # *** Copy rcf files to the archive directory (of the next leg!)
+    # -------------------------------------------------------------------------
+    outdir="restart/ifs/$(printf %03d $((leg_number+1)))"
+    mkdir -p ${outdir}
+
+    for f in rcf
+    do
+        test -f ${f} && cp ${f} ${outdir}
+    done
+
+    # -------------------------------------------------------------------------
+    # *** Move log files to archive directory
+    # -------------------------------------------------------------------------
+    outdir="log/$(printf %03d $((leg_number)))"
+    mkdir -p ${outdir}
+
+    for f in \
+        ifs.log ifs.stat fort.4 ocean.output \
+        time.step solver.stat guess.log run1/guess0.log \
+        amip.log namelist.amip \
+        nout.000000 debug.root.?? debug.??.?????? lucia.??.?????? \
+        ctm.tm5.log.0
+    do
+        test -f ${f} && mv ${f} ${outdir}
+    done
+    has_config pisces && cp ocean.carbon ${outdir}
+
+    for f in ctm.tm5.log.*
+    do
+        if [[ -f ${f} ]]
+        then
+            [[ -s ${f} ]] && mv ${f} ${outdir} || \rm -f ${f}
+        fi
+    done
+
+    # -------------------------------------------------------------------------
+    # *** Write the restart control file
+    # -------------------------------------------------------------------------
+
+    # Compute CPMIP performance
+    sypd="$(cpmip_sypd $leg_length_sec $(($t2 - $t1)))"
+    ncores=0
+    has_config nemo      && (( ncores+=${nem_numproc}  )) || :
+    has_config ifs       && (( ncores+=${ifs_numproc}  )) || :
+    has_config xios      && (( ncores+=${xio_numproc}  )) || :
+    has_config rnfmapper && (( ncores+=${rnf_numproc}  )) || :
+    has_config lpjg      && (( ncores+=${lpjg_numproc} )) || :
+    has_config tm5       && (( ncores+=${tm5_numproc}  )) || :
+    has_config amip      && (( ncores+=${amip_numproc} )) || :
+    chpsy="$(cpmip_chpsy  $leg_length_sec $(($t2 - $t1)) $ncores)"
+
+    echo "#"                                             | tee -a ${ece_info_file}
+    echo "# Finished leg at `date '+%F %T'` after ${tr} (hh:mm:ss)" \
+                                                         | tee -a ${ece_info_file}
+    echo "# CPMIP performance: $sypd SYPD   $chpsy CHPSY"| tee -a ${ece_info_file}
+    echo "leg_number=${leg_number}"                      | tee -a ${ece_info_file}
+    echo "leg_start_date=\"${leg_start_date}\""          | tee -a ${ece_info_file}
+    echo "leg_end_date=\"${leg_end_date}\""              | tee -a ${ece_info_file}
+
+    # Need to reset force_run_from_scratch in order to avoid destroying the next leg
+    force_run_from_scratch=false
+
+done # loop over legs
+
+# -----------------------------------------------------------------------------
+# *** Platform dependent finalising of the run
+# -----------------------------------------------------------------------------
+finalise

+ 1173 - 0
runtime/autosubmit/ece-lsm.sh.tmpl

@@ -0,0 +1,1173 @@
+#!/usr/bin/env bash
+
+set -xuve
+
+cd %CURRENT_ROOTDIR%
+
+# librunscript defines some helper functions
+source ./librunscript.sh
+
+# =============================================================================
+# *** BEGIN User configuration
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# *** General configuration
+# -----------------------------------------------------------------------------
+# Component configuration (for syntax of the $config variable, see librunscript.sh)
+#
+# Currently maintained:
+#     config="osm"               # OSM (Offline Surface Model, H-TESSEL), forced by IFS output or reanalysis data
+#     config="lpjg"              # LPJG-Offline, forced by IFS or OSM output (lpjg_forcing)
+                                 #   In this config lpjg can take the option lpjg:spinup to run an offline spinup
+#     config="lpjg:fdbck osm"    # LPJG & OSM Coupled via OASIS - option lpjg:fdbck is used to feedback on the OSM
+
+#config="lpjg:fdbck osm"
+
+# get config from autosubmit variables
+[[ "%LPJG%" = TRUE ]] && LPJG=TRUE || LPJG=FALSE
+LPJG_CONFIG="%LPJG_CONFIG%" ; [[ -z $LPJG_CONFIG ]] && LPJG_CONFIG="lpjg"
+[[ "%OSM%" = TRUE ]] && OSM=TRUE || OSM=FALSE
+OSM_CONFIG="%OSM_CONFIG%" ; [[ -z $OSM_CONFIG ]] && OSM_CONFIG="osm"
+
+# define which components to use
+if [[ "$LPJG" = TRUE ]]
+then
+    lpjg="$LPJG_CONFIG"
+    config="$lpjg"
+else
+    lpjg=""
+fi
+[[ "$OSM" = TRUE ]] && osm="$OSM_CONFIG" || osm=""
+
+# some special jobs override defaults (AS runtime only)
+TASKTYPE="%TASKTYPE%"
+if [[ "$TASKTYPE" = SPINUP_FORCING ]]
+then
+    # run OSM for 10 years with gswp3/e20c OSM forcings, cmip6 ICMCLs, to generate lpjg_forcing
+    osm="osm:post_run,post_spinup"
+    lpjg=""
+elif [[ "$TASKTYPE" = SPINUP_LPJG ]]
+then
+    # run LPJG in spinup mode using lpjg_forcing from run 1), to generate lpjg_state for 1850
+    osm=""
+    lpjg="lpjg:ioopt,spinup"
+    #if [[ "$OSM_FORCING_TYPE" = "gswp3" ]] ; then
+    #    lpjg="lpjg:ioopt,spinup_gswp3"
+    #else
+    #    exit 1
+fi
+
+config="$lpjg $osm"
+
+# dummy tm5 coupling - co2 ppm + fluxes
+ccycle_co2_init_ppm=0
+oas_rst_ifs_tm5=''
+if has_config lpjg:cc_coup
+then
+    # define initial CO2 concentrations in ppm
+    ccycle_co2_init_ppm=284.32
+    # set to true to write co2 fluxes
+    ccycle_debug_fluxes=true
+    config+=" tm5:co2 cc_coup"
+    export tm5_exch_nlevs=10
+    tm5_time_step_sec=[[[MOD:LPJG:TIME_STEP_SEC]]]
+    oas_rst_ifs_tm5=$oas_rst_ifs_tm5' l_co2.nc rlpjg.nc'
+fi
+
+# minimum sanity
+has_config ifs && error "Cannot have ifs in config"
+has_config nemo && error "Cannot have nemo in config"
+has_config lpjg:spinup osm && error "Cannot have both lpjg:spinup and osm in config"
+
+# add lpjg_forcing to config when needed (lpjg non-spinup and no osm) - do not specify it in the config directly
+has_config lpjg_forcing && error "lpjg:lpjg_forcing not allowed in user config"
+has_config lpjg && ! has_config lpjg:spinup && ! has_config osm && config+=" lpjg_forcing"
+has_config lpjg_forcing osm && error "Cannot have both lpjg_forcing and osm in config"
+has_config lpjg:spinup lpjg_forcing && error "Cannot have both lpjg:spinup and lpjg_forcing in config"
+
+# liblsm.sh defines some OSM and LPJG pre/post-processing functions
+has_config any osm lpjg lpjg_forcing && source ./liblsm.sh
+
+# Experiment name (exactly 4 letters!)
+export exp_name=[[[MOD:GENERAL:EXP_NAME]]]
+
+# Simulation start and end date. Use any (reasonable) syntax you want.
+run_start_date="[[[MOD:GENERAL:RUN_START_DATE]]]"
+# define run_start_date_as with proper format e.g. 19900101
+export run_start_date_as=$(date -u -d "${run_start_date}" +%Y%m%d)
+run_end_date="[[[MOD:GENERAL:RUN_END_DATE]]]"
+
+# Simulation member. Use any (reasonable) syntax you want.
+export member="%MEMBER%"
+
+# Set $force_run_from_scratch to 'true' if you want to force this run to start
+# from scratch, possibly ignoring any restart files present in the run
+# directory. Leave set to 'false' otherwise.
+# NOTE: If set to 'true' the run directory $run_dir is cleaned!
+CHUNK=%CHUNK%
+force_run_from_scratch=[[[MOD:GENERAL:FORCE_RUN_FROM_SCRATCH]]]
+force_run_from_scratch=${force_run_from_scratch:-false}
+force_run_from_scratch=$(echo ${force_run_from_scratch} | tr '[:upper:]' '[:lower:]')
+# we only apply this for the first chunk
+if ${force_run_from_scratch} && [[ "${CHUNK}" != "1" ]] ; then
+  force_run_from_scratch=false
+fi
+
+# Resolution (only T159 and T255 supported)
+ifs_grid=[[[MOD:IFS:GRID]]]
+#atm_grid=A128
+
+# Restart frequency. Use any (reasonable) number and time unit you want.
+# For runs without restart, leave this variable empty
+rst_freq="[[[MOD:GENERAL:RST_FREQ]]]"
+
+# Number of restart legs to be run in one go
+run_num_legs=[[[MOD:GENERAL:RUN_NUM_LEGS]]]
+
+# Coupling frequencies
+has_config lpjg && cpl_freq_atm_lpjg_hrs=[[[MOD:OASIS:CPL_FREQ_ATM_LPJG_HRS]]] #24
+
+# Directories
+start_dir=${PWD}
+ctrl_file_dir=${start_dir}/ctrl
+output_control_files_dir=${start_dir}/[[[MOD:GENERAL:OUTPUT_CONTROL_FILES_DIR]]]
+
+# Architecture
+build_arch=[[[PLT:ACTIVE:BUILD_ARCH]]]
+use_machinefile=[[[PLT:ACTIVE:USE_MACHINEFILE]]]
+
+# This file is used to store information about restarts
+ece_info_file="ece.info"
+
+# -----------------------------------------------------------------------------
+# *** Read platform dependent configuration
+# -----------------------------------------------------------------------------
+source ./ecconf.cfg
+
+configure
+
+# some special jobs override defaults (AS runtime only)
+if [[ "$TASKTYPE" = SPINUP_FORCING ]]
+then
+    rst_freq="10 year"
+    run_end_date="%SDATE% + 10 year"
+    run_dir=$(dirname "${run_dir}")/runtime-spinup-forcing
+elif [[ "$TASKTYPE" = SPINUP_LPJG ]]
+then
+    rst_freq="1 year"
+    run_end_date="%SDATE% + 1 year"
+    run_dir=$(dirname "${run_dir}")/runtime-spinup-lpjg
+fi
+
+[ -z $TMPDIR ] && error "you must define TMPDIR for your platform!!!"
+
+
+# -----------------------------------------------------------------------------
+# *** IFS/OSM configuration - some variables are needed by LPJG
+# -----------------------------------------------------------------------------
+
+ifs_version=36r4
+
+export ifs_res_hor=$(echo ${ifs_grid} | sed 's:T\([0-9]\+\)L\([0-9]\+\):\1:')
+ifs_res_ver=$(echo ${ifs_grid} | sed 's:T\([0-9]\+\)L\([0-9]\+\):\2:')
+
+osm_numproc=[[[MOD:OSM:NUMPROC]]] # 
+
+has_config lpjg && osm_exe_file=${ecearth_src_dir}/ifs-${ifs_version}/src/surf/offline/osm/build/bin/master1s_cpl.exe \
+    || osm_exe_file=${ecearth_src_dir}/ifs-${ifs_version}/src/surf/offline/osm/build/bin/master1s.exe
+
+osm_forcing_type="[[[MOD:OSM:OSM_FORCING_TYPE]]]"
+osm_ifs_output_dir="[[[MOD:OSM:OSM_IFS_OUTPUT_DIR]]]"
+osm_forcing_dir="[[[MOD:OSM:OSM_FORCING_DIR]]]"
+#uncomment these lines to use era20c/erai forcings, which are generated with the generate_forcing.sh script
+#osm_forcing_type="era20c"
+#osm_ifs_output_dir=""
+#osm_forcing_dir="${SCRATCH}/ECEARTH-RUNS/OSM_FORCING/${osm_forcing_type}/${ifs_grid}"
+
+export ifs_cmip_fixyear=[[[MOD:IFS:CMIP_FIXYEAR]]]
+
+ifs_cmip6=[[[MOD:IFS:CMIP6]]]
+ifs_cmip6_scenario=[[[MOD:IFS:CMIP6_SCENARIO]]]
+ifs_cmip_fixyear_ch4=[[[MOD:IFS:CMIP_FIXYEAR_CH4]]]
+ifs_A4xCO2=[[[MOD:IFS:CMIP6_A4xCO2]]]
+ifs_1PCTCO2=[[[MOD:IFS:CMIP6_1PCTCO2]]]
+bgc_1PCTCO2=[[[MOD:IFS:CMIP6_1PCTCO2_BGC]]]
+
+# *** Time step settings
+# setting ifs_time_step_sec breaks LPJG-offline oasis config so only set it when osm is active for now
+# usually we use the IFS time step setting for the target resolution, but for ERA5 forcing
+# we use 1h which is the resolution of the forcing
+if has_config osm
+then
+
+    case "${ifs_grid}" in
+        T159L*) ifs_time_step_sec=3600 ;;
+        T255L*) ifs_time_step_sec=2700 ;;
+        T511L*) ifs_time_step_sec=900  ;;
+        *)  error "Can't set time steps for unknown horizontal grid: ${ifs_grid}"
+            ;;
+    esac
+
+    if [[ "$osm_forcing_type" != "ifs" ]]
+    then
+        info "Setting OSM time step to 1h because we are using reanalysis forcing"
+        ifs_time_step_sec=3600
+    fi
+
+    # ifs_output_freq is defined below for ifs in the esm runscript, here it is hard-coded for osm
+    ifs_output_freq=$(( 3 * 3600 / ifs_time_step_sec ))
+    #ifs_di_freq=$(( 24 * 3600 / ifs_time_step_sec ))
+    #ifs_ddh_freq=$(( 120 * 3600 / ifs_time_step_sec ))
+fi
+
+# Select source of vegetation data:
+#  ifs       climatology from IFS
+#  era20c    vegetation from an off-line LPJ-Guess run forced with ERA20C
+#            (currently available only for T255 and T159)
+#  cmip6     vegetation from an EC-Earth3-Veg (interactive LPJ-Guess) run 
+#            (currently available only for T255)
+#  custom_exp vegetation from any EC-Earth3-Veg run exp
+#            (must contain same variables as era20c & cmip6 and located in icmcl_exp folder)
+#  none      don't create an ICMCL file with vegetation data (this is set
+#            automatically if LPJG is used with feedback)
+#
+ifs_veg_source="cmip6"
+if [ "%IFS_VEG_SOURCE%" != "" ] ; then ifs_veg_source="%IFS_VEG_SOURCE%" ; fi
+
+has_config lpjg:fdbck && ! has_config osm && ifs_veg_source="none"
+
+case ${ifs_veg_source} in
+"ifs" )
+    # Use Lambert-Beer to compute effective vegetation cover
+    n_compute_eff_veg_fraction=2
+    ;;
+"era20c" )
+    # LPJG vegetation is provided as effective cover
+    # Don't use Lambert-Beer
+    n_compute_eff_veg_fraction=0
+
+    case "${ifs_grid}" in
+        T159L*) veg_version=v29 ;;
+        T255L*) veg_version=v16 ;;
+        *)  error "Vegetation from off-line LPJ-Guess not available for ${ifs_grid}" ;;
+    esac    
+    ;;
+"cmip6" )
+    # LPJG vegetation is provided as effective cover
+    # Don't use Lambert-Beer
+    n_compute_eff_veg_fraction=0
+
+    case "${ifs_grid}" in
+        T255L*) veg_version=v32 ;;
+        *)  error "Vegetation from CMIP6 EC-Earth3-Veg not available for ${ifs_grid}" ;;
+    esac    
+    ;;
+"custom_"* )
+    # LPJG vegetation is provided as effective cover
+    # Don't use Lambert-Beer
+    n_compute_eff_veg_fraction=0
+
+    veg_version=${ifs_veg_source:7}
+    if [ ! -d ${ini_data_dir}/ifs/${ifs_grid}/icmcl_${veg_version} ]
+    then
+        error "requested IFS_VEG_SOURCE = ${ifs_veg_source} but not found in ${ini_data_dir}/ifs/${ifs_grid}/icmcl_${veg_version}"
+    fi
+    ;;
+"none" )
+    # LPJG with feedback
+    n_compute_eff_veg_fraction=0
+    has_config osm && ! has_config lpjg:fdbck && error "OSM requires an offline source of vegetation"
+    ;;
+* )
+    error "Vegetation from ${ifs_veg_source} not implemented"
+    ;;
+esac
+
+# use DMI land ice physics and varying snow albedo
+ifs_landice=false
+
+# -----------------------------------------------------------------------------
+# *** LPJ-GUESS configuration
+# -----------------------------------------------------------------------------
+
+lpjg_time_step_sec=[[[MOD:LPJG:TIME_STEP_SEC]]]
+lpjg_numproc=[[[MOD:LPJG:NUMPROC]]]
+lpjg_state_dir=%LPJG_STATE_DIR% ; [ -z $lpjg_state_dir ] && lpjg_state_dir=""
+
+has_config lpjg       && lpjg_on=1
+has_config lpjg:fdbck && lpjg_fdbck=1
+has_config tm5:co2    && lpjg_fdbck_tm5=1 || lpjg_fdbck_tm5=0
+
+export lpjg_fixNdepafter=[[[MOD:LPJG:LPJG_FIXNDEPAFTER]]]
+export lpjg_fixLUafter=[[[MOD:LPJG:LPJG_FIXLUAFTER]]]
+
+info '!!!! CMIP FIX YEAR SETTINGS:'
+info "ifs_cmip_fixyear:  $ifs_cmip_fixyear"
+info "lpjg_fixNDepAfter: $lpjg_fixNdepafter"
+info "lpjg_fixLUAfter:   $lpjg_fixLUafter"
+info '!!!!'  
+
+lpjg_res=T${ifs_res_hor}
+lpjg_exe_file=${ecearth_src_dir}/lpjg/build/guess_${lpjg_res}
+
+# -----------------------------------------------------------------------------
+# *** LPJ-GUESS offline forcing configuration
+# -----------------------------------------------------------------------------
+
+lpjg_forcing_exe_file=${ecearth_src_dir}/lpjg/offline/lpjg_forcing
+if $(has_config lpjg_forcing)
+then
+    case "${ifs_grid}" in
+        T159L*) lpjg_forcing_exe_file+="_ifs_T159" ;;
+        T255L*) lpjg_forcing_exe_file+="_ifs_T255" ;;
+        *) has_config lpjg && error "LPJG offline forcing doesn't exist for ifs-grid: ${ifs_grid}" ;;
+    esac
+fi
+lpjg_forcing_numproc=1
+
+ccycle_coupling_exe_file=${ecearth_src_dir}/lpjg/offline/ccycle_coupling
+ccycle_coupling_numproc=1
+
+if $(has_config lpjg)
+then
+    lpjg_ifs_output_dir="[[[MOD:LPJG:LPJG_IFS_OUTPUT_DIR]]]"
+    lpjg_forcing_dir="[[[MOD:LPJG:LPJG_FORCING_DIR]]]"
+    # some special jobs override defaults (AS runtime only)
+    if [[ "$TASKTYPE" = SPINUP_LPJG ]]
+    then
+        lpjg_ifs_output_dir=""
+        lpjg_forcing_dir=$(dirname "${run_dir}")/runtime-spinup-forcing/output/osm/lpjg_forcing
+    fi
+fi
+
+# Decide whether the OASIS weight files for interpolation should be linked from
+# the setup directory (true) or not (false). In the latter case, the weights
+# are re-computed at the start of the run.
+oas_link_weights=true
+
+# =============================================================================
+# *** END of User configuration
+# =============================================================================
+
+# =============================================================================
+# *** This is where the code begins ...
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# *** Create the run dir if necessary and go there
+#     Everything is done from here.
+# -----------------------------------------------------------------------------
+if [ ! -d ${run_dir} ]
+then
+    mkdir -p ${run_dir}
+fi
+cd ${run_dir}
+
+# -----------------------------------------------------------------------------
+# *** Determine the time span of this run and whether it's a restart leg
+# -----------------------------------------------------------------------------
+
+# Regularise the format of the start and end date of the simulation
+run_start_date=$(date -uR -d "${run_start_date}")
+run_end_date=$(date -uR -d "${run_end_date}")
+
+
+# -----------------------------------------------------------------------------
+# *** Set path to grib_set
+# -----------------------------------------------------------------------------
+
+grib_set=${GRIB_BIN_PATH}${GRIB_BIN_PATH:+/}grib_set
+grib_copy=${GRIB_BIN_PATH}${GRIB_BIN_PATH:+/}grib_copy
+
+# Loop over the number of legs
+for (( ; run_num_legs>0 ; run_num_legs-- ))
+do
+
+    # Check for restart information file and set the current leg start date
+    #   Ignore restart information file if force_run_from_scratch is true
+    if ${force_run_from_scratch} || ! [ -r ${ece_info_file} ]
+    then
+        leg_is_restart=false
+        leg_start_date=${run_start_date}
+        leg_number=1
+    else
+        leg_is_restart=true
+        . ./${ece_info_file}
+        leg_start_date=${leg_end_date}
+        leg_number=$((leg_number+1))
+    fi
+
+    # Compute the end date of the current leg
+    if [ -n "${rst_freq}" ]
+    then
+        leg_end_date=$(date -uR -d "${leg_start_date} + ${rst_freq}")
+    else
+        leg_end_date=${run_end_date}
+    fi
+
+    # Check if legs are integer multiples of full years if LPJG is used
+    if has_config lpjg
+    then
+        
+        if [[ $(date +%m%d%T -u -d "${leg_start_date}") != "010100:00:00" || \
+            $(date +%m%d%T -u -d "${leg_start_date} + ${rst_freq}") != "010100:00:00" ]]
+        then
+            error "LPJ-GUESS runs must start on Jan 1 and end on Dec 31. Multi-year legs are allowed."
+        fi
+    fi              
+
+    if [ $(date -u -d "${leg_end_date}" +%s) -ge $(date -u -d "${run_end_date}" +%s) ]
+    then
+        leg_end_date=${run_end_date}
+        ifs_lastout=true
+    fi
+
+    # Some time variables needed later
+    leg_length_sec=$(( $(date -u -d "${leg_end_date}" +%s) - $(date -u -d "${leg_start_date}" +%s) ))
+    leg_start_sec=$(( $(date -u -d "${leg_start_date}" +%s) - $(date -u -d "${run_start_date}" +%s) ))
+    leg_end_sec=$(( $(date -u -d "${leg_end_date}" +%s) - $(date -u -d "${run_start_date}" +%s) ))
+    leg_start_date_yyyymmdd=$(date -u -d "${leg_start_date}" +%Y%m%d)
+    leg_start_date_yyyy=$(date -u -d "${leg_start_date}" +%Y)
+    leg_end_date_yyyy=$(date -u -d "${leg_end_date}" +%Y)
+    # compute last full year of the leg, used for ICMCL data and OSM forcing when leg ends on Jan 1st
+    if [ $(date -u -d "${leg_end_date}" +%m%d) == "0101" ]
+    then
+      leg_end_date_yyyy_full=$(( leg_end_date_yyyy - 1 ))
+    else
+      leg_end_date_yyyy_full=$leg_end_date_yyyy
+    fi
+
+    # Check whether there's actually time left to simulate - exit otherwise
+    if [ ${leg_length_sec} -le 0 ]
+    then
+        info "Leg start date equal to or after end of simulation."
+        info "Nothing left to do. Exiting."
+        exit 0
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Prepare the run directory for a run from scratch
+    # -------------------------------------------------------------------------
+    if ! $leg_is_restart
+    then
+        # ---------------------------------------------------------------------
+        # *** Check if run dir is empty. If not, and if we are allowed to do so
+        #     by ${force_run_from_scratch}, remove everything
+        # ---------------------------------------------------------------------
+        if $(ls * >& /dev/null)
+        then
+            if ${force_run_from_scratch}
+            then
+                rm -fr ${run_dir}/*
+            else
+                error "Run directory ${run_dir} not empty and \$force_run_from_scratch not set."
+            fi
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Copy executables of model components
+        # *** Additionally, create symlinks to the original place for reference
+        # ---------------------------------------------------------------------
+        if $(has_config osm)
+        then
+            cp    ${osm_exe_file} .
+            ln -s ${osm_exe_file} $(basename ${osm_exe_file}).lnk
+        fi
+        if $(has_config lpjg)
+        then
+            cp    ${lpjg_exe_file} .
+            ln -s ${lpjg_exe_file} $(basename ${lpjg_exe_file}).lnk
+        fi
+        if $(has_config lpjg_forcing)
+        then
+          cp ${lpjg_forcing_exe_file} .
+        fi
+        if $(has_config cc_coup)
+        then
+          cp ${ccycle_coupling_exe_file} .
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for IFS/OSM (linked)
+        # ---------------------------------------------------------------------
+
+        if $(has_config osm)
+        then
+
+        # Initial data
+        ln -s \
+        ${ini_data_dir}/ifs/${ifs_grid}/${leg_start_date_yyyymmdd}/ICMGGECE3INIUA \
+                                                            ICMGG${exp_name}INIUA
+        ln -s \
+        ${ini_data_dir}/ifs/${ifs_grid}/${leg_start_date_yyyymmdd}/ICMSHECE3INIT \
+                                                            ICMSH${exp_name}INIT
+        rm -f ICMGG${exp_name}INIT
+        cp ${ini_data_dir}/ifs/${ifs_grid}/${leg_start_date_yyyymmdd}/ICMGGECE3INIT \
+                                                            ICMGG${exp_name}INIT
+
+        # add bare_soil_albedo to ICMGG*INIT
+        tempfile=tmp.$$
+        ${grib_set} -s dataDate=$(date -u -d "$run_start_date" +%Y%m%d) \
+            ${ini_data_dir}/ifs/${ifs_grid}/climate/bare_soil_albedos.grb \
+            ${tempfile}
+
+        cat ${tempfile} >> ICMGG${exp_name}INIT
+        rm -f ${tempfile}
+
+        # add land ice mask if needed - not used in OSM yet
+        if ${ifs_landice}
+        then
+            tempfile=tmp.$$
+            cdo divc,10 -setcode,82 -selcode,141 ICMGG${exp_name}INIT ${tempfile}
+            ${grib_set} -s gridType=reduced_gg ${tempfile} ${tempfile}
+            cat ${tempfile} >> ICMGG${exp_name}INIT
+            rm -f ${tempfile}
+        fi
+
+        fi #osm
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for LPJ-GUESS
+        # ---------------------------------------------------------------------
+        if $(has_config lpjg)
+        then
+            # Check for valid grid
+            if [ $lpjg_res != "T255" -a $lpjg_res != "T159" ]
+            then
+                error "LPJG-gridlist doesn't exist for ifs-grid: ${ifs_grid}" 
+            fi
+            # Initial data - saved state for LPJ-GUESS (.bin format)
+            lpjgstartdir=$(printf "lpjg_state_%04d" $leg_start_date_yyyy)
+            if ! $(has_config lpjg:spinup)
+            then
+                ln -sf ${ini_data_dir}/lpjg/ini_state/${lpjg_res}/${lpjgstartdir} ${run_dir}/${lpjgstartdir}
+            fi
+
+            # Control files (i.e. .ins, landuse, N deposition, soil type files etc.)
+            cp  -f ${ecearth_src_dir}/lpjg/data/ins/*.ins .
+            # activate the new litterfall scheme for C4MIP - for the coupled model this is done when both pisces and lpjg are activated
+            has_config cc_coup && echo -e "!override for EC-Earth-CC in runscript\nifpftlitterfall 1\ncalc_phen_after_restart 0" >> global.ins
+            mkdir -p ${run_dir}/landuse
+        fi
+
+        # if running an LPJG spinup, create fast forcing files and link to the ifs_spinup_dir expected by LPJG
+        if $(has_config lpjg:spinup)
+        then
+            lpjg_gen_forcing_spinup
+            ln -sf $lpjg_forcing_dir ifs_spinup_forcing
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for OASIS (linked)
+        # ---------------------------------------------------------------------
+
+        # Name table file
+        ln -s ${ini_data_dir}/oasis/cf_name_table.txt
+
+        # we should use the L128 grid (only in AMIP grid file)
+        # but for now let's use the same files as for the coupled runs
+        #oas_grid_dir=${ini_data_dir}/oasis/AMIP
+        oas_grid_dir=${ini_data_dir}/oasis/${lpjg_res}-ORCA1
+        mycp='cp'
+
+        # Grid definition files
+        if $(has_config tm5)
+        then
+            ${mycp} ${oas_grid_dir}/areas.nc gcm_areas.nc
+            ${mycp} ${oas_grid_dir}/grids.nc gcm_grids.nc
+            ${mycp} ${oas_grid_dir}/masks.nc gcm_masks.nc
+
+            oas_grid_dir=${ini_data_dir}/oasis/T${ifs_res_hor}-TM5-LPJG
+            cp ${oas_grid_dir}/tm5_areas.nc .
+            cp ${oas_grid_dir}/tm5_grids.nc .
+            cp ${oas_grid_dir}/tm5_masks.nc .
+
+            if ${oas_link_weights}
+            then
+                for f in ${oas_grid_dir}/rmp_????_to_????_*.nc
+                do
+                    ln -s $f
+                done
+            fi
+
+            # -- Get restart files for TM5-IFS/LPJG/PISCES 
+            for f in ${oas_rst_ifs_tm5}
+            do
+                cp ${oas_grid_dir}/rst/${tm5_exch_nlevs}-levels/$f .
+            done
+
+            # set CO2 concentrations to 1850 levels as in TM5 code
+            if true
+            then
+                for f in l_co2.nc
+                do
+                    [ -f $f ] && mv -f $f $f.bak && cdo setrtoc,0,1000,${ccycle_co2_init_ppm} $f.bak $f
+                done
+            fi
+
+            # -- Merge grid definition files
+            cdo merge gcm_areas.nc tm5_areas.nc areas.nc
+            cdo merge gcm_grids.nc tm5_grids.nc grids.nc
+            cdo merge gcm_masks.nc tm5_masks.nc masks.nc
+
+        else
+            ln -s ${oas_grid_dir}/areas.nc
+            ln -s ${oas_grid_dir}/grids.nc
+            ln -s ${oas_grid_dir}/masks.nc
+        fi
+
+    else # i.e. $leg_is_restart == true
+
+        # ---------------------------------------------------------------------
+        # *** Remove all leftover output files from previous legs
+        # ---------------------------------------------------------------------
+
+        # IFS/OSM files
+        rm -f ICM{SH,GG}${exp_name}+??????
+        
+    fi # ! $leg_is_restart
+
+    # -------------------------------------------------------------------------
+    # *** Create some control files
+    # -------------------------------------------------------------------------
+
+    # namelist and namcouple files
+
+    has_config lpjg_forcing  && . ${ctrl_file_dir}/namelist.lpjg_forcing.sh                     > namelist.lpjg_forcing
+    has_config cc_coup       && . ${ctrl_file_dir}/namelist.ccycle_coupling.sh                  > namelist.ccycle_coupling
+
+    . ${ctrl_file_dir}/namcouple.sh > namcouple
+
+    # -------------------------------------------------------------------------
+    # *** LPJ-GUESS initial data
+    # -------------------------------------------------------------------------
+    if $(has_config lpjg)
+    then
+        # LPJG runtime rcfile - update with leg dates
+        . ${ctrl_file_dir}/namelist.lpjg.sh > lpjg_steps.rc
+
+        # determine lpjg scenario-name and co2-file middle-fix
+        case $(echo ${ifs_cmip6_scenario} | tr '[:upper:]' '[:lower:]') in
+            hist*)     lpjg_scen="ssp370"; lu_src="AIM"    ; lpjg_sco2_mfix="AIM-ssp370-1-2-1"            ; lu_file_posfix="2018_10_08.txt";;
+            ssp1-1.9*) lpjg_scen="ssp119"; lu_src="IMAGE"  ; lpjg_sco2_mfix="IMAGE-ssp119-1-2-1"          ; lu_file_posfix="2019_03_13.txt";;
+            ssp1-2.6*) lpjg_scen="ssp126"; lu_src="IMAGE"  ; lpjg_sco2_mfix="IMAGE-ssp126-1-2-1"          ; lu_file_posfix="2018_10_08.txt";;
+            ssp2-4.5*) lpjg_scen="ssp245"; lu_src="MESSAGE"; lpjg_sco2_mfix="MESSAGE-GLOBIOM-ssp245-1-2-1"; lu_file_posfix="2018_10_08.txt";;
+            ssp3-7.0*) lpjg_scen="ssp370"; lu_src="AIM"    ; lpjg_sco2_mfix="AIM-ssp370-1-2-1"            ; lu_file_posfix="2018_10_08.txt";;
+            ssp4-3.4*) lpjg_scen="ssp434"; lu_src="GCAM"   ; lpjg_sco2_mfix="GCAM4-ssp434-1-2-1"            ; lu_file_posfix="2018_10_08.txt";;
+            ssp5-3.4*) lpjg_scen="ssp534os"; lu_src="MAGPIE"; lpjg_sco2_mfix="REMIND-MAGPIE-ssp534-over-1-2-1"            ; lu_file_posfix="2019_05_10.txt";;
+            ssp5-8.5*) lpjg_scen="ssp585"; lu_src="MAGPIE" ; lpjg_sco2_mfix="REMIND-MAGPIE-ssp585-1-2-1"  ; lu_file_posfix="2018_10_08.txt";;
+            *)  error "Scenario ${ifs_cmip6_scenario} not defined for LPJ-GUESS" ;;
+        esac
+
+        lpjg_scenario_new="historical + $lpjg_sco2_mfix"
+        lpjg_scenario_info=${run_dir}/lpjg_scenario.info
+
+        if [ -f $lpjg_scenario_info ]
+        then
+            source $lpjg_scenario_info
+            if [ "$lpjg_scenario_new" = "$lpjg_scenario" ]
+            then
+                lpjg_copy_rte=false
+            else
+                lpjg_copy_rte=true
+            fi
+        else
+            lpjg_copy_rte=true
+        fi
+
+        # copy RTE only if necessary (at beginning of a run or when scenario changes)
+        if $lpjg_copy_rte
+        then
+            # write info about installed scenarios to file
+            echo "lpjg_scenario=\"historical + $lpjg_sco2_mfix\"" > $lpjg_scenario_info
+            # set file prefixes depending on scenario
+            lu_file_prefix="1850_2100_luh2_Hist_ScenarioMIP_UofMD"
+            lu_file_midfix="2_1_f"
+
+            lu_path="${ini_data_dir}/lpjg/landuse/${lpjg_res}/${lpjg_scen}"
+
+            # copy and reference-link landuse,  gross transitions, crops, n-fertilisation
+            for inp in lu gross crop nfert
+            do
+                if [ $inp == "crop" -o $inp == "nfert" ]
+                then
+                    lu_src_file="${lu_path}/${inp}_rfirr_${lu_file_prefix}_${lu_src}_${lpjg_scen}_${lu_file_midfix}_${lpjg_res}_${lu_file_posfix}"
+                else
+                    lu_src_file="${lu_path}/${inp}_${lu_file_prefix}_${lu_src}_${lpjg_scen}_${lu_file_midfix}_${lpjg_res}_${lu_file_posfix}"
+                fi
+                cp -f $lu_src_file ${run_dir}/landuse/${inp}_luh2.txt
+                ln -fs $lu_src_file ${run_dir}/landuse/${inp}_luh2.txt.lnk
+            done
+            
+            # nitrogen deposition files
+            mkdir -p ${run_dir}/ndep
+            for inp in drynhx2 drynoy2 wetnhx2 wetnoy2
+            do
+                ndep_src_file="${ini_data_dir}/lpjg/ndep/${lpjg_res}/${lpjg_scen}/${lpjg_scen}_${lpjg_res}_${inp}.nc"
+                cp -f  $ndep_src_file ${run_dir}/ndep/${inp}.nc
+                ln -fs  $ndep_src_file ${run_dir}/ndep/${inp}.nc.lnk
+            done
+
+            # concatenate historic and scenario (2015+) co2 concentration file
+            # hist co2 file 
+            lpjg_hco2_file="${ini_data_dir}/ifs/cmip6-data/mole-fraction-of-carbon-dioxide-in-air_input4MIPs_GHGConcentrations_CMIP_UoM-CMIP-1-2-0_gr1-GMNHSH_0000-2014.nc"
+            # scenario co2 file 
+            lpjg_sco2_file="${ini_data_dir}/ifs/cmip6-data/mole-fraction-of-carbon-dioxide-in-air_input4MIPs_GHGConcentrations_ScenarioMIP_UoM-${lpjg_sco2_mfix}_gr1-GMNHSH_2015-2500.nc"
+            # combined file
+            lpjg_co2_file="${run_dir}/mole_fraction_of_carbon_dioxide_in_air_input4MIPs_lpjg.nc"
+            rm -f $lpjg_co2_file
+            cdo mergetime $lpjg_hco2_file $lpjg_sco2_file $lpjg_co2_file
+        fi
+
+        # Populate or update LPJG run directories
+        if $(has_config lpjg:ioopt)
+        then
+            export lpjg_numproc
+            run_node 'echo creating lpjg temp dirs on `hostname` ; rm -rf $TMPDIR/lpjg/run* ; for (( n=1; n<=${lpjg_numproc}; n++ )) ; do mkdir -p $TMPDIR/lpjg/run${n}/output/CMIP6 ; done ; ls -l $TMPDIR/lpjg/'
+        fi
+        for (( n=1; n<=${lpjg_numproc}; n++ ))
+        do
+            # if run from scratch or number of procs has been extended
+            if ! $leg_is_restart || [ ! -d ${run_dir}/run${n} ]
+            then
+                # Make output directories
+                # add the ioopt config option if running on one node to speed up output
+                if $(has_config lpjg:ioopt)
+                then
+                    mkdir -p ${run_dir}/run${n}
+                    ln -sf $TMPDIR/lpjg/run${n}/output ${run_dir}/run${n}/output
+                else
+                    mkdir -p ${run_dir}/run${n}/output/CMIP6
+                fi
+
+                # Copy *.ins, lpjg_steps.rc and OASIS-MCT restart files
+                cp ${run_dir}/*.ins ${run_dir}/run${n}
+
+                # Copy output control files
+                cp ${output_control_files_dir}/lpjg_cmip6_output.ins ${run_dir}/run${n}
+                ln -s ${output_control_files_dir}/lpjg_cmip6_output.ins ${run_dir}/run${n}/lpjg_cmip6_output.ins.lnk
+
+                cp ${ini_data_dir}/lpjg/oasismct/ghg*.txt ${run_dir}/run${n}
+                cp ${ini_data_dir}/lpjg/oasismct/${lpjg_res}/ece_gridlist_${lpjg_res}.txt ${run_dir}/run${n}/ece_gridlist.txt
+                ln -s ${ini_data_dir}/lpjg/oasismct/${lpjg_res}/ece_gridlist_${lpjg_res}.txt ${run_dir}/run${n}/ece_gridlist.txt.lnk
+
+                # Data only needed by master or spinup
+                if [ $n == 1 ]
+                then
+                    cp ${ini_data_dir}/lpjg/oasismct/${lpjg_res}/*.nc ${run_dir}
+                fi
+            fi
+            # Refresh output-dirs after they hav been removed at end of the last leg
+            mkdir -p ${run_dir}/run${n}/output/CMIP6
+            mkdir -p ${run_dir}/run${n}/output/CRESCENDO
+        done
+
+        if $leg_is_restart
+        then
+            lpjg_restart_dir="restart/lpjg/$(printf %03d $((leg_number-1)))"
+            lpjg_rst_state="${lpjg_restart_dir}/lpjg_state_${leg_start_date_yyyy}"
+            if [ -d "$lpjg_rst_state" ]
+            then
+                ln -sf $lpjg_rst_state
+            else
+                echo "lpjg restart dir $lpjg_rst_state not available"
+                exit -1
+            fi
+            # get oasis restart files
+            oasis_restart_dir="restart/oasis/$(printf %03d $((leg_number)))"
+            cp -f ${oasis_restart_dir}/*.nc ${run_dir}/
+        fi
+
+        # generate lpjg_forcing files
+        if $(has_config lpjg_forcing)
+        then
+            lpjg_gen_forcing $leg_start_date_yyyy $leg_end_date_yyyy_full
+        fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Create ICMCL file with vegetation fields
+    #     not needed if LPJG is used with feedback
+    # -------------------------------------------------------------------------
+    if $(has_config osm)
+    then
+
+    tempfile=tmp.$$
+
+    case ${ifs_veg_source} in
+    "ifs" )
+        # Vegetation from IFS (climatology)
+
+        icmclfile=${ini_data_dir}/ifs/${ifs_grid}/climate/ICMCL_ONLY_VEG_PD
+
+        # Create data for december, the year before the leg starts
+        ${grib_set} \
+            -s dataDate=$(printf "%04d" $((leg_start_date_yyyy-1)))1215,stepRange=0 \
+            ${icmclfile}-12 ICMCL${exp_name}INIT
+
+        # Create data for all month in the years of the leg
+        for (( y=${leg_start_date_yyyy} ; y<=${leg_end_date_yyyy_full} ; y++ ))
+        do
+            yy=$(printf "%04d" $y)
+            for m in {1..12}
+            do
+                mm=$(printf "%02d" $m)
+                ${grib_set} -s dataDate=${yy}${mm}15,stepRange=0 ${icmclfile}-${mm} ${tempfile}
+                cat ${tempfile} >> ICMCL${exp_name}INIT
+            done
+        done
+
+        # Create data for january, the year after the leg ends
+        ${grib_set} \
+            -s dataDate=$(printf "%04d" $((leg_end_date_yyyy_full+1)))0115,stepRange=0 \
+            ${icmclfile}-01 ${tempfile}
+        cat ${tempfile} >> ICMCL${exp_name}INIT
+        ;;
+    "era20c"|"cmip6"|"custom_"* )
+        # Vegetation from a LPJG run (off-line or EC-Earth3-Veg)
+
+        rm -f ICMCL${exp_name}INIT
+
+        # Create data for all years of the leg, including one year
+        # before and one year after
+        for (( yr=leg_start_date_yyyy-1 ; yr<=leg_end_date_yyyy_full+1 ; yr+=1 ))
+        do
+
+            case ${ifs_veg_source} in
+            'era20c' )
+                # no scenario needed with era20c
+                icmcl_scenario="" ;;
+            'custom_'* )
+                # no scenario implemented yet with custom_dir
+                icmcl_scenario="" ;;
+            'cmip6' )
+                # select scenario, use SSP3-7.0 as default
+                # if not otherwise specified
+                icmcl_scenario="historical"
+                if ( [ $ifs_cmip_fixyear -le 0 ] && [ $yr -ge 2015 ] ) || \
+                     [ $ifs_cmip_fixyear -ge 2015 ]
+                then
+                    [[ ${ifs_cmip6_scenario} =~ ^SSP ]] \
+                        && icmcl_scenario=${ifs_cmip6_scenario} \
+                        || icmcl_scenario='SSP3-7.0'
+                fi ;;
+            esac
+            
+            if [ $ifs_cmip_fixyear -le 0 ]
+            then
+                cat ${ini_data_dir}/ifs/${ifs_grid}/icmcl_${veg_version}/${icmcl_scenario}/icmcl_$yr.grb >> ICMCL${exp_name}INIT
+            else
+                # Fixed year forcing, requires cdo!
+                # If cdo is not available at runtime you need to fix proper
+                # icmcl files beforehand and use them here
+                cdo setyear,$yr ${ini_data_dir}/ifs/${ifs_grid}/icmcl_${veg_version}/${icmcl_scenario}/icmcl_${ifs_cmip_fixyear}.grb ${tempfile}
+                cat ${tempfile} >> ICMCL${exp_name}INIT
+            fi
+        done
+        ;;
+    "none" )
+        info "no ICMCL file is created"
+        ;;
+    * )
+        error "Vegetation from ${ifs_veg_source} not implemented"
+        ;;
+    esac
+
+    # Clean up
+    rm -f ${tempfile}
+
+    fi #osm
+
+    # ---------------------------------------------------------------------
+    # *** Create initial & climatological conditions for osm
+    # ---------------------------------------------------------------------
+    if $(has_config osm)
+    then
+
+        ## create initial conditions
+        if ! $leg_is_restart
+        then
+            osm_gen_init_clim
+        fi
+        
+        # used to generate daily veg from an IFS experiment to force the OSM 
+        osm_icmcl_ifs=false 
+        if $osm_icmcl_ifs
+        then   
+          if ! [ -r ${osm_forcing_dir}/ICMCL_${leg_start_date_yyyy} ]
+          then
+            osm_gen_icmcl_from_ifs $leg_start_date_yyyy
+            cp ICMCL${exp_name}INIT ${osm_forcing_dir}/ICMCL_${leg_start_date_yyyy}
+          else
+          # or get it from osm_forcing dir 
+            mv ICMCL${exp_name}INIT ICMCL${exp_name}INIT_ORI
+            ln -sf ${osm_forcing_dir}/ICMCL_${leg_start_date_yyyy} ICMCL${exp_name}INIT
+          fi 
+        fi 
+        
+        # generate surfveg for osm simulation 
+        osm_gen_veg 
+
+        ## create forcing 
+        osm_gen_forcing $leg_start_date_yyyy $leg_end_date_yyyy_full
+        if [[ $leg_start_date_yyyy == $leg_end_date_yyyy_full ]]
+        then
+            ln -sf ${osm_forcing_dir}/${leg_start_date_yyyy}/* .
+        else
+            ln -sf ${osm_forcing_dir}/${leg_start_date_yyyy}-${leg_end_date_yyyy_full}/* .
+        fi
+
+        ## generate osm namelist 
+        . ${ctrl_file_dir}/namelist.osm.sh > input
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Remove some OASIS files of the previous leg
+    # -------------------------------------------------------------------------
+    # TODO check oasis restart files
+    #if $leg_is_restart
+    #then
+    #    rm -f anaisout_*
+    #fi
+
+    # -------------------------------------------------------------------------
+    # *** Start the run
+    # -------------------------------------------------------------------------
+    # Activate OASIS coupling in OSM if necessary
+    has_config osm lpjg && export CPLNG='active'
+
+    # Use the launch function from the platform configuration file
+    cmd=""
+    if $(has_config lpjg)
+    then
+        [ "${cmd}" != "" ] && cmd=${cmd}" -- "
+        has_config lpjg:spinup && lpjg_spinup="-islpjgspinup" || lpjg_spinup=""
+        cmd=${cmd}"${lpjg_numproc} ${lpjg_exe_file} guess.ins ${lpjg_spinup} -parallel"
+        has_config lpjg_forcing && cmd=${cmd}" -- ${lpjg_forcing_numproc} ${lpjg_forcing_exe_file}"
+        has_config cc_coup && cmd=${cmd}" -- ${ccycle_coupling_numproc} ${ccycle_coupling_exe_file}"
+    fi
+    if $(has_config osm)
+    then
+        # TODO pass this only to the osm process?
+        export OMP_NUM_THREADS=${osm_numproc}
+        ### to do: special "launch" function for OpenMP only run
+        [ "${cmd}" != "" ] && cmd=${cmd}" -- "
+        cmd=${cmd}"1 ${osm_exe_file}"
+    fi
+
+    t1=$(date +%s)
+    launch $cmd
+    t2=$(date +%s)
+
+    tr=$(date -d "0 -$t1 sec + $t2 sec" +%T)
+
+    # -------------------------------------------------------------------------
+    # *** Check for signs of success
+    #     Note the tests provide no guarantee that things went fine! They are
+    #     just based on the IFS, NEMO and TM5 log files. More tests (e.g. checking
+    #     restart files) could be implemented.
+    # -------------------------------------------------------------------------
+
+    # Check for LPJG/OSM success ???
+
+    # -------------------------------------------------------------------------
+    # *** Move LPJ-GUESS output files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config lpjg)
+    then
+        outdir="output/lpjg/$(printf %03d $((leg_number)))"
+        if [ -d ${outdir} ]
+        then
+            rm -rf  ${outdir}
+        fi
+        mkdir -p ${outdir}
+
+        if $(has_config lpjg:ioopt)
+        then
+            for (( n=1; n<=${lpjg_numproc}; n++ )) ; do [ -L ${run_dir}/run${n}/output ] && rm -f ${run_dir}/run${n}/output ; done
+            export lpjg_numproc run_dir
+            run_node 'echo copying lpjg temp dirs from `hostname` ; for (( n=1; n<=${lpjg_numproc}; n++ )) ; do cp -rvf $TMPDIR/lpjg/run${n}/output/ ${run_dir}/run${n} ; done'
+        fi
+
+        # LPJG run directories
+        # concatenate *.out (or compressed *.out.gz) files from each run* into output dir
+        flist=$(cd ${run_dir}/run1/output && find *.out.gz -type f 2>/dev/null || true)
+        if [ "$flist" = "" ]
+        then
+            lpjg_compress_output=false
+            flist=$(cd ${run_dir}/run1/output && find *.out -type f 2>/dev/null)
+        else
+            lpjg_compress_output=true
+        fi
+
+        mkdir ${outdir}/CMIP6
+
+        for (( n=1; n<=${lpjg_numproc}; n++ ))
+        do
+            for ofile in $flist
+            do
+                if $lpjg_compress_output
+                then
+                    [ $n == 1 ] && gzip -c ${run_dir}/run${n}/output/`basename ${ofile} .gz`.hdr > ${outdir}/$ofile
+                    cat ${run_dir}/run${n}/output/${ofile} >> ${outdir}/$ofile
+                else
+                    if (( n == 1 ))
+                    then
+                        cat ${run_dir}/run${n}/output/${ofile} > ${outdir}/$ofile
+                    else
+                        awk '(FNR!=1){print $0}' ${run_dir}/run${n}/output/${ofile} >> ${outdir}/$ofile
+                    fi
+                fi
+            done
+            rm -rf ${run_dir}/run${n}/output
+        done
+        
+        # move monthly file if available
+        if [ -f ${run_dir}/LPJ-GUESS_monthlyoutput.txt ]
+        then
+            mv ${run_dir}/LPJ-GUESS_monthlyoutput.txt ${outdir}
+        fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move OSM output files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config osm)
+    then
+      outdir="output/osm/$(printf %03d $((leg_number)))"
+      mkdir -p ${outdir}
+      mv o_*.nc $outdir
+      rm -f Wind.nc Tair.nc Snowf.nc SWdown.nc Rainf.nc Qair.nc PSurf.nc LWdown.nc
+            
+      #------------------------------------------------------------------------
+      # ** Post-process OSM data 
+      #------------------------------------------------------------------------
+      osm_post_gen_script ${outdir} ${leg_number}
+      # run osm_post script now if post_run is in config
+      has_config osm:post_run && . ${exp_name}_osm_post_${leg_number}.sh
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move ccycle_coupling output files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config tm5:co2)
+    then
+      outdir="output/ccycle/$(printf %03d $((leg_number)))"
+      mkdir -p ${outdir}
+      rm -f GUE_{CNAT,CANT,CNPP}_*.nc
+      mv TM5_Land{CNAT,CANT,CNPP}_*.nc ${outdir}
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move LPJ-GUESS restart files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config lpjg) && ! $(has_config lpjg:spinup)
+    then
+        outdir="restart/lpjg/$(printf %03d $((leg_number)))"
+        if [ -d ${outdir} ]
+        then
+            rm -rf  ${outdir}
+        fi
+        mkdir -p ${outdir}
+
+        state_dir="./lpjg_state_$(printf %04d $((leg_end_date_yyyy)))"
+        mv ${state_dir} ${outdir}
+        # LPJG writes into run1 dir, so mv to main rundir
+        mv -f run1/lpjgv.nc .
+        has_config tm5:co2 lpjg && mv -f run1/rlpjg.nc .
+
+        # remove restart link
+        if $leg_is_restart
+        then
+            old_state_dir="./lpjg_state_$(printf %04d $((leg_start_date_yyyy)))"
+            if [ -L $old_state_dir ]
+            then
+                rm -f "$old_state_dir"
+            fi
+        fi
+    fi
+    # move restart created by spinup to external folder (AS runtime only)
+    if $(has_config lpjg:spinup)
+    then
+        state_dir="lpjg_state_$(printf %04d $((leg_start_date_yyyy)))"
+        if [[ $lpjg_state_dir != "" ]]
+        then
+          rm -rf ${lpjg_state_dir}/${state_dir}
+          mkdir -p ${lpjg_state_dir}
+          mv ${state_dir} ${lpjg_state_dir}
+        fi
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Move OSM restart files to archive directory
+    # -------------------------------------------------------------------------
+    if $(has_config osm)
+    then
+      outdir="restart/osm/$(printf %03d $((leg_number)))"
+      mkdir -p ${outdir}
+      mv restartout.nc $outdir/
+      rm -f restartin.nc restartin.nc.lnk
+      cp -f $outdir/restartout.nc restartin.nc 
+      ln -sf $outdir/restartout.nc restartin.nc.lnk
+    fi 
+
+    # -------------------------------------------------------------------------
+    # *** Move log files to archive directory
+    # -------------------------------------------------------------------------
+    outdir="log/$(printf %03d $((leg_number)))"
+    mkdir -p ${outdir}
+
+    for f in \
+        guess.log run1/guess0.log \
+        nout.000000 debug.??.?????? A*_??.nc O*_??.nc \
+        osm.log input
+    do
+        test -f ${f} && mv ${f} ${outdir}
+    done
+
+    # -------------------------------------------------------------------------
+    # *** Copy OASIS restart files to archive directory
+    #     NOTE: These files are copied and not moved as they are used in the
+    #           next leg!
+    #           Note also that the OASIS restart files present at the end of
+    #           the leg correspond to the start of the next leg!
+    # -------------------------------------------------------------------------
+    outdir="restart/oasis/$(printf %03d $((leg_number+1)))"
+    mkdir -p ${outdir}
+
+    for f in vegin.nc lpjgv.nc
+    do
+        test -f ${f} && cp ${f} ${outdir}
+    done
+
+    # -------------------------------------------------------------------------
+    # *** Write the restart control file
+    # -------------------------------------------------------------------------
+
+    # Compute CPMIP performance
+    sypd="$(cpmip_sypd $leg_length_sec $(($t2 - $t1)))"
+    ncores=0
+    has_config lpjg      && (( ncores+=${lpjg_numproc} )) || :
+    has_config lpjg_forcing  && (( ncores+=${lpjg_forcing_numproc} )) || :
+    has_config osm       && (( ncores+=${osm_numproc}  )) || :
+    chpsy="$(cpmip_chpsy  $leg_length_sec $(($t2 - $t1 +1)) $ncores)" #t_run+1 prevent div zero, just in case
+
+    echo "#"                                             | tee -a ${ece_info_file}
+    echo "# Finished leg at `date '+%F %T'` after ${tr} (hh:mm:ss)" \
+                                                         | tee -a ${ece_info_file}
+    echo "# CPMIP performance: $sypd SYPD   $chpsy CHPSY"| tee -a ${ece_info_file}
+    echo "leg_number=${leg_number}"                      | tee -a ${ece_info_file}
+    echo "leg_start_date=\"${leg_start_date}\""          | tee -a ${ece_info_file}
+    echo "leg_end_date=\"${leg_end_date}\""              | tee -a ${ece_info_file}
+
+    # Need to reset force_run_from_scratch in order to avoid destroying the next leg
+    force_run_from_scratch=false
+
+done # loop over legs
+
+# -----------------------------------------------------------------------------
+# *** Platform dependent finalising of the run
+# -----------------------------------------------------------------------------
+finalise
+

+ 698 - 0
runtime/autosubmit/ece-nemo.sh.tmpl

@@ -0,0 +1,698 @@
+#!/usr/bin/env bash
+
+set -xuve
+
+cd %CURRENT_ROOTDIR%
+
+# librunscript defines some helper functions
+source ./librunscript.sh
+
+# =============================================================================
+# *** BEGIN User configuration
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# *** General configuration
+# -----------------------------------------------------------------------------
+
+# Component configuration
+# (for syntax of the $config variable, see librunscript.sh)
+# get config from autosubmit variables
+[[ "%OCEAN_ini%" = *[!\ ]* ]] && start_nemo_from_restart=":start_from_restart" || start_nemo_from_restart=""
+[[ "%PISCES_ini%" = *[!\ ]* ]] && start_pisces_from_restart=":start_from_restart" || start_pisces_from_restart=""
+[ "%OCE_NUDG%" = TRUE ] && ocenudg=":ocenudg" || ocenudg=""
+[ "%SURF_RESTO%" = TRUE ] && surfresto=":surfresto" || surfresto=""
+[ "%PISCES%" = TRUE ] && [ "%PISCES_OFF%" = FALSE ] && pisces="pisces" || pisces=""
+[ "%PISCES_OFF%" = TRUE ] && pisces="pisces:offline"
+[ "%NEMO_remove_land%" = TRUE ] && elpin=":elpin" || elpin=""
+if [[ "%SAVE_IC%" = FALSE ]] || [[ "%SAVE_IC%" = "" ]]; then save_ic="" ; else save_ic="save_ic:%SAVE_IC%" ; fi
+
+config="nemo${start_nemo_from_restart}${ocenudg}${surfresto}${elpin} ${pisces}${start_pisces_from_restart} lim3 xios:detached ${save_ic}"
+
+nem_forcing_set=%NEM_FORCING_SET%
+nem_fixed_forcing_year=%NEM_FIXED_FORCING_YEAR%
+
+if [ -z ${nem_forcing_set-} ] ; then nem_forcing_set=CoreII ; fi
+
+# Experiment name (exactly 4 letters!)
+export exp_name=[[[MOD:GENERAL:EXP_NAME]]]
+
+# Simulation start and end date. Use any (reasonable) syntax you want.
+run_start_date="[[[MOD:GENERAL:RUN_START_DATE]]]"
+# define run_start_date_as with proper format e.g. 19900101
+export run_start_date_as=$(date -u -d "${run_start_date}" +%Y%m%d)
+run_end_date="[[[MOD:GENERAL:RUN_END_DATE]]]"
+
+# Simulation member. Use any (reasonable) syntax you want.
+export member="%MEMBER%"
+
+# Set $force_run_from_scratch to 'true' if you want to force this run to start
+# from scratch, possibly ignoring any restart files present in the run
+# directory. Leave set to 'false' otherwise.
+# NOTE: If set to 'true' the run directory $run_dir is cleaned!
+CHUNK=%CHUNK%
+force_run_from_scratch=[[[MOD:GENERAL:FORCE_RUN_FROM_SCRATCH]]]
+force_run_from_scratch=${force_run_from_scratch:-false}
+force_run_from_scratch=$(echo ${force_run_from_scratch} | tr '[:upper:]' '[:lower:]')
+# we only apply this for the first chunk
+if ${force_run_from_scratch} && [[ "${CHUNK}" != "1" ]] ; then
+  force_run_from_scratch=false
+fi
+
+# Resolution
+nem_grid=[[[MOD:NEM:GRID]]]
+
+# Restart frequency. Use any (reasonable) number and time unit you want.
+# For runs without restart, leave this variable empty
+rst_freq="[[[MOD:GENERAL:RST_FREQ]]]"
+
+# Number of restart legs to be run in one go
+run_num_legs=[[[MOD:GENERAL:RUN_NUM_LEGS]]]
+
+# Directories
+start_dir=${PWD}
+ctrl_file_dir=${start_dir}/ctrl
+output_control_files_dir=${start_dir}/[[[MOD:GENERAL:OUTPUT_CONTROL_FILES_DIR]]]
+
+# Architecture
+build_arch=[[[PLT:ACTIVE:BUILD_ARCH]]]
+use_machinefile=[[[PLT:ACTIVE:USE_MACHINEFILE]]]
+
+# This file is used to store information about restarts
+ece_info_file="ece.info"
+
+# -----------------------------------------------------------------------------
+# *** Read platform dependent configuration
+# -----------------------------------------------------------------------------
+source ./ecconf.cfg
+
+configure
+
+# -----------------------------------------------------------------------------
+# *** Time step settings
+# -----------------------------------------------------------------------------
+case "${nem_grid}" in
+
+    ORCA1L*)   nem_time_step_sec=2700; lim_time_step_sec=2700 ;;
+    ORCA025L*) nem_time_step_sec=900 ; lim_time_step_sec=900  ;;
+
+    *)  error "Can't set time steps for unknown horizontal grid: ${nem_grid}"
+        ;;
+esac
+
+# -----------------------------------------------------------------------------
+# *** NEMO/LIM configuration
+# -----------------------------------------------------------------------------
+
+# This is only needed if the experiment is started from an existing set of NEMO
+# restart files
+nem_restart_file_path=${ini_data_dir}
+
+nem_restart_offset=0
+
+nem_res_hor=$(echo ${nem_grid} | sed 's:ORCA\([0-9]\+\)L[0-9]\+:\1:')
+
+# Pick correct NEMO configuration, which is one of:
+#   NEMO standalone, NEMO+PISCES-standaone, PISCES-offline
+                             nem_config_name=${nem_grid}_LIM3_standalone
+has_config pisces         && nem_config_name=${nem_grid}_LIM3_PISCES_standalone
+has_config pisces:offline && nem_config_name=${nem_grid}_OFF_PISCES_standalone
+
+nem_exe_file=${ecearth_src_dir}/nemo-3.6/CONFIG/${nem_config_name}/BLD/bin/nemo.exe
+
+nem_numproc=[[[MOD:NEM:NUMPROC]]]
+
+# Thermal conductivity of snow, see comment in ctrl/namelist.lim3.ref.sh
+nem_rn_cdsn=0.27
+
+# -----------------------------------------------------------------------------
+# *** XIOS configuration
+# -----------------------------------------------------------------------------
+
+xio_exe_file=${ecearth_src_dir}/xios-2.5/bin/xios_server.exe
+
+xio_numproc=[[[MOD:XIO:NUMPROC]]]
+
+# -----------------------------------------------------------------------------
+# *** Extra initial conditions saved during the run
+# -----------------------------------------------------------------------------
+if has_config save_ic
+then
+    source ./libsave_ic.sh
+    declare -a save_ic_date save_ic_date1 save_ic_sec save_ic_day save_ic_ppt_file save_ic_nemo_ts
+fi
+
+# =============================================================================
+# *** END of User configuration
+# =============================================================================
+
+# =============================================================================
+# *** This is where the code begins ...
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# *** Create the run dir if necessary and go there
+#     Everything is done from here.
+# -----------------------------------------------------------------------------
+if [ ! -d ${run_dir} ]
+then
+    mkdir -p ${run_dir}
+fi
+cd ${run_dir}
+
+# -----------------------------------------------------------------------------
+# *** Determine the time span of this run and whether it's a restart leg
+# -----------------------------------------------------------------------------
+
+# Regularise the format of the start and end date of the simulation
+run_start_date=$(absolute_date_noleap "${run_start_date}")
+run_end_date=$(absolute_date_noleap "${run_end_date}")
+
+# Loop over the number of legs
+for (( ; run_num_legs>0 ; run_num_legs-- ))
+do
+
+    # Check for restart information file and set the current leg start date
+    #   Ignore restart information file if force_run_from_scratch is true
+    if ${force_run_from_scratch} || ! [ -r ${ece_info_file} ]
+    then
+        leg_is_restart=false
+        leg_start_date=${run_start_date}
+        leg_number=1
+    else
+        leg_is_restart=true
+        . ./${ece_info_file}
+        leg_start_date=${leg_end_date}
+        leg_number=$((leg_number+1))
+    fi
+
+    # Compute the end date of the current leg
+    if [ -n "${rst_freq}" ]
+    then
+        leg_end_date=$(absolute_date_noleap "${leg_start_date} + ${rst_freq}")
+    else
+        leg_end_date=${run_end_date}
+    fi
+
+    if [ $(date -d "${leg_end_date}" +%s) -gt $(date -d "${run_end_date}" +%s) ]
+    then
+        leg_end_date=${run_end_date}
+    fi
+
+    # Some time variables needed later
+    leg_length_sec=$(( $(date -d "${leg_end_date}" +%s) - $(date -d "${leg_start_date}" +%s) ))
+    leg_start_sec=$(( $(date -d "${leg_start_date}" +%s) - $(date -d "${run_start_date}" +%s) ))
+    leg_end_sec=$(( $(date -d "${leg_end_date}" +%s) - $(date -d "${run_start_date}" +%s) ))
+    leg_start_date_yyyymmdd=$(date -u -d "${leg_start_date}" +%Y%m%d)
+    leg_start_date_yyyy=$(date -u -d "${leg_start_date}" +%Y)
+    leg_end_date_yyyy=$(date -u -d "${leg_end_date}" +%Y)
+
+    # Correct for leap days because NEMO standalone uses no-leap calendar
+    leg_length_sec=$(( leg_length_sec - $(leap_days "${leg_start_date}" "${leg_end_date}")*24*3600 ))
+    leg_start_sec=$(( leg_start_sec - $(leap_days "${run_start_date}" "${leg_start_date}")*24*3600 ))
+    leg_end_sec=$(( leg_end_sec - $(leap_days "${run_start_date}" "${leg_end_date}")*24*3600 ))
+
+    # Check whether there's actually time left to simulate - exit otherwise
+    if [ ${leg_length_sec} -le 0 ]
+    then
+        info "Leg start date equal to or after end of simulation."
+        info "Nothing left to do. Exiting."
+        exit 0
+    fi
+
+    # Initial conditions saved during the run
+    do_save_ic=false
+    save_ic_custom=false
+    has_config save_ic && save_ic_get_config
+    # if you do not use an option with save_ic, you must define 'do_save_ic' and
+    # 'save_ic_date_offset' here or in ../libsave_ic.sh/save_ic_get_config()
+    # with AS runtime, no need to edit the script, set SAVE_IC_OFFSET (and optionally SAVE_IC_COND)
+    if $save_ic_custom
+    then
+        [[ "%SAVE_IC_COND%" = "" ]] && save_ic_cond=true || save_ic_cond='%SAVE_IC_COND%'
+        if eval $save_ic_cond ; then do_save_ic=true ; else do_save_ic=false ; fi
+        save_ic_date_offset=( %SAVE_IC_OFFSET% )
+    fi
+    ${do_save_ic} && save_ic_define_vars
+
+    # -------------------------------------------------------------------------
+    # *** Prepare the run directory for a run from scratch
+    # -------------------------------------------------------------------------
+    if ! $leg_is_restart
+    then
+        # ---------------------------------------------------------------------
+        # *** Check if run dir is empty. If not, and if we are allowed to do so
+        #     by ${force_run_from_scratch}, remove everything
+        # ---------------------------------------------------------------------
+        if $(ls * >& /dev/null)
+        then
+            if ${force_run_from_scratch}
+            then
+                rm -fr ${run_dir}/*
+            else
+                error "Run directory not empty and \$force_run_from_scratch not set."
+            fi
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Copy executables of model components
+        # *** Additionally, create symlinks to the original place for reference
+        # ---------------------------------------------------------------------
+        cp    ${nem_exe_file} .
+        ln -s ${nem_exe_file} $(basename ${nem_exe_file}).lnk
+
+        cp    ${xio_exe_file} .
+        ln -s ${xio_exe_file} $(basename ${xio_exe_file}).lnk
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for NEMO (linked)
+        # ---------------------------------------------------------------------
+
+        # Link initialisation files for matching ORCA grid
+        for f in \
+            bathy_meter.nc coordinates.nc \
+            ahmcoef.nc \
+            K1rowdrg.nc M2rowdrg.nc mask_itf.nc \
+            decay_scale_bot.nc decay_scale_cri.nc \
+            mixing_power_bot.nc mixing_power_cri.nc mixing_power_pyc.nc \
+            runoff_depth.nc subbasins.nc
+        do
+            [ -f ${ini_data_dir}/nemo/initial/${nem_grid}/$f ] && ln -s ${ini_data_dir}/nemo/initial/${nem_grid}/$f
+        done
+
+        # Copying the time independent NEMO files for the matching ORCA grid in order to facilitate cmorisation:
+        for f in \
+            bathy_meter.nc subbasins.nc
+        do
+            mkdir -p output/nemo/ofx-data
+            [ -f ${ini_data_dir}/nemo/initial/${nem_grid}/$f ] && cp -f ${ini_data_dir}/nemo/initial/${nem_grid}/$f output/nemo/ofx-data/
+        done
+
+        # Link geothermal heating file (independent of grid) and matching weight file
+        ln -s ${ini_data_dir}/nemo/initial/Goutorbe_ghflux.nc
+        ln -s ${ini_data_dir}/nemo/initial/weights_Goutorbe1_2_orca${nem_res_hor}_bilinear.nc
+
+        # Link either restart files or climatology files for the initial state
+        if $(has_config nemo:start_from_restart)
+        then
+            # When linking restart files, we accept three options:
+            # (1) Merged files for ocean and ice, i.e.
+            #     restart_oce.nc and restart_ice.nc
+            # (2) One-file-per-MPI-rank, i.e.
+            #     restart_oce_????.nc and restart_ice_????.nc
+            #     No check is done whether the number of restart files agrees
+            #     with the number of MPI ranks for NEMO!
+            # (3) One-file-per-MPI-rank with a prefix, i.e.
+            #     <exp_name>_<time_step>_restart_oce_????.nc (similar for the ice)
+            #     The prefix is ignored.
+            # The code assumes that one of the options can be applied! If more
+            # options are applicable, the first is chosen. If none of the
+            # options apply, NEMO will crash with missing restart file.
+            if   ls -U ${nem_restart_file_path}/restart_[oi]ce.nc > /dev/null 2>&1
+            then
+                 ln -s ${nem_restart_file_path}/restart_[oi]ce.nc ./
+
+            elif ls -U ${nem_restart_file_path}/restart_[oi]ce_????.nc > /dev/null 2>&1
+            then
+                 ln -s ${nem_restart_file_path}/restart_[oi]ce_????.nc ./
+
+            else
+                for f in ${nem_restart_file_path}/????_????????_restart_[oi]ce_????.nc
+                do
+                    ln -s $f $(echo $f | sed 's/.*_\(restart_[oi]ce_....\.nc\)/\1/')
+                done
+            fi
+        else
+
+            # Temperature and salinity files for initialisation
+            ln -s ${ini_data_dir}/nemo/climatology/absolute_salinity_WOA13_decav_Reg1L75_clim.nc
+            ln -s ${ini_data_dir}/nemo/climatology/conservative_temperature_WOA13_decav_Reg1L75_clim.nc
+            ln -s ${ini_data_dir}/nemo/climatology/weights_WOA13d1_2_orca${nem_res_hor}_bilinear.nc
+        fi
+
+        # Grid dependent runoff files
+        case ${nem_grid} in
+          ORCA1*)
+            ln -s ${ini_data_dir}/nemo/climatology/runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc
+            if [[ "${nem_forcing_set}" == "JRA55_1.4" ]] ; then
+              ln -s ${ini_data_dir}/nemo/forcing/JRA55_1.4/runoff_depth_JRA.nc
+            fi
+            ;;
+          ORCA025*)
+            ln -s ${ini_data_dir}/nemo/climatology/ORCA_R025_runoff_v1.1.nc
+            ;;
+        esac
+
+        #for ocean_nudging
+        if $(has_config nemo:ocenudg) ; then
+          ln -fs ${ini_data_dir}/nemo/oce_nudg/resto.nc ./
+        fi
+ 
+        # Salinity file (needed for diagnostics)
+        [ -f ${ini_data_dir}/nemo/climatology/${nem_grid}/sali_ref_clim_monthly.nc ] && ln -s ${ini_data_dir}/nemo/climatology/${nem_grid}/sali_ref_clim_monthly.nc
+
+        # Write fake file for previous fresh water budget adjustment (nn_fwb==2 in namelist)
+        echo "                               0  0.0000000000000000E+00  0.0000000000000000E+00" > EMPave_old.dat
+
+        # XIOS files
+        . ${ctrl_file_dir}/iodef.xml.sh > iodef.xml
+        ln -s ${ctrl_file_dir}/context_nemo.xml
+        ln -s ${ctrl_file_dir}/domain_def_nemo.xml
+        ln -s ${ctrl_file_dir}/axis_def_nemo.xml
+        ln -s ${ctrl_file_dir}/grids_def_nemo.xml
+        ln -s ${ctrl_file_dir}/field_def_nemo-lim.xml
+        ln -s ${ctrl_file_dir}/field_def_nemo-opa.xml
+        ln -s ${ctrl_file_dir}/field_def_nemo-pisces.xml
+        ln -s ${ctrl_file_dir}/field_def_nemo-inerttrc.xml
+        ln -s ${output_control_files_dir}/file_def_nemo-lim3.xml file_def_nemo-lim.xml
+        ln -s ${output_control_files_dir}/file_def_nemo-opa.xml
+        ln -s ${output_control_files_dir}/file_def_nemo-pisces.xml
+
+        if [ -f ${ini_data_dir}/xios/ORCA${nem_res_hor}/coordinates_xios.nc ]
+        then
+            cp ${ini_data_dir}/xios/ORCA${nem_res_hor}/coordinates_xios.nc ./
+        else
+            info "File 'coordinates_xios.nc' not found. NEMO can not be run with land domain removal!"
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for TOP/PISCES (linked)
+        # ---------------------------------------------------------------------
+        if $(has_config pisces)
+        then
+            ln -fs ${ini_data_dir}/nemo/pisces/dust_INCA_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/ndeposition_Duce_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/pmarge_etopo_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/river_global_news_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/Solubility_T62_Mahowald_ORCA_R1.nc
+
+            ln -fs ${ini_data_dir}/nemo/pisces/par_fraction_gewex_clim90s00s_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/DIC_GLODAP_annual_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/Alkalini_GLODAP_annual_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/O2_WOA2009_monthly_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/PO4_WOA2009_monthly_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/Si_WOA2009_monthly_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/DOC_PISCES_monthly_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/Fer_PISCES_monthly_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/NO3_WOA2009_monthly_ORCA_R1.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/mole-fraction-of-carbon-dioxide-in-air_input4MIPs_GHGConcentrations_CMIP_UoM-CMIP-1-2-0_gr1-GMNHSH_1637-2019.txt atcco2.txt
+        fi
+            #linking surface boundary conditions for CFCs (even if CFCs are not included)
+            ln -fs ${ini_data_dir}/nemo/cfc/CFCs_CDIAC_extension_1637_2019.dat CFCs_CDIAC.dat
+
+        if $(has_config pisces:start_from_restart)
+        then
+            # Same three options as for nemo:start_from_restart
+            if   ls -U ${nem_restart_file_path}/restart_trc.nc > /dev/null 2>&1
+            then
+                ln -s ${nem_restart_file_path}/restart_trc.nc ./
+
+            elif ls -U ${nem_restart_file_path}/restart_trc_????.nc > /dev/null 2>&1
+            then
+                ln -s ${nem_restart_file_path}/restart_trc_????.nc ./
+
+            else
+                for f in ${nem_restart_file_path}/????_????????_restart_trc_????.nc
+                do
+                    ln -s $f $(echo $f | sed 's/.*_\(restart_trc_....\.nc\)/\1/')
+                done
+            fi
+        fi
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for TOP/PISCES (linked) ADDED FOR PISCES OFFLINE
+        # ---------------------------------------------------------------------
+        if $(has_config pisces:offline)
+        then
+            ln -fs ${ini_data_dir}/nemo/pisces/pisces_dyn/OfflineForcing_grid_U.nc OfflineForcing_grid_U.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/pisces_dyn/OfflineForcing_grid_V.nc OfflineForcing_grid_V.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/pisces_dyn/OfflineForcing_grid_W.nc OfflineForcing_grid_W.nc
+            ln -fs ${ini_data_dir}/nemo/pisces/pisces_dyn/OfflineForcing_grid_T.nc OfflineForcing_grid_T.nc
+            ln -fs ${ctrl_file_dir}/context_nemo_offline.xml context_nemo.xml
+        fi
+
+    else # i.e. $leg_is_restart == true
+
+        # ---------------------------------------------------------------------
+        # *** Remove all leftover output files from previous legs
+        # ---------------------------------------------------------------------
+
+        # NEMO output files
+        rm -f ${exp_name}_??_????????_????????_{grid_U,grid_V,grid_W,grid_T,icemod,SBC,scalar,SBC_scalar,diad_T}.nc
+
+        restart_dir="restart/nemo/$(printf %03d $((leg_number)))"
+        if ! $(has_config pisces:offline) ; then
+            [ -f ${restart_dir}/EMPave_old.dat ] && cp ${restart_dir}/EMPave_old.dat .
+        fi
+    fi # ! $leg_is_restart
+
+    #--------------------------------------------------------------------------
+    # *** Surface restoring and ocean nudging options
+    #--------------------------------------------------------------------------
+        #for ocean_nudging
+        if $(has_config nemo:ocenudg) ; then
+          ln -fs ${ini_data_dir}/nemo/oce_nudg/temp_sal_*.nc ./
+        fi
+
+
+        #for surface restoring
+        if $(has_config nemo:surfresto) ; then
+          ln -fs ${ini_data_dir}/nemo/surface_restoring/sss_restore_data*.nc  ./
+          ln -fs ${ini_data_dir}/nemo/surface_restoring/sst_restore_data*.nc  ./
+          ln -fs ${ini_data_dir}/nemo/surface_restoring/mask_restore*.nc ./
+        fi
+
+    # -------------------------------------------------------------------------
+    # *** Remove land grid-points
+    # -------------------------------------------------------------------------
+    if $(has_config nemo:elpin)
+    then
+        if [ ! -f coordinates_xios.nc ]
+        then
+            error "ELpIN requested, but file 'coordinates_xios.nc' was not found"
+        fi
+        jpns=($(${ecearth_src_dir}/util/ELPiN/ELPiNv2.cmd ${nem_numproc}))
+        info "nemo domain decompostion from ELpIN: ${jpns[@]}"
+        nem_numproc=${jpns[0]}
+        nem_jpni=${jpns[1]}
+        nem_jpnj=${jpns[2]}
+    else
+        info "nemo original domain decomposition (not using ELPiN)"
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Initial conditions saved during the run
+    # -------------------------------------------------------------------------
+    ${do_save_ic} && save_ic_prepare_output
+
+    # -------------------------------------------------------------------------
+    # *** Create some control files
+    # -------------------------------------------------------------------------
+
+    # used in namelist.nemo
+    is_climatology=".true."
+    if [[ "${nem_forcing_set}" == "JRA55_1.4" || "${nem_forcing_set}" == "era5" || "${nem_forcing_set}" == "ERA5_HRES" || "${nem_forcing_set}" == "ERA5_ENDA" ]] ; then
+      ln_dm2dc=".false."
+    else
+      ln_dm2dc=".true."
+    fi
+
+    if [[ ${nem_fixed_forcing_year-} == -1 ]]  && ! [[ "${nem_forcing_set}" == "CoreII" ]] ; then  is_climatology=".false." ; fi
+
+    if [[ "${nem_forcing_set}" == "JRA55_1.4" ]] ; then
+      forcing_runoff="namelist.nemo-runoff-JRA55_1.4"
+    else
+      forcing_runoff="namelist.nemo-runoff-default"
+    fi
+
+    # NEMO and LIM namelists
+    . ${ctrl_file_dir}/namelist.nemo.ref.sh                        > namelist_ref
+    . ${ctrl_file_dir}/namelist.nemo-${nem_grid}-standalone.cfg.sh > namelist_cfg
+    . ${ctrl_file_dir}/namelist.lim3.ref.sh                        > namelist_ice_ref
+    . ${ctrl_file_dir}/namelist.lim3-${nem_grid}.cfg.sh            > namelist_ice_cfg
+
+    # NEMO/TOP+PISCES namelists
+    has_config pisces && . ${ctrl_file_dir}/namelist.nemo.top.ref.sh    > namelist_top_ref
+    has_config pisces && . ${ctrl_file_dir}/namelist.nemo.top.cfg.sh    > namelist_top_cfg
+    has_config pisces && . ${ctrl_file_dir}/namelist.nemo.pisces.ref.sh > namelist_pisces_ref
+    has_config pisces && . ${ctrl_file_dir}/namelist.nemo.pisces.cfg.sh > namelist_pisces_cfg
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.age.ref.sh                 > namelist_age_ref
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.age.cfg.sh                 > namelist_age_cfg
+    #include CFCs namelist even if CFCs are not included
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.cfc.ref.sh                 > namelist_cfc_ref
+    has_config nemo      && . ${ctrl_file_dir}/namelist.nemo.cfc.cfg.sh                 > namelist_cfc_cfg
+    # -------------------------------------------------------------------------
+    # *** Link the appropriate NEMO restart files of the previous leg
+    # -------------------------------------------------------------------------
+    if $leg_is_restart
+    then
+        ns=$(printf %08d $(( leg_start_sec / nem_time_step_sec - nem_restart_offset )))
+        for (( n=0 ; n<nem_numproc ; n++ ))
+        do
+            np=$(printf %04d ${n})
+            ln -fs ${exp_name}_${ns}_restart_oce_${np}.nc restart_oce_${np}.nc
+            ln -fs ${exp_name}_${ns}_restart_ice_${np}.nc restart_ice_${np}.nc
+            has_config pisces && \
+            ln -fs ${exp_name}_${ns}_restart_trc_${np}.nc restart_trc_${np}.nc
+        done
+
+        # Make sure there are no global restart files
+        # If links are found, they will be removed. We are cautious and do
+        # _not_ remove real files! However, if real global restart files are
+        # present, NEMO/LIM will stop because time stamps will not match.
+        [ -h restart_oce.nc ] && rm restart_oce.nc
+        [ -h restart_ice.nc ] && rm restart_ice.nc
+        [ -h restart_trc.nc ] && rm restart_trc.nc
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Start the run
+    # -------------------------------------------------------------------------
+
+    # Link NEMO forcing files
+
+
+    if ! [[ "${nem_forcing_set}" == "CoreII" ]] && \
+       ! [[ "${nem_forcing_set}" == "DFS5.2" ]] && \
+       ! [[ "${nem_forcing_set}" == "eraint" ]] && \
+       ! [[ "${nem_forcing_set}" == "CoreII_interannual" ]]&& \
+       ! [[ "${nem_forcing_set}" == "era5" ]] && \
+       ! [[ "${nem_forcing_set}" == "ERA5_HRES" ]] && \
+       ! [[ "${nem_forcing_set}" == "ERA5_ENDA" ]] && \
+       ! [[ "${nem_forcing_set}" == "JRA55_1.4" ]]
+    then
+        echo "${nem_forcing_set}" not supported;
+        exit 1
+    fi
+
+    case "${nem_forcing_set}" in
+      CoreII)
+          for variable in u_10 v_10 t_10 q_10 ncar_precip ncar_rad ; do
+              [ -f "${ini_data_dir}/nemo/forcing/CoreII/${variable}.15JUNE2009_fill.nc" ] && ln -sf "${ini_data_dir}/nemo/forcing/CoreII/${variable}.15JUNE2009_fill.nc"
+          done
+          # Weight files for forcing
+          ln -fs ${ini_data_dir}/nemo/forcing/CoreII/weights_coreII_2_orca${nem_res_hor}_bilinear.nc
+          ln -fs ${ini_data_dir}/nemo/forcing/CoreII/weights_coreII_2_orca${nem_res_hor}_bicubic.nc
+          ;;
+      * )
+          for forcing_file in ${ini_data_dir}/nemo/forcing/${nem_forcing_set}/* ; do
+            [ -f ${forcing_file} ] && ln -fs ${forcing_file} ./$(basename ${forcing_file})
+          done
+          #Weight files for forcing
+          ln -sf ${ini_data_dir}/nemo/forcing/weights/* .
+      ;;
+    esac
+
+    # Use the launch function from the platform configuration file
+    t1=$(date +%s)
+    launch \
+        ${xio_numproc} ${xio_exe_file} -- \
+        ${nem_numproc} ${nem_exe_file}
+    t2=$(date +%s)
+
+    tr=$(date -d "0 -$t1 sec + $t2 sec" +%T)
+
+    # -------------------------------------------------------------------------
+    # *** Check for signs of success
+    #     Note the tests provide no guarantee that things went fine! They are
+    #     just based on the IFS and NEMO log files. More tests (e.g. checking
+    #     restart files) could be implemented.
+    # -------------------------------------------------------------------------
+    # Check for NEMO success
+    if [ -f ocean.output ]
+    then
+        if [ "$(sed -n '/New day/h; ${g;s:.*\([0-9/]\{10\}\).*:\1:;p;}' ocean.output)" == "$(date -u -d "$(absolute_date_noleap "${leg_end_date} - 1 day")" +%Y/%m/%d)" ]
+        then
+            info "Leg successfully completed according to NEMO log file 'ocean.output'."
+        else
+            error "Leg not completed according to NEMO log file 'ocean.output'."
+        fi
+
+    else
+        error "NEMO log file 'ocean.output' not found after run."
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Post-process initial conditions saved during the run if requested
+    # -------------------------------------------------------------------------
+    ${do_save_ic} && save_ic_postproc
+
+    # -------------------------------------------------------------------------
+    # *** Move NEMO output files to archive directory
+    # -------------------------------------------------------------------------
+    outdir="output/nemo/$(printf %03d $((leg_number)))"
+    mkdir -p ${outdir}
+
+    for v in grid_U grid_V grid_W grid_T icemod SBC scalar SBC_scalar diad_T ptrc_T bioscalar \
+             grid_T_2D grid_U_2D grid_V_2D grid_W_2D grid_T_3D grid_U_3D grid_V_3D grid_W_3D \
+             grid_T_SFC grid_1point grid_T_3D_ncatice vert_sum \
+             grid_ptr_W_3basin_3D grid_ptr_T_3basin_2D grid_ptr_T_2D \
+             zoom_700_sum zoom_300_sum zoom_2000_sum
+    do
+        for f in ${exp_name}_*_????????_????????_*${v}.nc
+        do
+            test -f $f && mv $f $outdir/
+        done
+    done
+
+    # -------------------------------------------------------------------------
+    # *** Move NEMO restart files to archive directory
+    # -------------------------------------------------------------------------
+    if $leg_is_restart
+    then
+        outdir="restart/nemo/$(printf %03d $((leg_number)))"
+        mkdir -p ${outdir}
+
+        ns=$(printf %08d $(( leg_start_sec / nem_time_step_sec - nem_restart_offset )))
+        for f in oce ice trc
+        do
+            test -f ${exp_name}_${ns}_restart_${f}_0000.nc && \
+                 mv ${exp_name}_${ns}_restart_${f}_????.nc ${outdir}
+        done
+        if ! $(has_config pisces:offline)
+        then
+            cp EMPave_old.dat ${outdir}/EMPave_old.dat
+        fi
+    fi
+    if ! $(has_config pisces:offline)
+    then
+        cp EMPave.dat EMPave_old.dat
+    fi
+    # -------------------------------------------------------------------------
+    # *** Move log files to archive directory
+    # -------------------------------------------------------------------------
+    outdir="log/$(printf %03d $((leg_number)))"
+    mkdir -p ${outdir}
+
+    for f in \
+        ocean.output time.step solver.stat
+    do
+        test -f ${f} && mv ${f} ${outdir}
+    done
+
+    # -------------------------------------------------------------------------
+    # *** Write the restart control file
+    # -------------------------------------------------------------------------
+
+
+    # Compute CPMIP performance
+    sypd="$(cpmip_sypd $leg_length_sec $(($t2 - $t1)))"
+    chpsy="$(cpmip_chpsy  $leg_length_sec $(($t2 - $t1)) $(($nem_numproc + $xio_numproc)))"
+
+    echo "#"                                             | tee -a ${ece_info_file}
+    echo "# Finished leg at `date '+%F %T'` after ${tr} (hh:mm:ss)" \
+                                                         | tee -a ${ece_info_file}
+    echo "# CPMIP performance: $sypd SYPD   $chpsy CHPSY"| tee -a ${ece_info_file}
+    echo "leg_number=${leg_number}"                      | tee -a ${ece_info_file}
+    echo "leg_start_date=\"${leg_start_date}\""          | tee -a ${ece_info_file}
+    echo "leg_end_date=\"${leg_end_date}\""              | tee -a ${ece_info_file}
+
+    # Need to reset force_run_from_scratch in order to avoid destroying the next leg
+    force_run_from_scratch=false
+
+done # loop over legs
+
+# -----------------------------------------------------------------------------
+# *** Platform dependent finalising of the run
+# -----------------------------------------------------------------------------
+finalise

+ 171 - 0
runtime/autosubmit/test.sh

@@ -0,0 +1,171 @@
+#!/bin/bash
+source ../classic/librunscript.sh
+source ecconf.cfg
+
+function mpirun()
+{
+    # This function overrides the mpi command to be able to use the native launch function
+    :
+}
+
+function get_hosts()
+{
+    # This function overrides get_hosts from ecconf.cfg in order to use dummy testing nodes
+    hosts=(node01 node02 node03 node04 node05 node06 node07 node08 node09 \
+           node10 node11 node12 node13 node14 node15 node16 node17 node18 \
+           node19 node20 node21 node22 node23 node24 node25 node26 node27) 
+}
+
+function machinefile_config()
+{
+    # This function overrides the user configuration to fix an environment
+
+    if has_config ifs nemo pisces rnfmapper xios lpjg ; then
+      if ! has_config tm5 ; then
+            ifs_ppn=48 #ifs_numproc=384
+            nem_ppn=42 #nem_numproc=331
+            xio_ppn=5  #xio_numproc=5
+            lpjg_ppn=6 #lpjg_numproc=42
+        else
+            ifs_ppn=44 #ifs_numproc=256
+            nem_ppn=48 #nem_numproc=192
+            xio_ppn=39 #xio_numproc=39
+            lpjg_ppn=4 #lpjg_numproc=28
+            tm5_ppn=4  #tm5_numproc=2x2
+        fi
+      else
+        # Add any new exclusive binary here
+        ifs_exc=TRUE
+        nem_exc=TRUE
+        xio_exc=TRUE
+        lpjg_exc=TRUE
+        tm5_exc=TRUE
+
+        # Modify the allocation to each binary using more than one process here
+        ifs_ppn=48
+        nem_ppn=48
+        xio_ppn=48
+        lpjg_ppn=48
+        tm5_ppn=45
+    fi
+}
+
+function esm_launch()
+{
+    # Launch function call as it is on ece-esm.sh
+    has_config nemo && \
+    cmd="${xio_numproc} ${xio_exe_file} -- \
+         ${nem_numproc} ${nem_exe_file} -- \
+         ${ifs_numproc} ${ifs_exe_file} -v ecmwf -e ${exp_name}" || \
+    cmd="${ifs_numproc} ${ifs_exe_file} -v ecmwf -e ${exp_name}"
+
+    has_config lpjg && cmd=${cmd}" -- ${lpjg_numproc} ${lpjg_exe_file} guess.ins -parallel"
+    has_config tm5  && cmd=${cmd}" -- ${tm5_numproc}  ${tm5_exe_file} tm5-run.rc"
+    has_config amip && cmd=${cmd}" -- ${amip_numproc} ${amip_exe_file}"
+    has_config nemo && cmd=${cmd}" -- ${rnf_numproc} ${rnf_exe_file}"
+
+    launch $cmd
+}
+
+function nemo_launch()
+{
+    # Launch function call as it is on ece-nemo.sh
+    launch ${xio_numproc} ${xio_exe_file} -- ${nem_numproc} ${nem_exe_file}
+}
+
+function test_machinefile()
+{
+    # Function that indirectly calls the launch function to then validate the output
+    use_machinefile="true"
+    launch_output=$(has_config ifs && esm_launch || nemo_launch)
+    validate_machinefile "$launch_output"
+}
+
+function validate_machinefile()
+{
+    # Function that validates the test taking into account the expected output and the expected test result
+    success="false"
+    # Validate that both machine file and output (errors) are equal to the expected.
+    # The machine is in a summarized format: group and count repeated consecutive lines, remove line breaks and squeeze repeated spaces. 
+    [ "$(cat machinefile | uniq -c | paste -d" " -s | tr -s " ")" == "$expected_machinefile" ] && \
+    [ "$launch_output" == "$expected_output" ] && success="true"
+    rm machinefile
+    [ "$success" == "true" ] && echo "TEST OK" || echo "TEST FAILED"
+}
+
+proc_per_node=48
+ifs_exe_file="somedir/ifs"
+nem_exe_file="somedir/nemo"
+rnf_exe_file="somedir/runoff-mapper"
+lpjg_exe_file="somedir/guess"
+amip_exe_file="somedir/amip-forcing"
+tm5_exe_file="somedir/tm5"
+xio_exe_file="somedir/xios_server"
+
+ifs_numproc=480
+nem_numproc=229
+rnf_numproc=1
+lpjg_numproc=96
+amip_numproc=1
+tm5_numproc=45
+xio_numproc=48
+
+expected_output=""
+
+#1 XIOS NEMO IFS RUNOFF_MAPPER
+config='ifs nemo:elpin lim3 rnfmapper xios:detached oasis save_ic:end_leg'
+expected_machinefile=' 48 node01 48 node02 48 node03 48 node04 48 node05 37 node06 48 node07 48 node08 48 node09 48 node10 48 node11 48 node12 48 node13 48 node14 48 node15 48 node16 1 node06'
+test_machinefile
+
+#2 XIOS NEMO IFS TM5 RUNOFF-MAPPER
+ifs_numproc=40
+nem_numproc=24
+xio_numproc=10
+config='ifs nemo lim3 rnfmapper xios oasis tm5'
+expected_machinefile=' 10 node01 24 node02 40 node03 45 node04 1 node01'
+test_machinefile
+
+#3 IFS AMIP TM5
+config='ifs amip oasis tm5'
+expected_machinefile=' 40 node01 45 node02 1 node01'
+test_machinefile
+
+#4 IFS AMIP
+ifs_numproc=479
+config='ifs amip oasis'
+expected_machinefile=' 48 node01 48 node02 48 node03 48 node04 48 node05 48 node06 48 node07 48 node08 48 node09 48 node10'
+test_machinefile
+
+#5 XIOS NEMO
+nem_numproc=336
+xio_numproc=96
+config='nemo lim3 xios'
+expected_machinefile=' 48 node01 48 node02 48 node03 48 node04 48 node05 48 node06 48 node07 48 node08 48 node09'
+test_machinefile
+
+#6 XIOS NEMO IFS LPJG RUNOFF-MAPPER
+nem_numproc=331
+ifs_numproc=384
+xio_numproc=5
+lpjg_numproc=42
+config='ifs nemo pisces rnfmapper xios lpjg'
+expected_machinefile=' 47 node01 42 node02 42 node03 42 node04 42 node05 42 node06 42 node07 37 node08 48 node09 48 node10 48 node11 48 node12 48 node13 48 node14 48 node15 48 node16 6 node02 6 node03 6 node04 6 node05 6 node06 6 node07 6 node08 1 node01'
+test_machinefile
+
+#7 XIOS NEMO IFS LPJG TM5 RUNOFF-MAPPER
+ifs_numproc=256
+nem_numproc=192
+xio_numproc=39
+lpjg_numproc=28
+tm5_numproc=4
+config='ifs nemo pisces rnfmapper xios lpjg tm5'
+expected_machinefile=' 39 node01 48 node02 48 node03 48 node04 48 node05 44 node06 44 node07 44 node08 44 node09 44 node10 36 node11 4 node01 4 node06 4 node07 4 node08 4 node09 4 node10 4 node11 5 node01'
+test_machinefile
+
+#8 INVALID CONFIGURATION TEST: INSUFFICIENT RESOURCES
+nem_numproc=9999
+xio_numproc=48
+config='ifs nemo lim3 rnfmapper xios oasis'
+expected_output="Not enough computing nodes"
+expected_machinefile=' 48 node01 48 node02 48 node03 48 node04 48 node05 48 node06 48 node07 48 node08 48 node09 48 node10 48 node11 48 node12 48 node13 48 node14 48 node15 48 node16 48 node17 48 node18 48 node19 48 node20 48 node21 48 node22 48 node23 48 node24 48 node25 48 node26 48 node27'
+test_machinefile

+ 39 - 0
runtime/autosubmit/transfer.sh

@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+# local_transfer.sh: Copies the EC-Earth output from the
+# remote machine to a local folder and extract it
+
+LOCAL_DIR=/esarchive/exp/ecearth/%EXPID%
+
+set -xvue
+
+HPCARCH=%HPCARCH%
+CHUNK=%CHUNK%
+# 
+# Copy Model output
+#
+mkdir -p $LOCAL_DIR 
+cd $LOCAL_DIR
+if [ ${HPCARCH} == 'cca-intel' ]
+then
+  chunk=$( printf "%03d\n" ${CHUNK} )
+  for m in ifs nemo
+  do
+    mkdir -p ${m}/${chunk}
+    for f in `ecaccess-file-dir %HPCHOST%:%HPCROOTDIR%/%SDATE%/%MEMBER%/runtime/output/${m}/$chunk`
+    do
+      ecaccess-file-mget -force %HPCHOST%:%HPCROOTDIR%/%SDATE%/%MEMBER%/runtime/output/${m}/$chunk/$f ${m}/$chunk/
+    done
+  done
+else
+  rsync -avz --remove-source-files --no-group --omit-dir-times --chmod=g+rwxs,o-rwx %HPCUSER%@%HPCHOST%:%HPCROOTDIR%/%SDATE%/%MEMBER%/runtime/output/ifs/??? .
+  rsync -avz --remove-source-files --no-group --omit-dir-times --chmod=g+rwxs,o-rwx %HPCUSER%@%HPCHOST%:%HPCROOTDIR%/%SDATE%/%MEMBER%/runtime/output/nemo/??? .
+fi
+
+# 
+# Extract output
+# 
+#for filename in CMOR*.tar.gz
+#do
+#  tar -zxvf $filename
+#  rm $filename
+#done

+ 320 - 0
runtime/classic/config-run.xml

@@ -0,0 +1,320 @@
+<?xml version="1.0"?>
+
+<Configuration xmlns:xi="http://www.w3.org/2001/XInclude">
+
+    <Translation name="RUN_OCE">
+        <Description>Run script file (oce only run)</Description>
+        <Template>ece-nemo.sh.tmpl</Template>
+        <Target>ece-nemo.sh</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <Translation name="RUN_ESM">
+        <Description>Run script file (coupled run: atm+esm components)</Description>
+        <Template>ece-esm.sh.tmpl</Template>
+        <Target>ece-esm.sh</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <Translation name="RUN_LSM">
+        <Description>Run script file (offline land surface run)</Description>
+        <Template>ece-lsm.sh.tmpl</Template>
+        <Target>ece-lsm.sh</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <Translation name="RT_CTRL_CHE">
+        <Description>Control file for TM5</Description>
+        <Template>ctrl/tm5-config-run.rc.tmpl</Template>
+        <Target>ctrl/tm5-config-run.rc</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <xi:include href="platform/bsc-nord3.xml" />
+    <xi:include href="platform/bsc-marenostrum4.xml" />
+    <xi:include href="platform/dmi-hpcdev-intel.xml" />
+    <xi:include href="platform/ecmwf-cca-cray.xml" />
+    <xi:include href="platform/ecmwf-cca-intel.xml" />
+    <xi:include href="platform/fmi-voima.xml" />
+    <xi:include href="platform/knmi-rhino.xml" />
+    <xi:include href="platform/csc-puhti-intel.xml" />
+    <xi:include href="platform/csc-puhti-intel-intelmpi.xml" />
+    <xi:include href="platform/nsc-bi.xml" />
+    <xi:include href="platform/nsc-tetralith.xml" />
+    <xi:include href="platform/pdc-beskow.xml" />
+    <xi:include href="platform/surfsara-cartesius.xml" />
+
+    <Model name="GENERAL">
+
+        <Parameter name="EXP_NAME">
+            <Description>Experiment name (4 letters)</Description>
+            <Type>STRING</Type>
+            <Value>ECE3</Value>
+        </Parameter>
+
+        <Parameter name="RUN_START_DATE">
+            <Description>Start date of the simulation. Use any reasonable syntax.</Description>
+            <Type>DATE</Type>
+            <Value>1990-01-01</Value>
+        </Parameter>
+
+        <Parameter name="RUN_END_DATE">
+            <Description>End date of the simulation. Use any reasonable syntax.</Description>
+            <Type>STRING</Type>
+            <Value>${run_start_date} + 10 years</Value>
+        </Parameter>
+
+        <Parameter name="FORCE_RUN_FROM_SCRATCH">
+            <Description>Start simulation from scratch, possibly ignoring any restart files. [true/false]</Description>
+            <Type>BOOLEAN</Type>
+            <Value>false</Value>
+        </Parameter>
+
+        <Parameter name="RST_FREQ">
+            <Description>Restart frequency, e.g., 2 months</Description>
+            <Type>STRING</Type>
+            <Value>1 year</Value>
+        </Parameter>
+
+        <Parameter name="RUN_NUM_LEGS">
+            <Description>Number of restart legs</Description>
+            <Type>INTEGER</Type>
+            <Value>1</Value>
+        </Parameter>
+
+        <Parameter name="OUTPUT_CONTROL_FILES_DIR">
+            <Description>The path to the IFS ppt and NEMO file_def file dir</Description>
+            <Type>PATH</Type>
+            <Value>ctrl</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="OASIS">
+
+        <Parameter name="CPL_FREQ_ATM_CHE_HRS">
+            <Description>Coupling frequency between IFS and TM5 in hours</Description>
+            <Type>INTEGER</Type>
+            <Value>6</Value>
+        </Parameter>
+
+        <Parameter name="CPL_FREQ_ATM_LPJG_HRS">
+            <Description>Coupling frequency between IFS|TM5 and LPJG in hours</Description>
+            <Type>INTEGER</Type>
+            <Value>24</Value>
+        </Parameter>
+
+        <Parameter name="LUCIA">
+            <Description>Lucia output: 0 -> Deactivated, -1 -> Legacy, -2 -> Updated CERFACS tool, -3 lucia_lite BSC</Description>
+            <Type>INTEGER</Type>
+            <Value>0</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="IFS">
+
+        <Parameter name="GRID">
+            <Description>Resolution of IFS grid</Description>
+            <Type>STRING</Type>
+            <Value>T255L91</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors running IFS</Description>
+            <Type>INTEGER</Type>
+            <Value>64</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6">
+            <Description>Use CMIP6 forcings (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>TRUE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6_SCENARIO">
+            <Description>SSP selection for 2015 onwards</Description>
+            <Type>STRING</Type>
+            <Value>historical</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6_A4xCO2">
+            <Description>Use Abrupt4xCO2 in CMIP6 DECK (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>FALSE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6_1PCTCO2">
+            <Description>Use 1pctCO2 for radiation in CMIP6 DECK (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>FALSE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP6_1PCTCO2_BGC">
+            <Description>Use 1pctCO2 for BGC components (LPJ-GUESS, PISCES) in CMIP6 DECK (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>FALSE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP5">
+            <Description>Use CMIP5 forcings (TRUE or FALSE)</Description>
+            <Type>BOOLEAN</Type>
+            <Value>TRUE</Value>
+        </Parameter>
+
+        <Parameter name="CMIP5_RCP">
+            <Description>RCP selection (1-4 or 0 for historical run)</Description>
+            <Type>INTEGER</Type>
+            <Value>0</Value>
+        </Parameter>
+
+        <Parameter name="CMIP_FIXYEAR">
+            <Description>Fix CMIP5/CMIP6 forcings at the indicated year (or 0 to ignore for transient runs)</Description>
+            <Type>INTEGER</Type>
+            <Value>0</Value>
+        </Parameter>
+
+        <Parameter name="CMIP_FIXYEAR_CH4">
+            <Description>Fix CMIP5/CMIP6 CH4 mixing ratios at the indicated year (or 0 to ignore for transient runs)</Description>
+            <Type>INTEGER</Type>
+            <Value>0</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="NEM">
+
+        <Parameter name="GRID">
+            <Description>Resolution of NEMO grid</Description>
+            <Type>STRING</Type>
+            <Value>ORCA1L75</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors running NEMO</Description>
+            <Type>INTEGER</Type>
+            <Value>64</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="XIO">
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors running XIOS</Description>
+            <Type>INTEGER</Type>
+            <Value>1</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="TM5">
+
+        <Parameter name="NLEVS">
+            <Description>Number of levels in TM5 (4, 10, 34 or 91)</Description>
+            <Type>INTEGER</Type>
+            <Value>10</Value>
+        </Parameter>
+
+        <Parameter name="ISTART">
+            <Description>TM5 initial tracer fields option (2,5,9,31,32 or 33)</Description>
+            <Type>INTEGER</Type>
+            <Value>9</Value>
+        </Parameter>
+
+        <Parameter name="TIME_STEP_SEC">
+            <Description>TM5 time step in seconds</Description>
+            <Type>INTEGER</Type>
+            <Value>3600</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC_X">
+            <Description>Number of processors in the X direction running TM5 (max 4)</Description>
+            <Type>INTEGER</Type>
+            <Value>2</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC_Y">
+            <Description>Number of processors in the Y direction running TM5 (max 45)</Description>
+            <Type>INTEGER</Type>
+            <Value>45</Value>
+        </Parameter>
+
+        <Parameter name="EMISS_FIXYEAR">
+            <Description>Fix EMISSIONS at the indicated year (0 to ignore, -1 to disable emissions for co2 version)</Description>
+            <Type>INTEGER</Type>
+            <Value>0</Value>
+        </Parameter>
+
+    </Model>
+
+    <Model name="LPJG">
+
+        <Parameter name="TIME_STEP_SEC">
+            <Description>LPJ-GUESS time step in seconds</Description>
+            <Type>INTEGER</Type>
+            <Value>86400</Value>
+        </Parameter>
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors running LPJG (min )</Description>
+            <Type>INTEGER</Type>
+            <Value>32</Value>
+        </Parameter>
+
+        <Parameter name="LPJG_FIXNDEPAFTER">
+            <Description>Fix N-Deposition from (>=0: year, -1:off)</Description>
+            <Type>INTEGER</Type>
+            <Value>2099</Value>
+            <!-- This is a hack as the final year (2100) is missing in the dataset -->
+        </Parameter>
+
+        <Parameter name="LPJG_FIXLUAFTER">
+            <Description>Fix Land-Use from (>=0: year, -1:off)</Description>
+            <Type>INTEGER</Type>
+            <Value>-1</Value>
+        </Parameter>
+
+        <Parameter name="LPJG_IFS_OUTPUT_DIR">
+          <Description>IFS output directory for lpjg_forcing to find ICMGG* files</Description>
+          <Type>PATH</Type>
+          <Value>${SCRATCH}/ECEARTH-RUNS/AAAA/output/ifs</Value>
+        </Parameter>
+
+        <Parameter name="LPJG_FORCING_DIR">
+          <Description>LPJG directory to find forcing</Description>
+          <Type>PATH</Type>
+          <Value>${SCRATCH}/ECEARTH-RUNS/LPJG_FORCING/${exp_name}</Value>
+        </Parameter>
+
+    </Model>
+    
+    <Model name="OSM">
+
+        <Parameter name="NUMPROC">
+            <Description>Number of processors/threads running OSM:openMP</Description>
+            <Type>INTEGER</Type>
+            <Value>12</Value>
+        </Parameter>
+
+        <Parameter name="OSM_FORCING_TYPE">
+          <Description>OSM forcing type, either ifs or one or the ERA reanalyses (erai, era20c, gswp3, era5)</Description>
+          <Type>STRING</Type>
+          <Value>ifs</Value>
+        </Parameter>
+
+        <Parameter name="OSM_IFS_OUTPUT_DIR">
+          <Description>IFS output directory for OSM to find ICMGG* files</Description>
+          <Type>PATH</Type>
+          <Value>${SCRATCH}/ECEARTH-RUNS/AAAA/output/ifs</Value>
+        </Parameter>
+
+        <Parameter name="OSM_FORCING_DIR">
+          <Description>OSM directory to find forcing or save if generated</Description>
+          <Type>PATH</Type>
+          <Value>${SCRATCH}/ECEARTH-RUNS/OSM_FORCING/${exp_name}</Value>
+        </Parameter>
+        
+    </Model>
+
+</Configuration>

+ 35 - 0
runtime/classic/ctrl/axis_def_nemo.xml

@@ -0,0 +1,35 @@
+<!--
+============================================================================================================
+= Axis definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+ 
+    <axis_definition>
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="deptht300" axis_ref="deptht" >
+         <zoom_axis begin="0" n="35" />
+      </axis>
+      <axis id="deptht700" axis_ref="deptht" >
+         <zoom_axis begin="0" n="43" />
+      </axis>
+      <axis id="deptht2000" axis_ref="deptht" >
+         <zoom_axis begin="0" n="54" />
+      </axis>
+      <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="1"               />
+      <axis id="ncatice" long_name="Ice category"       unit="1"               />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            />
+      <axis id="basin"   long_name="Sub-basin mask (1=Global 2=Atlantic 3=Indo-Pacific 4=Indian, 5=Pacific)"  unit="1" />
+      <axis id="3basin" axis_ref="basin" long_name="Sub-basin mask (1=Global 2=Atlantic 3=Indo-Pacific)" >
+         <zoom_axis begin="0" n="3" />
+      </axis>
+      <axis id="nstrait" long_name="Number of straits" unit="1" />
+      <axis id="section"     n_glo="16" />
+      <axis id="section_lim" n_glo="4" />
+      <axis id="gau" />
+    </axis_definition>
+

+ 39 - 0
runtime/classic/ctrl/context_nemo.xml

@@ -0,0 +1,39 @@
+<!--
+ ==============================================================================================
+    NEMO context
+==============================================================================================
+-->
+<context id="nemo">
+    <!-- $id$ -->
+    <variable_definition>
+    <!-- Year of time origin for NetCDF files; defaults to 1800 -->
+       <variable id="ref_year" type="int"> 1800 </variable>
+       <variable id="rau0"     type="float" > 1026.0 </variable>
+       <variable id="cpocean"  type="float" > 3991.86795711963 </variable>
+       <variable id="convSpsu" type="float" > 0.99530670233846  </variable>
+       <variable id="rhoic"    type="float" > 917.0 </variable>
+       <variable id="rhosn"    type="float" > 330.0 </variable>
+    </variable_definition>
+
+<!-- Fields definition -->
+    <field_definition src="./field_def_nemo-opa.xml"/>      <!--  NEMO ocean dynamics                     -->
+    <field_definition src="./field_def_nemo-lim.xml"/>      <!--  NEMO ocean sea ice                      -->
+    <field_definition src="./field_def_nemo-pisces.xml"/>   <!--  NEMO ocean biogeochemistry with PISCES  -->
+    <field_definition src="./field_def_nemo-inerttrc.xml"/> <!--  NEMO ocean inert gases, age, c14  -->
+
+
+<!-- Files definition -->
+    <file_definition src="./file_def_nemo-opa.xml"/>    <!--  NEMO ocean dynamics                     -->
+    <file_definition src="./file_def_nemo-lim.xml"/>    <!--  NEMO ocean sea ice                      -->
+    <file_definition src="./file_def_nemo-pisces.xml"/> <!--  NEMO ocean biogeochemistry with PISCES  -->
+
+<!-- Axis definition -->
+    <axis_definition src="./axis_def_nemo.xml"/>
+
+<!-- Domain definition -->
+    <domain_definition src="./domain_def_nemo.xml"/>
+
+<!-- Grids definition -->
+    <grid_definition src="./grids_def_nemo.xml"/>
+
+</context>

+ 28 - 0
runtime/classic/ctrl/context_nemo_offline.xml

@@ -0,0 +1,28 @@
+<!--
+ ============================================================================================== 
+    NEMO context
+============================================================================================== 
+-->
+<context id="nemo">
+<!-- $id$ -->
+    <variable_definition>
+    <!-- Year of time origin for NetCDF files; defaults to 1800 -->
+       <variable id="ref_year" type="int"> 1800 </variable>
+    </variable_definition>
+
+<!-- Fields definition -->
+    <field_definition src="./field_def_nemo-opa.xml"/>   <!--  NEMO ocean dynamics                     -->
+    <field_definition src="./field_def_nemo-pisces.xml"/>   <!--  NEMO ocean biogeochemistry with PISCES  -->
+    <field_definition src="./field_def_nemo-inerttrc.xml"/> <!--  NEMO ocean biogeochemistry with PISCES  -->
+
+
+<!-- Axis definition -->
+    <axis_definition src="./axis_def_nemo.xml"/>
+
+<!-- Domain definition -->
+    <domain_definition src="./domain_def_nemo.xml"/>
+
+<!-- Grids definition -->
+    <grid_definition src="./grids_def_nemo.xml"/>
+
+</context>

+ 194 - 0
runtime/classic/ctrl/domain_def_nemo.xml

@@ -0,0 +1,194 @@
+
+   <domain_definition>
+     <domain_group id="grid_T">
+       <domain id="grid_T" long_name="grid T"/>
+       <!--   My zoom: example of hand defined zoom   -->
+       <domain id="myzoom" domain_ref="grid_T" >
+          <zoom_domain id="myzoom"  ibegin="139" jbegin="119" ni="5" nj="5" />
+       </domain>
+       <domain id="1point" domain_ref="grid_T" >
+          <zoom_domain id="1point" ibegin="139" jbegin="119" ni="1" nj="1" />
+       </domain>
+         <!--   Eq section -->
+       <domain id="EqT" domain_ref="grid_T" >
+	      <zoom_domain id="EqT" ibegin="0" jbegin="0000" ni="0000" nj="1" />
+	   </domain>
+         <!--   TAO : see example above   -->
+         <!--   137e   -->
+         <!-- <domain id="2n137eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n137eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n137eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   147e  -->
+         <!-- <domain id="0n147eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n147eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n147eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   156e  -->
+         <!-- <domain id="5s156eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s156eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n156eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n156eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n156eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n156eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   165e  -->
+         <!-- <domain id="8s165eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s165eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s165eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n165eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n165eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n165eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n165eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   180w  -->
+         <!-- <domain id="8s180wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s180wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s180wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n180wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n180wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n180wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n180wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   170w  -->
+         <!-- <domain id="8s170wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s170wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s170wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n170wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n170wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n170wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n170wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   155w  -->
+         <!-- <domain id="8s155wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s155wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s155wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n155wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n155wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n155wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n155wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   140w  -->
+         <!-- <domain id="8s140wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s140wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s140wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n140wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n140wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n140wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n140wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   125w  -->
+         <!-- <domain id="8s125wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s125wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s125wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n125wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n125wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n125wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n125wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   110w  -->
+         <!-- <domain id="8s110wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s110wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s110wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n110wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n110wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n110wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n110wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   95w   -->
+         <!-- <domain id="8s95wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s95wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2s95wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n95wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="2n95wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5n95wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n95wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   RAMA  -->
+         <!--   55e   -->
+         <!-- <domain id="16s55eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="12s55eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8s55eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4s55eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="1.5s55eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n55eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="1.5n55eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4n55eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--    65e  -->
+         <!-- <domain id="15n65eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--    67e  -->
+         <!-- <domain id="16s67eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="12s67eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8s67eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4s67eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="1.5s67eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n67eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="1.5n67eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4n67eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n67eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   80.5e -->
+         <!-- <domain id="16s80.5eT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="12s80.5eT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8s80.5eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4s80.5eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="1.5s80.5eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n80.5eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="1.5n80.5eT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4n80.5eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   90e   -->
+         <!-- <domain id="1.5s90eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n90eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="1.5n90eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4n90eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n90eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="12n90eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="15n90eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   95e   -->
+         <!-- <domain id="16s95eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="12s95eT"    domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8s95eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="5s95eT"     domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   PIRATA   -->
+         <!--   38w-30w  -->
+         <!-- <domain id="19s34wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="14s32wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8s30wT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n35wT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4n38wT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="8n38wT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="12n38wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="15n38wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="20n38wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   23w   -->
+         <!-- <domain id="0n23wT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="4n23wT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="12n23wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="21n23wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   10w   -->
+         <!-- <domain id="10s10wT" domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="6s10wT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!-- <domain id="0n10wT"  domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+         <!--   0e   -->
+         <!-- <domain id="0n0eT"   domain_ref="grid_T" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" /> -->
+      </domain_group>
+
+      <domain_group id="grid_U">
+         <domain id="grid_U" long_name="grid U"/>
+         <!--   Eq section   -->
+         <domain id="EqU" domain_ref="grid_U" >
+	   <zoom_domain id="EqU" ibegin="1" jbegin="0000" ni="0000" nj="1" /> 
+	 </domain>    
+      </domain_group>
+
+      <domain id="grid_V" long_name="grid V"/>
+
+      <domain_group id="grid_W">
+         <domain id="grid_W" long_name="grid W"/>
+         <!--   Eq section   -->
+         <domain id="EqW" domain_ref="grid_W" >
+	   <zoom_domain id="EqW" ibegin="1" jbegin="0000" ni="0000" nj="1" />
+	 </domain>   
+      </domain_group>
+
+      <domain_group id="scalarpoint">
+         <domain id="scalarpoint" long_name="scalar"/>
+      </domain_group>
+
+        <domain_group id="gznl">
+         <domain id="gznl" long_name="gznl"/>
+         <domain id="ptr" domain_ref="gznl" >
+	   <zoom_domain id="ptr" ibegin="0000" jbegin="0" ni="1" nj="0000" />
+	</domain>  
+        </domain_group>
+
+   </domain_definition>    
+ 

+ 50 - 0
runtime/classic/ctrl/field_def_nemo-inerttrc.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0"?> 
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+   <field_definition level="1" prec="4" operation="average" enabled=".TRUE." default_value="1.e20" detect_missing_value="true"> <!-- time step automaticaly defined -->
+
+    <!-- 
+============================================================================================================
+                                     Biogeochemistry model variables
+============================================================================================================
+    -->
+
+      <!-- Available with key_top-->
+
+     <field_group id="inerttrc" grid_ref="grid_T_3D">
+
+
+       <!-- AGE : variables available with key_age -->
+         <field id="Age"        long_name="Sea Water Age Since Surface contact" standard_name="sea_water_age_since_surface_contact"  unit="yr"         />
+         <field id="Age_E3T"    long_name="Age * e3t"                                 unit="yr * m"  > Age * e3t </field>
+
+       <!-- CFC11/CFC12/SF6 : variables available with key_cfc -->
+         <field id="CFC11"       long_name="CFC-11 Concentration"               standard_name="mole_concentration_of_cfc11_in_sea_water"  unit="umol/m3" />
+         <field id="CFC11_E3T"   long_name="CFC11 * E3T"                                                                                  unit="umol/m2"  > CFC11 * e3t </field>
+         <field id="CFC12"       long_name="CFC-12 Concentration"               standard_name="mole_concentration_of_cfc12_in_sea_water"  unit="umol/m3" />
+         <field id="CFC12_E3T"   long_name="CFC12 * E3T"                                                                                  unit="umol/m2"  > CFC12 * e3t </field>
+         <field id="SF6"         long_name="SF6 Concentration"                  standard_name="mole_concentration_of_sf6_in_sea_water"    unit="umol/m3" />
+         <field id="SF6_E3T"     long_name="SF6 * E3T"                                                                                    unit="umol/m2"  > SF6 * e3t </field>
+         <field id="qtr_CFC11"    long_name="Air-sea flux of CFC-11"            standard_name="surface_downward_mole_flux_of_cfc11"       unit="mol/m2/s"  grid_ref="grid_T_2D"  />
+         <field id="qint_CFC11"   long_name="Cumulative air-sea flux of CFC-11"                                                           unit="mol/m2"    grid_ref="grid_T_2D"  />
+         <field id="qtr_CFC12"   long_name="Air-sea flux of CFC-12"             standard_name="surface_downward_mole_flux_of_cfc12"       unit="mol/m2/s"  grid_ref="grid_T_2D"  />
+         <field id="qint_CFC12"  long_name="Cumulative air-sea flux of CFC-12"                                                            unit="mol/m2"    grid_ref="grid_T_2D"  />
+         <field id="qtr_SF6"     long_name="Air-sea flux of SF6"                standard_name="surface_downward_mole_flux_of_sf6"         unit="mol/m2/s"  grid_ref="grid_T_2D"  />
+         <field id="qint_SF6"    long_name="Cumulative air-sea flux of SF6"                                                               unit="mol/m2"    grid_ref="grid_T_2D"  />
+
+       <!-- Bomb C14 : variables available with key_c14b -->
+         <field id="C14B"        long_name="Bomb C14 Concentration"             standard_name="mole_concentration_of_nuclear_c14_in_sea_water"    unit="1" />
+         <field id="C14B_E3T"    long_name="C14B * E3T"                                                                                           unit="m"  > C14B * e3t </field>
+         <field id="qtr_C14b"     long_name="Air-sea flux of Bomb C14"           standard_name="surface_downward_mole_flux_of_nuclear_c14"        unit="mol/m2/s"  grid_ref="grid_T_2D"  />
+         <field id="qint_C14b"    long_name="Cumulative air-sea flux of Bomb C14"                                                                 unit="mol/m2"    grid_ref="grid_T_2D"  />
+         <field id="fdecay"      long_name="Radioctive decay of Bomb C14"                                                                         unit="mol/m3"   />
+
+     </field_group>
+
+   </field_definition>

+ 336 - 0
runtime/classic/ctrl/field_def_nemo-lim.xml

@@ -0,0 +1,336 @@
+<?xml version="1.0"?> 
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+   <field_definition level="1" prec="4" operation="average" enabled=".TRUE." default_value="1.e20" detect_missing_value="true"> <!-- time step automaticaly defined -->
+
+      <field_group id="SBC" grid_ref="grid_T_2D" > <!-- time step automaticaly defined based on nn_fsbc -->
+
+         <!-- LIM2(only) fields -->
+         <field id="qsr_ai_cea"   long_name="Air-Ice downward solar heat flux (cell average)"              standard_name="surface_downwelling_shortwave_flux_in_air"          unit="W/m2"         />
+         <field id="qns_ai_cea"   long_name="Air-Ice downward non-solar heat flux (cell average)"                                                                             unit="W/m2"         />
+         <field id="qla_ai_cea"   long_name="Air-Ice downward Latent heat flux (cell average)"             standard_name="surface_downward_latent_heat_flux"                  unit="W/m2"         />         
+         <field id="qsr_io_cea"   long_name="Ice-Oce downward solar heat flux (cell average)"              standard_name="net_downward_shortwave_flux_at_sea_water_surface"   unit="W/m2"         />
+         <field id="qns_io_cea"   long_name="Ice-Oce downward non-solar heat flux (cell average)"                                                                             unit="W/m2"         />
+         <field id="iceprod_cea"  long_name="Ice production (cell average)"                                                                                                   unit="m/s"          />
+         <field id="iiceconc"     long_name="Ice concentration"                                            standard_name="sea_ice_area_fraction"                              unit="1"            />
+         <field id="ice_pres"     long_name="Ice presence"                                                                                                                    unit=""             />
+         <field id="ist_cea"      long_name="Ice surface temperature (cell average)"                       standard_name="surface_temperature"                                unit="degC"         />
+         <field id="ist_ipa"      long_name="Ice surface temperature (ice presence average)"               standard_name="surface_temperature"                                unit="degC"         />
+         <field id="u_imasstr"    long_name="Sea-ice mass transport along i-axis"                          standard_name="sea_ice_x_transport"                                unit="kg/s" grid_ref="grid_U_2D"         />
+         <field id="v_imasstr"    long_name="Sea-ice mass transport along j-axis"                          standard_name="sea_ice_y_transport"                                unit="kg/s" grid_ref="grid_V_2D"        />
+
+         <!-- SIMIP LIM fields -->
+         <field id="icethic"      long_name="Sea-ice thickness"                                    standard_name="sea_ice_thickness"                          unit="m"   detect_missing_value="true" />
+         <field id="uice_mv"      long_name="X-component of sea ice velocity"                      standard_name="sea_ice_x_velocity"                         unit="m/s" detect_missing_value="true" grid_ref="grid_U_2D" /> 
+         <field id="vice_mv"      long_name="Y-component of sea ice velocity"                      standard_name="sea_ice_y_velocity"                         unit="m/s" detect_missing_value="true" grid_ref="grid_V_2D" />      
+         <field id="uice_mvT"      long_name="X-component of sea ice velocity"                      standard_name="sea_ice_x_velocity"                         unit="m/s" detect_missing_value="true" grid_ref="grid_T_2D" > uice_mv </field>
+         <field id="icevel_mv"    long_name="Sea-ice speed"                                        standard_name="sea_ice_speed"                              unit="m/s" detect_missing_value="true" />
+         <field id="icepres"      long_name="Fraction of time steps with sea ice"                  standard_name="sea_ice_time_fraction"                      unit=""             />
+         <field id="iceconc"      long_name="Sea-ice area fraction"                                standard_name="sea_ice_area_fraction"                      unit=""             />
+         <field id="iceconc_pct"  long_name="Sea-ice area fraction in percent"                     standard_name="sea_ice_area_fraction_in_percent"           unit="%"   > iceconc * 100. </field>
+         <field id="icemass"      long_name="Sea-ice mass per area"                                standard_name="sea_ice_amount"                             unit="kg/m2"        />
+         <!-- <field id="icevolu"      long_name="Sea-ice volume per area"                              standard_name="sea_ice_thickness"                          unit="m"            /> -->
+         <field id="snomass"      long_name="Snow mass per area"                                   standard_name="liquid_water_content_of_surface_snow"       unit="kg/m2"    detect_missing_value="true"    />
+         <field id="snothic"      long_name="Snow thickness"                                       standard_name="surface_snow_thickness"                     unit="m"           detect_missing_value="true"  />
+
+         <field id="iceconc_cat_mv"     long_name="Sea-ice area fractions in thickness categories" standard_name="sea_ice_area_fraction_over_categories"      unit=""   grid_ref="grid_T_3D_ncatice" />
+         <field id="iceconc_cat_pct_mv" long_name="Sea-ice area fractions in thickness categories" standard_name="sea_ice_area_fraction_over_categories"      unit="%"  detect_missing_value="true" grid_ref="grid_T_3D_ncatice"  > iceconc_cat_mv * 100. </field>
+         <field id="icethic_cat_mv"     long_name="Sea-ice thickness in thickness categories"      standard_name="sea_ice_thickness_over_categories"          unit="m"  detect_missing_value="true" grid_ref="grid_T_3D_ncatice" />
+         <field id="snowthic_cat_mv"    long_name="Snow thickness in thickness categories"         standard_name="snow_thickness_over_categories"             unit="m"  detect_missing_value="true" grid_ref="grid_T_3D_ncatice" />
+
+         <field id="icestK"       long_name="Surface temperature of sea ice"                       standard_name="sea_ice_surface_temperature"                unit="K"     detect_missing_value="true"       /> 
+         <field id="icesntK"      long_name="Temperature at snow-ice interface"                    standard_name="sea_ice_snow_interface_temperature"         unit="K"     detect_missing_value="true"        />
+         <field id="icebotK"      long_name="Temperature at ice-ocean interface"                   standard_name="sea_ice_bottom_temperature"                 unit="K"     detect_missing_value="true"       />
+
+         <field id="iceage"       long_name="Age of sea ice"                                       standard_name="age_of_sea_ice"                             unit="s"     detect_missing_value="true"       />
+         <field id="icealb"       long_name="Sea-ice or snow albedo"                               standard_name="sea_ice_albedo"                             unit=""             />
+         <field id="icesmass"     long_name="Mass of salt in sea ice per area"                     standard_name="sea_ice_salt_mass"                          unit="kg/m2"        />
+         <field id="icesal"       long_name="Sea ice salinity"                                     standard_name="sea_ice_salinity"                           unit="g/kg"  detect_missing_value="true"       />
+         <field id="icefb"        long_name="Sea-ice freeboard"                                    standard_name="sea_ice_freeboard"                          unit="m"     detect_missing_value="true"       />
+
+         <field id="icehcneg"     long_name="Sea-ice heat content per unit area"  standard_name="integral_of_sea_ice_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" > (-1.0)*icehc </field>
+         <field id="isnhcneg"     long_name="Snow-heat content per unit area"     standard_name="thermal_energy_content_of_surface_snow"                              unit="J/m2" detect_missing_value="true" /> 
+
+         <field id="wfxsum"       long_name="Freshwater flux from sea-ice surface"               standard_name="freshwater_flux_from_ice_surface"                   unit="kg/m2/s"  detect_missing_value="true"    />
+
+         <field id="afxthd"       long_name="sea-ice area fraction change from thermodynamics"   standard_name="tendency_of_sea_ice_area_fraction_due_to_dynamics"  unit="s-1"   />
+         <field id="afxdyn"       long_name="sea-ice area fraction change from dynamics"         standard_name="tendency_of_sea_ice_area_fraction_due_to_dynamics"  unit="s-1"   />
+
+         <field id="dmithd"       long_name="sea-ice mass change from thermodynamics"            standard_name="tendency_of_sea_ice_amount_due_to_thermodynamics"   unit="kg/m2/s" />
+         <field id="dmidyn"       long_name="sea-ice mass change from dynamics"                  standard_name="tendency_of_sea_ice_amount_due_to_dynamics"         unit="kg/m2/s" />
+         <field id="dmiopw"       long_name="sea-ice mass change through growth in supercooled open water (aka frazil)"   standard_name="tendency_of_sea_ice_amount_due_to_freezing_in_open_water"   unit="kg/m2/s" />
+         <field id="dmibog"       long_name="sea-ice mass change through basal growth"           standard_name="tendency_of_sea_ice_amount_due_to_congelation_ice_accumulation"  unit="kg/m2/s" />
+         <field id="dmisni"       long_name="sea-ice mass change through snow-to-ice conversion" standard_name="tendency_of_sea_ice_amount_due_to_snow_conversion"               unit="kg/m2/s" />
+         <field id="dmtsub"       long_name="snow and sea ice mass change through sublimation"   standard_name="tendency_of_snow_and_ice_amount_due_to_sublimation"              unit="kg/m2/s" />
+         <field id="dmssub"       long_name="sea-ice mass change through evaporation and sublimation" standard_name="water_evaporation_flux"                                     unit="kg/m2/s" />
+         <field id="dmisub"       long_name="snow mass change through evaporation or sublimation"     standard_name="surface_snow_sublimation_flux"           unit="kg/m2/s" />
+         <field id="dmisum"       long_name="sea-ice mass change through surface melting"        standard_name="tendency_of_sea_ice_amount_due_to_surface_melting"               unit="kg/m2/s" />
+         <field id="dmibom"       long_name="sea-ice mass change through bottom melting"         standard_name="tendency_of_sea_ice_amount_due_to_basal_melting"                 unit="kg/m2/s" />
+
+         <field id="dmsspr"       long_name="snow mass change through snow fall"                 standard_name="snowfall_flux"                                                   unit="kg/m2/s" />
+         <field id="dmsmel"       long_name="snow mass change through melt"                      standard_name="surface_snow_melt_flux"                                          unit="kg/m2/s" />
+         <field id="dmsdyn"       long_name="snow mass change through advection by sea-ice dynamics" standard_name="tendency_of_snow_mass_due_to_sea_ice_dynamics"               unit="kg/m2/s" />
+         <field id="dmsssi"       long_name="snow mass change through snow-to-ice conversion"    standard_name="tendency_of_snow_mass_due_to_snow_to_ice_conversion"             unit="kg/m2/s" />
+
+         <field id="hfxsenso"     long_name="Net sensible heat flux under sea ice"               standard_name="ice_ocean_heat_flux"                          unit="W/m2" detect_missing_value="true" />
+         <field id="hfxconsu"     long_name="Net conductive heat flux in ice at the surface"     standard_name="conductive_heat_flux_at_sea_ice_surface"      unit="W/m2" detect_missing_value="true" /> 
+         <field id="hfxconbo"     long_name="Net conductive heat fluxes in ice at the bottom"    standard_name="conductive_heat_flux_at_sea_ice_bottom"       unit="W/m2" detect_missing_value="true" />
+
+         <field id="sfx_mv"       long_name="Salt flux from sea ice"                             standard_name="salt_flux_from_ice"                           unit="kg/m2/s" detect_missing_value="true" />
+         <field id="wfxtot"       long_name="Freshwater flux from sea ice"                       standard_name="freshwater_flux_from_ice"                     unit="kg/m2/s" detect_missing_value="true" /> 
+
+         <field id="utau_ice"     long_name="X-component of atmospheric stress on sea ice"       standard_name="surface_downward_x_stress"                    unit="N/m2"  detect_missing_value="true"  />
+         <field id="vtau_ice"     long_name="Y-component of atmospheric stress on sea ice"       standard_name="surface_downward_y_stress"                    unit="N/m2"  detect_missing_value="true"  />
+
+         <field id="utau_oi"      long_name="X-component of ocean stress on sea ice"             standard_name="sea_ice_base_upward_x_stress"                 unit="N/m2"  detect_missing_value="true"  />
+         <field id="vtau_oi"      long_name="Y-component of ocean stress on sea ice"             standard_name="sea_ice_base_upward_y_stress"                 unit="N/m2"  detect_missing_value="true"  />
+
+         <field id="icestr"       long_name="Compressive sea ice strength"                       standard_name="compressive_strength_of_sea_ice"              unit="N/m"  detect_missing_value="true"   />
+
+         <field id="dssh_dx"      long_name="Sea-surface tilt term in force balance (x-component)"  standard_name="sea_surface_tilt_force_on_sea_ice_x"       unit="N/m2" detect_missing_value="true"   />
+         <field id="dssh_dy"      long_name="Sea-surface tilt term in force balance (y-component)"  standard_name="sea_surface_tilt_force_on_sea_ice_y"       unit="N/m2" detect_missing_value="true"   />
+
+         <field id="corstrx"      long_name="Coriolis force term in force balance (x-component)"    standard_name="coriolis_force_on_sea_ice_x"               unit="N/m2" detect_missing_value="true"   />
+         <field id="corstry"      long_name="Coriolis force term in force balance (y-component)"    standard_name="coriolis_force_on_sea_ice_y"               unit="N/m2" detect_missing_value="true"   />
+
+         <field id="intstrx"      long_name="Internal stress term in force balance (x-component)"   standard_name="internal_stress_in_sea_ice_x"              unit="N/m2" detect_missing_value="true"   />
+         <field id="intstry"      long_name="Internal stress term in force balance (y-component)"   standard_name="internal_stress_in_sea_ice_y"              unit="N/m2" detect_missing_value="true"   />
+
+         <field id="xmtrpice"     long_name="X-component of ice mass transport"                  standard_name="ice_x_transport"                              unit="kg/s" />
+         <field id="ymtrpice"     long_name="Y-component of ice mass transport"                  standard_name="ice_y_transport"                              unit="kg/s" />
+
+         <field id="xmtrpsnw"     long_name="X-component of snw mass transport"                  standard_name="snw_x_transport"                              unit="kg/s" />
+         <field id="ymtrpsnw"     long_name="Y-component of snw mass transport"                  standard_name="snw_y_transport"                              unit="kg/s" />
+
+         <field id="xatrp"        long_name="X-component of ice area transport"                  standard_name="area_x_transport"                             unit="m2/s" />
+         <field id="yatrp"        long_name="Y-component of ice area transport"                  standard_name="area_y_transport"                             unit="m2/s" />
+
+         <field id="xmtrptot"     long_name="X-component of sea-ice mass transport"              standard_name="sea_ice_x_transport"                          unit="kg/s" > xmtrpice + xmtrpsnw </field>
+         <field id="ymtrptot"     long_name="Y-component of sea-ice mass transport"              standard_name="sea_ice_y_transport"                          unit="kg/s" > ymtrpice + ymtrpsnw </field>
+
+         <field id="normstr"      long_name="Average normal stress in sea ice"                   standard_name="average_normal_stress"                        unit="N/m"  detect_missing_value="true"   />
+         <field id="sheastr"      long_name="Maximum shear stress in sea ice"                    standard_name="maximum_shear_stress"                         unit="N/m"     />
+
+         <field id="idive"        long_name="Divergence of the sea-ice velocity field"           standard_name="divergence_of_sea_ice_velocity"               unit="s-1"  detect_missing_value="true"   />
+         <field id="ishear"       long_name="Maximum shear of sea-ice velocity field"            standard_name="maximum_shear_of_sea_ice_velocity"            unit="s-1"  detect_missing_value="true"   />
+
+         <!-- ice LIM fields -->
+
+         <field id="ice_cover"    long_name="Ice fraction"                                                 standard_name="sea_ice_area_fraction"                              unit="1"            />        
+
+         <field id="uice_ipa"     long_name="X-component of sea ice velocity"                              standard_name="sea_ice_x_velocity"                                 unit="m/s"          grid_ref="grid_U_2D"/> 
+         <field id="vice_ipa"     long_name="Y-component of sea ice velocity"                              standard_name="sea_ice_y_velocity"                                 unit="m/s"          grid_ref="grid_V_2D"/>      
+         <field id="icevel"       long_name="Sea-ice speed"                                                standard_name="sea_ice_speed"                                      unit="m/s"          />
+       	 <field id="isst"         long_name="sea surface temperature"                                      standard_name="sea_surface_temperature"                            unit="degC"         />
+         <field id="isss"         long_name="sea surface salinity"                                         standard_name="sea_surface_salinity"                               unit="1e-3"         /> 
+         <field id="qt_oce"       long_name="total flux at ocean surface"                                  standard_name="surface_downward_heat_flux_in_sea_water"            unit="W/m2"         />
+         <field id="qsr_oce"      long_name="solar heat flux at ocean surface"                             standard_name="net_downward_shortwave_flux_at_sea_water_surface"   unit="W/m2"         />
+         <field id="qns_oce"      long_name="non-solar heat flux at ocean surface"                                                                                            unit="W/m2"         />
+         <field id="qns_mix"      long_name="non-solar heat flux received from OASIS"                                                                                         unit="W/m2"         />
+         <field id="qt_ice"       long_name="total heat flux at ice surface: sum over categories"          standard_name="surface_downward_heat_flux_in_air"                  unit="W/m2"         />
+         <field id="qsr_ice"      long_name="solar heat flux at ice surface: sum over categories"          standard_name="surface_downwelling_shortwave_flux_in_air"          unit="W/m2"         />
+         <field id="qns_ice"      long_name="non-solar heat flux at ice surface: sum over categories"                                                                         unit="W/m2"         />
+         <field id="qtr_ice"      long_name="solar heat flux transmitted through ice: sum over categories"                                                                    unit="W/m2"         />
+         <field id="qemp_ice"     long_name="Downward Heat Flux from E-P over ice"                                                                                            unit="W/m2"         />
+         <field id="albedo"       long_name="Mean albedo over sea ice and ocean"                                                                                              unit=""             />
+
+         <field id="iceconc_cat"  long_name="Sea-ice area fractions in thickness categories"               unit=""   grid_ref="grid_T_3D_ncatice" />
+         <field id="icethic_cat"  long_name="Sea-ice thickness in thickness categories"                    unit="m"  grid_ref="grid_T_3D_ncatice" />
+         <field id="snowthic_cat" long_name="Snow thickness in thickness categories"                       unit="m"  grid_ref="grid_T_3D_ncatice" />
+         <field id="iceage_cat"   long_name="Ice age for categories"                                       unit="days"   grid_ref="grid_T_3D_ncatice" />
+         <field id="salinity_cat" long_name="Sea-Ice Bulk salinity for categories"                         unit="g/kg"   grid_ref="grid_T_3D_ncatice" />
+         <field id="brinevol_cat" long_name="Brine volume for categories"                                  unit="%"      grid_ref="grid_T_3D_ncatice" />
+         <field id="icetemp_cat"  long_name="Ice temperature for categories"                               unit="degC"   grid_ref="grid_T_3D_ncatice" />
+         <field id="snwtemp_cat"  long_name="Snow temperature for categories"                              unit="degC"   grid_ref="grid_T_3D_ncatice" />
+
+         <field id="micet"        long_name="Mean ice temperature"                                         unit="degC"     />
+         <field id="miceage"      long_name="Age of sea ice"                                               unit="s"        />
+         <field id="micesalt"     long_name="Sea ice salinity"                                             unit="g/kg"     />
+         <field id="icehc"        long_name="ice total heat content"                                       unit="J/m2"     /> 
+         <field id="isnowhc"      long_name="snow total heat content"                                      unit="J/m2"     />
+         <field id="icest"        long_name="ice surface temperature"                                      unit="degC"     />
+         <field id="ibrinv"       long_name="brine volume"                                                 unit="%"        />
+         <field id="icecolf"      long_name="frazil ice collection thickness"                              unit="m"        />
+         <field id="snowvol"      long_name="snow volume"                                                  unit="m"        />
+
+         <field id="icetrp"       long_name="ice volume transport"                                         unit="m/day"          />
+         <field id="snwtrp"       long_name="snw volume transport"                                         unit="m/day"          />
+         <field id="saltrp"       long_name="salt content transport"                                       unit="1e-3*kg/m2/day" />
+         <field id="deitrp"       long_name="advected ice enthalpy"                                        unit="W/m2"           />
+         <field id="destrp"       long_name="advected snw enthalpy"                                        unit="W/m2"           />
+
+         <field id="sfxbri"       long_name="brine salt flux"                                              unit="1e-3*kg/m2/day" />
+         <field id="sfxdyn"       long_name="salt flux from ridging rafting"                               unit="1e-3*kg/m2/day" />
+         <field id="sfxres"       long_name="salt flux from lipupdate (resultant)"                         unit="1e-3*kg/m2/day" />
+         <field id="sfxbog"       long_name="salt flux from bot growth"                                    unit="1e-3*kg/m2/day" />
+         <field id="sfxbom"       long_name="salt flux from bot melt"                                      unit="1e-3*kg/m2/day" />
+         <field id="sfxsum"       long_name="salt flux from surf melt"                                     unit="1e-3*kg/m2/day" />
+         <field id="sfxsni"       long_name="salt flux from snow-ice formation"                            unit="1e-3*kg/m2/day" />
+         <field id="sfxopw"       long_name="salt flux from open water ice formation"                      unit="1e-3*kg/m2/day" />
+         <field id="sfxsub"       long_name="salt flux from sublimation"                                   unit="1e-3*kg/m2/day" />
+         <field id="sfx"          long_name="Salt flux from sea ice"                                       unit="1e-3*kg/m2/day" />
+
+         <field id="vfxbog"       long_name="daily bottom thermo ice prod."                                unit="m/day"   />
+         <field id="vfxdyn"       long_name="daily  dynamic ice prod."                                     unit="m/day"   />
+         <field id="vfxopw"       long_name="daily lateral thermo ice prod."                               unit="m/day"   />
+         <field id="vfxsni"       long_name="daily snowice ice prod."                                      unit="m/day"   />
+         <field id="vfxsum"       long_name="surface melt"                                                 unit="m/day"   />
+         <field id="vfxbom"       long_name="bottom melt"                                                  unit="m/day"   />
+         <field id="vfxres"       long_name="daily resultant ice prod./melting from limupdate"             unit="m/day"   />
+         <field id="vfxice"       long_name="ice melt/growth"                                              unit="m/day"   />
+         <field id="vfxsnw"       long_name="snw melt/growth"                                              unit="m/day"   />
+         <field id="vfxsub"       long_name="snw sublimation"                                              unit="m/day"   />
+         <field id="vfxsub_err"   long_name="excess of snw sublimation sent to ocean"                      unit="m/day"   />
+         <field id="vfxspr"       long_name="snw precipitation on ice"                                     unit="m/day"   />
+         <field id="vfxthin"      long_name="daily thermo ice prod. for thin ice(20cm) + open water"       unit="m/day"   />
+
+         <field id="afxtot"       long_name="area tendency (total)"                                        unit="s-1"   />
+
+         <field id="hfxsum"       long_name="heat fluxes causing surface ice melt"                         unit="W/m2"  />
+         <field id="hfxbom"       long_name="heat fluxes causing bottom ice melt"                          unit="W/m2"  />
+         <field id="hfxbog"       long_name="heat fluxes causing bottom ice growth"                        unit="W/m2"  />
+         <field id="hfxdif"       long_name="heat fluxes causing ice temperature change"                   unit="W/m2"  />
+         <field id="hfxopw"       long_name="heat fluxes causing open water ice formation"                 unit="W/m2"  />
+         <field id="hfxsnw"       long_name="heat fluxes causing snow melt"                                unit="W/m2"  />
+         <field id="hfxerr"       long_name="heat fluxes error after heat diffusion"                       unit="W/m2"  />
+         <field id="hfxerr_rem"   long_name="heat fluxes error after remapping"                            unit="W/m2"  />
+         <field id="hfxout"       long_name="total heat fluxes received by the ocean"                      unit="W/m2"  />
+         <field id="hfxin"        long_name="total heat fluxes at the ice/ocean surface"                   unit="W/m2"  />
+
+         <!-- heat flux associated with mass exchange -->
+         <field id="hfxthd"       long_name="heat fluxes from ice-ocean mass exchange during thermo"       unit="W/m2"  />
+         <field id="hfxdyn"       long_name="heat fluxes from ice-ocean mass exchange during dynamic"      unit="W/m2"  />
+         <field id="hfxres"       long_name="heat fluxes from ice-ocean mass exchange during resultant"    unit="W/m2"  />
+         <field id="hfxsub"       long_name="heat fluxes from ice-atm. mass exchange during sublimation"   unit="W/m2"  />
+         <field id="hfxspr"       long_name="heat fluxes from ice-atm. mass exchange during snow precip"   unit="W/m2"  />
+
+         <!-- diags -->
+         <field id="hfxdhc"       long_name="Heat content variation in snow and ice"                       unit="W/m2" />
+         <field id="hfxtur"       long_name="turbulent heat flux at the ice base"                          unit="W/m2" />
+
+         <!-- in order to compute flux through straits -->
+         <field id="icevolu"  long_name="Sea-ice volume per area"                              standard_name="sea_ice_thickness"                          unit="m"            />
+         <field id="vtiu"     long_name="Sea ice mass flux in zonal direction"      standard_name="sea_ice_mass_transport_zonal" unit="m2/s"  grid_ref="grid_U_2D" detect_missing_value="true" /> 
+         <field id="vtiv"     long_name="Sea ice mass flux in meridional direction"      standard_name="sea_ice_mass_transport_meridional" unit="m2/s"  grid_ref="grid_V_2D" detect_missing_value="true" />
+         <field id="vtsu"     long_name="Snow mass flux in zonal direction"      standard_name="snow_mass_transport_zonal" unit="m2/s"  grid_ref="grid_U_2D" detect_missing_value="true" /> 
+         <field id="vtsv"     long_name="Snow mass flux in meridional direction"  standard_name="snow_mass_transport_meridional" unit="m2/s"  grid_ref="grid_V_2D" detect_missing_value="true" />
+         <field id="atiu"     long_name="Sea ice area flux in zonal direction"      standard_name="sea_ice_area_transport_zonal" unit="m2/s"  grid_ref="grid_U_2D" detect_missing_value="true" /> 
+         <field id="ativ"     long_name="Sea ice area flux in meridional direction"      standard_name="sea_area_mass_transport_meridional" unit="m2/s"  grid_ref="grid_V_2D" detect_missing_value="true" /> 
+
+         <field id="vtiu_ave" grid_ref="grid_U_2D" freq_op="1mo" freq_offset="_reset_" field_ref="vtiu" > @vtiu </field>
+         <field id="vtiu_scalar" grid_ref="grid_U_2D_scalar"  > vtiu_ave </field>
+         <field id="vtiu_transect"  field_ref="vtiu_scalar" grid_ref="grid_U_transect_lim"  />
+         <field id="transport_vtiu_mask_transect" field_ref="vtiu_transect" grid_ref="grid_U_transect_lim" detect_missing_value="true" > vtiu_transect*maskMFO_lim_u  </field>
+         <field id="transport_simasse_U_transect" field_ref="transport_vtiu_mask_transect" grid_ref="grid_U_transect_lim_hsum" unit="kg/s" > transport_vtiu_mask_transect*$rhoic  </field>
+
+         <field id="vtiv_ave" grid_ref="grid_V_2D" freq_op="1mo" freq_offset="_reset_" field_ref="vtiv" > @vtiv </field>
+         <field id="vtiv_scalar" grid_ref="grid_V_2D_scalar"  > vtiv_ave </field>
+         <field id="vtiv_transect"  field_ref="vtiv_scalar" grid_ref="grid_V_transect_lim" />
+         <field id="transport_vtiv_mask_transect" field_ref="vtiv_transect" grid_ref="grid_V_transect_lim" detect_missing_value="true" > vtiv_transect*maskMFO_lim_v  </field>
+         <field id="transport_simasse_V_transect" field_ref="transport_vtiv_mask_transect" grid_ref="grid_V_transect_lim_hsum" unit="kg/s" > transport_vtiv_mask_transect*$rhoic </field>
+         <field id="transport_simasse_transect" grid_ref="grid_transect_lim" freq_op="1mo" freq_offset="1mo-2ts" > transport_simasse_U_transect+transport_simasse_V_transect</field>
+
+
+         <field id="atiu_ave" grid_ref="grid_U_2D" freq_op="1mo" freq_offset="_reset_" field_ref="atiu" > @atiu </field>
+         <field id="atiu_scalar" grid_ref="grid_U_2D_scalar"  > atiu_ave </field>
+         <field id="atiu_transect"  field_ref="atiu_scalar" grid_ref="grid_U_transect_lim" />
+         <field id="transport_atiu_mask_transect" field_ref="atiu_transect" grid_ref="grid_U_transect_lim" detect_missing_value="true" > atiu_transect*maskMFO_lim_u  </field>
+         <field id="transport_siarea_U_transect" field_ref="transport_atiu_mask_transect" grid_ref="grid_U_transect_lim_hsum" > transport_atiu_mask_transect </field>
+
+         <field id="ativ_ave" grid_ref="grid_V_2D" freq_op="1mo" freq_offset="_reset_" field_ref="ativ" > @ativ </field>
+         <field id="ativ_scalar" grid_ref="grid_V_2D_scalar"  > ativ_ave </field>
+         <field id="ativ_transect"  field_ref="ativ_scalar" grid_ref="grid_V_transect_lim" />
+         <field id="transport_ativ_mask_transect" field_ref="ativ_transect" grid_ref="grid_V_transect_lim" detect_missing_value="true" > ativ_transect*maskMFO_lim_v  </field>
+         <field id="transport_siarea_V_transect" field_ref="transport_ativ_mask_transect" grid_ref="grid_V_transect_lim_hsum" > transport_ativ_mask_transect </field>
+         <field id="transport_siarea_transect" grid_ref="grid_transect_lim" freq_op="1mo" freq_offset="1mo-2ts" > transport_siarea_U_transect+transport_siarea_V_transect</field>
+
+         <field id="vtsu_ave" grid_ref="grid_U_2D" freq_op="1mo" freq_offset="_reset_" field_ref="vtsu" > @vtsu </field>
+         <field id="vtsu_scalar" grid_ref="grid_U_2D_scalar"  > vtsu_ave </field>
+         <field id="vtsu_transect"  field_ref="vtsu_scalar" grid_ref="grid_U_transect_lim" />
+         <field id="transport_vtsu_mask_transect" field_ref="vtsu_transect" grid_ref="grid_U_transect_lim" detect_missing_value="true" > vtsu_transect*maskMFO_lim_u  </field>
+         <field id="transport_snmasse_U_transect" field_ref="transport_vtsu_mask_transect" grid_ref="grid_U_transect_lim_hsum" unit="kg/s" > transport_vtsu_mask_transect*$rhosn </field>
+
+         <field id="vtsv_ave" grid_ref="grid_V_2D" freq_op="1mo" freq_offset="_reset_" field_ref="vtsv" > @vtsv </field>
+         <field id="vtsv_scalar" grid_ref="grid_V_2D_scalar"  > vtsv_ave </field>
+         <field id="vtsv_transect"  field_ref="vtsv_scalar" grid_ref="grid_V_transect_lim" />
+         <field id="transport_vtsv_mask_transect" field_ref="vtsv_transect" grid_ref="grid_V_transect_lim" detect_missing_value="true" > vtsv_transect*maskMFO_lim_v </field>
+         <field id="transport_snmasse_V_transect" field_ref="transport_vtsv_mask_transect" grid_ref="grid_V_transect_lim_hsum" unit="kg/s" > transport_vtsv_mask_transect*$rhosn  </field>
+         <field id="transport_snmasse_transect" grid_ref="grid_transect_lim" freq_op="1mo" freq_offset="1mo-2ts" > transport_snmasse_U_transect+transport_snmasse_V_transect</field>
+
+      </field_group>
+
+      <field_group id="SBC_scalar" grid_ref="grid_T_2D" >
+         <field id="ibgfrcvoltop"    long_name="global mean ice/snow forcing at interface ice/snow-atm (volume equivalent ocean volume)"   unit="km3"        />
+         <field id="ibgfrcvolbot"    long_name="global mean ice/snow forcing at interface ice/snow-ocean (volume equivalent ocean volume)" unit="km3"        />
+         <field id="ibgfrctemtop"    long_name="global mean heat on top of ice/snw/ocean-atm "                                             unit="1e20J"      />
+         <field id="ibgfrctembot"    long_name="global mean heat below ice (on top of ocean) "                                             unit="1e20J"      />
+         <field id="ibgfrcsal"       long_name="global mean ice/snow forcing (salt equivalent ocean volume)"                               unit="pss*km3"    />
+         <field id="ibgfrchfxtop"    long_name="global mean heat flux on top of ice/snw/ocean-atm "                                        unit="W/m2"       />
+         <field id="ibgfrchfxbot"    long_name="global mean heat flux below ice (on top of ocean) "                                        unit="W/m2"       />
+ 
+         <field id="ibgvolume"       long_name="drift in ice/snow volume (equivalent ocean volume)"                                        unit="km3"        />
+         <field id="ibgsaltco"       long_name="drift in ice salt content (equivalent ocean volume)"                                       unit="pss*km3"    />
+         <field id="ibgheatco"       long_name="drift in ice/snow heat content"                                                            unit="1e20J"      />
+         <field id="ibgheatfx"       long_name="drift in ice/snow heat flux"                                                               unit="W/m2"       />
+
+         <field id="ibgvol_tot"      long_name="global mean ice volume"                                                                    unit="km3"        />
+         <field id="sbgvol_tot"      long_name="global mean snow volume"                                                                   unit="km3"        />
+         <field id="ibgarea_tot"     long_name="global mean ice area"                                                                      unit="km2"        />
+         <field id="ibgsalt_tot"     long_name="global mean ice salt content"                                                              unit="1e-3*km3"   />
+         <field id="ibgheat_tot"     long_name="global mean ice heat content"                                                              unit="1e20J"      />
+         <field id="sbgheat_tot"     long_name="global mean snow heat content"                                                             unit="1e20J"      />
+
+         <field id="NH_iceextt"      long_name="Sea ice extent North"                            standard_name="sea_ice_extent_n"          unit="1e6_km2"    />
+         <field id="SH_iceextt"      long_name="Sea ice extent South"                            standard_name="sea_ice_extent_s"          unit="1e6_km2"    />
+         <field id="NH_icevolu"      long_name="Sea ice volume North"                            standard_name="sea_ice_volume_n"          unit="1e3_km3"    />
+         <field id="SH_icevolu"      long_name="Sea ice volume South"                            standard_name="sea_ice_volume_s"          unit="1e3_km3"    />
+         <field id="NH_icearea"      long_name="Sea ice area North"                              standard_name="sea_ice_area_n"            unit="1e6_km2"    />
+	 <field id="SH_icearea"      long_name="Sea ice area South"                              standard_name="sea_ice_area_s"            unit="1e6_km2"    />
+
+         <field id="NH_sc_iceextt"        field_ref="NH_iceextt"      grid_ref="grid_1point" />
+         <field id="SH_sc_iceextt"        field_ref="SH_iceextt"      grid_ref="grid_1point" />
+         <field id="NH_sc_icevolu"        field_ref="NH_icevolu"      grid_ref="grid_1point" />
+         <field id="SH_sc_icevolu"        field_ref="SH_icevolu"      grid_ref="grid_1point" />
+         <field id="NH_sc_icearea"        field_ref="NH_icearea"      grid_ref="grid_1point" />
+         <field id="SH_sc_icearea"        field_ref="SH_icearea"      grid_ref="grid_1point" />
+
+      <!--  Available later
+         <field id="strait_mifl"     long_name="Sea ice mass flux through straits"      standard_name="sea_ice_mass_transport_across_line" unit="kg/s"  grid_ref="grid_4strait"   />
+         <field id="strait_arfl"     long_name="Sea ice area flux through straits"      standard_name="sea_ice_area_transport_across_line" unit="m2/s"  grid_ref="grid_4strait"   />  
+         <field id="strait_msfl"     long_name="Sea ice snow flux through straits"      standard_name="snow_mass_transport_across_line"    unit="kg/s"  grid_ref="grid_4strait"   />
+       -->
+
+      </field_group>
+
+      <!-- LIM3 scalar variables -->
+      <field_group id="ICE_globalbudget">
+
+    	<field field_ref="ibgvol_tot"     grid_ref="grid_1point"  name="ibgvol_tot"   />
+	    <field field_ref="sbgvol_tot"     grid_ref="grid_1point"  name="sbgvol_tot"   />
+    	<field field_ref="ibgarea_tot"    grid_ref="grid_1point"  name="ibgarea_tot"  />
+    	<field field_ref="ibgsalt_tot"    grid_ref="grid_1point"  name="ibgsalt_tot"  />
+    	<field field_ref="ibgheat_tot"    grid_ref="grid_1point"  name="ibgheat_tot"  />
+    	<field field_ref="sbgheat_tot"    grid_ref="grid_1point"  name="sbgheat_tot"  />
+
+     	<field field_ref="ibgvolume"      grid_ref="grid_1point"  name="ibgvolume"    />
+    	<field field_ref="ibgsaltco"      grid_ref="grid_1point"  name="ibgsaltco"    />
+    	<field field_ref="ibgheatco"      grid_ref="grid_1point"  name="ibgheatco"    />
+        <field field_ref="ibgheatfx"      grid_ref="grid_1point"  name="ibgheatfx"    />
+
+    	<field field_ref="ibgfrcvoltop"   grid_ref="grid_1point"  name="ibgfrcvoltop" />
+    	<field field_ref="ibgfrcvolbot"   grid_ref="grid_1point"  name="ibgfrcvolbot" />
+    	<field field_ref="ibgfrctemtop"   grid_ref="grid_1point"  name="ibgfrctemtop" />
+    	<field field_ref="ibgfrctembot"   grid_ref="grid_1point"  name="ibgfrctembot" />
+    	<field field_ref="ibgfrcsal"      grid_ref="grid_1point"  name="ibgfrcsal"    />
+        <field field_ref="ibgfrchfxtop"   grid_ref="grid_1point"  name="ibgfrchfxtop" />
+        <field field_ref="ibgfrchfxbot"   grid_ref="grid_1point"  name="ibgfrchfxbot" />
+
+      </field_group>
+
+   </field_definition>

+ 1037 - 0
runtime/classic/ctrl/field_def_nemo-opa.xml

@@ -0,0 +1,1037 @@
+<?xml version="1.0"?> 
+    <!-- $id$ -->
+    
+   <field_definition level="1" prec="4" operation="average" enabled=".TRUE." default_value="1.e20" detect_missing_value="true"> <!-- time step automaticaly defined -->
+
+    <!-- 
+============================================================================================================
+                                  Dynamical ocean model variables
+============================================================================================================
+    -->
+
+      <!-- T grid -->
+      
+      <field_group id="grid_T" grid_ref="grid_T_2D" >
+         <field id="e3t"          long_name="T-cell thickness"   standard_name="cell_thickness"   unit="m"   grid_ref="grid_T_3D"/>
+         <field id="e3tb"          long_name="bottom T-cell thickness"   standard_name="bottom_cell_thickness"   unit="m"   grid_ref="grid_T_2D"/> 
+         <field id="e3t_0"        long_name="Initial T-cell thickness"   standard_name="ref_cell_thickness"   unit="m"   grid_ref="grid_T_3D"/>
+         <field id="masscello"    long_name="Sea Water Mass per unit area"   standard_name="sea_water_mass_per_unit_area"   unit="kg/m2"   grid_ref="grid_T_3D"/>
+         <field id="volcello"     long_name="Ocean Volume"                   standard_name="ocean_volume"   unit="m3"       grid_ref="grid_T_3D"/> <!-- WARNING : not consistent with CMIP DR where volcello is at ca. 2000 -->
+
+         <field id="toce"         long_name="Sea Water Conservative Temperature"         standard_name="sea_water_conservative_temperature"   unit="degree_C"     grid_ref="grid_T_3D"/>
+         <field id="toce2"        long_name="Squared Sea Water Conservative Temperature" standard_name="sea_water_conservative_temperature"   unit="degree_C**2"  grid_ref="grid_T_3D"> toce * toce </field>
+         <field id="toce_e3t"     long_name="conservative temperature * e3t"                                        unit="degree_C*m"   grid_ref="grid_T_3D" > toce * e3t </field>
+         
+	 <field id="soce"         long_name="salinity"            standard_name="sea_water_practical_salinity"      unit="0.001"     grid_ref="grid_T_3D"/>
+         <field id="soce2"        long_name="Squared salinity"  standard_name="sea_water_salinity"   unit="0.001**2"  grid_ref="grid_T_3D"> soce * soce </field>
+         <field id="soce_e3t"     long_name="salinity * e3t"                                                        unit="0.001*m"   grid_ref="grid_T_3D" > soce * e3t </field>
+
+        <field id="toce_e3t_300" field_ref="toce_e3t"  unit="degree_C"   grid_ref="zoom_300" detect_missing_value="true" />
+         <field id="e3t_300" field_ref="e3t"  unit="m"   grid_ref="zoom_300" detect_missing_value="true" />
+         <field id="toce_e3t_vsum300" field_ref="toce_e3t_300" unit="degress_C*m"  grid_ref="zoom_300_sum" detect_missing_value="true" />
+         <field id="e3t_vsum300" field_ref="e3t_300" unit="m" grid_ref="zoom_300_sum" detect_missing_value="true" />
+         <field id="toce_vmean300" field_ref="toce_e3t_vsum300" unit="degree_C" grid_ref="zoom_300_sum" detect_missing_value="true" > toce_e3t_vsum300/e3t_vsum300 </field>
+
+         <field id="toce_e3t_700" field_ref="toce_e3t"  unit="degree_C*m"   grid_ref="zoom_700" detect_missing_value="true" />
+         <field id="e3t_700" field_ref="e3t"  unit="m"   grid_ref="zoom_700" detect_missing_value="true" />
+         <field id="toce_e3t_vsum700" field_ref="toce_e3t_700" unit="degress_C*m" grid_ref="zoom_700_sum" detect_missing_value="true" />
+         <field id="e3t_vsum700" field_ref="e3t_700" unit="m" grid_ref="zoom_700_sum" detect_missing_value="true" />
+         <field id="toce_vmean700" field_ref="toce_e3t_vsum700" unit="degree_C" grid_ref="zoom_700_sum" detect_missing_value="true" > toce_e3t_vsum700/e3t_vsum700 </field>
+
+         <field id="toce_e3t_2000" field_ref="toce_e3t"  unit="degree_C*m"   grid_ref="zoom_2000" detect_missing_value="true" />
+         <field id="e3t_2000" field_ref="e3t"  unit="m"   grid_ref="zoom_2000" detect_missing_value="true" />
+         <field id="toce_e3t_vsum2000" field_ref="toce_e3t_2000" unit="degress_C*m" grid_ref="zoom_2000_sum" detect_missing_value="true" />
+         <field id="e3t_vsum2000" field_ref="e3t_2000" unit="m" grid_ref="zoom_2000_sum" detect_missing_value="true" />
+         <field id="toce_vmean2000" field_ref="toce_e3t_vsum2000" unit="degree_C"  grid_ref="zoom_2000_sum" detect_missing_value="true" > toce_e3t_vsum2000/e3t_vsum2000 </field>
+
+         <!-- Case EOS = TEOS-10 : output potential temperature -->
+         <field id="toce_pot"         long_name="Sea Water Potential Temperature"         standard_name="sea_water_potential_temperature"   unit="degC"     grid_ref="grid_T_3D"/>
+         <field id="toce_potb_e3tb"   long_name="bottom Sea Water Potential Temperature * e3tb"       unit="degC*m"     grid_ref="grid_T_2D"> sbt*e3tb </field>
+         <field id="toce_pot2"        long_name="Squared Sea Water Potential Temperature" standard_name="sea_water_potential_temperature"   unit="degree_C**2"  grid_ref="grid_T_3D"> toce_pot * toce_pot </field>
+         <field id="toce_pot_e3t"     long_name="potential temperature * e3t"                         unit="degC*m"   grid_ref="grid_T_3D" > toce_pot * e3t </field>
+         <field id="toce_pot2_e3t"    long_name="Squared Sea Water Potential Temperature * e3t" standard_name="sea_water_potential_temperature"   unit="degree_C**2*m"  grid_ref="grid_T_3D"> toce_pot * toce_pot_e3t </field>
+
+         <field id="toce_pot_e3t_vsum" field_ref="toce_pot_e3t" grid_ref="vert_sum" />
+         <field id="e3t_vsum" field_ref="e3t" unit="m" grid_ref="vert_sum" detect_missing_value="true" />
+         <field id="toce_pot_vmean" field_ref="toce_pot_e3t_vsum" grid_ref="vert_sum"> toce_pot_e3t_vsum/e3t_vsum </field>
+	 
+         <field id="toce_pot_e3t_300" field_ref="toce_pot_e3t"  unit="degree_C*m"   grid_ref="zoom_300" detect_missing_value="true" />
+         <field id="toce_pot_e3t_vsum300" field_ref="toce_pot_e3t_300" grid_ref="zoom_300_sum" detect_missing_value="true" />
+         <field id="toce_pot_vmean300" field_ref="toce_pot_e3t_vsum300" grid_ref="zoom_300_sum" detect_missing_value="true" > toce_pot_e3t_vsum300/e3t_vsum300 </field>
+
+         <field id="toce_pot_e3t_700" field_ref="toce_pot_e3t"  unit="degree_C*m"   grid_ref="zoom_700" detect_missing_value="true" />
+         <field id="toce_pot_e3t_vsum700" field_ref="toce_pot_e3t_700" grid_ref="zoom_700_sum" detect_missing_value="true" />
+         <field id="toce_pot_vmean700" field_ref="toce_pot_e3t_vsum700" grid_ref="zoom_700_sum" detect_missing_value="true" > toce_pot_e3t_vsum700/e3t_vsum700 </field>
+
+         <field id="toce_pot_e3t_2000" field_ref="toce_pot_e3t"  unit="degree_C*m"   grid_ref="zoom_2000" detect_missing_value="true" />
+         <field id="toce_pot_e3t_vsum2000" field_ref="toce_pot_e3t_2000" grid_ref="zoom_2000_sum" detect_missing_value="true" />
+         <field id="toce_pot_vmean2000" field_ref="toce_pot_e3t_vsum2000" grid_ref="zoom_2000_sum" detect_missing_value="true" > toce_pot_e3t_vsum2000/e3t_vsum2000 </field>
+
+         <field id="sst"          long_name=" sea surface temperature (conservative or potential depending on EOS)"             standard_name="sea_surface_temperature"             unit="degC"     />
+         <field id="sst2"         long_name="square of sea surface temperature"   standard_name="square_of_sea_surface_temperature"   unit="degC2"     > sst * sst </field>
+         <field id="sst_pot"      long_name="potential sea surface temperature"             standard_name="sea_surface_temperature"             unit="degC"     />
+         <field id="sst_pot2"         long_name="square of sea surface temperature"   standard_name="square_of_sea_surface_temperature"   unit="degC2"     > sst_pot * sst_pot </field>
+         <field id="sstmax"       long_name="max of sea surface temperature"   field_ref="sst"   operation="maximum"                                  />
+         <field id="sstmin"       long_name="min of sea surface temperature"   field_ref="sst"   operation="minimum"                                  />
+         <field id="sstgrad"      long_name="module of sst gradient"                                                                  unit="degree_C/m"   />
+         <field id="sstgrad2"     long_name="square of module of sst gradient"                                                        unit="degree_C2/m2" />
+         <field id="sbt"          long_name="potential sea bottom temperature"                                                                  unit="degree_C"     />
+         <field id="tosmint"      long_name="vertical integral of temperature times density"   standard_name="integral_wrt_depth_of_product_of_density_and_prognostic_temperature"  unit="(kg m2) degree_C" />
+         <field id="tosmint_pot"  long_name="vertical integral of potential temperature times density"   standard_name="integral_wrt_depth_of_product_of_density_and_potential_temperature"  unit="(kg m2) degree_C" />
+
+         <field id="sss"          long_name="sea surface salinity"             standard_name="sea_surface_salinity"   unit="1e-3" />
+         <field id="sss2"         long_name="square of sea surface salinity"                                          unit="1e-6"  > sss * sss </field>
+         <field id="sssmax"       long_name="max of sea surface salinity"   field_ref="sss"   operation="maximum"                 />
+         <field id="sssmin"       long_name="min of sea surface salinity"   field_ref="sss"   operation="minimum"                 />
+         <field id="sbs"          long_name="sea bottom salinity"                                                     unit="0.001" />
+         <field id="sbs_e3tb"     long_name="sea bottom salinity"                                      unit="0.001" > sbs * e3tb </field>
+         <field id="somint"       long_name="vertical integral of salinity times density"   standard_name="integral_wrt_depth_of_product_of_density_and_salinity"  unit="(kg m2) x (1e-3)" /> 
+
+         <field id="taubot"       long_name="bottom stress module"                                                    unit="N/m2" /> 
+
+         <field id="ssh"          long_name="sea surface height"             standard_name="sea_surface_height_above_geoid"             unit="m" />
+         <field id="ssh2"         long_name="square of sea surface height"   standard_name="square_of_sea_surface_height_above_geoid"   unit="m2" > ssh * ssh </field>
+         <field id="sshmax"       long_name="max of sea surface height"   field_ref="ssh"   operation="maximum"                                  />
+
+         <field id="mldkz5"       long_name="Turbocline depth (Kz = 5e-4)"                       standard_name="ocean_mixed_layer_thickness_defined_by_vertical_tracer_diffusivity"                unit="m"          />
+         <field id="mldr10_1"     long_name="Mixed Layer Depth (dsigma = 0.01 wrt 10m)"          standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"                                unit="m"          />
+         <field id="mldr10_1max"  long_name="Max of Mixed Layer Depth (dsigma = 0.01 wrt 10m)"   field_ref="mldr10_1"   operation="maximum"                                                                          />
+         <field id="mldr10_1min"  long_name="Min of Mixed Layer Depth (dsigma = 0.01 wrt 10m)"   field_ref="mldr10_1"   operation="minimum"                                                                          />
+         <field id="mldr10_3max"  long_name="Max of Mixed Layer Depth (dsigma = 0.03 wrt 10m)"   field_ref="mldr10_3"   operation="maximum"                                                                          />
+         <field id="mldr10_3min"  long_name="Min of Mixed Layer Depth (dsigma = 0.03 wrt 10m)"   field_ref="mldr10_3"   operation="minimum"                                                                          />
+         <field id="heatc"        long_name="Heat content vertically integrated"                 standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       />
+         <field id="saltc"        long_name="Salt content vertically integrated"                                                                                                                   unit="1e-3*kg/m2" />
+         <field id="mixlength"    long_name="Mixing Length at surface"         standard_name="mixing_length"   unit="m" />
+         <field id="mixlength2"   long_name="Mixing Length at surface"                                          unit="m2"  > mixlength * mixlength </field>
+
+         <!-- EOS -->
+         <field id="alpha"        long_name="thermal expansion"                                                         unit="degC-1" grid_ref="grid_T_3D" />
+         <field id="beta"         long_name="haline contraction"                                                        unit="1e3"    grid_ref="grid_T_3D" />
+         <field id="bn2"          long_name="squared Brunt-Vaisala frequency"                                           unit="s-1"    grid_ref="grid_T_3D" />
+         <field id="bn2_e3t"      long_name="squared Brunt-Vaisala frequency * e3t"    unit="m* s-1"    grid_ref="grid_T_3D" > bn2 * e3t </field> 
+         <field id="rhop"         long_name="potential density (sigma0)"        standard_name="sea_water_sigma_theta"   unit="kg/m3"  grid_ref="grid_T_3D" />
+
+         <!-- Energy - horizontal divergence -->
+         <field id="eken"         long_name="kinetic energy"          standard_name="specific_kinetic_energy_of_sea_water"   unit="m2/s2"  grid_ref="grid_T_3D" />
+         <field id="hdiv"         long_name="horizontal divergence"                                                          unit="s-1"    grid_ref="grid_T_3D" />
+
+         <!-- variables available with MLE -->
+         <field id="Lf_NHpf"      long_name="MLE: Lf = N H / f"   unit="m" />
+
+         <!-- next variables available with key_diahth -->
+         <field id="mlddzt"       long_name="Thermocline Depth (depth of max dT/dz)"         standard_name="depth_at_maximum_upward_derivative_of_sea_water_potential_temperature"             unit="m"                         />
+         <field id="mldr10_3"     long_name="Mixed Layer Depth (dsigma = 0.03 wrt 10m)"      standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"                                unit="m"                         />
+         <field id="mldr0_1"      long_name="Mixed Layer Depth (dsigma = 0.01 wrt sfc)"      standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"                                unit="m"                         />
+         <field id="mldr0_3"      long_name="Mixed Layer Depth (dsigma = 0.03 wrt sfc)"      standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"                                unit="m"                         />
+         <field id="mld_dt02"     long_name="Mixed Layer Depth (|dT| = 0.2 wrt 10m)"         standard_name="ocean_mixed_layer_thickness_defined_by_temperature"                                unit="m"                         />
+         <field id="topthdep"     long_name="Top of Thermocline Depth (dT = -0.2 wrt 10m)"   standard_name="ocean_mixed_layer_thickness_defined_by_temperature"                                unit="m"                         />
+         <field id="pycndep"      long_name="Pycnocline Depth (dsigma[dT=-0.2] wrt 10m)"     standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"                                unit="m"                         />
+         <field id="BLT"          long_name="Barrier Layer Thickness"                                                                                                                          unit="m"                          > topthdep - pycndep </field>
+         <field id="tinv"         long_name="Max of vertical invertion of temperature"                                                                                                         unit="degC"                      />
+         <field id="depti"        long_name="Depth of max. vert. inv. of temperature"                                                                                                          unit="m"                         />
+         <field id="20d"          long_name="Depth of 20C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"   />
+         <field id="26d"          long_name="Depth of 20C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"   />
+         <field id="28d"          long_name="Depth of 28C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"   />
+         <field id="hc300"        long_name="Heat content 0-300m"                            standard_name="integral_of_sea_water_[conservative if nn_eos=-1, potential otherwise]_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"                      />
+         <field id="hc700"        long_name="Heat content 0-700m"                            standard_name="integral_of_sea_water_[conservative if nn_eos=-1, potential otherwise]_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"                      />
+         <field id="hc2000"       long_name="Heat content 0-2000m"                           standard_name="integral_of_sea_water_[conservative if nn_eos=-1, potential otherwise]_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"                      />
+
+         <!-- variables available with key_diaar5 -->
+         <field id="botpres"      long_name="Sea Water Pressure at Sea Floor"   standard_name="sea_water_pressure_at_sea_floor"   unit="dbar" />
+         <field id="sshdyn"       long_name="dynamic sea surface height"     standard_name="dynamic_sea_surface_height_above_geoid"     unit="m" />
+         <field id="sshdyn2"      long_name="square of dynamic sea surface height"     standard_name="dynamic_sea_surface_height_above_geoid_squared"     unit="m2" > sshdyn * sshdyn </field>
+         <field id="tnpeo"      long_name="Tendency of ocean potential energy content"          unit="W/m2"                           />
+
+         <!-- variables available with key_vvl -->
+         <field id="tpt_dep"      long_name="T-point depth"                  standard_name="depth_below_geoid"   unit="m"   grid_ref="grid_T_3D" />
+         <field id="e3tdef"       long_name="T-cell thickness deformation"                                       unit="%"   grid_ref="grid_T_3D" />
+      </field_group>
+
+      <!-- Tides -->
+
+      <field_group id="Tides_T" grid_ref="grid_T_2D" operation="once" >
+         <!-- tidal composante -->
+         <field id="M2x"          long_name="M2 Elevation harmonic real part "                             unit="m"        />
+         <field id="M2y"          long_name="M2 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="S2x"          long_name="S2 Elevation harmonic real part "                             unit="m"        />
+         <field id="S2y"          long_name="S2 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="N2x"          long_name="N2 Elevation harmonic real part "                             unit="m"        />
+         <field id="N2y"          long_name="N2 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="K1x"          long_name="K1 Elevation harmonic real part "                             unit="m"        />
+         <field id="K1y"          long_name="K1 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="O1x"          long_name="O1 Elevation harmonic real part "                             unit="m"        />
+         <field id="O1y"          long_name="O1 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="Q1x"          long_name="Q1 Elevation harmonic real part "                             unit="m"        />
+         <field id="Q1y"          long_name="Q1 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="M4x"          long_name="M4 Elevation harmonic real part "                             unit="m"        />
+         <field id="M4y"          long_name="M4 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="K2x"          long_name="K2 Elevation harmonic real part "                             unit="m"        />
+         <field id="K2y"          long_name="K2 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="P1x"          long_name="P1 Elevation harmonic real part "                             unit="m"        />
+         <field id="P1y"          long_name="P1 Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="Mfx"          long_name="Mf Elevation harmonic real part "                             unit="m"        />
+         <field id="Mfy"          long_name="Mf Elevation harmonic imaginary part"                         unit="m"        />
+         <field id="Mmx"          long_name="Mm Elevation harmonic real part "                             unit="m"        />
+         <field id="Mmy"          long_name="Mm Elevation harmonic imaginary part"                         unit="m"        />
+      </field_group>
+	 
+      <field_group id="Tides_U" grid_ref="grid_U_2D" operation="once" >
+         <field id="M2x_u"        long_name="M2 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="M2y_u"        long_name="M2 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="S2x_u"        long_name="S2 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="S2y_u"        long_name="S2 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="N2x_u"        long_name="N2 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="N2y_u"        long_name="N2 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="K1x_u"        long_name="K1 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="K1y_u"        long_name="K1 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="O1x_u"        long_name="O1 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="O1y_u"        long_name="O1 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="Q1x_u"        long_name="Q1 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="Q1y_u"        long_name="Q1 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="M4x_u"        long_name="M4 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="M4y_u"        long_name="M4 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="K2x_u"        long_name="K2 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="K2y_u"        long_name="K2 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="P1x_u"        long_name="P1 current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="P1y_u"        long_name="P1 current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="Mfx_u"        long_name="Mf current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="Mfy_u"        long_name="Mf current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="Mmx_u"        long_name="Mm current barotrope along i-axis harmonic real part "        unit="m/s"      />
+         <field id="Mmy_u"        long_name="Mm current barotrope along i-axis harmonic imaginary part "   unit="m/s"      />
+      </field_group>
+	 
+      <field_group id="Tides_V" grid_ref="grid_V_2D" operation="once" >
+         <field id="M2x_v"        long_name="M2 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="M2y_v"        long_name="M2 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="S2x_v"        long_name="S2 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="S2y_v"        long_name="S2 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="N2x_v"        long_name="N2 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="N2y_v"        long_name="N2 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="K1x_v"        long_name="K1 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="K1y_v"        long_name="K1 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="O1x_v"        long_name="O1 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="O1y_v"        long_name="O1 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="Q1x_v"        long_name="Q1 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="Q1y_v"        long_name="Q1 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="M4x_v"        long_name="M4 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="M4y_v"        long_name="M4 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="K2x_v"        long_name="K2 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="K2y_v"        long_name="K2 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="P1x_v"        long_name="P1 current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="P1y_v"        long_name="P1 current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="Mfx_v"        long_name="Mf current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="Mfy_v"        long_name="Mf current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />
+         <field id="Mmx_v"        long_name="Mm current barotrope along j-axis harmonic real part "        unit="m/s"      />
+         <field id="Mmy_v"        long_name="Mm current barotrope along j-axis harmonic imaginary part "   unit="m/s"      />	 
+      </field_group>
+
+      <!-- SBC -->
+      
+      <field_group id="SBC" grid_ref="grid_T_2D" > <!-- time step automaticaly defined based on nn_fsbc -->
+         <field id="empmr"        long_name="Net Upward Water Flux"                standard_name="water_flux_out_of_sea_ice_and_sea_water"                              unit="kg/m2/s"   />
+         <field id="empbmr"       long_name="Net Upward Water Flux at pre. tstep"  standard_name="water_flux_out_of_sea_ice_and_sea_water"                              unit="kg/m2/s"   />
+         <field id="emp_oce"      long_name="Evap minus Precip over ocean"         standard_name="evap_minus_precip_over_sea_water"                                     unit="kg/m2/s"   />
+         <field id="emp_ice"      long_name="Evap minus Precip over ice"           standard_name="evap_minus_precip_over_sea_ice"                                       unit="kg/m2/s"   />
+         <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="kg/m2/s" />
+         <field id="fmmflx"       long_name="Water flux due to freezing/melting"                                                                                        unit="kg/m2/s"   />
+         <field id="snowpre"      long_name="Snow precipitation"                   standard_name="snowfall_flux"                                                        unit="kg/m2/s"   />
+         <field id="runoffs"      long_name="River Runoffs"                        standard_name="water_flux_into_sea_water_from_rivers"                                unit="kg/m2/s"   />
+         <field id="precip"       long_name="Total precipitation"                  standard_name="precipitation_flux"                                                   unit="kg/m2/s"   />
+ 
+         <field id="qt"           long_name="Net Downward Heat Flux"                standard_name="surface_downward_heat_flux_in_sea_water"                              unit="W/m2"                           />
+         <field id="qns"          long_name="non solar Downward Heat Flux"                                                                                               unit="W/m2"                           />
+         <field id="qsr"          long_name="Shortwave Radiation"                   standard_name="net_downward_shortwave_flux_at_sea_water_surface"                     unit="W/m2"                           />
+         <field id="qsr3d"        long_name="Shortwave Radiation 3D distribution"   standard_name="downwelling_shortwave_flux_in_sea_water"                              unit="W/m2"      grid_ref="grid_T_3D" />
+         <field id="e3t_SBC"    field_ref="e3t"  unit="m"   grid_ref="grid_T_3D"/>
+         <field id="qsr3d_e3t_SBC"    long_name="Shortwave Radiation 3D distribution * e3t"                                                                                  unit="m* W/m2"   grid_ref="grid_T_3D" > qsr3d * e3t_SBC </field> 
+         <field id="qrp"          long_name="Surface Heat Flux: Damping"            standard_name="heat_flux_into_sea_water_due_to_newtonian_relaxation"                 unit="W/m2"                           />
+         <field id="erp"          long_name="Surface Water Flux: Damping"           standard_name="water_flux_out_of_sea_water_due_to_newtonian_relaxation"              unit="kg/m2/s"                        />
+         <field id="taum"         long_name="wind stress module"                    standard_name="magnitude_of_surface_downward_stress"                                 unit="N/m2"                           />
+         <field id="wspd"         long_name="wind speed module"                     standard_name="wind_speed"                                                           unit="m/s"                            />
+         
+         <!-- * variable relative to atmospheric pressure forcing : available with ln_apr_dyn -->
+         <field id="ssh_ib"       long_name="Inverse barometer sea surface height"  standard_name="sea_surface_height_correction_due_to_air_pressure_at_low_frequency"   unit="m"        />
+
+         <!-- * variable related to ice shelf forcing * -->
+         <field id="fwfisf"       long_name="Ice shelf melting"                             unit="kg/m2/s"  />
+         <field id="fwfisf3d"     long_name="Ice shelf melting"                             unit="kg/m2/s"  grid_ref="grid_T_3D" />
+	 <field id="qlatisf"      long_name="Ice shelf latent heat flux"                    unit="W/m2"     />
+         <field id="qlatisf3d"    long_name="Ice shelf latent heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" />
+         <field id="qhcisf"       long_name="Ice shelf heat content flux"                   unit="W/m2"     />
+         <field id="qhcisf3d"     long_name="Ice shelf heat content flux"                   unit="W/m2"     grid_ref="grid_T_3D" />
+         <field id="isfgammat"    long_name="transfert coefficient for isf (temperature)"   unit="m/s"      />
+         <field id="isfgammas"    long_name="transfert coefficient for isf (salinity)"      unit="m/s"      />
+         <field id="stbl"         long_name="salinity in the Losh tbl"                      unit="1e-3"     />
+         <field id="ttbl"         long_name="temperature in the Losh tbl"                   unit="degC"     />
+
+         <!-- *_oce variables available with ln_blk_clio or ln_blk_core -->
+         <field id="qlw_oce"      long_name="Longwave Downward Heat Flux over open ocean"  standard_name="surface_net_downward_longwave_flux"   unit="W/m2"  />
+         <field id="qsb_oce"      long_name="Sensible Downward Heat Flux over open ocean"  standard_name="surface_downward_sensible_heat_flux"  unit="W/m2"  />
+         <field id="qla_oce"      long_name="Latent Downward Heat Flux over open ocean"    standard_name="surface_downward_latent_heat_flux"    unit="W/m2"  />
+         <field id="qemp_oce"     long_name="Downward Heat Flux from E-P over open ocean"                                                       unit="W/m2"  />
+         <field id="taum_oce"     long_name="wind stress module over open ocean"           standard_name="magnitude_of_surface_downward_stress" unit="N/m2"  />
+
+
+         <!-- available key_oasis3 -->
+         <field id="snow_ao_cea"  long_name="Snow over ice-free ocean (cell average)"   standard_name="snowfall_flux"                             unit="kg/m2/s"  />
+         <field id="snow_ai_cea"  long_name="Snow over sea-ice (cell average)"          standard_name="snowfall_flux"                             unit="kg/m2/s"  />
+         <field id="subl_ai_cea"  long_name="Sublimation over sea-ice (cell average)"   standard_name="surface_snow_and_ice_sublimation_flux"     unit="kg/m2/s"  />
+         <field id="icealb_cea"   long_name="Ice albedo (cell average)"                 standard_name="sea_ice_albedo"                            unit="1"        />
+         <field id="calving_cea"  long_name="Calving"                                   standard_name="water_flux_into_sea_water_from_icebergs"   unit="kg/m2/s"  />
+         <field id="acalving_cea" long_name="Antarctic Calving"                         standard_name="water_flux_into_sea_water_from_antarctic_icebergs"   unit="kg/m2/s"  />
+         <field id="gcalving_cea" long_name="Greenland Calving"                         standard_name="water_flux_into_sea_water_from_greenland_icebergs"   unit="kg/m2/s"  />
+         <field id="iceberg_cea"  long_name="Iceberg"                                   standard_name="water_flux_into_sea_water_from_icebergs"   unit="kg/m2/s"  />
+         <field id="iceshelf_cea" long_name="Iceshelf"                                  standard_name="water_flux_into_sea_water_from_iceshelf"   unit="kg/m2/s"  />
+         <field id="lake"         long_name="Inland Lake water budget"                  standard_name="water_flux_into_sea_water_from_inland_lake_budget"   unit="kg/m2/s"  />
+
+         <!-- available if key_oasis3 + conservative method -->
+	 <field id="rain"          long_name="Liquid precipitation"                                     standard_name="rainfall_flux"                                                                 unit="kg/m2/s"  />
+         <field id="rain_ao_cea"   long_name="Liquid precipitation over ice-free ocean (cell average)"  standard_name="rainfall_flux"                                                                 unit="kg/m2/s"  />
+         <field id="tprec"         long_name="Total precipitation"                                      standard_name="precipitation_flux"                   unit="kg/m2/s"  />
+         <field id="tevp"          long_name="Total evaporation"                                        standard_name="evaporation_flux"                     unit="kg/m2/s"  />
+         <field id="e-p"           long_name="Total evaporation - total precipitation"                  standard_name="evaporation_minus_precipitation_flux" unit="kg/m2/s"  />
+         <field id="qnsrcv"        long_name="qns received from OASIS"                                  standard_name="net_surface_non_solar_heat_flux"      unit="W/m2"  />
+         <field id="qsrrcv"        long_name="qsr received from OASIS"                                  standard_name="net_surface_solar_heat_flux"      unit="W/m2"  />
+         <field id="qns_tot"       long_name="qns over the oce/ice system"                              standard_name="net_surface_non_solar_heat_flux_over_ocean_and_ice"                            unit="W/m2"  />
+         <field id="qsr_tot"       long_name="qsr over the oce/ice system"                              standard_name="net_surface_solar_heat_flux_over_ocean_and_ice"                                unit="W/m2"  />
+         <field id="empsbcm"       long_name="EMP in sbcmod"                                            standard_name="net_surface_water_flux"               unit="kg/m2/s"  />
+         <field id="rnfsbcm"       long_name="runoffs in sbcmod"                                        standard_name="runoff_water_flux"                                                             unit="kg/m2/s"  />
+         <field id="evap_ao_cea"   long_name="Evaporation over ice-free ocean (cell average)"           standard_name="water_evaporation_flux"                                                        unit="kg/m2/s"  />
+         <field id="isnwmlt_cea"   long_name="Snow over Ice melting (cell average)"                     standard_name="surface_snow_melt_flux"                                                        unit="kg/m2/s"  />
+         <field id="fsal_virt_cea" long_name="Virtual salt flux due to ice formation (cell average)"    standard_name="virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics"                unit="kg/m2/s"  />
+         <field id="fsal_real_cea" long_name="Real salt flux due to ice formation (cell average)"       standard_name="downward_sea_ice_basal_salt_flux"                                              unit="kg/m2/s"  />
+         <field id="hflx_rain_cea" long_name="heat flux due to rainfall"                                standard_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water"        unit="W/m2"     />
+         <field id="hflx_prec_cea" long_name="heat flux due to precipitation"                           standard_name="temperature_flux_due_to_precipitation_expressed_as_heat_flux_into_sea_water"        unit="W/m2"     />
+         <field id="hflx_evap_cea" long_name="heat flux due to evaporation"                             standard_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water"   unit="W/m2"     />
+         <field id="hflx_snow_cea" long_name="heat flux due to snow falling"                            standard_name="heat_flux_onto_ocean_and_ice_due_to_snow_thermodynamics"                       unit="W/m2"     />
+	 <field id="hflx_snow_ai_cea" long_name="heat flux due to snow falling over ice"                standard_name="heat_flux_onto_ice_due_to_snow_thermodynamics"                                 unit="W/m2"     />
+         <field id="hflx_snow_ao_cea" long_name="heat flux due to snow falling over ice-free ocean"     standard_name="heat_flux_onto_sea_water_due_to_snow_thermodynamics"                           unit="W/m2"     />
+         <field id="hflx_ice_cea"  long_name="heat flux due to ice thermodynamics"                      standard_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics"                        unit="W/m2"     />
+         <field id="hflx_rnf_cea"  long_name="heat flux due to runoffs"                                 standard_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water"          unit="W/m2"     />
+         <field id="hflx_cal_cea"  long_name="heat flux due to calving"                                 standard_name="heat_flux_into_sea_water_due_to_calving             "                          unit="W/m2"     />
+         <field id="hflx_icb_cea"  long_name="heat flux due to iceberg"                                 standard_name="heat_flux_into_sea_water_due_to_icebergs_thermodyncamics"                      unit="W/m2"     />
+         <field id="hflx_isf_cea"  long_name="heat flux due to iceshelf"                                standard_name="heat_flux_into_sea_water_due_to_iceshelf"                                      unit="W/m2"     />
+         <field id="bicemel_cea"   long_name="Rate of Melt at Sea Ice Base (cell average)"              standard_name="tendency_of_sea_ice_amount_due_to_basal_melting"                               unit="kg/m2/s"  />
+         <field id="licepro_cea"   long_name="Lateral Sea Ice Growth Rate (cell average)"               standard_name="tendency_of_sea_ice_amount_due_to_lateral_growth_of_ice_floes"                 unit="kg/m2/s"  />
+         <field id="snowmel_cea"   long_name="Snow Melt Rate (cell average)"                            standard_name="surface_snow_melt_flux"                                                        unit="kg/m2/s"  />
+         <field id="sntoice_cea"   long_name="Snow-Ice Formation Rate (cell average)"                   standard_name="tendency_of_sea_ice_amount_due_to_snow_conversion"                             unit="kg/m2/s"  />
+         <field id="ticemel_cea"   long_name="Rate of Melt at Upper Surface of Sea Ice (cell average)"  standard_name="tendency_of_sea_ice_amount_due_to_surface_melting"                             unit="kg/m2/s"  />
+
+         <field id="emp_x_sst"    long_name="Concentration/Dilution term on SST"                                                                                              unit="kg*degC/m2/s" />
+         <field id="emp_x_sss"    long_name="Concentration/Dilution term on SSS"                                                                                              unit="kg*1e-3/m2/s" />        
+         <field id="rnf_x_sst"    long_name="Runoff term on SST"                                                                                                              unit="kg*degC/m2/s" />
+         <field id="rnf_x_sss"    long_name="Runoff term on SSS"                                                                                                              unit="kg*1e-3/m2/s" />
+       
+        <!-- sbcssm variables -->
+         <field id="sst_m"    unit="degC" />
+         <field id="sss_m"    unit="psu"  />
+         <field id="qoc_m"    unit="W/m2" />
+         <field id="ssu_m"    unit="m/s"  />
+         <field id="ssv_m"    unit="m/s"  />
+         <field id="ssh_m"    unit="m"    />
+         <field id="e3t_m"    unit="m"    />
+         <field id="frq_m"    unit="-"    />
+      </field_group>
+
+      <!-- U grid -->
+      
+      <field_group id="grid_U"   grid_ref="grid_U_2D">
+         <field id="e2u"          long_name="U-cell width in meridional direction"                standard_name="cell_width"              unit="m"          grid_ref="grid_U_2D" />
+         <field id="e3u"          long_name="U-cell thickness"                                       standard_name="cell_thickness"              unit="m"          grid_ref="grid_U_3D" />
+         <field id="e3u_0"        long_name="Initial U-cell thickness"                               standard_name="ref_cell_thickness"          unit="m"          grid_ref="grid_U_3D"/>
+         <field id="utau"         long_name="Wind Stress along i-axis"                               standard_name="surface_downward_x_stress"   unit="N/m2"                            />
+         <field id="uoce"         long_name="ocean current along i-axis"                             standard_name="sea_water_x_velocity"        unit="m/s"        grid_ref="grid_U_3D" />
+         <field id="uoce_e3u"     long_name="ocean current along i-axis * e3u"                                                                   unit="m2/s"       grid_ref="grid_U_3D"  > uoce * e3u </field>
+         <field id="uoce_e3u_vsum" long_name="ocean current along i-axis * e3u summed on the vertical"  field_ref="uoce_e3u"    unit="m3/s"       grid_ref="vert_sum_U"/>
+         <field id="uoce2"    	  long_name="squared ocean current along i-axis"                    standard_name="squared_sea_water_x_velocity"        unit="m2/s2"      grid_ref="grid_U_3D" > uoce * uoce </field>
+         <field id="uoce2_e3u"    long_name="ocean current along i-axis"                            standard_name="squared_sea_water_x_velocity"        unit="m3/s2"      grid_ref="grid_U_3D" > uoce * uoce_e3u </field>
+         
+         <field id="uoce_e3u_vsum_e2u"  long_name="ocean current along i-axis * e3u * e2u summed on the vertical"         field_ref="e2u"       unit="m3/s"> uoce_e3u_vsum * e2u </field> 
+         <field id="uoce_e3u_vsum_e2u_op"  long_name="ocean current along i-axis * e3u * e2u summed on the vertical"  read_access="true"  freq_op="1mo"    field_ref="e2u"       unit="m3/s"> @uoce_e3u_vsum_e2u </field>
+         <field id="uoce_e3u_vsum_e2u_cumul" long_name="ocean current along i-axis * e3u * e2u cumulated from southwest point" freq_offset="_reset_" operation="instant" freq_op="1mo" grid_ref="grid_U_2D"  unit="m3/s" /> 
+
+         <field id="ssu"          long_name="ocean surface current along i-axis"                                                                 unit="m/s"                             />
+         <field id="sbu"          long_name="ocean bottom current along i-axis"                                                                  unit="m/s"                             />
+         <field id="ubar"         long_name="ocean barotropic current along i-axis"                                                              unit="m/s"                             />
+         <field id="uocetr_eff"   long_name="Effective ocean transport along i-axis"                 standard_name="ocean_volume_x_transport"    unit="m3/s"       grid_ref="grid_U_3D" />
+         <field id="uocet"        long_name="ocean transport along i-axis times temperature (CRS)"                                               unit="degC*m/s"   grid_ref="grid_U_3D" />
+         <field id="uoces"        long_name="ocean transport along i-axis times salinity (CRS)"                                                  unit="1e-3*m/s"   grid_ref="grid_U_3D" />
+
+         <!-- variables available with MLE -->
+         <field id="psiu_mle"     long_name="MLE streamfunction along i-axis"   unit="m3/s"   grid_ref="grid_U_3D" />
+
+         <!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv -->
+         <field id="uoce_eiv"      long_name="EIV ocean current along i-axis"   standard_name="bolus_sea_water_x_velocity"   unit="m/s"   grid_ref="grid_U_3D" />
+         <field id="ueiv_masstr"   long_name="EIV Ocean Mass X Transport"    standard_name="bolus_ocean_mass_x_transport"                          unit="kg/s"        grid_ref="grid_U_3D" />
+         <field id="ueiv_heattr3d" long_name="ocean bolus heat transport along i-axis"    standard_name="ocean_heat_x_transport_due_to_bolus_advection"   unit="W"    grid_ref="grid_U_3D" />
+         <field id="ueiv_salttr3d" long_name="ocean bolus salt transport along i-axis"    standard_name="ocean_salt_x_transport_due_to_bolus_advection"   unit="kg"   grid_ref="grid_U_3D" />
+
+         <!-- uoce_eiv: available with key_trabbl -->
+         <field id="uoce_bbl"     long_name="BBL ocean current along i-axis"    unit="m/s"  />
+         <field id="ahu_bbl"      long_name="BBL diffusive flux along i-axis"   unit="m3/s" />
+
+         <!-- variable for ice shelves -->
+         <field id="utbl"         long_name="zonal current in the Losh tbl"     unit="m/s" />
+
+         <!-- variables available with key_diaar5 -->
+         <field id="u_masstr"     long_name="ocean eulerian mass transport along i-axis"    standard_name="ocean_mass_x_transport"                          unit="kg/s"        grid_ref="grid_U_3D" />
+         <field id="u_masstr_vint" long_name="vertical integral of ocean eulerian mass transport along i-axis"    standard_name="vertical_integral_of_ocean_mass_x_transport"  unit="kg/s" />
+         <field id="u_heattr"     long_name="ocean eulerian heat transport along i-axis"    standard_name="ocean_heat_x_transport"                          unit="W"                                />
+         <field id="uadv_heattr"  long_name="ocean advective heat transport along i-axis"    standard_name="advectice_ocean_heat_x_transport"                          unit="W"                                />
+         <field id="u_salttr"     long_name="ocean eulerian salt transport along i-axis"    standard_name="ocean_salt_x_transport"                          unit="0.001*kg/s"                        />
+         <field id="ueiv_heattr"  long_name="ocean bolus heat transport along i-axis"       standard_name="ocean_heat_x_transport_due_to_bolus_advection"   unit="W"                                />
+         <field id="ueiv_salttr"  long_name="ocean bolus salt transport along i-axis"       standard_name="ocean_salt_x_transport_due_to_bolus_advection"   unit="W"                                />
+         <field id="udiff_heattr" long_name="ocean diffusion heat transport along i-axis"   standard_name="ocean_heat_x_transport_due_to_diffusion"         unit="W"                                />
+       </field_group>
+      
+      <!-- V grid -->
+      
+      <field_group id="grid_V"   grid_ref="grid_V_2D">
+        <field id="e1v"            grid_ref="grid_V_2D" />
+         <field id="e3v"          long_name="V-cell thickness"                                       standard_name="cell_thickness"              unit="m"          grid_ref="grid_V_3D" />
+         <field id="e3v_0"        long_name="Initial V-cell thickness"                               standard_name="ref_cell_thickness"          unit="m"          grid_ref="grid_V_3D"/>
+         <field id="vtau"         long_name="Wind Stress along j-axis"                               standard_name="surface_downward_y_stress"   unit="N/m2"                            />
+         <field id="voce"         long_name="ocean current along j-axis"                             standard_name="sea_water_y_velocity"        unit="m/s"        grid_ref="grid_V_3D" />
+         <field id="voce_e3v"     long_name="ocean current along j-axis * e3v"                                                                   unit="m2/s"       grid_ref="grid_V_3D"  > voce * e3v </field>
+         <field id="voce2"    	  long_name="squared ocean current along j-axis"                    standard_name="squared_sea_water_y_velocity"        unit="m2/s2"      grid_ref="grid_V_3D" > voce * voce </field>
+         <field id="voce2_e3v"    long_name="ocean current along j-axis"                            standard_name="squared_sea_water_y_velocity"        unit="m3/s2"      grid_ref="grid_V_3D" > voce * voce_e3v </field>
+
+         <field id="ssv"          long_name="ocean surface current along j-axis"                                                                 unit="m/s"                             />
+
+         <field id="sbv"          long_name="ocean bottom current along j-axis"                                                                  unit="m/s"                             />
+         <field id="vbar"         long_name="ocean barotropic current along j-axis"                                                              unit="m/s"                             />
+         <field id="vocetr_eff"   long_name="Effective ocean transport along j-axis"                 standard_name="ocean_volume_y_transport"    unit="m3/s"       grid_ref="grid_V_3D" />
+         <field id="vocet"        long_name="ocean transport along j-axis times temperature (CRS)"                                               unit="degC*m/s"   grid_ref="grid_V_3D" />
+         <field id="voces"        long_name="ocean transport along j-axis times salinity (CRS)"                                                  unit="1e-3*m/s"   grid_ref="grid_V_3D" />
+
+         <!-- variables available with MLE -->
+         <field id="psiv_mle"     long_name="MLE streamfunction along j-axis"   unit="m3/s"   grid_ref="grid_V_3D" />
+
+         <!-- voce_eiv: available with key_traldf_eiv and key_diaeiv -->
+         <field id="voce_eiv"     long_name="EIV ocean current along j-axis"   standard_name="bolus_sea_water_y_velocity"   unit="m/s"   grid_ref="grid_V_3D" />
+         <field id="veiv_masstr"   long_name="EIV Ocean Mass Y Transport"    standard_name="bolus_ocean_mass_y_transport"                          unit="kg/s"        grid_ref="grid_V_3D" />
+         <field id="veiv_heattr3d" long_name="ocean bolus heat transport along j-axis"    standard_name="ocean_heat_y_transport_due_to_bolus_advection"   unit="W"    grid_ref="grid_V_3D" />
+         <field id="veiv_salttr3d" long_name="ocean bolus salt transport along j-axis"    standard_name="ocean_salt_y_transport_due_to_bolus_advection"   unit="kg"   grid_ref="grid_V_3D" />
+
+         <!-- voce_eiv: available with key_trabbl -->
+         <field id="voce_bbl"     long_name="BBL ocean current along j-axis"    unit="m/s"  />
+         <field id="ahv_bbl"      long_name="BBL diffusive flux along j-axis"   unit="m3/s" />
+
+         <!-- variable for ice shelves -->
+         <field id="vtbl"         long_name="meridional current in the Losh tbl"   unit="m/s" />
+
+         <!-- variables available with key_diaar5 -->
+         <field id="v_masstr"     long_name="Ocean eulerian mass transport along j-axis"    standard_name="ocean_mass_y_transport"                          unit="kg/s"        grid_ref="grid_V_3D" />
+         <field id="v_masstr_vint" long_name="vertical integral of ocean eulerian mass transport along j-axis"    standard_name="vertical_integral_of_ocean_mass_y_transport"  unit="kg/s" />
+         <field id="v_heattr"     long_name="Ocean eulerian heat transport along j-axis"    standard_name="ocean_heat_y_transport"                          unit="W"                                />
+         <field id="vadv_heattr"  long_name="ocean advective heat transport along j-axis"    standard_name="advective_ocean_heat_y_transport"                          unit="W"                                />
+         <field id="v_salttr"     long_name="ocean eulerian salt transport along i-axis"    standard_name="ocean_salt_y_transport"                          unit="0.001*kg/s"                        />
+         <field id="veiv_heattr"  long_name="ocean bolus heat transport along j-axis"       standard_name="ocean_heat_y_transport_due_to_bolus_advection"   unit="W"                                />
+         <field id="veiv_salttr"  long_name="ocean bolus salt transport along j-axis"       standard_name="ocean_salt_y_transport_due_to_bolus_advection"   unit="W"                                />
+         <field id="vdiff_heattr" long_name="ocean diffusion heat transport along j-axis"   standard_name="ocean_heat_y_transport_due_to_diffusion"         unit="W"                                />
+       </field_group>
+
+     <!-- Transects -->
+     <field id="uoce_e3u_ave_transect"  freq_op="1mo" freq_offset="_reset_" field_ref="uoce_e3u"> @uoce_e3u </field>
+     <field id="uoce_e3u_vsum_transect"  field_ref="uoce_e3u_ave_transect" grid_ref="vert_sum_U"/>
+     <field id="uoce_e3u_vsum_transect_e2u_ave"  grid_ref="grid_U_2D_scalar"  detect_missing_value="true">uoce_e3u_vsum_transect * e2u </field>
+     <field id="uoce_e3u_vsum_transect_e2u_transect"  field_ref="uoce_e3u_vsum_transect_e2u_ave" grid_ref="grid_U_transect" />
+     <field id="transport_Umask_transect" field_ref="uoce_e3u_vsum_transect_e2u_transect" grid_ref="grid_U_transect" > uoce_e3u_vsum_transect_e2u_transect*maskMFO_u  </field>
+     <field id="transport_masse_U_transect" field_ref="transport_Umask_transect" grid_ref="grid_U_transect_hsum" unit="kg/s"> transport_Umask_transect * $rau0 </field>
+
+     <field id="voce_e3v_ave_transect"  freq_op="1mo" freq_offset="_reset_" field_ref="voce_e3v"> @voce_e3v </field>
+     <field id="voce_e3v_vsum_transect"  field_ref="voce_e3v_ave_transect" grid_ref="vert_sum_V"/>
+     <field id="voce_e3v_vsum_transect_e1v_ave"  grid_ref="grid_V_2D_scalar"  detect_missing_value="true">voce_e3v_vsum_transect * e1v </field>
+     <field id="voce_e3v_vsum_transect_e1v_transect"  field_ref="voce_e3v_vsum_transect_e1v_ave" grid_ref="grid_V_transect" />
+     <field id="transport_Vmask_transect" field_ref="voce_e3v_vsum_transect_e1v_transect" grid_ref="grid_V_transect" > voce_e3v_vsum_transect_e1v_transect*maskMFO_v  </field>
+     <field id="transport_masse_V_transect" field_ref="transport_Vmask_transect" grid_ref="grid_V_transect_hsum" unit="kg/s"> transport_Vmask_transect * $rau0 </field>
+
+     <field id="transport_masse_transect" grid_ref="grid_transect" unit="kg/s"> transport_masse_U_transect+transport_masse_V_transect </field>
+
+      
+      <!-- W grid -->
+      
+      <field_group id="grid_W" grid_ref="grid_W_3D">
+        <field id="e3w"          long_name="W-cell thickness"                     standard_name="cell_thickness"              unit="m"    />
+        <field id="woce"         long_name="ocean vertical velocity"              standard_name="upward_sea_water_velocity"   unit="m/s"  />
+        <field id="woce_e3w"         long_name="ocean vertical velocity * e3w"      unit="m2/s"  > woce * e3w </field>
+        <field id="wocetr_eff"   long_name="effective ocean vertical transport"                                               unit="m3/s" />
+
+        <!-- woce_eiv: available with key_traldf_eiv and key_diaeiv -->
+        <field id="woce_eiv"     long_name="EIV ocean vertical velocity"   standard_name="bolus_upward_sea_water_velocity"   unit="m/s" />
+        <field id="weiv_masstr"  long_name="EIV Upward Ocean Mass Transport"  standard_name="bolus_upward_ocean_mass_transport"             unit="kg/s"   />
+        <field id="weiv_heattr3d" long_name="ocean bolus heat transport"    standard_name="ocean_heat_z_transport_due_to_bolus_advection"   unit="W"    grid_ref="grid_W_3D" />
+        <field id="weiv_salttr3d" long_name="ocean bolus salt transport"    standard_name="ocean_salt_z_transport_due_to_bolus_advection"   unit="kg"   grid_ref="grid_W_3D" />
+
+        
+        <field id="avt"          long_name="vertical eddy diffusivity"   standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" />
+        <field id="avt_e3w"      long_name="vertical heat diffusivity * e3w"   unit="m3/s" > avt * e3w </field> 
+        <field id="logavt"       long_name="logarithm of vertical eddy diffusivity"   standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" />
+        <field id="avm"          long_name="vertical eddy viscosity"     standard_name="ocean_vertical_momentum_diffusivity"   unit="m2/s" />
+        <field id="avm_e3w"      long_name="vertical eddy viscosity * e3w"   unit="m3/s" > avm * e3w </field> 
+        <field id="avtb"         long_name="vertical eddy diffusivity"   standard_name="ocean_vertical_heat_diffusivity_due_to_background"       unit="m2/s" />
+        <field id="avmb"         long_name="vertical eddy viscosity"     standard_name="ocean_vertical_momentum_diffusivity_due_to_background"   unit="m2/s" />
+
+<!--avs: available with key_zdfddm -->
+        <field id="avs"          long_name="salt vertical eddy diffusivity"   standard_name="ocean_vertical_salt_diffusivity"   unit="m2/s" />
+        <field id="avs_e3w"      long_name="vertical salt diffusivity * e3w"   unit="m3/s" > avs * e3w </field> 
+        <field id="logavs"       long_name="logarithm of salt vertical eddy diffusivity"   standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" />
+
+        <!-- avt_evd and avm_evd: available with ln_zdfevd -->
+        <field id="avt_evd"      long_name="convective enhancement to vertical diffusivity"   standard_name="ocean_vertical_tracer_diffusivity_due_to_convection"     unit="m2/s" />
+        <field id="avt_evd_e3w"  long_name="convective enhancement to vertical diffusivity * e3w "    unit="m3/s" > avt_evd * e3w </field> 
+        <field id="avm_evd"      long_name="convective enhancement to vertical viscosity"     standard_name="ocean_vertical_momentum_diffusivity_due_to_convection"   unit="m2/s" />
+
+        <!-- avt_tide: available with key_zdftmx -->
+        <field id="av_tide"      long_name="tidal vertical diffusivity"   standard_name="ocean_vertical_tracer_diffusivity_due_to_tides"   unit="m2/s" />
+        <field id="av_tide_e3w"  long_name="tidal vertical diffusivity * e3w"  unit="m3/s" > av_tide * e3w </field> 
+
+       <!-- variables available with key_zdftmx_new -->
+        <field id="av_ratio"     long_name="S over T diffusivity ratio"            standard_name="salinity_over_temperature_diffusivity_ratio"                     unit="1"    />
+        <field id="av_wave"      long_name="wave-induced vertical diffusivity"     standard_name="ocean_vertical_tracer_diffusivity_due_to_internal_waves"         unit="m2/s" />
+        <field id="av_wave_e3w"  long_name="wave-induced vertical diffusivity * e3w"    unit="m3/s" > av_wave * e3w </field>
+        <field id="bflx_tmx"     long_name="wave-induced buoyancy flux"            standard_name="buoyancy_flux_due_to_internal_waves"                             unit="W/kg" />
+        <field id="pcmap_tmx"    long_name="power consumed by wave-driven mixing"  standard_name="vertically_integrated_power_consumption_by_wave_driven_mixing"   unit="W/m2"      grid_ref="grid_W_2D" />
+        <field id="emix_tmx"     long_name="power density available for mixing"    standard_name="power_available_for_mixing_from_breaking_internal_waves"         unit="W/kg" />
+
+        <!-- variables available with key_diaar5 -->   
+        <field id="w_masstr"     long_name="vertical mass transport"             standard_name="upward_ocean_mass_transport"             unit="kg/s"   />
+        <field id="w_masstr2"    long_name="square of vertical mass transport"   standard_name="square_of_upward_ocean_mass_transport"   unit="kg2/s2" />
+
+        <!-- aht2d and  aht2d_eiv: available with key_traldf_eiv and key_traldf_c2d -->
+        <field id="aht2d"        long_name="lateral eddy diffusivity"       standard_name="ocean_tracer_xy_laplacian_diffusivity"      unit="m2/s"   grid_ref="grid_W_2D" />
+        <field id="aht2d_eiv"    long_name="EIV lateral eddy diffusivity"   standard_name="ocean_tracer_bolus_laplacian_diffusivity"   unit="m2/s"   grid_ref="grid_W_2D" />
+      </field_group>
+
+      <!-- product fields -->
+      <field_group id="diaprod">
+	<field id="ut"           long_name="product_of_sea_water_x_velocity_and_potential_temperature"      unit="degree_C m/s"      grid_ref="grid_U_3D"   />
+        <field id="ut_e3u"       long_name="product_of_sea_water_x_velocity_and_potential_temperature * e3u"  unit="degree_C m2/s"   grid_ref="grid_U_3D" > ut * e3u </field>
+	<field id="us"           long_name="product_of_sea_water_x_velocity_and_salinity"                   unit="PSU m/s"       grid_ref="grid_U_3D"   />
+        <field id="us_e3u"       long_name="product_of_sea_water_x_velocity_and_salinity * e3u"             unit="PSU m2/s"      grid_ref="grid_U_3D" > us * e3u </field>
+	<field id="urhop"        long_name="product_of_sea_water_x_velocity_and_potential_density"          unit="(kg/m3).(m/s)" grid_ref="grid_U_3D"   />
+        <field id="urhop_e3u"    long_name="product_of_sea_water_x_velocity_and_potential_density * e3u"    unit="(kg/m3).(m2/s)"   grid_ref="grid_U_3D" > urhop * e3u </field>
+	<field id="vt"           long_name="product_of_sea_water_y_velocity_and_potential_temperature"      unit="degree_C m/s"      grid_ref="grid_V_3D"   />
+        <field id="vt_e3v"       long_name="product_of_sea_water_y_velocity_and_potential_temperature * e3v"  unit="degree_C m2/s"   grid_ref="grid_V_3D" > vt * e3v </field>
+	<field id="vs"           long_name="product_of_sea_water_y_velocity_and_salinity"                   unit="PSU m/s"       grid_ref="grid_V_3D"   />
+        <field id="vs_e3v"       long_name="product_of_sea_water_y_velocity_and_salinity * e3t"             unit="PSU m2/s"      grid_ref="grid_V_3D" > vs * e3v </field>
+	<field id="vrhop"        long_name="product_of_sea_water_y_velocity_and_potential_density"          unit="(kg/m3).(m/s)" grid_ref="grid_V_3D"   />
+        <field id="vrhop_e3v"    long_name="product_of_sea_water_y_velocity_and_potential_density * e3t"    unit="(kg/m3).(m2/s)"  grid_ref="grid_V_3D" > vrhop * e3v </field>
+	<field id="wt"           long_name="product_of_upward_sea_water_velocity_and_potential_temperature" unit="degree_C m/s"      grid_ref="grid_W_3D"   />
+	<field id="ws"           long_name="product_of_upward_sea_water_velocity_and_salinity"              unit="PSU m/s"       grid_ref="grid_W_3D"   />
+	<field id="wrhop"        long_name="product_of_upward_sea_water_velocity_and_potential_density"     unit="(kg/m3).(m/s)" grid_ref="grid_W_3D"   />
+      </field_group>
+
+      <!-- scalar variables available with key_diaar5 -->
+
+      <field_group id="scalar"  grid_ref="grid_T_2D" >
+         <field id="voltot"     long_name="global total volume"                          standard_name="sea_water_volume"                               unit="m3"   />
+         <field id="sshtot"     long_name="global mean ssh"                              standard_name="global_average_sea_level_change"                unit="m"    />
+         <field id="sshsteric"  long_name="global mean ssh steric"                       standard_name="global_average_steric_sea_level_change"         unit="m"    />
+         <field id="sshthster"  long_name="global mean ssh thermosteric"                 standard_name="global_average_thermosteric_sea_level_change"   unit="m"    />
+         <field id="masstot"    long_name="global total mass"                            standard_name="sea_water_mass"                                 unit="kg"   />
+         <field id="temptot"    long_name="global mean conservative temperature"         standard_name="sea_water_conservative_temperature"             unit="degC" />
+         <field id="saltot"     long_name="global mean salinity"                         standard_name="sea_water_salinity"                             unit="1e-3" />
+         <field id="ssttot"     long_name="global mean sea surface temperature"          standard_name="sea_water_conservative_temperature"             unit="degC" />
+         <field id="ssstot"     long_name="global mean salinity"		         standard_name="sea_water_salinity"			        unit="1e-3" />
+         <field id="fram_trans" long_name="Sea Ice Mass Transport Through Fram Strait"   standard_name="sea_ice_transport_across_line"                  unit="kg/s" />
+         <!-- EOS = TEOS-10 -->
+         <field id="temptot_pot" long_name="global mean potential temperature"            standard_name="sea_water_potential_temperature"                unit="degC" />
+
+      	 <!-- available with ln_diahsb -->
+    	 <field id="bgtemper"     long_name="drift in global mean temperature wrt timestep 1"                 standard_name="change_over_time_in_sea_water_potential_temperature"   unit="degC"     />
+    	 <field id="bgsaline"     long_name="drift in global mean salinity wrt timestep 1"                    standard_name="change_over_time_in_sea_water_practical_salinity"      unit="1e-3"     />
+    	 <field id="bgheatco"     long_name="drift in global mean heat content wrt timestep 1"                                                                                      unit="10^9J"    />
+     	 <field id="bgheatfx"     long_name="drift in global mean heat flux    wrt timestep 1"                                                                                      unit="W/m2"     />
+	 <field id="bgsaltco"     long_name="drift in global mean salt content wrt timestep 1"                                                                                      unit="1e-3*km3"  />
+    	 <field id="bgvolssh"     long_name="drift in global mean ssh volume wrt timestep 1"                                                                                        unit="km3"      />
+         <field id="bgvole3t"     long_name="drift in global mean volume variation (e3t) wrt timestep 1"                                                                            unit="km3"      />
+    	 <field id="bgfrcvol"     long_name="global mean volume from forcing"                                                                                                       unit="km3"      />
+    	 <field id="bgfrctem"     long_name="global mean heat content from forcing"                                                                                                 unit="1.e20J"   />
+         <field id="bgfrchfx"     long_name="global mean heat flux from forcing"                                                                                                    unit="W/m2"     />
+    	 <field id="bgfrcsal"     long_name="global mean salt content from forcing"                                                                                                 unit="1e-3*km3" />
+    	 <field id="bgmistem"     long_name="global mean temperature error due to free surface (no vvl)"                                                                            unit="degC"     />
+    	 <field id="bgmissal"     long_name="global mean salinity error due to free surface (no vvl)"                                                                               unit="1e-3"     />     
+         <field id="scmastot"     field_ref="masstot"      grid_ref="grid_1point" /> 
+         <field id="scvoltot"     field_ref="voltot"       grid_ref="grid_1point" /> 
+         <field id="scsshtst"     field_ref="sshthster"    grid_ref="grid_1point" /> 
+         <field id="sctemtot"     field_ref="temptot"      grid_ref="grid_1point" /> 
+         <field id="scsaltot"     field_ref="saltot"       grid_ref="grid_1point" /> 
+         <field id="scssttot"     field_ref="ssttot"       grid_ref="grid_1point" /> 
+         <field id="scssstot"     field_ref="ssstot"       grid_ref="grid_1point" /> 
+         <field id="sctemtotpot"  field_ref="temptot_pot"  grid_ref="grid_1point" /> 
+
+       </field_group>
+
+  
+      <!-- variables available with key_float -->
+
+      <field_group id="floatvar" grid_ref="grid_T_nfloat" operation="instant" >
+        <field id="traj_lon"      long_name="floats longitude"                                                           unit="degrees_east"  />
+        <field id="traj_lat"      long_name="floats latitude"                                                            unit="degrees_north" />
+        <field id="traj_dep"      long_name="floats depth"                                                               unit="m"             />
+        <field id="traj_temp"     long_name="floats temperature"       standard_name="sea_water_potential_temperature"   unit="degC"          />
+        <field id="traj_salt"     long_name="floats salinity"          standard_name="sea_water_practical_salinity"      unit="1e-3"          />
+        <field id="traj_dens"     long_name="floats in-situ density"   standard_name="sea_water_density"                 unit="kg/m3"         />
+        <field id="traj_group"    long_name="floats group"                                                               unit="1"             />
+      </field_group>
+
+      <!-- variables available with iceberg trajectories -->
+
+      <field_group id="icbvar" domain_ref="grid_T"  > 
+        <field id="berg_melt"          long_name="icb melt rate of icebergs"                       unit="kg/m2/s"                    />
+        <field id="berg_buoy_melt"     long_name="icb buoyancy component of iceberg melt rate"     unit="kg/m2/s"                    />
+        <field id="berg_eros_melt"     long_name="icb erosion component of iceberg melt rate"      unit="kg/m2/s"                    />
+        <field id="berg_conv_melt"     long_name="icb convective component of iceberg melt rate"   unit="kg/m2/s"                    />
+        <field id="berg_virtual_area"  long_name="icb virtual coverage by icebergs"                unit="m2"                         />
+        <field id="bits_src"           long_name="icb mass source of bergy bits"                   unit="kg/m2/s"                    />
+        <field id="bits_melt"          long_name="icb melt rate of bergy bits"                     unit="kg/m2/s"                    />
+        <field id="bits_mass"          long_name="icb bergy bit density field"                     unit="kg/m2"                      />
+        <field id="berg_mass"          long_name="icb iceberg density field"                       unit="kg/m2"                      />
+        <field id="calving"            long_name="icb calving mass input"                          unit="kg/s"                       />
+        <field id="berg_floating_melt" long_name="icb melt rate of icebergs + bits"                unit="kg/m2/s"                    />
+        <field id="berg_real_calving"  long_name="icb calving into iceberg class"                  unit="kg/s"     axis_ref="icbcla" />
+        <field id="berg_stored_ice"    long_name="icb accumulated ice mass by class"               unit="kg"       axis_ref="icbcla" />
+      </field_group>
+
+      <!-- Poleward transport : ptr -->   
+      <field_group id="diaptr" > 
+        <field id="zomsfglo"          long_name="Meridional Stream-Function: Global"                             unit="Sv"         grid_ref="grid_znl_W_3D" />
+        <field id="zomsfatl"          long_name="Meridional Stream-Function: Atlantic"                           unit="Sv"         grid_ref="grid_znl_W_3D" />
+        <field id="zomsfpac"          long_name="Meridional Stream-Function: Pacific"                            unit="Sv"         grid_ref="grid_znl_W_3D" />
+        <field id="zomsfind"          long_name="Meridional Stream-Function: Indian"                             unit="Sv"         grid_ref="grid_znl_W_3D" />
+        <field id="zomsfipc"          long_name="Meridional Stream-Function: Pacific+Indian"                     unit="Sv"         grid_ref="grid_znl_W_3D" />
+        <field id="zotemglo"          long_name="Zonal Mean Temperature : Global"                                unit="degree_C"   grid_ref="grid_znl_T_3D" />
+        <field id="zotematl"          long_name="Zonal Mean Temperature : Atlantic"                              unit="degree_C"   grid_ref="grid_znl_T_3D" />
+        <field id="zotempac"          long_name="Zonal Mean Temperature : Pacific"                               unit="degree_C"   grid_ref="grid_znl_T_3D" />
+        <field id="zotemind"          long_name="Zonal Mean Temperature : Indian"                                unit="degree_C"   grid_ref="grid_znl_T_3D" />
+        <field id="zotemipc"          long_name="Zonal Mean Temperature : Pacific+Indian"                        unit="degree_C"   grid_ref="grid_znl_T_3D" />
+        <field id="zosalglo"          long_name="Zonal Mean Salinity : Global"                                   unit="0.001"      grid_ref="grid_znl_T_3D" />
+        <field id="zosalatl"          long_name="Zonal Mean Salinity : Atlantic"                                 unit="0.001"      grid_ref="grid_znl_T_3D" />
+        <field id="zosalpac"          long_name="Zonal Mean Salinity : Pacific"                                  unit="0.001"      grid_ref="grid_znl_T_3D" />
+        <field id="zosalind"          long_name="Zonal Mean Salinity : Indian"                                   unit="0.001"      grid_ref="grid_znl_T_3D" />
+        <field id="zosalipc"          long_name="Zonal Mean Salinity : Pacific+Indian"                           unit="0.001"      grid_ref="grid_znl_T_3D" />
+        <field id="zosrfglo"          long_name="Zonal Mean Surface"                                             unit="m2"         grid_ref="grid_znl_T_3D" />
+        <field id="zosrfatl"          long_name="Zonal Mean Surface : Atlantic"                                  unit="m2"         grid_ref="grid_znl_T_3D" />
+        <field id="zosrfpac"          long_name="Zonal Mean Surface : Pacific"                                   unit="m2"         grid_ref="grid_znl_T_3D" />
+        <field id="zosrfind"          long_name="Zonal Mean Surface : Indian"                                    unit="m2"         grid_ref="grid_znl_T_3D" />
+        <field id="zosrfipc"          long_name="Zonal Mean Surface : Pacific+Indian"                            unit="m2"         grid_ref="grid_znl_T_3D" />
+        <field id="sophtadv"          long_name="Advective Heat Transport"                                       unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtadv_atl"      long_name="Advective Heat Transport: Atlantic"                             unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtadv_pac"      long_name="Advective Heat Transport: Pacific"                              unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtadv_ind"      long_name="Advective Heat Transport: Indian"                               unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtadv_ipc"      long_name="Advective Heat Transport: Pacific+Indian"                       unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtldf"          long_name="Diffusive Heat Transport"                                       unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtldf_atl"      long_name="Diffusive Heat Transport: Atlantic"                             unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtldf_pac"      long_name="Diffusive Heat Transport: Pacific"                              unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtldf_ind"      long_name="Diffusive Heat Transport: Indian"                               unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtldf_ipc"      long_name="Diffusive Heat Transport: Pacific+Indian"                       unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtove"          long_name="Overturning Heat Transport"                                     unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtove_atl"      long_name="Overturning Heat Transport: Atlantic"                           unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtove_pac"      long_name="Overturning Heat Transport: Pacific"                            unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtove_ind"      long_name="Overturning Heat Transport: Indian"                             unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtove_ipc"      long_name="Overturning Heat Transport: Pacific+Indian"                     unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtbtr"          long_name="Barotropic Heat Transport"                                      unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtbtr_atl"      long_name="Barotropic Heat Transport: Atlantic"                            unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtbtr_pac"      long_name="Barotropic Heat Transport: Pacific"                             unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtbtr_ind"      long_name="Barotropic Heat Transport: Indian"                              unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophtbtr_ipc"      long_name="Barotropic Heat Transport: Pacific+Indian"                      unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophteiv"          long_name="Heat Transport from mesoscale eddy advection"                   unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophteiv_atl"      long_name="Heat Transport from mesoscale eddy advection: Atlantic"         unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophteiv_pac"      long_name="Heat Transport from mesoscale eddy advection: Pacific"          unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophteiv_ind"      long_name="Heat Transport from mesoscale eddy advection: Indian"           unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sophteiv_ipc"      long_name="Heat Transport from mesoscale eddy advection: Pacific+Indian"   unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sopstadv"          long_name="Advective Salt Transport"                                       unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstadv_atl"      long_name="Advective Salt Transport: Atlantic"                             unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstadv_pac"      long_name="Advective Salt Transport: Pacific"                              unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstadv_ind"      long_name="Advective Salt Transport: Indian"                               unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstadv_ipc"      long_name="Advective Salt Transport: Pacific+Indian"                       unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstove"          long_name="Overturning Salt Transport"                                     unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstove_atl"      long_name="Overturning Salt Transport: Atlantic"                           unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstove_pac"      long_name="Overturning Salt Transport: Pacific"                            unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstove_ind"      long_name="Overturning Salt Transport: Indian"                             unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstove_ipc"      long_name="Overturning Salt Transport: Pacific+Indian"                     unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstbtr"          long_name="Barotropic Salt Transport"                                      unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstbtr_atl"      long_name="Barotropic Salt Transport: Atlantic"                            unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstbtr_pac"      long_name="Barotropic Salt Transport: Pacific"                             unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstbtr_ind"      long_name="Barotropic Salt Transport: Indian"                              unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstbtr_ipc"      long_name="Barotropic Salt Transport: Pacific+Indian"                      unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstldf"          long_name="Diffusive Salt Transport"                                       unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstldf_atl"      long_name="Diffusive Salt Transport: Atlantic"                             unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstldf_pac"      long_name="Diffusive Salt Transport: Pacific"                              unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstldf_ind"      long_name="Diffusive Salt Transport: Indian"                               unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopstldf_ipc"      long_name="Diffusive Salt Transport: Pacific+Indian"                       unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopsteiv"          long_name="Salt Transport from mesoscale eddy advection"                   unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopsteiv_atl"      long_name="Salt Transport from mesoscale eddy advection: Atlantic"         unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopsteiv_pac"      long_name="Salt Transport from mesoscale eddy advection: Pacific"          unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopsteiv_ind"      long_name="Salt Transport from mesoscale eddy advection: Indian"           unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopsteiv_ipc"      long_name="Salt Transport from mesoscale eddy advection: Pacific+Indian"   unit="Giga g/s"   grid_ref="grid_znl_T_2D" />       
+        <field id="sopht_vt"          long_name="Heat Transport"                                                 unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sopht_vt_atl"      long_name="Heat Transport: Atlantic"                                       unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sopht_vt_ind"      long_name="Heat Transport: Indian"                                         unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sopht_vt_pac"      long_name="Heat Transport: Pacific"                                        unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sopht_vt_ipc"      long_name="Heat Transport: Indo-Pacific"                                   unit="PW"         grid_ref="grid_znl_T_2D" />
+        <field id="sopst_vs"          long_name="Salt Transport"                                                 unit="Giga g/s"   grid_ref="grid_znl_T_2D" /> 
+        <field id="sopst_vs_atl"      long_name="Salt Transport: Atlantic"                                       unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopst_vs_ind"      long_name="Salt Transport: Indian"                                         unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopst_vs_pac"      long_name="Salt Transport: Pacific"                                        unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="sopst_vs_ipc"      long_name="Salt Transport: Indo-Pacific"                                   unit="Giga g/s"   grid_ref="grid_znl_T_2D" />
+        <field id="zomsf_znl"         long_name="Meridional Stream-Function : All basins"                        unit="Sv"         grid_ref="grid_znl_W_basin_3D" />
+        <field id="sophtove_znl"      long_name="Overturning Heat Transport: All basins"                         unit="PW"         grid_ref="grid_znl_T_basin_2D" />
+        <field id="sopstove_znl"      long_name="Overturning Salt Transport: All basins"                         unit="Giga g/s"   grid_ref="grid_znl_T_basin_2D" />
+        <field id="sophtbtr_znl"      long_name="Barotropic Heat Transport: All basins"                          unit="PW"         grid_ref="grid_znl_T_basin_2D" />
+        <field id="sopstbtr_znl"      long_name="Barotropic Salt Transport: All basins"                          unit="Giga g/s"   grid_ref="grid_znl_T_basin_2D" /> 
+        <field id="sophtadv_znl"      long_name="Advective Heat Transport: All basins"                           unit="PW"         grid_ref="grid_znl_T_basin_2D" />
+        <field id="sopstadv_znl"      long_name="Advective Salt Transport: All basins"                           unit="Giga g/s"   grid_ref="grid_znl_T_basin_2D" />
+        <field id="sophtldf_znl"      long_name="Diffusive Heat Transport: All basins"                           unit="PW"         grid_ref="grid_znl_T_basin_2D" />
+        <field id="sopstldf_znl"      long_name="Diffusive Salt Transport: All basins"                           unit="Giga g/s"   grid_ref="grid_znl_T_basin_2D" />
+        <field id="sopht_vt_znl"      long_name="Heat Transport : All basins"                                    unit="PW"         grid_ref="grid_znl_T_basin_2D" />
+        <field id="sopst_vs_znl"      long_name="Salt Transport : All basins"                                    unit="Giga g/s"   grid_ref="grid_znl_T_basin_2D" />  
+        <field id="sophteiv_znl"      long_name="Heat Transport from mesoscale eddy advection: All basins"       unit="PW"         grid_ref="grid_znl_T_basin_2D" />
+        <field id="sopsteiv_znl"      long_name="Salt Transport from mesoscale eddy advection : All basins"      unit="Giga g/s"   grid_ref="grid_znl_T_basin_2D" />
+
+        <field id="zomsf_bsn"         field_ref="zomsf_znl"                                                                        grid_ref="grid_ptr_W_basin_3D" />
+        <field id="sophtove_bsn"      field_ref="sophtove_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sopstove_bsn"      field_ref="sopstove_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sophtbtr_bsn"      field_ref="sophtbtr_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sopstbtr_bsn"      field_ref="sopstbtr_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sophtadv_bsn"      field_ref="sophtadv_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sopstadv_bsn"      field_ref="sopstadv_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sophtldf_bsn"      field_ref="sophtldf_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sopstldf_bsn"      field_ref="sopstldf_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sopht_vt_bsn"      field_ref="sopht_vt_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sopst_vs_bsn"      field_ref="sopst_vs_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sophteiv_bsn"      field_ref="sophteiv_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+        <field id="sopsteiv_bsn"      field_ref="sopsteiv_znl"                                                                     grid_ref="grid_ptr_T_basin_2D" />
+
+        <field id="zomsf_3bsn"         field_ref="zomsf_bsn"                                                                       grid_ref="grid_ptr_W_3basin_3D" />
+        <field id="sophtove_3bsn"      field_ref="sophtove_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sopstove_3bsn"      field_ref="sopstove_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sophtbtr_3bsn"      field_ref="sophtbtr_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sopstbtr_3bsn"      field_ref="sopstbtr_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sophtadv_3bsn"      field_ref="sophtadv_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sopstadv_3bsn"      field_ref="sopstadv_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sophtldf_3bsn"      field_ref="sophtldf_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sopstldf_3bsn"      field_ref="sopstldf_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sopht_vt_3bsn"      field_ref="sopht_vt_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sopst_vs_3bsn"      field_ref="sopst_vs_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sophteiv_3bsn"      field_ref="sophteiv_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+        <field id="sopsteiv_3bsn"      field_ref="sopsteiv_bsn"                                                                    grid_ref="grid_ptr_T_3basin_2D" />
+
+        <field id="sopht_glo"         field_ref="sopht_vt"                                                   unit="PW"  grid_ref="grid_ptr_T_2D" />
+        <field id="sopht_atl"         field_ref="sopht_vt_atl"                                               unit="PW"  grid_ref="grid_ptr_T_2D" />
+        <field id="sopst_glo"         field_ref="sopst_vs"                                                   unit="Giga g/s"  grid_ref="grid_ptr_T_2D" />
+        <field id="sopst_atl"         field_ref="sopst_vs_atl"                                               unit="Giga g/s"  grid_ref="grid_ptr_T_2D" />
+
+      </field_group>
+
+      <field_group id="constant_fields"  grid_ref="grid_T_2D"  operation="once" >
+         <field id="bathy"       long_name="Sea floor depth below geoid"               standard_name="sea_floor_depth_below_geoid"               unit="m"/>
+         <field id="areacello"   long_name="Horizontal area of ocean grid cells"       standard_name="cell_area"                                 unit="m2" />
+         <field id="hfgeou"      long_name="Upward geothermal heat flux at sea floor"  standard_name="upward_geothermal_heat_flux_at_sea_floor"  unit="W/m2"/>
+         <field id="basins"      long_name="ocean tracer region masks"                 standard_name="ocean_tracer_region_masks"                 unit="none"   />
+      </field_group>
+    <!-- 
+============================================================================================================
+                  Physical ocean model trend diagnostics : temperature, KE, PE, momentum
+============================================================================================================
+    -->
+
+    <field_group id="trendT" grid_ref="grid_T_3D">
+      <!-- variables available with ln_tra_trd -->
+      <field id="ttrd_xad"      long_name="temperature-trend: i-advection"                                                                                          unit="degC/s"                        />
+      <field id="strd_xad"      long_name="salinity   -trend: i-advection"                                                                                          unit="1e-3/s"                        />
+      <field id="ttrd_yad"      long_name="temperature-trend: j-advection"                                                                                          unit="degC/s"                        />
+      <field id="strd_yad"      long_name="salinity   -trend: j-advection"                                                                                          unit="1e-3/s"                        />
+      <field id="ttrd_zad"      long_name="temperature-trend: k-advection"                                                                                          unit="degC/s"                        />
+      <field id="strd_zad"      long_name="salinity   -trend: k-advection"                                                                                          unit="1e-3/s"                        />
+      <field id="ttrd_ad"       long_name="temperature-trend: advection"               standard_name="tendency_of_sea_water_temperature_due_to_advection"           unit="degC/s"                         > sqrt( ttrd_xad^2 + ttrd_yad^2 + ttrd_zad^2 ) </field>
+      <field id="strd_ad"       long_name="salinity   -trend: advection"               standard_name="tendency_of_sea_water_salinity_due_to_advection"              unit="1e-3/s"                         > sqrt( strd_xad^2 + strd_yad^2 + strd_zad^2 ) </field>
+      <field id="ttrd_totad"    long_name="temperature-trend: total advection"         standard_name="tendency_of_sea_water_salinity_due_to_advection"              unit="degC/s"                        />
+      <field id="strd_totad"    long_name="salinity   -trend: total advection"         standard_name="tendency_of_sea_water_salinity_due_to_advection"              unit="1e-3/s"                        />
+      <field id="ttrd_eivad"    long_name="temperature-trend: total advection"         standard_name="tendency_of_sea_water_salinity_due_to_eiv_advection"              unit="degC/s"                        />
+      <field id="strd_eivad"    long_name="salinity   -trend: total advection"         standard_name="tendency_of_sea_water_salinity_due_to_eiv_advection"              unit="1e-3/s"                        />
+      <field id="ttrd_sad"      long_name="temperature-trend: surface adv. (no-vvl)"                                                                                unit="degC/s"   grid_ref="grid_T_2D" />
+      <field id="strd_sad"      long_name="salinity   -trend: surface adv. (no-vvl)"                                                                                unit="1e-3/s"   grid_ref="grid_T_2D" />
+      <field id="ttrd_ldf"      long_name="temperature-trend: lateral  diffusion"      standard_name="tendency_of_sea_water_temperature_due_to_horizontal_mixing"   unit="degC/s"                        />
+      <field id="strd_ldf"      long_name="salinity   -trend: lateral  diffusion"      standard_name="tendency_of_sea_water_salinity_due_to_horizontal_mixing"      unit="1e-3/s"                        />
+      <field id="ttrd_zdf"      long_name="temperature-trend: vertical diffusion"      standard_name="tendency_of_sea_water_temperature_due_to_vertical_mixing"     unit="degC/s"                        />
+      <field id="strd_zdf"      long_name="salinity   -trend: vertical diffusion"      standard_name="tendency_of_sea_water_salinity_due_to_vertical_mixing"        unit="1e-3/s"                        />
+      <field id="ttrd_evd"      long_name="temperature-trend: EVD convection"                                                                                       unit="degC/s"                        />
+      <field id="strd_evd"      long_name="salinity   -trend: EVD convection"                                                                                       unit="1e-3/s"                        />
+
+      <!-- ln_traldf_iso=T only (iso-neutral diffusion) -->
+      <field id="ttrd_iso_x"    long_name="temperature-trend: isopycnal diffusion x-component"                                                                      unit="degC/s"                        />
+      <field id="strd_iso_x"    long_name="salinity   -trend: isopycnal diffusion x-component"                                                                      unit="1e-3/s"                        />
+      <field id="ttrd_iso_y"    long_name="temperature-trend: isopycnal diffusion y-component"                                                                      unit="degC/s"                        />
+      <field id="strd_iso_y"    long_name="salinity   -trend: isopycnal diffusion y-component"                                                                      unit="1e-3/s"                        />
+      <field id="ttrd_iso_z1"   long_name="temperature-trend: isopycnal diffusion z-component part 1"                                                               unit="degC/s"                        />
+      <field id="strd_iso_z1"   long_name="salinity   -trend: isopycnal diffusion z-component part 1"                                                               unit="1e-3/s"                        />
+      <field id="ttrd_iso_z"    long_name="temperature-trend: isopycnal diffusion z-component"                 unit="degC/s" > ttrd_iso_z1 + ttrd_zdf - ttrd_zdfp </field>
+      <field id="strd_iso_z"    long_name="salinity   -trend: isopycnal diffusion z-component"                 unit="1e-3/s" > strd_iso_z1 + strd_zdf - strd_zdfp </field>
+      <field id="ttrd_iso"      long_name="temperature-trend: isopycnal diffusion"                             unit="degC/s" > ttrd_ldf + ttrd_zdf - ttrd_zdfp </field>
+      <field id="strd_iso"      long_name="salinity   -trend: isopycnal diffusion"                             unit="1e-3/s" > strd_ldf + strd_zdf - strd_zdfp </field>
+      <field id="ttrd_zdfp"     long_name="temperature-trend: pure vert. diffusion"   unit="degC/s" />
+      <field id="strd_zdfp"     long_name="salinity   -trend: pure vert. diffusion"   unit="1e-3/s" />
+
+      <!-- -->
+      <field id="ttrd_dmp"      long_name="temperature-trend: interior restoring"        unit="degree_C/s" />
+      <field id="strd_dmp"      long_name="salinity   -trend: interior restoring"        unit="0.001/s" />
+      <field id="ttrd_bbl"      long_name="temperature-trend: bottom boundary layer"     unit="degree_C/s" />
+      <field id="strd_bbl"      long_name="salinity   -trend: bottom boundary layer"     unit="0.001/s" />
+      <field id="ttrd_npc"      long_name="temperature-trend: non-penetrative conv."     unit="degree_C/s" />
+      <field id="strd_npc"      long_name="salinity   -trend: non-penetrative conv."     unit="0.001/s" />
+      <field id="ttrd_qns"      long_name="temperature-trend: non-solar flux + runoff"   unit="degC/s" grid_ref="grid_T_2D"/>
+      <field id="strd_cdt"      long_name="salinity   -trend: C/D term       + runoff"   unit="degC/s" grid_ref="grid_T_2D"/>
+      <field id="ttrd_qsr"      long_name="temperature-trend: solar penetr. heating"     unit="degree_C/s" />
+      <field id="ttrd_bbc"      long_name="temperature-trend: geothermal heating"        unit="degree_C/s" />
+      <field id="ttrd_atf"      long_name="temperature-trend: asselin time filter"       unit="degree_C/s" />
+      <field id="strd_atf"      long_name="salinity   -trend: asselin time filter"       unit="0.001/s" />
+      <field id="ttrd_tot"      long_name="temperature-trend: total model trend"         unit="degC/s" />
+      <field id="strd_tot"      long_name="salinity   -trend: total model trend"         unit="1e-3/s" />
+
+      <!-- Thickness weighted versions: -->
+      <field id="ttrd_xad_e3t"      unit="degC/s * m" >  ttrd_xad * e3t </field>
+      <field id="strd_xad_e3t"      unit="1e-3/s * m" >  strd_xad * e3t </field>
+      <field id="ttrd_yad_e3t"      unit="degC/s * m" >  ttrd_yad * e3t </field>
+      <field id="strd_yad_e3t"      unit="1e-3/s * m" >  strd_yad * e3t </field>
+      <field id="ttrd_zad_e3t"      unit="degC/s * m" >  ttrd_zad * e3t </field>
+      <field id="strd_zad_e3t"      unit="1e-3/s * m" >  strd_zad * e3t </field>
+      <field id="ttrd_ad_e3t"       unit="degC/s * m" >  ttrd_ad  * e3t </field>
+      <field id="strd_ad_e3t"       unit="1e-3/s * m" >  strd_ad  * e3t </field>
+      <field id="ttrd_totad_e3t"    unit="degC/s * m" >  ttrd_totad  * e3t </field>
+      <field id="strd_totad_e3t"    unit="1e-3/s * m" >  strd_totad  * e3t </field>
+      <field id="ttrd_eivad_e3t"    unit="degC/s * m" >  ttrd_eivad  * e3t </field>
+      <field id="strd_eivad_e3t"    unit="1e-3/s * m" >  strd_eivad  * e3t </field>
+      <field id="ttrd_ldf_e3t"      unit="degC/s * m" >  ttrd_ldf * e3t </field>
+      <field id="strd_ldf_e3t"      unit="1e-3/s * m" >  strd_ldf * e3t </field>
+      <field id="ttrd_zdf_e3t"      unit="degC/s * m" >  ttrd_zdf * e3t </field>
+      <field id="strd_zdf_e3t"      unit="1e-3/s * m" >  strd_zdf * e3t </field>
+      <field id="ttrd_evd_e3t"      unit="degC/s * m" >  ttrd_evd * e3t </field>
+      <field id="strd_evd_e3t"      unit="1e-3/s * m" >  strd_evd * e3t </field>
+
+      <!-- ln_traldf_iso=T only (iso-neutral diffusion) -->
+      <field id="ttrd_iso_x_e3t"    unit="degC/s * m"  >  ttrd_iso_x * e3t </field>
+      <field id="strd_iso_x_e3t"    unit="1e-3/s * m"  >  strd_iso_x * e3t </field>
+      <field id="ttrd_iso_y_e3t"    unit="degC/s * m"  >  ttrd_iso_y * e3t </field>
+      <field id="strd_iso_y_e3t"    unit="1e-3/s * m"  >  strd_iso_y * e3t </field>
+      <field id="ttrd_iso_z_e3t"    unit="degC/s * m"  >  ttrd_iso_z * e3t </field>
+      <field id="strd_iso_z_e3t"    unit="1e-3/s * m"  >  strd_iso_z * e3t </field>
+      <field id="ttrd_iso_e3t"      unit="degC/s * m"  >  ttrd_iso * e3t </field>
+      <field id="strd_iso_e3t"      unit="1e-3/s * m"  >  strd_iso * e3t </field>
+      <field id="ttrd_zdfp_e3t"     unit="degC/s * m"  >  ttrd_zdfp * e3t </field>
+      <field id="strd_zdfp_e3t"     unit="1e-3/s * m"  >  strd_zdfp * e3t </field>
+
+      <!-- -->
+      <field id="ttrd_dmp_e3t"      unit="degC/s * m"  >  ttrd_dmp * e3t </field>
+      <field id="strd_dmp_e3t"      unit="1e-3/s * m"  >  strd_dmp * e3t </field>
+      <field id="ttrd_bbl_e3t"      unit="degC/s * m"  >  ttrd_bbl * e3t </field>
+      <field id="strd_bbl_e3t"      unit="1e-3/s * m"  >  strd_bbl * e3t </field>
+      <field id="ttrd_npc_e3t"      unit="degC/s * m"  >  ttrd_npc * e3t </field>
+      <field id="strd_npc_e3t"      unit="1e-3/s * m"  >  strd_npc * e3t </field>
+      <field id="ttrd_qns_e3t"      unit="degC/s * m"  >  ttrd_qns * e3t_surf </field>
+      <field id="strd_cdt_e3t"      unit="degC/s * m"  >  strd_cdt * e3t_surf </field>
+      <field id="ttrd_qsr_e3t"      unit="degC/s * m"  >  ttrd_qsr * e3t </field>
+      <field id="ttrd_bbc_e3t"      unit="degC/s * m"  >  ttrd_bbc * e3t </field>
+      <field id="ttrd_atf_e3t"      unit="degC/s * m"  >  ttrd_atf * e3t </field>
+      <field id="strd_atf_e3t"      unit="1e-3/s * m"  >  strd_atf * e3t </field>
+      <field id="ttrd_tot_e3t"      unit="degC/s * m"  >  ttrd_tot * e3t </field>
+      <field id="strd_tot_e3t"      unit="1e-3/s * m"  >  strd_tot * e3t </field>
+
+      <!-- variables available with ln_KE_trd -->
+      <field id="ketrd_hpg"     long_name="ke-trend: hydrostatic pressure gradient"          unit="W/m^3"                        />
+      <field id="ketrd_spg"     long_name="ke-trend: surface     pressure gradient"          unit="W/m^3"                        />
+      <field id="ketrd_spgexp"  long_name="ke-trend: surface pressure gradient (explicit)"   unit="W/m^3"                        />
+      <field id="ketrd_spgflt"  long_name="ke-trend: surface pressure gradient (filter)"     unit="W/m^3"                        />
+      <field id="ssh_flt"       long_name="filtered contribution to ssh (dynspg_flt)"        unit="m"       grid_ref="grid_T_2D" />
+      <field id="w0"            long_name="surface vertical velocity"                        unit="m/s"     grid_ref="grid_T_2D" />
+      <field id="pw0_exp"       long_name="surface pressure flux due to ssh"                 unit="W/m^2"   grid_ref="grid_T_2D" />
+      <field id="pw0_flt"       long_name="surface pressure flux due to filtered ssh"        unit="W/m^2"   grid_ref="grid_T_2D" />
+      <field id="ketrd_keg"     long_name="ke-trend: KE gradient         or hor. adv."       unit="W/m^3"                        />
+      <field id="ketrd_rvo"     long_name="ke-trend: relative  vorticity or metric term"     unit="W/m^3"                        />
+      <field id="ketrd_pvo"     long_name="ke-trend: planetary vorticity"                    unit="W/m^3"                        />
+      <field id="ketrd_zad"     long_name="ke-trend: vertical  advection"                    unit="W/m^3"                        />
+      <field id="ketrd_udx"     long_name="ke-trend: U.dx[U]"                                unit="W/m^3"                        />
+      <field id="ketrd_ldf"     long_name="ke-trend: lateral   diffusion"                    unit="W/m^3"                        />
+      <field id="ketrd_zdf"     long_name="ke-trend: vertical  diffusion"                    unit="W/m^3"                        />
+      <field id="ketrd_tau"     long_name="ke-trend: wind stress "                           unit="W/m^3"   grid_ref="grid_T_2D" />
+      <field id="ketrd_bfr"     long_name="ke-trend: bottom friction (explicit)"             unit="W/m^3"                        />   
+      <field id="ketrd_bfri"    long_name="ke-trend: bottom friction (implicit)"             unit="W/m^3"                        />   
+      <field id="ketrd_atf"     long_name="ke-trend: asselin time filter trend"              unit="W/m^3"                        />  
+      <field id="ketrd_convP2K" long_name="ke-trend: conversion (potential to kinetic)"      unit="W/m^3"                        />
+      <field id="KE"            long_name="kinetic energy: u(n)*u(n+1)/2"                    unit="W/m^2"                        />  
+     <!-- variables available when explicit mixing is used -->
+      <field id="dispkexyfo"    long_name="KE-trend: lateral  mixing induced dissipation"   standard_name="ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction"                   unit="W/m^2" grid_ref="grid_T_2D" />   
+      <field id="dispkevfo"     long_name="KE-trend: vertical mixing induced dissipation"   standard_name="ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction"             unit="W/m^2" grid_ref="grid_T_2D" />   
+      <!-- variables available with key_traadv_eiv and key_diaeiv -->
+      <field id="eketrd_eiv"    long_name="EKE-trend due to parameterized eddy advection"   standard_name="tendency_of_ocean_eddy_kinetic_energy_content_due_to_parameterized_eddy_advection"   unit="W/m^2" grid_ref="grid_T_2D" />  
+ 
+      <!-- variables available with ln_PE_trd -->
+      <field id="petrd_xad"     long_name="pe-trend: i-advection"                unit="W/m^3"                        />
+      <field id="petrd_yad"     long_name="pe-trend: j-advection"                unit="W/m^3"                        />
+      <field id="petrd_zad"     long_name="pe-trend: k-advection"                unit="W/m^3"                        />
+      <field id="petrd_sad"     long_name="pe-trend: surface adv. (no-vvl)"      unit="W/m^3"   grid_ref="grid_T_2D" />
+      <field id="petrd_ldf"     long_name="pe-trend: lateral  diffusion"         unit="W/m^3"                        />
+      <field id="petrd_zdf"     long_name="pe-trend: vertical diffusion"         unit="W/m^3"                        />
+      <field id="petrd_zdfp"    long_name="pe-trend: pure vert. diffusion"       unit="W/m^3"                        />
+      <field id="petrd_dmp"     long_name="pe-trend: interior restoring"         unit="W/m^3"                        />
+      <field id="petrd_bbl"     long_name="pe-trend: bottom boundary layer"      unit="W/m^3"                        />
+      <field id="petrd_npc"     long_name="pe-trend: non-penetrative conv."      unit="W/m^3"                        />
+      <field id="petrd_nsr"     long_name="pe-trend: surface forcing + runoff"   unit="W/m^3"                        />
+      <field id="petrd_qsr"     long_name="pe-trend: solar penetr. heating"      unit="W/m^3"                        />
+      <field id="petrd_bbc"     long_name="pe-trend: geothermal heating"         unit="W/m^3"                        />
+      <field id="petrd_atf"     long_name="pe-trend: asselin time filter"        unit="W/m^3"                        />
+      <field id="PEanom"        long_name="potential energy anomaly"             unit="1"                            />   
+      <field id="alphaPE"       long_name="partial deriv. of PEanom wrt T"       unit="degC-1"                       />   
+      <field id="betaPE"        long_name="partial deriv. of PEanom wrt S"       unit="1e3"                          />   
+      <field id="petrd_zdfp_e3t"    unit="W/m^2" grid_ref="grid_T_3D"  > petrd_zdfp * e3t </field>
+    </field_group>
+
+    <field_group id="trendU" grid_ref="grid_U_3D">
+     <!-- variables available with ln_dyn_trd -->
+     <field id="utrd_hpg"       long_name="i-trend: hydrostatic pressure gradient"          unit="m/s^2"                        />
+     <field id="utrd_spg"       long_name="i-trend: surface     pressure gradient"          unit="m/s^2"                        />
+     <field id="utrd_spgexp"    long_name="i-trend: surface pressure gradient (explicit)"   unit="m/s^2"                        />
+     <field id="utrd_spgflt"    long_name="i-trend: surface pressure gradient (filtered)"   unit="m/s^2"                        />
+     <field id="utrd_keg"       long_name="i-trend: KE gradient         or hor. adv."       unit="m/s^2"                        />
+     <field id="utrd_rvo"       long_name="i-trend: relative  vorticity or metric term"     unit="m/s^2"                        />
+     <field id="utrd_pvo"       long_name="i-trend: planetary vorticity"                    unit="m/s^2"                        />
+     <field id="utrd_zad"       long_name="i-trend: vertical  advection"                    unit="m/s^2"                        />
+     <field id="utrd_udx"       long_name="i-trend: U.dx[U]"                                unit="m/s^2"                        />
+     <field id="utrd_ldf"       long_name="i-trend: lateral   diffusion"                    unit="m/s^2"                        />
+     <field id="utrd_zdf"       long_name="i-trend: vertical  diffusion"                    unit="m/s^2"                        />
+     <field id="utrd_tau"       long_name="i-trend: wind stress "                           unit="m/s^2"   grid_ref="grid_U_2D" />
+     <field id="utrd_bfr"       long_name="i-trend: bottom friction (explicit)"             unit="m/s^2"                        />   
+     <field id="utrd_bfri"      long_name="i-trend: bottom friction (implicit)"             unit="m/s^2"                        />   
+     <field id="utrd_tot"       long_name="i-trend: total momentum trend before atf"        unit="m/s^2"                        />   
+     <field id="utrd_atf"       long_name="i-trend: asselin time filter trend"              unit="m/s^2"                        />   
+    </field_group>
+
+    <field_group id="trendV" grid_ref="grid_V_3D">
+     <!-- variables available with ln_dyn_trd -->
+     <field id="vtrd_hpg"       long_name="j-trend: hydrostatic pressure gradient"          unit="m/s^2"                        />
+     <field id="vtrd_spg"       long_name="j-trend: surface     pressure gradient"          unit="m/s^2"                        />
+     <field id="vtrd_spgexp"    long_name="j-trend: surface pressure gradient (explicit)"   unit="m/s^2"                        />
+     <field id="vtrd_spgflt"    long_name="j-trend: surface pressure gradient (filtered)"   unit="m/s^2"                        />
+     <field id="vtrd_keg"       long_name="j-trend: KE gradient         or hor. adv."       unit="m/s^2"                        />
+     <field id="vtrd_rvo"       long_name="j-trend: relative  vorticity or metric term"     unit="m/s^2"                        />
+     <field id="vtrd_pvo"       long_name="j-trend: planetary vorticity"                    unit="m/s^2"                        />
+     <field id="vtrd_zad"       long_name="j-trend: vertical  advection"                    unit="m/s^2"                        />
+     <field id="vtrd_vdy"       long_name="i-trend: V.dx[V]"                                unit="m/s^2"                        />
+     <field id="vtrd_ldf"       long_name="j-trend: lateral   diffusion"                    unit="m/s^2"                        />
+     <field id="vtrd_zdf"       long_name="j-trend: vertical  diffusion"                    unit="m/s^2"                        />
+     <field id="vtrd_tau"       long_name="j-trend: wind stress "                           unit="m/s^2"   grid_ref="grid_V_2D" />
+     <field id="vtrd_bfr"       long_name="j-trend: bottom friction (explicit)"             unit="m/s^2"                        />   
+     <field id="vtrd_bfri"      long_name="j-trend: bottom friction (implicit)"             unit="m/s^2"                        />   
+     <field id="vtrd_tot"       long_name="j-trend: total momentum trend before atf"        unit="m/s^2"                        />   
+     <field id="vtrd_atf"       long_name="j-trend: asselin time filter trend"              unit="m/s^2"                        />   
+    </field_group>
+
+    <!-- 
+============================================================================================================
+                                        Definitions for iodef_demo.xml
+============================================================================================================
+    -->
+
+    <field_group id="mooring" >
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"      />
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                   />
+      <field field_ref="uoce"         name="uo"       long_name="sea_water_x_velocity"                 />
+      <field field_ref="voce"         name="vo"       long_name="sea_water_y_velocity"                 />
+      <field field_ref="woce"         name="wo"       long_name="sea_water_z_velocity"                 />
+      <field field_ref="avt"          name="difvho"   long_name="ocean_vertical_heat_diffusivity"      />
+      <field field_ref="avm"          name="difvmo"   long_name="ocean_vertical_momentum_diffusivity"  />
+   
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
+      <field field_ref="sstgrad"      name="tosgrad"  long_name="module_of_sea_surface_temperature_gradient"    />
+      <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="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+      <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
+      <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+      <field field_ref="taum"                                                                                   />
+      <field field_ref="20d"                                                                                    />
+      <field field_ref="mldkz5"                                                                                 />
+      <field field_ref="mldr10_1"                                                                               />
+      <field field_ref="mldr10_3"                                                                               />
+      <field field_ref="mldr0_1"                                                                                />
+      <field field_ref="mldr0_3"                                                                                />
+      <field field_ref="mld_dt02"                                                                               />
+      <field field_ref="topthdep"                                                                               />
+      <field field_ref="pycndep"                                                                                />
+      <field field_ref="tinv"                                                                                   />
+      <field field_ref="depti"                                                                                  />
+      <field field_ref="BLT"          name="blt"      long_name="barrier_layer_thickness"                       />
+      <field field_ref="utau"         name="tauuo"    long_name="surface_downward_x_stress"                     />
+      <field field_ref="vtau"         name="tauvo"    long_name="surface_downward_y_stress"                     />
+    </field_group>
+
+    <field_group id="groupT" >
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+      <field field_ref="sst2"         name="tossq"    long_name="square_of_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="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+      <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
+      <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+      <field field_ref="taum"                                                                                   />
+      <field field_ref="20d"                                                                                    />
+      <field field_ref="mldkz5"                                                                                 />
+      <field field_ref="mldr10_1"                                                                               />
+      <field field_ref="mldr10_3"                                                                               />
+      <field field_ref="mld_dt02"                                                                               />
+      <field field_ref="topthdep"                                                                               />
+      <field field_ref="pycndep"                                                                                />
+      <field field_ref="tinv"                                                                                   />
+      <field field_ref="depti"                                                                                  />
+      <field field_ref="BLT"          name="blt"      long_name="Barrier Layer Thickness"                       />
+    </field_group>
+    
+    <field_group id="groupU" >
+      <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+      <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
+      <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+    </field_group>
+    
+    <field_group id="groupV" >
+      <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+      <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
+      <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+    </field_group>
+    
+    <field_group id="groupW" >
+      <field field_ref="woce"         name="wo"       long_name="ocean vertical velocity"  />
+    </field_group>
+    
+     <field_group id="groupPTR"  >
+        <field field_ref="zomsfglo"          name="zomsfglo"  grid_ref="grid_znl_W_3D" />
+        <field field_ref="zomsfatl"          name="zomsfatl"  grid_ref="grid_znl_W_3D" />
+        <field field_ref="zomsfpac"          name="zomsfpac"  grid_ref="grid_znl_W_3D" />
+        <field field_ref="zomsfind"          name="zomsfind"  grid_ref="grid_znl_W_3D" />
+        <field field_ref="zomsfipc"          name="zomsfipc"  grid_ref="grid_znl_W_3D" />
+        <field field_ref="zotemglo"          name="zotemglo"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zotematl"          name="zotematl"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zotempac"          name="zotempac"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zotemind"          name="zotemind"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zotemipc"          name="zotemipc"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosalglo"          name="zosalglo"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosalatl"          name="zosalatl"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosalpac"          name="zosalpac"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosalind"          name="zosalind"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosalipc"          name="zosalipc"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosrfglo"          name="zosrfglo"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosrfatl"          name="zosrfatl"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosrfpac"          name="zosrfpac"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosrfind"          name="zosrfind"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="zosrfipc"          name="zosrfipc"  grid_ref="grid_znl_T_3D" />
+        <field field_ref="sophtadv"          name="sophtadv"  grid_ref="grid_znl_T_2D" />
+        <field field_ref="sophtldf"          name="sophtldf"  grid_ref="grid_znl_T_2D" />
+        <field field_ref="sopstadv"          name="sopstadv"  grid_ref="grid_znl_T_2D" />
+        <field field_ref="sopstldf"          name="sopstldf"  grid_ref="grid_znl_T_2D" />
+      </field_group>
+    
+
+   </field_definition>

+ 275 - 0
runtime/classic/ctrl/field_def_nemo-pisces.xml

@@ -0,0 +1,275 @@
+<?xml version="1.0"?> 
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+   <field_definition level="1" prec="4" operation="average" enabled=".TRUE." default_value="1.e20" detect_missing_value="true"> <!-- time step automaticaly defined -->
+
+    <!-- 
+============================================================================================================
+                                     Biogeochemistry model variables
+============================================================================================================
+    -->
+
+      <!-- ptrc on T grid -->
+
+     <field_group id="ptrc_T" grid_ref="grid_T_3D">
+       <field id="DIC"          long_name="Dissolved inorganic Concentration"        unit="mmol/m3" />
+       <field id="Alkalini"     long_name="Total Alkalinity Concentration"           unit="mmol/m3" />
+       <field id="O2"           long_name="Oxygen Concentration"                     unit="mmol/m3" />
+       <field id="CaCO3"        long_name="Calcite Concentration"                    unit="mmol/m3" />
+       <field id="PO4"          long_name="Phosphorus Concentration"                 unit="mmol/m3" />
+       <field id="POC"          long_name="Small organic carbon Concentration"       unit="mmol/m3" />
+       <field id="Si"           long_name="Silicate Concentration"                   unit="mmol/m3" />
+       <field id="PHY"          long_name="(Nano)Phytoplankton Concentration"        unit="mmol/m3" />
+       <field id="ZOO"          long_name="(Micro)Zooplankton Concentration"         unit="mmol/m3" />
+       <field id="DOC"          long_name="Dissolved organic Concentration"          unit="mmol/m3" />
+       <field id="PHY2"         long_name="Diatoms Concentration"                    unit="mmol/m3" />
+       <field id="ZOO2"         long_name="Mesozooplankton Concentration"            unit="mmol/m3" />
+       <field id="DSi"          long_name="Diatoms Silicate Concentration"           unit="mmol/m3" />
+       <field id="Fer"          long_name="Dissolved Iron Concentration"             unit="mmol/m3" />
+       <field id="BFe"          long_name="Big iron particles Concentration"         unit="mmol/m3" />
+       <field id="SFe"          long_name="Small iron particles Concentration"       unit="mmol/m3" />
+       <field id="GOC"          long_name="Big organic carbon Concentration"         unit="mmol/m3" />
+       <field id="DFe"          long_name="Diatoms iron  Concentration"              unit="mmol/m3" />
+       <field id="GSi"          long_name="Sinking biogenic Silicate Concentration"  unit="mmol/m3" />
+       <field id="NFe"          long_name="Nano iron Concentration"                  unit="mmol/m3" />
+       <field id="NCHL"         long_name="Nano chlorophyl Concentration"            unit="mg/m3"   />
+       <field id="DCHL"         long_name="Diatoms chlorophyl Concentration"         unit="mg/m3"   />
+       <field id="NO3"          long_name="Nitrate Concentration"                    unit="mmol/m3" />
+       <field id="NH4"          long_name="Ammonium Concentration"                   unit="mmol/m3" />
+       <!-- Tracer Content -->
+       <field id="DIC_E3T"      long_name="Dissolved inorganic Content"              unit="mmol/m2"  > DIC * e3t </field >
+       <field id="Alkalini_E3T" long_name="Total Alkalinity Content"                 unit="mmol/m2"  > Alkalini * e3t </field >
+       <field id="O2_E3T"       long_name="Oxygen Content"                           unit="mmol/m2"  > O2 * e3t </field >
+       <field id="CaCO3_E3T"    long_name="Calcite Content"                          unit="mmol/m2"  > CaCO3 * e3t </field >
+       <field id="PO4_E3T"      long_name="Phophorus Content"                        unit="mmol/m2"  > PO4 * e3t </field >
+       <field id="POC_E3T"      long_name="Small organic carbon Content"             unit="mmol/m2"  > POC * e3t </field >
+       <field id="Si_E3T"       long_name="Silicate content"                         unit="mmol/m2"  > Si * e3t </field >
+       <field id="PHY_E3T"      long_name="(Nano)Phytoplankton Content"              unit="mmol/m2"  > PHY * e3t </field >
+       <field id="ZOO_E3T"      long_name="(Micro)Zooplankton Content"               unit="mmol/m2"  > ZOO * e3t </field >
+       <field id="DOC_E3T"      long_name="Dissolved organic Content"                unit="mmol/m2"  > DOC * e3t </field >
+       <field id="PHY2_E3T"     long_name="Diatoms Content"                          unit="mmol/m2"  > PHY2 * e3t </field >
+       <field id="ZOO2_E3T"     long_name="Mesozooplankton Content"                  unit="mmol/m2"  > ZOO2 * e3t </field >
+       <field id="DSi_E3T"      long_name="Diatoms Silicate Content"                 unit="mmol/m2"  > DSi * e3t </field >
+       <field id="Fer_E3T"      long_name="Dissolved Iron Content"                   unit="mmol/m2"  > Fer * e3t </field >
+       <field id="BFe_E3T"      long_name="Big iron particles Content"               unit="mmol/m2"  > BFe * e3t </field >
+       <field id="SFe_E3T"      long_name="Small iron particles Content"             unit="mmol/m2"  > SFe * e3t </field >
+       <field id="GOC_E3T"      long_name="Big organic carbon particles Content"     unit="mmol/m2"  > GOC * e3t </field >
+       <field id="DFe_E3T"      long_name="Diatoms iron  Content"                    unit="mmol/m2"  > DFe * e3t </field >
+       <field id="GSi_E3T"      long_name="Sinking biogenic Silicate Content"        unit="mmol/m2"  > GSi * e3t </field >
+       <field id="NFe_E3T"      long_name="Nano iron Content"                        unit="mmol/m2"  > NFe * e3t </field >
+       <field id="NCHL_E3T"     long_name="Nano chlorophyl Content"                  unit="mmol/m2"  > NCHL * e3t </field >
+       <field id="DCHL_E3T"     long_name="Diatoms chlorophyl Content"               unit="mmol/m2"  > DCHL * e3t </field >
+       <field id="NO3_E3T"      long_name="Nitrate Content"                          unit="mmol/m2"  > NO3 * e3t </field >
+       <field id="NH4_E3T"      long_name="Ammonium Content"                         unit="mmol/m2"  > NH4 * e3t </field >
+       <!-- Surface Tracer Content -->
+       <field id="E3TSFC"           long_name="T-cell thickness at surface"               field_ref="e3t"          grid_ref="grid_T_SFC" />
+       <field id="DICSFC_E3T"       long_name="Surface Dissolved inorganic Content"       field_ref="DIC_E3T"      grid_ref="grid_T_SFC" />
+       <field id="AlkaliniSFC_E3T"  long_name="Surface Total Alkalinity Content"          field_ref="Alkalini_E3T" grid_ref="grid_T_SFC" />
+       <field id="O2SFC_E3T"        long_name="Surface Oxygen Content"                    field_ref="O2_E3T"       grid_ref="grid_T_SFC" />
+       <field id="CaCO3SFC_E3T"     long_name="Surface Calcite Content"                   field_ref="CaCO3_E3T"    grid_ref="grid_T_SFC" />
+       <field id="PO4SFC_E3T"       long_name="Surface Phosphate Content"                 field_ref="PO4_E3T"      grid_ref="grid_T_SFC" />
+       <field id="POCSFC_E3T"       long_name="Surface Small organic carbon Content"      field_ref="POC_E3T"      grid_ref="grid_T_SFC" />
+       <field id="SiSFC_E3T"        long_name="Surface Silicate Content"                  field_ref="Si_E3T"       grid_ref="grid_T_SFC" />
+       <field id="PHYSFC_E3T"       long_name="Surface (Nano)Phytoplankton Content"       field_ref="PHY_E3T"      grid_ref="grid_T_SFC" />
+       <field id="ZOOSFC_E3T"       long_name="Surface (Micro)Zooplankton Content"        field_ref="ZOO_E3T"      grid_ref="grid_T_SFC" />
+       <field id="DOCSFC_E3T"       long_name="Surface Dissolved organic Content"         field_ref="DOC_E3T"      grid_ref="grid_T_SFC" />
+       <field id="PHY2SFC_E3T"      long_name="Surface Diatoms Content"                   field_ref="PHY2_E3T"     grid_ref="grid_T_SFC" />
+       <field id="ZOO2SFC_E3T"      long_name="Surface Mesozooplankton Content"           field_ref="ZOO2_E3T"     grid_ref="grid_T_SFC" />
+       <field id="DSiSFC_E3T"       long_name="Surface Diatoms Silicate Content"          field_ref="DSi_E3T"      grid_ref="grid_T_SFC" />
+       <field id="FerSFC_E3T"       long_name="Surface Dissolved Iron Content"            field_ref="Fer_E3T"      grid_ref="grid_T_SFC" />
+       <field id="BFeSFC_E3T"       long_name="Surface Big iron particles Content"        field_ref="BFe_E3T"      grid_ref="grid_T_SFC" />
+       <field id="SFeSFC_E3T"       long_name="Surface Small iron particles Content"      field_ref="SFe_E3T"      grid_ref="grid_T_SFC" />
+       <field id="GOCSFC_E3T"       long_name="Surface Big organic carbon Content"        field_ref="GOC_E3T"      grid_ref="grid_T_SFC" />
+       <field id="DFeSFC_E3T"       long_name="Surface Diatoms iron  Content"             field_ref="DFe_E3T"      grid_ref="grid_T_SFC" />
+       <field id="GSiSFC_E3T"       long_name="Surface Sinking biogenic Silicate Content" field_ref="GSi_E3T"      grid_ref="grid_T_SFC" />
+       <field id="NFeSFC_E3T"       long_name="Surface Nano iron Content"                 field_ref="NFe_E3T"      grid_ref="grid_T_SFC" />
+       <field id="NCHLSFC_E3T"      long_name="Surface Nano chlorophyl Content"           field_ref="NCHL_E3T"     grid_ref="grid_T_SFC" />
+       <field id="DCHLSFC_E3T"      long_name="Surface Diatoms chlorophyl Content"        field_ref="DCHL_E3T"     grid_ref="grid_T_SFC" />
+       <field id="NO3SFC_E3T"       long_name="Surface Nitrate Content"                   field_ref="NO3_E3T"      grid_ref="grid_T_SFC" />
+       <field id="NH4SFC_E3T"       long_name="Surface Ammonium Content"                  field_ref="NH4_E3T"      grid_ref="grid_T_SFC" />
+
+       <!-- PISCES with Kriest parametisation : variables available with key_kriest -->
+       <field id="Num"         long_name="Number of organic particles"              unit="1" />
+       <field id="Num_E3T"     long_name="Num * E3T"                                unit="m"  > Num * e3t </field >
+
+       <!-- PISCES light : variables available with key_pisces_reduced -->
+       <field id="DET"         long_name="Detritus"                                 unit="mmol-N/m3" />
+       <field id="DOM"         long_name="Dissolved Organic Matter"                 unit="mmol-N/m3" />
+       <field id="DET_E3T"     long_name="DET * E3T"                                unit="mmol-N/m2"  > DET * e3t </field >
+       <field id="DOM_E3T"     long_name="DOM * E3T"                                unit="mmol-N/m2"  > DOM * e3t </field >
+
+
+     </field_group>
+
+     <!-- PISCES additional diagnostics on T grid  -->
+     <field_group id="diad_T" grid_ref="grid_T_2D">
+       <field id="PH"          long_name="PH"                                      unit="1"          grid_ref="grid_T_3D" />
+       <field id="CO3"         long_name="Bicarbonates"                            unit="mol/m3"     grid_ref="grid_T_3D" />
+       <field id="CO3sat"      long_name="CO3 saturation"                          unit="mol/m3"     grid_ref="grid_T_3D" />
+       <field id="PAR"         long_name="Photosynthetically Available Radiation"  unit="W/m2"       grid_ref="grid_T_3D" />
+       <field id="PARDM"       long_name="Daily mean PAR"                          unit="W/m2"       grid_ref="grid_T_3D" />
+       <field id="PPPHY"       long_name="Primary production of nanophyto"         unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="PPPHY2"      long_name="Primary production of diatoms"           unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="PPNEWN"      long_name="New Primary production of nanophyto"     unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="PPNEWD"      long_name="New Primary production of diatoms"       unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="PBSi"        long_name="Primary production of Si diatoms"        unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="PFeN"        long_name="Primary production of nano iron"         unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="PFeD"        long_name="Primary production of diatoms iron"      unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="xfracal"     long_name="Calcifying fraction"                     unit="1"          grid_ref="grid_T_3D" />
+       <field id="PCAL"        long_name="Calcite production"                      unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="DCAL"        long_name="Calcite dissolution"                     unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="GRAZ1"       long_name="Grazing by microzooplankton"             unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="GRAZ2"       long_name="Grazing by mesozooplankton"              unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="REMIN"       long_name="Oxic remineralization of OM"             unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="DENIT"       long_name="Anoxic remineralization of OM"           unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="Nfix"        long_name="Nitrogen fixation"                       unit="mol/m3/s"   grid_ref="grid_T_3D" />
+       <field id="Mumax"       long_name="Maximum growth rate"                     unit="s-1"        grid_ref="grid_T_3D" />
+       <field id="MuN"         long_name="Realized growth rate for nanophyto"      unit="s-1"        grid_ref="grid_T_3D" />
+       <field id="MuD"         long_name="Realized growth rate for diatomes"       unit="s-1"        grid_ref="grid_T_3D" />
+       <field id="LNnut"       long_name="Nutrient limitation term in Nanophyto"   unit=""           grid_ref="grid_T_3D" />
+       <field id="LDnut"       long_name="Nutrient limitation term in Diatoms"     unit=""           grid_ref="grid_T_3D" />
+       <field id="LNFe"        long_name="Iron limitation term in Nanophyto"       unit=""           grid_ref="grid_T_3D" />
+       <field id="LDFe"        long_name="Iron limitation term in Diatoms"         unit=""           grid_ref="grid_T_3D" />
+       <field id="LNlight"     long_name="Light limitation term in Nanophyto"      unit=""           grid_ref="grid_T_3D" />
+       <field id="LDlight"     long_name="Light limitation term in Diatoms"        unit=""           grid_ref="grid_T_3D" />
+       <field id="Fe2"         long_name="Iron II concentration"                   unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="Fe3"         long_name="Iron III concentration"                  unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="FeL1"        long_name="Complexed Iron concentration with L1"    unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="FeL2"        long_name="Complexed Iron concentration with L2"    unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="FeP"         long_name="Precipitated Iron III"                   unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="TL1"         long_name="Total L1 concentration"                  unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="TL2"         long_name="Total L2 concentration"                  unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="pdust"       long_name="dust concentration"                      unit="g/m3"                            />
+       <field id="Totlig"      long_name="Total ligand concentation"               unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="Biron"       long_name="Bioavailable iron"                       unit="nmol/m3"    grid_ref="grid_T_3D" />
+       <field id="Sdenit"      long_name="Nitrate reduction in the sediments"      unit="molN/m2/s"                       />
+       <field id="SedCal"      long_name="Calcite burial in the sediments"         unit="molC/m2/s"                       />
+       <field id="SedSi"       long_name="Silicon burial in the sediments"         unit="molSi/m2/s"                      />
+       <field id="SedC"        long_name="Organic C burial in the sediments"       unit="molC/m2/s"                       />
+       <field id="Ironice"     long_name="Iron input/uptake due to sea ice"        unit="mol/m2/s"                        />
+       <field id="HYDR"        long_name="Iron input from hydrothemal vents"       unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="EPC100"      long_name="Export of carbon particles at 100 m"     unit="mol/m2/s"                        />
+       <field id="EPFE100"     long_name="Export of biogenic iron at 100 m"        unit="mol/m2/s"                        />
+       <field id="EPSI100"     long_name="Export of Silicate at 100 m"             unit="mol/m2/s"                        />
+       <field id="EPCAL100"    long_name="Export of Calcite at 100 m"              unit="mol/m2/s"                        />
+       <field id="EXPC"        long_name="Export of carbon"                        unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="EXPFE"       long_name="Export of biogenic iron"                 unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="EXPSI"       long_name="Export of Silicate"                      unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="EXPCAL"      long_name="Export of Calcite"                       unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="Cflx"        long_name="DIC flux"                                unit="mol/m2/s"                        />
+       <field id="Oflx"        long_name="Oxygen flux"                             unit="mol/m2/s"                        />
+       <field id="Kg"          long_name="Gas transfer"                            unit="mol/m2/s/uatm"                   />
+       <field id="Dpco2"       long_name="Delta CO2"                               unit="uatm"                            />
+       <field id="pCO2sea"     long_name="surface ocean pCO2"                      unit="uatm"                            />
+       <field id="Dpo2"        long_name="Delta O2"                                unit="uatm"                            />
+       <field id="Heup"        long_name="Euphotic layer depth"                    unit="m"                               />
+       <field id="AtmCo2"      long_name="Atmospheric CO2 concentration"           unit="ppm"                               />
+
+       <!-- PISCES : external inputs -->
+       <field id="rivDIC"      long_name="Riverine Dissolved Inorganic Carbon inputs"          unit="mol/L/s"                      />
+       <field id="rivDOC"      long_name="Riverine Dissolved Organic Carbon inputs"            unit="mol/L/s"                      />
+       <field id="rivTAlk"     long_name="Riverine Total Alkalinity inputs"                    unit="mol/L/s"                      />
+       <field id="rivNO3"      long_name="Riverine Nitrate inputs"                             unit="mol/L/s"                      />
+       <field id="rivPO4"      long_name="Riverine Phosphate inputs"                           unit="mol/L/s"                      />
+       <field id="rivIron"     long_name="Riverine Iron inputs"                                unit="mol/L/s"                      />
+       <field id="rivSi"       long_name="Riverine Silicon inputs"                             unit="mol/L/s"                      />
+       <field id="IronSupply"  long_name="Total Iron supply from external sources"             unit="mol/m2/s"                     />
+       <field id="NitrSupply"  long_name="Total Nitrogen supply from external sources"         unit="mol/m2/s"                     />
+       <field id="Irondep"     long_name="Iron deposition from dust"                           unit="mol/m2/s"                        />
+       <field id="Ironsed"     long_name="Iron deposition from sediment"                       unit="mol/m2/s"   grid_ref="grid_T_3D" />
+
+
+       <!-- PISCES with Kriest parametisation : variables available with key_kriest -->
+       <field id="EPN100"      long_name="Particulate number flux at 100 m"        unit="mol/m2/s"                        />
+       <field id="EXPN"        long_name="Particulate number flux"                 unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="XNUM"        long_name="Number of particles in aggregats"        unit="1"          grid_ref="grid_T_3D" />
+       <field id="WSC"         long_name="sinking speed of mass flux"              unit="m2/s"       grid_ref="grid_T_3D" />
+       <field id="WSN"         long_name="sinking speed of number flux"            unit="m2/s"       grid_ref="grid_T_3D" />
+
+       <!-- dbio_T on T grid : variables available with key_diaar5 -->
+       <field id="TPP"         long_name="Total Primary production of phyto"                   unit="mol/m3/s"  grid_ref="grid_T_3D" />
+       <field id="TPNEW"       long_name="New Primary production of phyto"                     unit="mol/m3/s"  grid_ref="grid_T_3D" />
+       <field id="TPBFE"       long_name="Total biogenic iron production"                      unit="mol/m3/s"  grid_ref="grid_T_3D" />
+       <field id="INTDIC"      long_name="DIC content"                                         unit="kg/m2"                          />
+       <field id="INTDOC"      long_name="DOC content"                                         unit="kg/m2"                          />
+       <field id="INTPOC"      long_name="POC content"                                         unit="kg/m2"                          />
+       <field id="O2MIN"       long_name="Oxygen minimum concentration"                        unit="mol/m3"                          />
+       <field id="ZO2MIN"      long_name="Depth of oxygen minimum concentration"               unit="m"                              />
+       <field id="INTNFIX"     long_name="Nitrogen fixation rate : vert. integrated"           unit="mol/m2/s"                       />
+       <field id="INTPPPHY"    long_name="Vertically integrated primary production by nanophy" unit="mol/m2/s"                       />
+       <field id="INTPPPHY2"   long_name="Vertically integrated primary production by diatom"  unit="mol/m2/s"                       />
+       <field id="INTPP"       long_name="Vertically integrated primary production by phyto"   unit="mol/m2/s"                       />
+       <field id="INTPNEW"     long_name="Vertically integrated new primary production"        unit="mol/m2/s"                       />
+       <field id="INTPBFE"     long_name="Vertically integrated of biogenic iron production"   unit="mol/m2/s"                       />
+       <field id="INTPBSI"     long_name="Vertically integrated of biogenic Si production"     unit="mol/m2/s"                       />
+       <field id="INTPCAL"     long_name="Vertically integrated of calcite production"         unit="mol/m2/s"                       />
+       <!-- surface  -->
+       <field id="TPNEWSFC"    long_name="New Primary production of phyto at surface"          field_ref="TPNEW" grid_ref="grid_T_SFC" />
+
+       <!-- PISCES tracers trends -->
+       <field id="INTdtAlk"    long_name="Vertically int. of change of alkalinity"             unit="mol/m2/s"                       />
+       <field id="INTdtDIC"    long_name="Vertically int. of change of dissic    "             unit="mol/m2/s"                       />
+       <field id="INTdtFer"    long_name="Vertically int. of change of iron      "             unit="mol/m2/s"                       />
+       <field id="INTdtDIN"    long_name="Vertically int. of change of nitrogen  "             unit="mol/m2/s"                       />
+       <field id="INTdtDIP"    long_name="Vertically int. of change of phophate  "             unit="mol/m2/s"                       />
+       <field id="INTdtSil"    long_name="Vertically int. of change of silicon   "             unit="mol/m2/s"                       />
+
+       <!--  -->
+       <field id="PHSFC"       long_name="PH at surface"                                     field_ref="PH"          grid_ref="grid_T_SFC" />
+       <field id="CO3SFC"      long_name="Bicarbonates at surface"                           field_ref="CO3"         grid_ref="grid_T_SFC" />
+       <field id="CO3satSFC"   long_name="CO3 saturatiob at surface"                         field_ref="CO3sat"      grid_ref="grid_T_SFC" />
+       <field id="LNnutSFC"    long_name="Nutrient limitation term in Nanophyto at surface"  field_ref="LNnut"       grid_ref="grid_T_SFC" /> 
+       <field id="LDnutSFC"    long_name="Nutrient limitation term in Diatoms at surface"    field_ref="LDnut"       grid_ref="grid_T_SFC" />
+       <field id="LNFeSFC"     long_name="Iron limitation term in Nanophyto at surface"      field_ref="LNFe"        grid_ref="grid_T_SFC" />
+       <field id="LDFeSFC"     long_name="Iron limitation term in Diatoms at surface"        field_ref="LDFe"        grid_ref="grid_T_SFC" />
+       <field id="LNlightSFC"  long_name="Light limitation term in Nanophyto at surface"     field_ref="LNlight"     grid_ref="grid_T_SFC" />
+       <field id="LDlightSFC"  long_name="Light limitation term in Diatoms at surface"       field_ref="LDlight"     grid_ref="grid_T_SFC" />
+       <field id="TPPSFC"      long_name="Total primary production at surface"               field_ref="TPP"         grid_ref="grid_T_SFC" />
+
+       <!-- PISCES light : variables available with key_pisces_reduced -->
+       <field id="FNO3PHY"     long_name="FNO3PHY"                                 unit=""          grid_ref="grid_T_3D" /> 
+       <field id="FNH4PHY"     long_name="FNH4PHY"                                 unit=""          grid_ref="grid_T_3D" /> 
+       <field id="FNH4NO3"     long_name="FNH4NO3"                                 unit=""          grid_ref="grid_T_3D" /> 
+       <field id="TNO3PHY"     long_name="TNO3PHY"                                 unit=""  /> 
+       <field id="TNH4PHY"     long_name="TNH4PHY"                                 unit=""  /> 
+       <field id="TPHYDOM"     long_name="TPHYDOM"                                 unit=""  /> 
+       <field id="TPHYNH4"     long_name="TPHYNH4"                                 unit=""  /> 
+       <field id="TPHYZOO"     long_name="TPHYZOO"                                 unit=""  /> 
+       <field id="TPHYDET"     long_name="TPHYDET"                                 unit=""  /> 
+       <field id="TDETZOO"     long_name="TDETZOO"                                 unit=""  /> 
+       <field id="TZOODET"     long_name="TZOODET"                                 unit=""  /> 
+       <field id="TZOOBOD"     long_name="TZOOBOD"                                 unit=""  /> 
+       <field id="TZOONH4"     long_name="TZOONH4"                                 unit=""  /> 
+       <field id="TZOODOM"     long_name="TZOODOM"                                 unit=""  /> 
+       <field id="TNH4NO3"     long_name="TNH4NO3"                                 unit=""  /> 
+       <field id="TDOMNH4"     long_name="TDOMNH4"                                 unit=""  /> 
+       <field id="TDETNH4"     long_name="TDETNH4"                                 unit=""  /> 
+       <field id="TPHYTOT"     long_name="TPHYTOT"                                 unit=""  /> 
+       <field id="TZOOTOT"     long_name="TZOOTOT"                                 unit=""  /> 
+       <field id="SEDPOC"      long_name="SEDPOC"                                  unit=""  /> 
+       <field id="TDETSED"     long_name="TDETSED"                                 unit=""  /> 
+
+     </field_group>
+
+     <field_group id="PISCES_scalar"  grid_ref="grid_T_2D" >
+       <field id="dictot"          long_name="global carbon inventory"                            unit="PgC"     />
+       <field id="pno3tot"         long_name="global mean nitrate concentration"                  unit="mol/m3"   />
+       <field id="ppo4tot"         long_name="global mean phosphorus concentration"               unit="mol/m3"   />
+       <field id="psiltot"         long_name="global mean silicate concentration"                 unit="mol/m3"   />
+       <field id="palktot"         long_name="global mean alkalinity concentration"               unit="mol/m3"   />
+       <field id="pfertot"         long_name="global mean iron concentration"                     unit="mol/m3"   />
+       <field id="tcflx"           long_name="total Flux of Carbon out of the ocean"              unit="mol/s"   />
+       <field id="tcflxcum"        long_name="cumulative total Flux of Carbon out of the ocean"   unit="mol/s"   />
+       <field id="tcexp"           long_name="total Carbon export at 100m"                        unit="mol/s"   />
+       <field id="tintpp"          long_name="global total integrated primary production"         unit="mol/s"   />
+       <field id="tnfix"           long_name="global total nitrogen fixation"                     unit="mol/s"   />
+       <field id="tdenit"          long_name="Total denitrification"                              unit="mol/s"   />
+     </field_group>
+
+   </field_definition>

+ 100 - 0
runtime/classic/ctrl/file_def_nemo-lim3.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+    <!-- $id$ -->
+    
+ <!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files for lim3                                =
+=                                         put the variables you want...                                    =
+============================================================================================================
+  -->
+    
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+  
+      <file_group id="1ts_lim" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+      <file_group id="1h_lim" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h_lim" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h_lim" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h_lim" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h_lim" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->        
+      <file_group id="1d_lim" output_freq="1d"  output_level="10" enabled=".TRUE."/>  <!-- 5d files -->   	
+      <file_group id="5d_lim" output_freq="5d"  output_level="10" enabled=".TRUE."/>  <!-- 5d files -->   	
+
+      <file_group id="1m_lim" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files -->
+
+       <file id="file40" name_suffix="_icemod" description="ice variables" >
+    
+         <field field_ref="snothic"          name="snthic"     long_name="surface_snow_thickness"   />
+         <field field_ref="icethic"          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"  />
+
+     <!-- thermo -->
+         <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" />
+
+     <!-- dyn -->
+         <field field_ref="uice_mv"          name="sivelu" />
+         <field field_ref="vice_mv"          name="sivelv" />
+         <field field_ref="icevel_mv"        name="sivelo" />
+         <field field_ref="idive"            name="sidive" />
+         <field field_ref="ishear"           name="sishea" />
+         <field field_ref="icestr"           name="sistre" />
+
+     <!-- transports -->
+         <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" />
+
+     <!-- volume flux -->
+         <field field_ref="vfxice"           name="vfxice" />
+         <field field_ref="vfxsnw"           name="vfxsnw" />
+         <field field_ref="vfxsub"           name="vfxsub" />
+         <field field_ref="vfxsub_err"       name="vfxsub_err" />
+         <field field_ref="vfxspr"           name="vfxspr" />
+
+     <!-- ice-ocean salt flux -->
+         <field field_ref="sfx_mv"           name="sfx" />
+
+     <!-- heat fluxes -->
+         <field field_ref="hfxout"           name="hfxout"   />
+         <field field_ref="hfxin"            name="hfxin"    />
+
+     <!-- ice-atm. heat flux from mass exchange -->
+         <field field_ref="hfxsub"           name="hfxsub"   />
+         <field field_ref="hfxspr"           name="hfxspr"   />
+
+     <!-- outputs by category -->
+         <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"/>
+
+     <!-- ocean outputs -->
+         <field field_ref="isst"             name="sst"    />
+         <field field_ref="isss"             name="sss"    />
+
+        </file>
+
+      </file_group>
+
+      <file_group id="2m_lim" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m_lim" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m_lim" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m_lim" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+      <file_group id="1y_lim"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y_lim"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y_lim"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y_lim" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+
+   </file_definition>

+ 632 - 0
runtime/classic/ctrl/file_def_nemo-opa.xml

@@ -0,0 +1,632 @@
+<?xml version="1.0"?>
+
+<!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own filesfor ocean dynamics context                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+   
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+
+      <file_group id="1ts_opa" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+      <file_group id="1h_opa" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+
+      <file_group id="2h_opa" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+
+      <file_group id="3h_opa" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+
+      <file_group id="4h_opa" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+
+      <file_group id="6h_opa" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+
+      
+      <file_group id="1d_opa" output_freq="1d"  output_level="10" enabled=".FALSE.">  <!-- 1d files -->   
+	
+        <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <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="average" freq_op="1d" > sqrt( @sst2 - @sst * @sst ) </field>
+	  <field field_ref="ssh"          name="zosstd"   long_name="sea_surface_height_above_geoid_standard_deviation"  operation="average" 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="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>
+	</file>
+       
+       
+        <file id="file2" name_suffix="_scalar" description="scalar variables" >
+
+	  <!-- Volume -->
+          <!-- global contents -->
+	  <field field_ref="voltot"       grid_ref="grid_1point"   name="scvoltot"  />
+	  <field field_ref="sshtot"       grid_ref="grid_1point"   name="scsshtot"  />
+	  <field field_ref="sshsteric"    grid_ref="grid_1point"   name="scsshste"  />
+<!--  <field field_ref="sshthster"    grid_ref="grid_1point"   name="scsshtst"  /> -->
+	  <field field_ref="masstot"      grid_ref="grid_1point"   name="scmastot"  />
+	  <field field_ref="temptot"      grid_ref="grid_1point"   name="sctemtot"  />
+	  <field field_ref="saltot"       grid_ref="grid_1point"   name="scsaltot"  />
+	  
+	  <!-- global drifts (conservation checks) -->
+	  <field field_ref="bgtemper"     grid_ref="grid_1point"   name="bgtemper"    />
+	  <field field_ref="bgsaline"     grid_ref="grid_1point"   name="bgsaline"    />
+	  <field field_ref="bgheatco"     grid_ref="grid_1point"   name="bgheatco"    />
+	  <field field_ref="bgheatfx"     grid_ref="grid_1point"   name="bgheatfx"    />
+	  <field field_ref="bgsaltco"     grid_ref="grid_1point"   name="bgsaltco"    />
+	  <field field_ref="bgvolssh"     grid_ref="grid_1point"   name="bgvolssh"    />
+	  <field field_ref="bgvole3t"     grid_ref="grid_1point"   name="bgvole3t"    />
+
+	  <!-- global surface forcings  -->
+	  <field field_ref="bgfrcvol"     grid_ref="grid_1point"   name="bgfrcvol"    />
+	  <field field_ref="bgfrctem"     grid_ref="grid_1point"   name="bgfrctem"    />
+	  <field field_ref="bgfrchfx"     grid_ref="grid_1point"   name="bgfrchfx"    />
+	  <field field_ref="bgfrcsal"     grid_ref="grid_1point"   name="bgfrcsal"    />
+
+	  <!-- Surface -->
+	  <!-- global contents -->
+          <field field_ref="ibgvol_tot"     grid_ref="grid_1point"  name="ibgvol_tot"   />
+          <field field_ref="sbgvol_tot"     grid_ref="grid_1point"  name="sbgvol_tot"   />
+          <field field_ref="ibgarea_tot"    grid_ref="grid_1point"  name="ibgarea_tot"  />
+          <field field_ref="ibgsalt_tot"    grid_ref="grid_1point"  name="ibgsalt_tot"  />
+          <field field_ref="ibgheat_tot"    grid_ref="grid_1point"  name="ibgheat_tot"  />
+          <field field_ref="sbgheat_tot"    grid_ref="grid_1point"  name="sbgheat_tot"  />
+	  
+	  <!-- global drifts (conservation checks) -->
+          <field field_ref="ibgvolume"      grid_ref="grid_1point"  name="ibgvolume"    />
+          <field field_ref="ibgsaltco"      grid_ref="grid_1point"  name="ibgsaltco"    />
+          <field field_ref="ibgheatco"      grid_ref="grid_1point"  name="ibgheatco"    />
+          <field field_ref="ibgheatfx"      grid_ref="grid_1point"  name="ibgheatfx"    />
+	  
+	  <!-- global forcings  -->
+          <field field_ref="ibgfrcvoltop"   grid_ref="grid_1point"  name="ibgfrcvoltop" />
+          <field field_ref="ibgfrcvolbot"   grid_ref="grid_1point"  name="ibgfrcvolbot" />
+          <field field_ref="ibgfrctemtop"   grid_ref="grid_1point"  name="ibgfrctemtop" />
+          <field field_ref="ibgfrctembot"   grid_ref="grid_1point"  name="ibgfrctembot" />
+          <field field_ref="ibgfrcsal"      grid_ref="grid_1point"  name="ibgfrcsal"    />
+          <field field_ref="ibgfrchfxtop"   grid_ref="grid_1point"  name="ibgfrchfxtop" />
+          <field field_ref="ibgfrchfxbot"   grid_ref="grid_1point"  name="ibgfrchfxbot" />
+	  
+        </file>
+	
+	<file id="file3" name_suffix="_SBC" description="surface fluxes variables" > <!-- time step automaticaly defined based on nn_fsbc -->
+	  <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="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="taum"          name="taum" />
+	  <field field_ref="wspd"          name="windsp"  />
+	  <field field_ref="precip"        name="precip" />
+	  <!-- For heat conservation checking -->
+	  <field field_ref="qt_oce"        name="qt_oce"   long_name="downward total flux at ocean surface"           />
+	  <field field_ref="qemp_oce"      name="qemp_oce" long_name="Downward Heat Flux from E-P over open ocean"           />
+	  <field field_ref="qt_ice"        name="qt_ice"   long_name="downward total flux at ice surface"           />
+	  <field field_ref="qemp_ice"      name="qemp_ice" long_name="Downward Heat Flux from E-P over ice"           />
+	  <field field_ref="hflx_rain_cea" name="hflx_rain_cea"      />
+	  <field field_ref="hflx_evap_cea" name="hflx_evap_cea"      />
+	  <field field_ref="hflx_snow_cea" name="hflx_snow_cea"      />
+	  <field field_ref="hflx_cal_cea"  name="hflx_cal_cea"      />
+	  <!-- For freshwater conservation checking -->
+	  <field field_ref="empmr"         name="wfo"      long_name="water_flux_into_sea_water"                     />
+	  <field field_ref="emp_oce"       name="emp_oce"                      />
+	  <field field_ref="emp_ice"       name="emp_ice"                      />
+          <field field_ref="runoffs"       name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+	  <field field_ref="calving_cea"   name="calving" />
+      <field field_ref="iceberg_cea"   name="iceberg" />
+      <field field_ref="iceshelf_cea"  name="iceshelf" />
+	  <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="rain"          name="rain"      />
+	  <field field_ref="snow_ao_cea"   name="snow_ao_cea"      />
+	  <field field_ref="snow_ai_cea"   name="snow_ai_cea"      />
+	  <field field_ref="evap_ao_cea"   name="evap_ao_cea"      />
+	  <field field_ref="subl_ai_cea"   name="subl_ai_cea"      />
+	  <field field_ref="fmmflx"        name="fmmflx"  />
+          <field field_ref="fwfisf"        name="fwfisf"  />
+          <field field_ref="hflx_snow_ai_cea" name="hflx_snow_ai"  />
+          <field field_ref="hflx_snow_ao_cea" name="hflx_snow_ao"  />
+          <field field_ref="hflx_ice_cea"     name="hflx_ice"      />
+          <field field_ref="hflx_rnf_cea"     name="hflx_rnf"      />
+	  <!-- For salt conservation checking -->
+          <field field_ref="saltflx"      name="sosflxdo"  />
+	  <!-- 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="5d_opa" output_freq="5d"  output_level="10" enabled=".FALSE.">  <!-- 5d files -->   
+	
+	<file id="file4" 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="average" freq_op="5d" > @toce_e3t / @e3t </field>
+          <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                   operation="average" freq_op="5d" > @soce_e3t / @e3t </field>
+          <field field_ref="hdiv"         name="hdivtr"   long_name="horizontal divergence transport"      operation="average" freq_op="5d" > @hdiv * @e3t </field>
+          <field field_ref="mldr10_1"     name="mldr10_1"/>
+          <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+          <field field_ref="qsr"          name="rsntds"      long_name="surface_net_downward_shortwave_flux" />
+          <field field_ref="wspd"         name="windsp"  />
+          <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+          <field field_ref="empbmr"       name="wfob"     long_name="water_flux_into_sea_water at prev time-step"    />
+         <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+          <field field_ref="fmmflx"       name="fmmflx"  />
+          <field field_ref="iceconc"      name="siconc"  />
+	</file>
+
+	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="e3u"  />
+          <field field_ref="uocetr_eff"   name="uocetr_eff"  />
+	  <field field_ref="ahu_bbl"       />
+	</file>
+	
+	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="e3v"  />
+          <field field_ref="vocetr_eff"   name="vocetr_eff"  />
+	  <field field_ref="ahv_bbl"       />
+	</file>
+	
+	<file id="file7" name_suffix="_grid_W" description="ocean W grid variables" >
+          <field field_ref="e3w"  />
+          <field field_ref="woce"         name="wo"     />
+          <field field_ref="wocetr_eff"   name="wocetr_eff"  />
+          <field field_ref="avs"          name="difvso"  long_name="ocean_vertical_salt_diffusivity" />
+          <field field_ref="logavs"       name="difvsolog"  long_name="ocean_vertical_salt_diffusivity" operation="average" freq_op="5d" > exp( @logavs ) </field>
+          <field field_ref="aht2d"        name="ahtt"   />
+          <field field_ref="aht2d_eiv"    name="aeiv"   />
+	</file>
+
+
+        <file id="file30" name_suffix="_trdtra" description="ocean trends variables" >
+          <field field_ref="ttrd_zdfp_e3t"   name="ttrdtr_zdfp"  long_name="Tendency_of_heat_content_from_parameterized_dianeutral_mixing"  unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_eivad_e3t"  name="ttrdtr_eivad" long_name="Tendency_of_heat_content_from_parameterized_eddy_advection"     unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_iso_e3t"    name="ttrdtr_iso"   long_name="Tendency_of_heat_content_from_parameterized_eddy_diffusion"     unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_totad_e3t"  name="ttrdtr_totad" long_name="Tendency_of_heat_content_from_residual_mean_advection"          unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_tot_e3t"    name="ttrdtr_tot"   long_name="Tendency_of_heat_content_from_all_processes"                    unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="strd_zdfp_e3t"   name="strdtr_zdfp"  long_name="Tendency_of_salt_content_from_parameterized_dianeutral_mixing"  unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_eivad_e3t"  name="strdtr_eivad" long_name="Tendency_of_salt_content_from_parameterized_eddy_advection"     unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_iso_e3t"    name="strdtr_iso"   long_name="Tendency_of_salt_content_from_parameterized_eddy_diffusion"     unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_totad_e3t"  name="strdtr_totad" long_name="Tendency_of_salt_content_from_residual_mean_advection"          unit="kg m-2 s-1" > this * $rau0  </field>
+          <field field_ref="strd_tot_e3t"    name="strdtr_tot"   long_name="Tendency_of_salt_content_from_all_processes"                    unit="kg m-2 s-1" > this * $rau0  </field>
+        </file>
+
+
+  </file_group> 
+
+
+      <file_group id="1m_opa" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files -->
+
+        <file id="file8" 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="average" 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="average" freq_op="1mo" > @soce_e3t / @e3t </field>       
+          <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                                 level="1" />
+	  <!-- diurnal cycle -->
+	  <!-- sst -->
+	  <field field_ref="sst"          name="sstdcymax"   long_name="max of sst diurnal cycle" operation="average" freq_op="1d" > @sstmax  </field>
+          <field field_ref="sst"          name="sstdcymin"   long_name="min of sst diurnal cycle" operation="average" freq_op="1d" > @sstmin </field>
+          <field field_ref="sst"          name="sstdcy"      long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > @sstmax - @sstmin </field>
+	  <!-- sss -->
+	  <field field_ref="sss"          name="sssdcymax"   long_name="max of sss diurnal cycle" operation="average" freq_op="1d" > @sssmax  </field>
+          <field field_ref="sss"          name="sssdcymin"   long_name="min of sss diurnal cycle" operation="average" freq_op="1d" > @sssmin </field>
+          <field field_ref="sss"          name="sssdcy"      long_name="amplitude of sss diurnal cycle" operation="average" freq_op="1d" > @sssmax - @sssmin </field>
+	  <!-- mld -->
+	  <field field_ref="mldr10_1"     name="mld10_1dcymax"   long_name="max of mld diurnal cycle" operation="average" freq_op="1d" > @mldr10_1max  </field>
+	  <field field_ref="mldr10_1"     name="mld10_1dcymin"   long_name="min of mld diurnal cycle" operation="average" freq_op="1d" > @mldr10_1min  </field>
+	  <field field_ref="mldr10_1"     name="mld10_1dcy"      long_name="amplitude of mld diurnal cycle" operation="average" freq_op="1d" > @mldr10_1max - @mldr10_1min  </field>
+	  <!--  -->
+          <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" />
+          <!-- 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" />
+      <!-- next variables available with key_diahth -->
+      <field field_ref="mlddzt"        level="1" />
+      <field field_ref="mldr10_3"      level="1" />
+      <field field_ref="mldr0_1"       level="1" />
+      <field field_ref="mldr0_3"       level="1" />
+      <field field_ref="mld_dt02"      level="1" />
+      <field field_ref="topthdep"      level="1" />
+      <field field_ref="pycndep"       level="1" />
+      <field field_ref="BLT"           level="1" />
+      <field field_ref="tinv"          level="1" />
+      <field field_ref="depti"         level="1" />
+      <!-- <field field_ref="20d"           level="1" /> -->
+      <!-- <field field_ref="28d"           level="1" /> -->
+      <field field_ref="hc300"         level="1" />
+      <!-- next variables are additional for PISCES offline-->
+          <field field_ref="hdiv"         name="hdivtr"   long_name="horizontal divergence transport"      operation="average" freq_op="1mo" > @hdiv * @e3t </field>
+          <field field_ref="wspd"         name="windsp"  />
+          <field field_ref="empbmr"       name="wfob"     long_name="water_flux_into_sea_water at prev time-step"    />
+          <field field_ref="fmmflx"       name="fmmflx"  />
+          <field field_ref="iceconc"      name="siconc"  />
+	  <!-- For heat conservation checking -->
+	  <field field_ref="qt_oce"        name="qt_oce"   long_name="downward total flux at ocean surface"           />
+	  <field field_ref="qemp_oce"      name="qemp_oce" long_name="Downward Heat Flux from E-P over open ocean"           />
+	  <field field_ref="qt_ice"        name="qt_ice"   long_name="downward total flux at ice surface"           />
+	  <field field_ref="qemp_ice"      name="qemp_ice" long_name="Downward Heat Flux from E-P over ice"           />
+	  <field field_ref="hflx_rain_cea" name="hflx_rain_cea"      />
+	  <field field_ref="hflx_evap_cea" name="hflx_evap_cea"      />
+	  <field field_ref="hflx_snow_cea" name="hflx_snow_cea"      />
+	  <field field_ref="hflx_cal_cea"  name="hflx_cal_cea"      />
+	  <!-- For freshwater conservation checking -->
+	  <field field_ref="empmr"         name="wfo"      long_name="water_flux_into_sea_water"                     />
+	  <field field_ref="emp_oce"       name="emp_oce"                      />
+	  <field field_ref="emp_ice"       name="emp_ice"                      />
+          <field field_ref="runoffs"       name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+	  <field field_ref="calving_cea"   name="calving" />
+      <field field_ref="iceberg_cea"   name="iceberg" />
+      <field field_ref="iceshelf_cea"  name="iceshelf" />
+	  <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="rain"          name="rain"      />
+	  <field field_ref="snow_ao_cea"   name="snow_ao_cea"      />
+	  <field field_ref="snow_ai_cea"   name="snow_ai_cea"      />
+	  <field field_ref="evap_ao_cea"   name="evap_ao_cea"      />
+	  <field field_ref="subl_ai_cea"   name="subl_ai_cea"      />
+	  <!-- For salt conservation checking -->
+          <field field_ref="saltflx"      name="sosflxdo"  />
+
+        </file>
+
+	<file id="file9" 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="average" freq_op="1mo" > @uoce_e3u / @e3u </field>
+	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+          <field field_ref="uocetr_eff"   name="uocetr_eff"  />
+          <field field_ref="ahu_bbl"       />
+      <!-- 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="file10" 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="average" freq_op="1mo" > @voce_e3v / @e3v </field>
+	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+          <field field_ref="vocetr_eff"   name="vocetr_eff"  />
+          <field field_ref="ahv_bbl"       />
+      <!-- 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="file11" 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" />
+	  <!-- avs: available with key_zdfddm -->
+	  <field field_ref="avs"          name="avs"         /> 
+	  <field field_ref="avm"              name="avm"        />
+	  <!-- avt_evd: available with ln_zdfevd -->
+	  <field field_ref="avt_evd"        name="avt_evd"  /> 
+	  <field field_ref="av_wave"      name="av_wave" /> 
+	  <field field_ref="bn2"             name="bn2"           /> 
+	  <field field_ref="wocetr_eff"   name="wocetr_eff" /> 
+	  <field field_ref="bflx_tmx"     name="bflx_tmx"   /> 
+	  <field field_ref="pcmap_tmx"    name="pcmap_tmx"  /> 
+	  <field field_ref="emix_tmx"     name="emix_tmx"   /> 	  
+	  <field field_ref="w_masstr"     name="vovematr"  />
+          <field field_ref="logavs"       name="difvsolog"  long_name="ocean_vertical_salt_diffusivity" operation="average" freq_op="1mo" > exp( @logavs ) </field>
+          <field field_ref="aht2d"        name="ahtt"   />
+          <field field_ref="aht2d_eiv"    name="aeiv"   />
+	</file>
+	
+	<file id="file33" name_suffix="_SBC" description="surface fluxes variables" > <!-- time step automaticaly defined based on nn_fsbc -->
+	  <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="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="taum"          name="taum" />
+	  <field field_ref="wspd"          name="windsp"  />
+	  <field field_ref="precip"        name="precip" />
+	  <!-- For heat conservation checking -->
+	  <field field_ref="qt_oce"        name="qt_oce"   long_name="downward total flux at ocean surface"           />
+	  <field field_ref="qemp_oce"      name="qemp_oce" long_name="Downward Heat Flux from E-P over open ocean"           />
+	  <field field_ref="qt_ice"        name="qt_ice"   long_name="downward total flux at ice surface"           />
+	  <field field_ref="qemp_ice"      name="qemp_ice" long_name="Downward Heat Flux from E-P over ice"           />
+	  <field field_ref="hflx_rain_cea" name="hflx_rain_cea"      />
+	  <field field_ref="hflx_evap_cea" name="hflx_evap_cea"      />
+	  <field field_ref="hflx_snow_cea" name="hflx_snow_cea"      />
+	  <field field_ref="hflx_cal_cea"  name="hflx_cal_cea"      />
+	  <!-- For freshwater conservation checking -->
+	  <field field_ref="empmr"         name="wfo"      long_name="water_flux_into_sea_water"                     />
+	  <field field_ref="emp_oce"       name="emp_oce"                      />
+	  <field field_ref="emp_ice"       name="emp_ice"                      />
+          <field field_ref="runoffs"       name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+	  <field field_ref="calving_cea"   name="calving" />
+      <field field_ref="iceberg_cea"   name="iceberg" />
+      <field field_ref="iceshelf_cea"  name="iceshelf" />
+	  <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="rain"          name="rain"      />
+	  <field field_ref="snow_ao_cea"   name="snow_ao_cea"      />
+	  <field field_ref="snow_ai_cea"   name="snow_ai_cea"      />
+	  <field field_ref="evap_ao_cea"   name="evap_ao_cea"      />
+	  <field field_ref="subl_ai_cea"   name="subl_ai_cea"      />
+	  <field field_ref="fmmflx"        name="fmmflx"  />
+          <field field_ref="fwfisf"        name="fwfisf"  />
+          <field field_ref="hflx_snow_ai_cea" name="hflx_snow_ai"  />
+          <field field_ref="hflx_snow_ao_cea" name="hflx_snow_ao"  />
+          <field field_ref="hflx_ice_cea"     name="hflx_ice"      />
+          <field field_ref="hflx_rnf_cea"     name="hflx_rnf"      />
+	  <!-- For salt conservation checking -->
+          <field field_ref="saltflx"      name="sosflxdo"  />
+	  <!-- ice and snow -->
+	  <field field_ref="snowpre"      />
+	  <field field_ref="utau_ice"         name="utau_ice" />
+	  <field field_ref="vtau_ice"         name="vtau_ice" />
+            <!-- sea surface restoring -->
+          <field field_ref="erp"          name="wfcorr"     long_name="surface_water_flux_correction"                      level="1" /> <!-- usually = 0 -->
+          <field field_ref="qrp"          name="hfcorr"     long_name="surface_heat_flux_correction"                       level="1" /> <!-- usually = 0 -->
+	</file>
+
+	<file id="file12" name_suffix="_scalar" description="scalar variables"  >
+
+	  <!-- Volume -->
+          <!-- global contents -->
+	  <field field_ref="voltot"       grid_ref="grid_1point"   name="scvoltot"  />
+	  <field field_ref="sshtot"       grid_ref="grid_1point"   name="scsshtot"  />
+	  <field field_ref="sshsteric"    grid_ref="grid_1point"   name="scsshste"  />
+<!--  <field field_ref="sshthster"    grid_ref="grid_1point"   name="scsshtst"  /> -->
+	  <field field_ref="masstot"      grid_ref="grid_1point"   name="scmastot"  />
+	  <field field_ref="temptot"      grid_ref="grid_1point"   name="sctemtot"  />
+	  <field field_ref="saltot"       grid_ref="grid_1point"   name="scsaltot"  />
+	  
+	  <!-- global drifts (conservation checks) -->
+	  <field field_ref="bgtemper"     grid_ref="grid_1point"   name="bgtemper"    />
+	  <field field_ref="bgsaline"     grid_ref="grid_1point"   name="bgsaline"    />
+	  <field field_ref="bgheatco"     grid_ref="grid_1point"   name="bgheatco"    />
+	  <field field_ref="bgheatfx"     grid_ref="grid_1point"   name="bgheatfx"    />
+	  <field field_ref="bgsaltco"     grid_ref="grid_1point"   name="bgsaltco"    />
+	  <field field_ref="bgvolssh"     grid_ref="grid_1point"   name="bgvolssh"    />
+	  <field field_ref="bgvole3t"     grid_ref="grid_1point"   name="bgvole3t"    />
+
+	  <!-- global surface forcings  -->
+	  <field field_ref="bgfrcvol"     grid_ref="grid_1point"   name="bgfrcvol"    />
+	  <field field_ref="bgfrctem"     grid_ref="grid_1point"   name="bgfrctem"    />
+	  <field field_ref="bgfrchfx"     grid_ref="grid_1point"   name="bgfrchfx"    />
+	  <field field_ref="bgfrcsal"     grid_ref="grid_1point"   name="bgfrcsal"    />
+
+	  <!-- Surface -->
+	  <!-- global contents -->
+          <field field_ref="ibgvol_tot"     grid_ref="grid_1point"  name="ibgvol_tot"   />
+          <field field_ref="sbgvol_tot"     grid_ref="grid_1point"  name="sbgvol_tot"   />
+          <field field_ref="ibgarea_tot"    grid_ref="grid_1point"  name="ibgarea_tot"  />
+          <field field_ref="ibgsalt_tot"    grid_ref="grid_1point"  name="ibgsalt_tot"  />
+          <field field_ref="ibgheat_tot"    grid_ref="grid_1point"  name="ibgheat_tot"  />
+          <field field_ref="sbgheat_tot"    grid_ref="grid_1point"  name="sbgheat_tot"  />
+	  
+	  <!-- global drifts (conservation checks) -->
+          <field field_ref="ibgvolume"      grid_ref="grid_1point"  name="ibgvolume"    />
+          <field field_ref="ibgsaltco"      grid_ref="grid_1point"  name="ibgsaltco"    />
+          <field field_ref="ibgheatco"      grid_ref="grid_1point"  name="ibgheatco"    />
+          <field field_ref="ibgheatfx"      grid_ref="grid_1point"  name="ibgheatfx"    />
+	  
+	  <!-- global forcings  -->
+          <field field_ref="ibgfrcvoltop"   grid_ref="grid_1point"  name="ibgfrcvoltop" />
+          <field field_ref="ibgfrcvolbot"   grid_ref="grid_1point"  name="ibgfrcvolbot" />
+          <field field_ref="ibgfrctemtop"   grid_ref="grid_1point"  name="ibgfrctemtop" />
+          <field field_ref="ibgfrctembot"   grid_ref="grid_1point"  name="ibgfrctembot" />
+          <field field_ref="ibgfrcsal"      grid_ref="grid_1point"  name="ibgfrcsal"    />
+          <field field_ref="ibgfrchfxtop"   grid_ref="grid_1point"  name="ibgfrchfxtop" />
+          <field field_ref="ibgfrchfxbot"   grid_ref="grid_1point"  name="ibgfrchfxbot" />
+	  
+        </file>
+
+	<file id="file13" name_suffix="_diaptr" description="diaptr variables" >
+	  <field field_ref="zomsfglo"          name="zomsfglo"  grid_ref="grid_ptr_W_3D" />
+          <field field_ref="zomsfatl"          name="zomsfatl"  grid_ref="grid_ptr_W_3D" />
+          <field field_ref="zomsfpac"          name="zomsfpac"  grid_ref="grid_ptr_W_3D" />
+          <field field_ref="zomsfind"          name="zomsfind"  grid_ref="grid_ptr_W_3D" />
+          <field field_ref="zomsfipc"          name="zomsfipc"  grid_ref="grid_ptr_W_3D" />
+          <field field_ref="zotemglo"          name="zotemglo"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zotematl"          name="zotematl"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zotempac"          name="zotempac"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zotemind"          name="zotemind"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zotemipc"          name="zotemipc"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosalglo"          name="zosalglo"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosalatl"          name="zosalatl"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosalpac"          name="zosalpac"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosalind"          name="zosalind"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosalipc"          name="zosalipc"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosrfglo"          name="zosrfglo"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosrfatl"          name="zosrfatl"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosrfpac"          name="zosrfpac"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosrfind"          name="zosrfind"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="zosrfipc"          name="zosrfipc"  grid_ref="grid_ptr_T_3D" />
+          <field field_ref="sophtadv"          name="sophtadv"  grid_ref="grid_ptr_T_2D" />
+          <field field_ref="sophtldf"          name="sophtldf"  grid_ref="grid_ptr_T_2D" />
+          <field field_ref="sopstadv"          name="sopstadv"  grid_ref="grid_ptr_T_2D" />
+          <field field_ref="sopstldf"          name="sopstldf"  grid_ref="grid_ptr_T_2D" />
+        </file>
+
+
+        <file id="file31" name_suffix="_trdtra" description="ocean trends variables" >
+          <field field_ref="ttrd_zdfp_e3t"   name="ttrdtr_zdfp"  long_name="Tendency_of_heat_content_from_parameterized_dianeutral_mixing"  unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_eivad_e3t"  name="ttrdtr_eivad" long_name="Tendency_of_heat_content_from_parameterized_eddy_advection"     unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_iso_e3t"    name="ttrdtr_iso"   long_name="Tendency_of_heat_content_from_parameterized_eddy_diffusion"     unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_totad_e3t"  name="ttrdtr_totad" long_name="Tendency_of_heat_content_from_residual_mean_advection"          unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_tot_e3t"    name="ttrdtr_tot"   long_name="Tendency_of_heat_content_from_all_processes"                    unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="strd_zdfp_e3t"   name="strdtr_zdfp"  long_name="Tendency_of_salt_content_from_parameterized_dianeutral_mixing"  unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_eivad_e3t"  name="strdtr_eivad" long_name="Tendency_of_salt_content_from_parameterized_eddy_advection"     unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_iso_e3t"    name="strdtr_iso"   long_name="Tendency_of_salt_content_from_parameterized_eddy_diffusion"     unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_totad_e3t"  name="strdtr_totad" long_name="Tendency_of_salt_content_from_residual_mean_advection"          unit="kg m-2 s-1" > this * $rau0  </field>
+          <field field_ref="strd_tot_e3t"    name="strdtr_tot"   long_name="Tendency_of_salt_content_from_all_processes"                    unit="kg m-2 s-1" > this * $rau0  </field>
+        </file>
+
+      </file_group>
+
+
+
+      <file_group id="2m_opa" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m_opa" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m_opa" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m_opa" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+ 
+      <file_group id="1y_opa"  output_freq="1y" output_level="10" enabled=".FALSE."> <!-- real yearly files -->
+
+
+	<file id="file14" 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="average" freq_op="1y" > @toce_e3t / @e3t </field>        
+	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                   operation="average" 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="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="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" />
+	  <!-- For heat conservation checking -->
+	  <field field_ref="qt_oce"        name="qt_oce"   long_name="downward total flux at ocean surface"           />
+	  <field field_ref="qemp_oce"      name="qemp_oce" long_name="Downward Heat Flux from E-P over open ocean"           />
+	  <field field_ref="qt_ice"        name="qt_ice"   long_name="downward total flux at ice surface"           />
+	  <field field_ref="qemp_ice"      name="qemp_ice" long_name="Downward Heat Flux from E-P over ice"           />
+	  <field field_ref="hflx_rain_cea" name="hflx_rain_cea"      />
+	  <field field_ref="hflx_evap_cea" name="hflx_evap_cea"      />
+	  <field field_ref="hflx_snow_cea" name="hflx_snow_cea"      />
+	  <field field_ref="hflx_cal_cea"  name="hflx_cal_cea"      />
+	  <!-- For freshwater conservation checking -->
+	  <field field_ref="empmr"         name="wfo"      long_name="water_flux_into_sea_water"                     />
+	  <field field_ref="emp_oce"       name="emp_oce"                      />
+	  <field field_ref="emp_ice"       name="emp_ice"                      />
+          <field field_ref="runoffs"       name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+	  <field field_ref="calving_cea"   name="calving" />
+      <field field_ref="iceberg_cea"   name="iceberg" />
+      <field field_ref="iceshelf_cea"  name="iceshelf" />
+	  <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="rain"          name="rain"      />
+	  <field field_ref="snow_ao_cea"   name="snow_ao_cea"      />
+	  <field field_ref="snow_ai_cea"   name="snow_ai_cea"      />
+	  <field field_ref="evap_ao_cea"   name="evap_ao_cea"      />
+	  <field field_ref="subl_ai_cea"   name="subl_ai_cea"      />
+	  <!-- For salt conservation checking -->
+          <field field_ref="saltflx"      name="sosflxdo"  />
+         <field field_ref="dispkevfo"  name="dispkevfo" />
+	</file>
+	
+	<file id="file15" 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="average" 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"  />
+      <field field_ref="uadv_heattr"   name="uadv_heattr" />
+      <field field_ref="udiff_heattr"  name="udiff_heattr" />
+      <field field_ref="uadv_heattr"   name="hfx" > this + udiff_heattr </field>
+	</file>
+	
+	<file id="file16" 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="average" 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"  />
+      <field field_ref="vadv_heattr"   name="vadv_heattr" />
+      <field field_ref="vdiff_heattr"  name="vdiff_heattr" />
+      <field field_ref="vadv_heattr"   name="hfy" > this + vdiff_heattr </field>
+	</file>
+	
+	<file id="file17" 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"  />
+	  <field field_ref="avt_evd"      name="avt_evd"    />
+	  <field field_ref="av_wave"      name="av_wave"    />
+	  <field field_ref="bn2"          name="bn2"        />
+	  <field field_ref="bflx_tmx"     name="bflx_tmx"   />
+	  <field field_ref="pcmap_tmx"    name="pcmap_tmx"  />
+	  <field field_ref="emix_tmx"     name="emix_tmx"   />
+	  <field field_ref="av_ratio"     name="av_ratio"   />
+	</file>
+	
+	<file id="file18" name_suffix="_diaptr" description="diaptr variables" >
+      <field field_ref="zomsf_3bsn"     name="msftyyz" > this * 1e6 * $rau0   </field>
+      <field field_ref="sophtove_3bsn"  name="htovgyre" > sopht_vt_3bsn * 1e15 - this * 1e15  </field>
+      <field field_ref="sophtove_3bsn"  name="htovovrt" > this * 1e15  </field>
+      <field field_ref="sopht_vt_3bsn"  name="hfbasin" > this * 1e15  </field>
+      <field field_ref="sophteiv_3bsn"  name="hfbasinpmadv" > this * 1e15  </field>
+	</file>   
+
+
+        <file id="file32" name_suffix="_trdtra" description="ocean trends variables" >
+          <field field_ref="ttrd_zdfp_e3t"   name="ttrdtr_zdfp"  long_name="Tendency_of_heat_content_from_parameterized_dianeutral_mixing"  unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_eivad_e3t"  name="ttrdtr_eivad" long_name="Tendency_of_heat_content_from_parameterized_eddy_advection"     unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_iso_e3t"    name="ttrdtr_iso"   long_name="Tendency_of_heat_content_from_parameterized_eddy_diffusion"     unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_totad_e3t"  name="ttrdtr_totad" long_name="Tendency_of_heat_content_from_residual_mean_advection"          unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="ttrd_tot_e3t"    name="ttrdtr_tot"   long_name="Tendency_of_heat_content_from_all_processes"                    unit="W m-2"      > this * $cpocean * $rau0  </field>
+          <field field_ref="strd_zdfp_e3t"   name="strdtr_zdfp"  long_name="Tendency_of_salt_content_from_parameterized_dianeutral_mixing"  unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_eivad_e3t"  name="strdtr_eivad" long_name="Tendency_of_salt_content_from_parameterized_eddy_advection"     unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_iso_e3t"    name="strdtr_iso"   long_name="Tendency_of_salt_content_from_parameterized_eddy_diffusion"     unit="kg m-2 s-1" > this * $rau0 </field>
+          <field field_ref="strd_totad_e3t"  name="strdtr_totad" long_name="Tendency_of_salt_content_from_residual_mean_advection"          unit="kg m-2 s-1" > this * $rau0  </field>
+          <field field_ref="strd_tot_e3t"    name="strdtr_tot"   long_name="Tendency_of_salt_content_from_all_processes"                    unit="kg m-2 s-1" > this * $rau0  </field>
+        </file>
+
+
+      </file_group>
+
+      <file_group id="2y_opa"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y_opa"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y_opa" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+    </file_definition>
+    
+
+
+

+ 223 - 0
runtime/classic/ctrl/file_def_nemo-pisces.xml

@@ -0,0 +1,223 @@
+    <!-- $id$ -->
+    
+    <!-- 
+
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files ocean biogeochemistry                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+   
+      <file_group id="1ts_pis" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+      <file_group id="1h_pis" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h_pis" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h_pis" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h_pis" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h_pis" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+      <file_group id="1d_pis" output_freq="1d"  output_level="10" enabled=".TRUE." >  <!-- 1d files -->   
+ 
+        <file id="file20" name_suffix="_bioscalar" description="pisces sms variables" >
+          <field field_ref="tdenit"   name="tdenit"   grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tnfix"    name="tnfix"    grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tcflx"    name="tcflx"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tcflxcum" name="tcflxcum" grid_ref="grid_1point" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field>
+          <field field_ref="tcexp"    name="tcexp"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tintpp"   name="tintpp"   grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="pno3tot"  name="pno3tot"  grid_ref="grid_1point" unit="umolN"  operation="instant" > pno3tot * 16. / 122. * 1e6 </field>
+          <field field_ref="ppo4tot"  name="ppo4tot"  grid_ref="grid_1point" unit="umolP"  operation="instant" > ppo4tot * 1. / 122. * 1e6 </field>
+          <field field_ref="psiltot"  name="psiltot"  grid_ref="grid_1point" unit="umolC"  operation="instant" > psiltot * 1e6  </field>
+          <field field_ref="palktot"  name="palktot"  grid_ref="grid_1point" unit="umolC"  operation="instant" > palktot * 1e6  </field>
+          <field field_ref="pfertot"  name="pfertot"  grid_ref="grid_1point" unit="nmolFe" operation="instant" > pfertot * 1e9  </field>
+        </file>
+
+      </file_group> 
+
+      <file_group id="5d_pis" output_freq="5d"  output_level="10" enabled=".TRUE."/>  <!-- 5d files -->   
+	
+      <file_group id="1m_pis" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files -->
+
+       <file id="file21" name_suffix="_ptrc_T" description="pisces sms variables" >
+          <field field_ref="DIC"       name="DIC"      operation="average" freq_op="1mo" > @DIC_E3T / @e3t </field>
+          <field field_ref="Alkalini"  name="Alkalini" operation="average" freq_op="1mo" > @Alkalini_E3T / @e3t </field>
+          <field field_ref="O2"        name="O2"       operation="average" freq_op="1mo" > @O2_E3T / @e3t </field>
+          <field field_ref="CaCO3"     name="CaCO3"    operation="average" freq_op="1mo" > @CaCO3_E3T / @e3t </field>
+          <field field_ref="PO4"       name="PO4"      operation="average" freq_op="1mo" > @PO4_E3T / @e3t </field>
+          <field field_ref="POC"       name="POC"      operation="average" freq_op="1mo" > @POC_E3T / @e3t </field>
+          <field field_ref="Si"        name="Si"       operation="average" freq_op="1mo" > @Si_E3T / @e3t </field>
+          <field field_ref="PHY"       name="PHY"      operation="average" freq_op="1mo" > @PHY_E3T / @e3t </field>
+          <field field_ref="ZOO"       name="ZOO"      operation="average" freq_op="1mo" > @ZOO_E3T / @e3t </field>
+          <field field_ref="DOC"       name="DOC"      operation="average" freq_op="1mo" > @DOC_E3T / @e3t </field>
+          <field field_ref="PHY2"      name="PHY2"     operation="average" freq_op="1mo" > @PHY2_E3T / @e3t </field>
+          <field field_ref="ZOO2"      name="ZOO2"     operation="average" freq_op="1mo" > @ZOO2_E3T / @e3t </field>
+          <field field_ref="DSi"       name="DSi"      operation="average" freq_op="1mo" > @DSi_E3T / @e3t </field>
+          <field field_ref="Fer"       name="Fer"      operation="average" freq_op="1mo" > @Fer_E3T / @e3t </field>
+          <field field_ref="BFe"       name="BFe"      operation="average" freq_op="1mo" > @BFe_E3T / @e3t </field>
+          <field field_ref="GOC"       name="GOC"      operation="average" freq_op="1mo" > @GOC_E3T / @e3t </field>
+          <field field_ref="SFe"       name="SFe"      operation="average" freq_op="1mo" > @SFe_E3T / @e3t </field>
+          <field field_ref="DFe"       name="DFe"      operation="average" freq_op="1mo" > @DFe_E3T / @e3t </field>
+          <field field_ref="GSi"       name="GSi"      operation="average" freq_op="1mo" > @GSi_E3T / @e3t </field>
+          <field field_ref="NFe"       name="NFe"      operation="average" freq_op="1mo" > @NFe_E3T / @e3t </field>
+          <field field_ref="NCHL"      name="NCHL"     operation="average" freq_op="1mo" > @NCHL_E3T / @e3t </field>
+          <field field_ref="DCHL"      name="DCHL"     operation="average" freq_op="1mo" > @DCHL_E3T / @e3t </field>
+          <field field_ref="NO3"       name="NO3"      operation="average" freq_op="1mo" > @NO3_E3T / @e3t </field>
+          <field field_ref="NH4"       name="NH4"      operation="average" freq_op="1mo" > @NH4_E3T / @e3t </field>
+    </file>
+
+   <file id="file22" name_suffix="_diad_T" description="additional pisces diagnostics" >
+        <field field_ref="PH"         name="PH" />
+        <field field_ref="CO3"        name="CO3" />
+        <field field_ref="CO3sat"     name="CO3sat" />
+        <field field_ref="PAR"        name="PAR"   />
+        <field field_ref="PCAL"       name="PCAL"   />
+        <field field_ref="Cflx"       name="Cflx"  />
+        <field field_ref="Oflx"       name="Oflx"  />
+        <field field_ref="Dpco2"      name="Dpco2"   />
+        <field field_ref="Dpo2"       name="Dpo2"   />
+        <field field_ref="Heup"      name="Heup"  />
+        <field field_ref="Irondep"   name="Irondep"  />
+        <field field_ref="Ironsed"   name="Ironsed"  />
+        <field field_ref="Nfix"      name="Nfix"  />
+        <field field_ref="LNnut"     name="LNnut"  />
+        <field field_ref="LDnut"     name="LDnut"  />
+        <field field_ref="LNFe"      name="LNFe"  />
+        <field field_ref="LDFe"      name="LDFe"  />
+        <field field_ref="LNlight"   name="LNlight"  />
+        <field field_ref="LDlight"   name="LDlight"  />
+        <field field_ref="TPP"       name="TPP"  />
+        <field field_ref="INTPP"     name="INTPP"  />
+        <field field_ref="INTPNEW"     name="INTPNEW"  />
+        <field field_ref="TPNEW"      name="TPNEW"  />
+        <field field_ref="EPC100"    name="EPC100"  />
+        <field field_ref="EPFE100"   name="EPFE100"  />
+        <field field_ref="EPSI100"   name="EPSI100"  />
+        <field field_ref="EPCAL100"  name="EPCAL100"  />
+    </file>
+
+
+      <file id="file23" name_suffix="_bioscalar" description="pisces sms variables" >
+          <field field_ref="tdenit"   name="tdenit"   grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tnfix"    name="tnfix"    grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tcflx"    name="tcflx"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tcflxcum" name="tcflxcum" grid_ref="grid_1point" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field>
+          <field field_ref="tcexp"    name="tcexp"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tintpp"   name="tintpp"   grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="pno3tot"  name="pno3tot"  grid_ref="grid_1point" unit="umolN"  operation="instant" > pno3tot * 16. / 122. * 1e6 </field>
+          <field field_ref="ppo4tot"  name="ppo4tot"  grid_ref="grid_1point" unit="umolP"  operation="instant" > ppo4tot * 1. / 122. * 1e6 </field>
+          <field field_ref="psiltot"  name="psiltot"  grid_ref="grid_1point" unit="umolC"  operation="instant" > psiltot * 1e6  </field>
+          <field field_ref="palktot"  name="palktot"  grid_ref="grid_1point" unit="umolC"  operation="instant" > palktot * 1e6  </field>
+          <field field_ref="pfertot"  name="pfertot"  grid_ref="grid_1point" unit="nmolFe" operation="instant" > pfertot * 1e9  </field>
+        </file>
+
+
+      </file_group>
+
+      <file_group id="2m_pis" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m_pis" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m_pis" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m_pis" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+
+      <file_group id="1y_pis"  output_freq="1y" output_level="10" enabled=".FALSE."> <!-- real yearly files -->
+
+ 
+       <file id="file24" name_suffix="_ptrc_T" description="pisces sms variables" >
+          <field field_ref="DIC"       name="DIC"      operation="average" freq_op="1y" > @DIC_E3T / @e3t </field>
+          <field field_ref="Alkalini"  name="Alkalini" operation="average" freq_op="1y" > @Alkalini_E3T / @e3t </field>
+          <field field_ref="O2"        name="O2"       operation="average" freq_op="1y" > @O2_E3T / @e3t </field>
+          <field field_ref="CaCO3"     name="CaCO3"    operation="average" freq_op="1y" > @CaCO3_E3T / @e3t </field>
+          <field field_ref="PO4"       name="PO4"      operation="average" freq_op="1y" > @PO4_E3T / @e3t </field>
+          <field field_ref="POC"       name="POC"      operation="average" freq_op="1y" > @POC_E3T / @e3t </field>
+          <field field_ref="Si"        name="Si"       operation="average" freq_op="1y" > @Si_E3T / @e3t </field>
+          <field field_ref="PHY"       name="PHY"      operation="average" freq_op="1y" > @PHY_E3T / @e3t </field>
+          <field field_ref="ZOO"       name="ZOO"      operation="average" freq_op="1y" > @ZOO_E3T / @e3t </field>
+          <field field_ref="DOC"       name="DOC"      operation="average" freq_op="1y" > @DOC_E3T / @e3t </field>
+          <field field_ref="PHY2"      name="PHY2"     operation="average" freq_op="1y" > @PHY2_E3T / @e3t </field>
+          <field field_ref="ZOO2"      name="ZOO2"     operation="average" freq_op="1y" > @ZOO2_E3T / @e3t </field>
+          <field field_ref="DSi"       name="DSi"      operation="average" freq_op="1y" > @DSi_E3T / @e3t </field>
+          <field field_ref="Fer"       name="Fer"      operation="average" freq_op="1y" > @Fer_E3T / @e3t </field>
+          <field field_ref="BFe"       name="BFe"      operation="average" freq_op="1y" > @BFe_E3T / @e3t </field>
+          <field field_ref="GOC"       name="GOC"      operation="average" freq_op="1y" > @GOC_E3T / @e3t </field>
+          <field field_ref="SFe"       name="SFe"      operation="average" freq_op="1y" > @SFe_E3T / @e3t </field>
+          <field field_ref="DFe"       name="DFe"      operation="average" freq_op="1y" > @DFe_E3T / @e3t </field>
+          <field field_ref="GSi"       name="GSi"      operation="average" freq_op="1y" > @GSi_E3T / @e3t </field>
+          <field field_ref="NFe"       name="NFe"      operation="average" freq_op="1y" > @NFe_E3T / @e3t </field>
+          <field field_ref="NCHL"      name="NCHL"     operation="average" freq_op="1y" > @NCHL_E3T / @e3t </field>
+          <field field_ref="DCHL"      name="DCHL"     operation="average" freq_op="1y" > @DCHL_E3T / @e3t </field>
+          <field field_ref="NO3"       name="NO3"      operation="average" freq_op="1y" > @NO3_E3T / @e3t </field>
+          <field field_ref="NH4"       name="NH4"      operation="average" freq_op="1y" > @NH4_E3T / @e3t </field>
+    </file>
+
+   <file id="file25" name_suffix="_diad_T" description="additional pisces diagnostics" >
+        <field field_ref="PH"         name="PH" />
+        <field field_ref="CO3"        name="CO3" />
+        <field field_ref="CO3sat"     name="CO3sat" />
+        <field field_ref="PAR"        name="PAR"   />
+        <field field_ref="PCAL"       name="PCAL"   />
+        <field field_ref="Cflx"       name="Cflx"  />
+        <field field_ref="Oflx"       name="Oflx"  />
+        <field field_ref="Dpco2"      name="Dpco2"   />
+        <field field_ref="Dpo2"       name="Dpo2"   />
+        <field field_ref="Heup"      name="Heup"  />
+        <field field_ref="Irondep"   name="Irondep"  />
+        <field field_ref="Ironsed"   name="Ironsed"  />
+        <field field_ref="Nfix"      name="Nfix"  />
+        <field field_ref="LNnut"     name="LNnut"  />
+        <field field_ref="LDnut"     name="LDnut"  />
+        <field field_ref="LNFe"      name="LNFe"  />
+        <field field_ref="LDFe"      name="LDFe"  />
+        <field field_ref="LNlight"   name="LNlight"  />
+        <field field_ref="LDlight"   name="LDlight"  />
+        <field field_ref="TPP"       name="TPP"  />
+        <field field_ref="INTPP"     name="INTPP"  />
+        <field field_ref="INTPNEW"     name="INTPNEW"  />
+        <field field_ref="TPNEW"      name="TPNEW"  />
+        <field field_ref="EPC100"    name="EPC100"  />
+        <field field_ref="EPFE100"   name="EPFE100"  />
+        <field field_ref="EPSI100"   name="EPSI100"  />
+        <field field_ref="EPCAL100"  name="EPCAL100"  />
+        <field field_ref="xfracal"   name="xfracal"  />
+    </file>
+
+      <file id="file26" name_suffix="_bioscalar" description="pisces sms variables" >
+          <field field_ref="tdenit"   name="tdenit"   grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tnfix"    name="tnfix"    grid_ref="grid_1point" unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tcflx"    name="tcflx"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tcflxcum" name="tcflxcum" grid_ref="grid_1point" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field>
+          <field field_ref="tcexp"    name="tcexp"    grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tintpp"   name="tintpp"   grid_ref="grid_1point" unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="pno3tot"  name="pno3tot"  grid_ref="grid_1point" unit="umolN"  operation="instant" > pno3tot * 16. / 122. * 1e6 </field>
+          <field field_ref="ppo4tot"  name="ppo4tot"  grid_ref="grid_1point" unit="umolP"  operation="instant" > ppo4tot * 1. / 122. * 1e6 </field>
+          <field field_ref="psiltot"  name="psiltot"  grid_ref="grid_1point" unit="umolC"  operation="instant" > psiltot * 1e6  </field>
+          <field field_ref="palktot"  name="palktot"  grid_ref="grid_1point" unit="umolC"  operation="instant" > palktot * 1e6  </field>
+          <field field_ref="pfertot"  name="pfertot"  grid_ref="grid_1point" unit="nmolFe" operation="instant" > pfertot * 1e9  </field>
+    </file>
+
+       <file id="file27" name_suffix="_age" description="Age Inert tracer" >
+          <field field_ref="Age"       name="Age"      operation="average" freq_op="1y" > @Age_E3T / @e3t </field>
+      </file>
+
+       <file id="file28" name_suffix="_dbio_T" description="Additional diags" >
+          <field field_ref="DICSFC_E3T"       name="DIC"      operation="average" freq_op="1y" > @DICSFC_E3T / @E3TSFC </field>
+          <field field_ref="NO3SFC_E3T"       name="NO3"      operation="average" freq_op="1y" > @NO3SFC_E3T / @E3TSFC </field>
+        <field field_ref="LNnutSFC"     name="LNnut"  />
+        <field field_ref="LDnutSFC"     name="LDnut"  />
+        <field field_ref="pCO2sea"     name="pCO2sea"  />
+        <field field_ref="INTdtAlk"     name="INTdtAlk"  />
+        <field field_ref="INTdtDIC"     name="INTdtDIC"  />
+        <field field_ref="INTdtDIN"     name="INTdtDIN"  />
+        <field field_ref="INTdtDIP"     name="INTdtDIP"  />
+        <field field_ref="INTdtFer"     name="INTdtFer"  />
+        <field field_ref="INTdtSil"     name="INTdtSil"  />
+      </file>
+
+      </file_group>
+
+      <file_group id="2y_pis"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y_pis"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y_pis" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+

+ 309 - 0
runtime/classic/ctrl/grids_def_nemo.xml

@@ -0,0 +1,309 @@
+<!--
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+ 
+    <grid_definition>    
+
+        <!--  -->
+       <grid id="grid_T_2D" >
+         <domain domain_ref="grid_T" />
+       </grid>
+        <!--  -->
+       <grid id="grid_T_3D_ncatice" >
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="ncatice" />
+       </grid>
+        <!--  -->
+       <grid id="grid_T_3D" >
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="deptht" name="olevel" />
+       </grid>
+        <!--  -->
+       <grid id="grid_U_2D" >
+         <domain domain_ref="grid_U" />
+       </grid>
+        <!--  -->
+       <grid id="grid_U_3D" >
+         <domain domain_ref="grid_U" />
+         <axis axis_ref="depthu" name="olevel" />
+       </grid>
+        <!--  -->
+       <grid id="grid_V_2D" >
+         <domain domain_ref="grid_V" />
+       </grid>
+        <!--  -->
+       <grid id="grid_V_3D" >
+         <domain domain_ref="grid_V" />
+         <axis axis_ref="depthv" name="olevel" />
+       </grid>
+        <!--  -->
+       <grid id="grid_W_2D" >
+         <domain domain_ref="grid_W" />
+       </grid>
+        <!--  -->
+       <grid id="grid_W_3D" >
+         <domain domain_ref="grid_W" />
+         <axis axis_ref="depthw" name="olevel" />
+       </grid>
+        <!--  -->
+       <grid id="grid_1point" >
+         <domain domain_ref="1point"/>
+       </grid>
+        <!--  -->
+       <grid id="grid_T_nfloat" >
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="nfloat" />
+       </grid>
+        <!--  -->
+       <grid id="grid_EqT" >
+         <domain domain_ref="EqT" />
+       </grid>
+        <!--  -->
+       <grid id="grid_znl_T_2D">
+         <domain domain_ref="gznl" />
+       </grid>
+        <!--  -->
+       <grid id="grid_znl_T_3D">
+         <domain domain_ref="gznl" />
+         <axis axis_ref="deptht" name="olevel"  />
+       </grid>
+        <!--  -->
+       <grid id="grid_znl_W_3D">
+         <domain domain_ref="gznl" />
+         <axis axis_ref="depthw" name="olevel" />
+       </grid>
+
+       <grid id="grid_ptr_T_2D">
+         <domain domain_ref="ptr" />
+       </grid>
+
+       <grid id="grid_ptr_T_3D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="deptht" name="olevel" />
+       </grid>
+
+       <grid id="grid_ptr_W_3D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="depthw" name="olevel" />
+       </grid>
+
+       <grid id="grid_ptr_T_basin_2D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="basin" />
+       </grid>
+
+       <grid id="grid_ptr_T_3basin_2D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="3basin" />
+       </grid>
+
+       <grid id="grid_znl_T_basin_2D">
+         <domain domain_ref="gznl" />
+         <axis axis_ref="basin" />
+       </grid>
+
+       <grid id="grid_ptr_W_basin_3D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="depthw" name="olevel" />
+         <axis axis_ref="basin" />
+       </grid>
+
+       <grid id="grid_ptr_W_3basin_3D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="depthw" name="olevel"  />
+         <axis axis_ref="3basin" />
+       </grid>
+
+       <grid id="grid_znl_W_basin_3D">
+         <domain domain_ref="gznl" />
+         <axis axis_ref="depthw" name="olevel"  />
+         <axis axis_ref="basin" />
+       </grid>
+
+       <grid id="grid_T_2D_SFC">
+         <domain domain_ref="grid_T" />
+         <scalar>
+           <extract_axis position="0" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_U_2D_SFC">
+         <domain domain_ref="grid_U" />
+         <scalar>
+           <extract_axis position="0" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_V_2D_SFC">
+         <domain domain_ref="grid_V" />
+         <scalar>
+           <extract_axis position="0" />
+         </scalar>
+       </grid>
+
+       <grid id="vert_sum">
+         <domain domain_ref="grid_T"/>
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="vert_sum_U">
+         <domain domain_ref="grid_U"/>
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="vert_sum_V">
+         <domain domain_ref="grid_V"/>
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+<!--
+       <grid id="cumul_U">
+         <axis axis_ref="cumul_U" n_glo="362" >
+           <reduce_domain local="true" operation="sum" direction="jDir" />
+           <reduce_axis operation="sum" />
+         </axis>
+         <axis axis_ref="depthu" />
+       </grid>
+-->
+
+
+       <grid id="zoom_300">
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="deptht300" name="olevel" />
+       </grid>
+
+       <grid id="zoom_300_sum">
+         <domain domain_ref="grid_T" />
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="zoom_700">
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="deptht700" name="olevel" />
+       </grid>
+
+       <grid id="zoom_700_sum">
+         <domain domain_ref="grid_T" />
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="zoom_2000">
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="deptht2000" name="olevel" />
+       </grid>
+
+       <grid id="zoom_2000_sum">
+         <domain domain_ref="grid_T" />
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_T_SFC">
+         <domain domain_ref="grid_T" />
+         <scalar>
+           <extract_axis position="0" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_U_2D_scalar" >
+         <domain domain_ref="grid_U" />
+         <scalar/>
+       </grid>
+
+       <grid id="grid_V_2D_scalar" >
+         <domain domain_ref="grid_V" />
+         <scalar/>
+       </grid>
+ 
+<!--
+       <grid id="grid_U_transect">
+         <domain domain_ref="grid_U" />
+         <axis axis_ref="section">
+           <duplicate_scalar/>
+         </axis>
+       </grid>
+ 
+       <grid id="grid_V_transect">
+         <domain domain_ref="grid_V" />
+         <axis axis_ref="section">
+           <duplicate_scalar/>
+         </axis>
+       </grid>
+-->
+ 
+<!--
+       <grid id="grid_U_transect_hsum">
+         <scalar >
+           <reduce_domain operation="sum" local="true"/>
+           <reduce_scalar operation="sum" />
+         </scalar>
+         <axis axis_ref="section"/>
+       </grid>
+ 
+       <grid id="grid_V_transect_hsum">
+         <scalar >
+           <reduce_domain operation="sum" local="true"/>
+           <reduce_scalar operation="sum" />
+         </scalar>
+         <axis axis_ref="section"/>
+       </grid>
+-->
+ 
+       <grid id="grid_transect">
+         <axis axis_ref="section"/>
+       </grid>
+
+<!--
+      <grid id="grid_U_transect_lim">
+        <domain domain_ref="grid_U" />
+        <axis axis_ref="section_lim">
+          <duplicate_scalar/>
+        </axis>
+      </grid>
+
+      <grid id="grid_V_transect_lim">
+        <domain domain_ref="grid_V" />
+        <axis axis_ref="section_lim">
+         <duplicate_scalar/>
+        </axis>
+      </grid>
+-->
+
+<!--
+      <grid id="grid_U_transect_lim_hsum">
+        <scalar >
+         <reduce_domain operation="sum" local="true"/>
+         <reduce_scalar operation="sum" />
+        </scalar>
+        <axis axis_ref="section_lim"/>
+      </grid>
+
+     <grid id="grid_V_transect_lim_hsum">
+        <scalar >
+         <reduce_domain operation="sum" local="true"/>
+         <reduce_scalar operation="sum" />
+        </scalar>
+        <axis axis_ref="section_lim"/>
+     </grid>
+-->
+
+     <grid id="grid_transect_lim">
+       <axis axis_ref="section_lim"/>
+     </grid>
+ 
+ 
+    </grid_definition>   
+ 

+ 301 - 0
runtime/classic/ctrl/grids_def_nemo_with_transect.xml

@@ -0,0 +1,301 @@
+<!--
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+ 
+    <grid_definition>    
+
+        <!--  -->
+       <grid id="grid_T_2D" >
+         <domain domain_ref="grid_T" />
+       </grid>
+        <!--  -->
+       <grid id="grid_T_3D_ncatice" >
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="ncatice" />
+       </grid>
+        <!--  -->
+       <grid id="grid_T_3D" >
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="deptht" name="olevel" />
+       </grid>
+        <!--  -->
+       <grid id="grid_U_2D" >
+         <domain domain_ref="grid_U" />
+       </grid>
+        <!--  -->
+       <grid id="grid_U_3D" >
+         <domain domain_ref="grid_U" />
+         <axis axis_ref="depthu" name="olevel" />
+       </grid>
+        <!--  -->
+       <grid id="grid_V_2D" >
+         <domain domain_ref="grid_V" />
+       </grid>
+        <!--  -->
+       <grid id="grid_V_3D" >
+         <domain domain_ref="grid_V" />
+         <axis axis_ref="depthv" name="olevel" />
+       </grid>
+        <!--  -->
+       <grid id="grid_W_2D" >
+         <domain domain_ref="grid_W" />
+       </grid>
+        <!--  -->
+       <grid id="grid_W_3D" >
+         <domain domain_ref="grid_W" />
+         <axis axis_ref="depthw" name="olevel" />
+       </grid>
+        <!--  -->
+       <grid id="grid_1point" >
+         <domain domain_ref="1point"/>
+       </grid>
+        <!--  -->
+       <grid id="grid_T_nfloat" >
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="nfloat" />
+       </grid>
+        <!--  -->
+       <grid id="grid_EqT" >
+         <domain domain_ref="EqT" />
+       </grid>
+        <!--  -->
+       <grid id="grid_znl_T_2D">
+         <domain domain_ref="gznl" />
+       </grid>
+        <!--  -->
+       <grid id="grid_znl_T_3D">
+         <domain domain_ref="gznl" />
+         <axis axis_ref="deptht" name="olevel"  />
+       </grid>
+        <!--  -->
+       <grid id="grid_znl_W_3D">
+         <domain domain_ref="gznl" />
+         <axis axis_ref="depthw" name="olevel" />
+       </grid>
+
+       <grid id="grid_ptr_T_2D">
+         <domain domain_ref="ptr" />
+       </grid>
+
+       <grid id="grid_ptr_T_3D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="deptht" name="olevel" />
+       </grid>
+
+       <grid id="grid_ptr_W_3D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="depthw" name="olevel" />
+       </grid>
+
+       <grid id="grid_ptr_T_basin_2D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="basin" />
+       </grid>
+
+       <grid id="grid_ptr_T_3basin_2D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="3basin" />
+       </grid>
+
+       <grid id="grid_znl_T_basin_2D">
+         <domain domain_ref="gznl" />
+         <axis axis_ref="basin" />
+       </grid>
+
+       <grid id="grid_ptr_W_basin_3D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="depthw" name="olevel" />
+         <axis axis_ref="basin" />
+       </grid>
+
+       <grid id="grid_ptr_W_3basin_3D">
+         <domain domain_ref="ptr" />
+         <axis axis_ref="depthw" name="olevel"  />
+         <axis axis_ref="3basin" />
+       </grid>
+
+       <grid id="grid_znl_W_basin_3D">
+         <domain domain_ref="gznl" />
+         <axis axis_ref="depthw" name="olevel"  />
+         <axis axis_ref="basin" />
+       </grid>
+
+       <grid id="grid_T_2D_SFC">
+         <domain domain_ref="grid_T" />
+         <scalar>
+           <extract_axis position="0" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_U_2D_SFC">
+         <domain domain_ref="grid_U" />
+         <scalar>
+           <extract_axis position="0" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_V_2D_SFC">
+         <domain domain_ref="grid_V" />
+         <scalar>
+           <extract_axis position="0" />
+         </scalar>
+       </grid>
+
+       <grid id="vert_sum">
+         <domain domain_ref="grid_T"/>
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="vert_sum_U">
+         <domain domain_ref="grid_U"/>
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="vert_sum_V">
+         <domain domain_ref="grid_V"/>
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+<!--
+       <grid id="cumul_U">
+         <axis axis_ref="cumul_U" n_glo="362" >
+           <reduce_domain local="true" operation="sum" direction="jDir" />
+           <reduce_axis operation="sum" />
+         </axis>
+         <axis axis_ref="depthu" />
+       </grid>
+-->
+
+
+       <grid id="zoom_300">
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="deptht300" name="olevel" />
+       </grid>
+
+       <grid id="zoom_300_sum">
+         <domain domain_ref="grid_T" />
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="zoom_700">
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="deptht700" name="olevel" />
+       </grid>
+
+       <grid id="zoom_700_sum">
+         <domain domain_ref="grid_T" />
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="zoom_2000">
+         <domain domain_ref="grid_T" />
+         <axis axis_ref="deptht2000" name="olevel" />
+       </grid>
+
+       <grid id="zoom_2000_sum">
+         <domain domain_ref="grid_T" />
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_T_SFC">
+         <domain domain_ref="grid_T" />
+         <scalar>
+           <extract_axis position="0" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_U_2D_scalar" >
+         <domain domain_ref="grid_U" />
+         <scalar/>
+       </grid>
+
+       <grid id="grid_V_2D_scalar" >
+         <domain domain_ref="grid_V" />
+         <scalar/>
+       </grid>
+ 
+       <grid id="grid_U_transect">
+         <domain domain_ref="grid_U" />
+         <axis axis_ref="section">
+           <duplicate_scalar/>
+         </axis>
+       </grid>
+ 
+       <grid id="grid_V_transect">
+         <domain domain_ref="grid_V" />
+         <axis axis_ref="section">
+           <duplicate_scalar/>
+         </axis>
+       </grid>
+ 
+       <grid id="grid_U_transect_hsum">
+         <scalar >
+           <reduce_domain operation="sum" local="true"/>
+           <reduce_scalar operation="sum" />
+         </scalar>
+         <axis axis_ref="section"/>
+       </grid>
+ 
+       <grid id="grid_V_transect_hsum">
+         <scalar >
+           <reduce_domain operation="sum" local="true"/>
+           <reduce_scalar operation="sum" />
+         </scalar>
+         <axis axis_ref="section"/>
+       </grid>
+ 
+       <grid id="grid_transect">
+         <axis axis_ref="section"/>
+       </grid>
+
+      <grid id="grid_U_transect_lim">
+        <domain domain_ref="grid_U" />
+        <axis axis_ref="section_lim">
+          <duplicate_scalar/>
+        </axis>
+      </grid>
+
+      <grid id="grid_V_transect_lim">
+        <domain domain_ref="grid_V" />
+        <axis axis_ref="section_lim">
+         <duplicate_scalar/>
+        </axis>
+      </grid>
+
+      <grid id="grid_U_transect_lim_hsum">
+        <scalar >
+         <reduce_domain operation="sum" local="true"/>
+         <reduce_scalar operation="sum" />
+        </scalar>
+        <axis axis_ref="section_lim"/>
+      </grid>
+
+     <grid id="grid_V_transect_lim_hsum">
+        <scalar >
+         <reduce_domain operation="sum" local="true"/>
+         <reduce_scalar operation="sum" />
+        </scalar>
+        <axis axis_ref="section_lim"/>
+     </grid>
+
+     <grid id="grid_transect_lim">
+       <axis axis_ref="section_lim"/>
+     </grid>
+ 
+ 
+    </grid_definition>   
+ 

+ 17 - 0
runtime/classic/ctrl/ifs-tuning-parameters-T159L62.sh

@@ -0,0 +1,17 @@
+# *** IFS tuning (the commented values are EC-Earth 3.2beta and IFS cy36r4)
+# *** for resolution T159L62
+# see https://dev.ec-earth.org/issues/548
+# Vegetation v29 (LPJG offline forced with ERA20C)
+#                    jvg6     ECE32b     IFS cy36r4
+
+RPRCON=1.24E-3      # 1.52e-4 1.2E-3 1.4E-3
+RVICE=0.17         # 0.126 0.13 0.15
+RLCRITSNOW=3.50E-5   # 4.2e-5 3.0E-5 5.0E-5
+RSNOWLIN2=0.035     # 0.035 0.035 0.025
+ENTRORG=1.80E-4     # 1.58e-4 1.5E-4 1.8E-4
+DETRPEN=0.85E-4     # 0.75e-4 0.75E-4 0.75E-4
+ENTRDD=3.0E-4       # 3.5e-4 3.0E-4 2.0E-4
+RMFDEPS=0.3         # 0.27 0.3 0.35
+RCLDIFF=3.E-6       # 3.6e-6 3.E-6
+RCLDIFFC=5.0        # 5.0
+RLCRIT_UPHYS=0.92e-5

+ 17 - 0
runtime/classic/ctrl/ifs-tuning-parameters-T255L91-AerChem.sh

@@ -0,0 +1,17 @@
+# *** IFS tuning (the commented values are EC-Earth 3.2beta and IFS cy36r4)
+# *** for resolution T255L91
+# Default based on the v16 LPJG vegetation dataset discussed in #449-197 (jcn4)
+# The default values are WITH 2nd indirect effect NCLOUDACT=2, NAERCLD=9
+# jvg6 is the best alternative configuration found in #449 with NCLOUDACT=0
+#                    jvg6     ECE32b     IFS cy36r4
+RPRCON=1.34E-3      # 1.52e-4  1.2E-3     1.4E-3
+RVICE=0.137         # 0.126    0.13       0.15
+RLCRITSNOW=4.0E-5   # 4.2e-5   3.0E-5     5.0E-5
+RSNOWLIN2=0.03      # 0.035    0.035      0.025
+ENTRORG=1.75E-4     # 1.58e-4  1.5E-4     1.8E-4
+DETRPEN=0.75E-4     # 0.75e-4  0.75E-4    0.75E-4
+ENTRDD=3.0E-4       # 3.5e-4   3.0E-4     2.0E-4
+RMFDEPS=0.3         # 0.27     0.3        0.35
+RCLDIFF=3.E-6       # 3.6e-6   3.E-6
+RCLDIFFC=5.0        # 5.0
+RLCRIT_UPHYS=0.875e-5

+ 17 - 0
runtime/classic/ctrl/ifs-tuning-parameters-T255L91.sh

@@ -0,0 +1,17 @@
+# *** IFS tuning (the commented values are EC-Earth 3.2beta and IFS cy36r4)
+# *** for resolution T255L91
+# Default based on the v16 LPJG vegetation dataset discussed in #449-197 (jcn4)
+# The default values are WITH 2nd indirect effect NCLOUDACT=2, NAERCLD=9
+# jvg6 is the best alternative configuration found in #449 with NCLOUDACT=0
+#                    jvg6     ECE32b     IFS cy36r4
+RPRCON=1.34E-3      # 1.52e-4  1.2E-3     1.4E-3
+RVICE=0.137         # 0.126    0.13       0.15
+RLCRITSNOW=4.0E-5   # 4.2e-5   3.0E-5     5.0E-5
+RSNOWLIN2=0.035     # 0.035    0.035      0.025
+ENTRORG=1.70E-4     # 1.58e-4  1.5E-4     1.8E-4
+DETRPEN=0.75E-4     # 0.75e-4  0.75E-4    0.75E-4
+ENTRDD=3.0E-4       # 3.5e-4   3.0E-4     2.0E-4
+RMFDEPS=0.3         # 0.27     0.3        0.35
+RCLDIFF=3.E-6       # 3.6e-6   3.E-6
+RCLDIFFC=5.0        # 5.0
+RLCRIT_UPHYS=0.875e-5

+ 23 - 0
runtime/classic/ctrl/ifs-tuning-parameters-T511L91.sh

@@ -0,0 +1,23 @@
+# *** IFS tuning (the commented values are EC-Earth 3.2beta and IFS cy36r4)
+# *** for resolution T511L91 
+
+##############################################
+# It is a copy of T255L91 tunning parameters #
+# !!!  THE T511L91 HAS NOT BEEN TUNED !!!    #
+##############################################
+
+# Default based on the v16 LPJG vegetation dataset discussed in #449-197 (jcn4)
+# The default values are WITH 2nd indirect effect NCLOUDACT=2, NAERCLD=9
+# jvg6 is the best alternative configuration found in #449 with NCLOUDACT=0
+#                    jvg6     ECE32b     IFS cy36r4
+RPRCON=1.34E-3      # 1.52e-4  1.2E-3     1.4E-3
+RVICE=0.137         # 0.126    0.13       0.15
+RLCRITSNOW=4.0E-5   # 4.2e-5   3.0E-5     5.0E-5
+RSNOWLIN2=0.035     # 0.035    0.035      0.025
+ENTRORG=1.70E-4     # 1.58e-4  1.5E-4     1.8E-4
+DETRPEN=0.75E-4     # 0.75e-4  0.75E-4    0.75E-4
+ENTRDD=3.0E-4       # 3.5e-4   3.0E-4     2.0E-4
+RMFDEPS=0.3         # 0.27     0.3        0.35
+RCLDIFF=3.E-6       # 3.6e-6   3.E-6
+RCLDIFFC=5.0        # 5.0
+RLCRIT_UPHYS=0.875e-5

+ 45 - 0
runtime/classic/ctrl/iodef.xml.sh

@@ -0,0 +1,45 @@
+# Find out if we run attached or detached (default is detached)
+has_config xios:attached && using_server=false || using_server=true
+has_config xios:detached && using_server=true
+
+# Find out if we are using OASIS and set using_oasis accordingly
+has_config oasis && using_oasis=true || using_oasis=false
+
+# Buffer allocation mode for XIOS2, either "memory" or "performance". In
+# "memory" mode, XIOS will try to use buffers as small as possible. In
+# "performance" mode, XIOS will ensure that all active fields can be buffered
+# without flushes. This is default since it allows more asynchronism and thus
+# better performance at the cost of being quite memory hungry
+optimal_buffer_size="performance"
+
+cat << EOF
+<?xml version="1.0"?>
+<simulation> 
+
+<!-- ============================================================================================ -->
+<!-- XIOS context                                                                                 -->
+<!-- ============================================================================================ -->
+
+  <context id="xios" >
+
+      <variable_definition>
+	
+	  <variable id="info_level"                type="int">5</variable>
+
+	  <variable id="using_server"              type="bool">$using_server</variable>
+	  <variable id="using_oasis"               type="bool">$using_oasis</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+
+	  <variable id="optimal_buffer_size"       type="string" >$optimal_buffer_size</variable>
+	
+      </variable_definition>
+  </context>
+
+<!-- ============================================================================================ -->
+<!-- NEMO  CONTEXT add and suppress the components you need                                       -->
+<!-- ============================================================================================ -->
+
+  <context id="nemo" src="./context_nemo.xml"/>       <!--  NEMO       -->
+
+</simulation>
+EOF

+ 174 - 0
runtime/classic/ctrl/lpjg_cmip6_output.ins

@@ -0,0 +1,174 @@
+file_baresoilFrac_yearly "baresoilFrac_yearly.out"
+file_residualFrac_yearly "residualFrac_yearly.out"
+file_cLitter_yearly "cLitter_yearly.out"
+file_cLitterLut_yearly "cLitterLut_yearly.out"
+file_cProduct_yearly "cProduct_yearly.out"
+file_cProductLut_yearly "cProductLut_yearly.out"
+file_cropFrac_yearly "cropFrac_yearly.out"
+file_cSoil_yearly "cSoil_yearly.out"
+file_cSoilLut_yearly "cSoilLut_yearly.out"
+file_cVeg_yearly "cVeg_yearly.out"
+file_cVegLut_yearly "cVegLut_yearly.out"
+file_fracInLut_yearly "fracInLut_yearly.out"
+file_fracLut_yearly "fracLut_yearly.out"
+file_fracOutLut_yearly "fracOutLut_yearly.out"
+file_grassFrac_yearly "grassFrac_yearly.out"
+file_shrubFrac_yearly "shrubFrac_yearly.out"
+file_treeFrac_yearly "treeFrac_yearly.out"
+file_cLand_monthly "cLand_monthly.out"
+file_cLitterCwd_monthly "cLitterCwd_monthly.out"
+file_cLitterSubSurf_monthly "cLitterSubSurf_monthly.out"
+file_cLitterSurf_monthly "cLitterSurf_monthly.out"
+file_cOther_monthly "cOther_monthly.out"
+file_cropFracC3_monthly "cropFracC3_monthly.out"
+file_cropFracC4_monthly "cropFracC4_monthly.out"
+file_cSoil_monthly "cSoil_monthly.out"
+file_cStem_monthly "cStem_monthly.out"
+file_cTotFireLut_monthly "cTotFireLut_monthly.out"
+file_cWood_monthly "cWood_monthly.out"
+file_evspsblpot_monthly "evspsblpot_monthly.out"
+file_fAnthDisturb_monthly "fAnthDisturb_monthly.out"
+file_fBNF_monthly "fBNF_monthly.out"
+file_fCLandToOcean_monthly "fCLandToOcean_monthly.out"
+file_fDeforestToAtmos_monthly "fDeforestToAtmos_monthly.out"
+file_fDeforestToProduct_monthly "fDeforestToProduct_monthly.out"
+file_fFireAll_monthly "fFireAll_monthly.out"
+file_fFireNat_monthly "fFireNat_monthly.out"
+file_fHarvestToAtmos_monthly "fHarvestToAtmos_monthly.out"
+file_fLitterFire_monthly "fLitterFire_monthly.out"
+file_fLuc_monthly "fLuc_monthly.out"
+file_fLulccAtmLut_monthly "fLulccAtmLut_monthly.out"
+file_fLulccProductLut_monthly "fLulccProductLut_monthly.out"
+file_fLulccResidueLut_monthly "fLulccResidueLut_monthly.out"
+file_fNAnthDisturb_monthly "fNAnthDisturb_monthly.out"
+file_fNdep_monthly "fNdep_monthly.out"
+file_fNfert_monthly "fNfert_monthly.out"
+file_fNgas_monthly "fNgas_monthly.out"
+file_fNgasFire_monthly "fNgasFire_monthly.out"
+file_fNgasNonFire_monthly "fNgasNonFire_monthly.out"
+file_fNLandToOcean_monthly "fNLandToOcean_monthly.out"
+file_fNleach_monthly "fNleach_monthly.out"
+file_fNLitterSoil_monthly "fNLitterSoil_monthly.out"
+file_fNloss_monthly "fNloss_monthly.out"
+file_fNnetmin_monthly "fNnetmin_monthly.out"
+file_fNProduct_monthly "fNProduct_monthly.out"
+file_fNup_monthly "fNup_monthly.out"
+file_fNVegLitter_monthly "fNVegLitter_monthly.out"
+file_fProductDecomp_monthly "fProductDecomp_monthly.out"
+file_fProductDecompLut_monthly "fProductDecompLut_monthly.out"
+file_fracLut_monthly "fracLut_monthly.out"
+file_fVegFire_monthly "fVegFire_monthly.out"
+file_gppGrass_monthly "gppGrass_monthly.out"
+file_gppLut_monthly "gppLut_monthly.out"
+file_gppTree_monthly "gppTree_monthly.out"
+file_grassFracC3_monthly "grassFracC3_monthly.out"
+file_grassFracC4_monthly "grassFracC4_monthly.out"
+file_irrLut_monthly "irrLut_monthly.out"
+file_laiLut_monthly "laiLut_monthly.out"
+file_mrroLut_monthly "mrroLut_monthly.out"
+file_mrsll_monthly "mrsll_monthly.out"
+file_mrsol_monthly "mrsol_monthly.out"
+file_mrsoLut_monthly "mrsoLut_monthly.out"
+file_mrsosLut_monthly "mrsosLut_monthly.out"
+file_necbLut_monthly "necbLut_monthly.out"
+file_nep_monthly "nep_monthly.out"
+file_netAtmosLandCO2Flux_monthly "netAtmosLandCO2Flux_monthly.out"
+file_nLand_monthly "nLand_monthly.out"
+file_nLeaf_monthly "nLeaf_monthly.out"
+file_nLitter_monthly "nLitter_monthly.out"
+file_nLitterCwd_monthly "nLitterCwd_monthly.out"
+file_nLitterSubSurf_monthly "nLitterSubSurf_monthly.out"
+file_nLitterSurf_monthly "nLitterSurf_monthly.out"
+file_nMineral_monthly "nMineral_monthly.out"
+file_nMineralNH4_monthly "nMineralNH4_monthly.out"
+file_nMineralNO3_monthly "nMineralNO3_monthly.out"
+file_nOther_monthly "nOther_monthly.out"
+file_nppGrass_monthly "nppGrass_monthly.out"
+file_nppLut_monthly "nppLut_monthly.out"
+file_nppTree_monthly "nppTree_monthly.out"
+file_nProduct_monthly "nProduct_monthly.out"
+file_nRoot_monthly "nRoot_monthly.out"
+file_nSoil_monthly "nSoil_monthly.out"
+file_nStem_monthly "nStem_monthly.out"
+file_nwdFracLut_monthly "nwdFracLut_monthly.out"
+file_nVeg_monthly "nVeg_monthly.out"
+file_fN2O_monthly "fN2O_monthly.out"
+file_fNOx_monthly "fNOx_monthly.out"
+file_pastureFracC3_monthly "pastureFracC3_monthly.out"
+file_pastureFracC4_monthly "pastureFracC4_monthly.out"
+file_prCrop_monthly "prCrop_monthly.out"
+file_raGrass_monthly "raGrass_monthly.out"
+file_raLeaf_monthly "raLeaf_monthly.out"
+file_raLut_monthly "raLut_monthly.out"
+file_raOther_monthly "raOther_monthly.out"
+file_raRoot_monthly "raRoot_monthly.out"
+file_raStem_monthly "raStem_monthly.out"
+file_raTree_monthly "raTree_monthly.out"
+file_rhLitter_monthly "rhLitter_monthly.out"
+file_rhLut_monthly "rhLut_monthly.out"
+file_rhSoil_monthly "rhSoil_monthly.out"
+file_treeFracBdlDcd_monthly "treeFracBdlDcd_monthly.out"
+file_treeFracBdlEvg_monthly "treeFracBdlEvg_monthly.out"
+file_treeFracNdlDcd_monthly "treeFracNdlDcd_monthly.out"
+file_treeFracNdlEvg_monthly "treeFracNdlEvg_monthly.out"
+file_vegFrac_monthly "vegFrac_monthly.out"
+file_vegHeightTree_monthly "vegHeightTree_monthly.out"
+file_baresoilFrac_monthly "baresoilFrac_monthly.out"
+file_cCwd_monthly "cCwd_monthly.out"
+file_cLeaf_monthly "cLeaf_monthly.out"
+file_cLitter_monthly "cLitter_monthly.out"
+file_cLitterAbove_monthly "cLitterAbove_monthly.out"
+file_cLitterBelow_monthly "cLitterBelow_monthly.out"
+file_cProduct_monthly "cProduct_monthly.out"
+file_cRoot_monthly "cRoot_monthly.out"
+file_cropFrac_monthly "cropFrac_monthly.out"
+file_cSoilFast_monthly "cSoilFast_monthly.out"
+file_cSoilMedium_monthly "cSoilMedium_monthly.out"
+file_cSoilSlow_monthly "cSoilSlow_monthly.out"
+file_cVeg_monthly "cVeg_monthly.out"
+file_evspsblsoi_monthly "evspsblsoi_monthly.out"
+file_evspsblveg_monthly "evspsblveg_monthly.out"
+file_evspsbl_monthly "evspsbl_monthly.out"
+file_fFire_monthly "fFire_monthly.out"
+file_fGrazing_monthly "fGrazing_monthly.out"
+file_fHarvest_monthly "fHarvest_monthly.out"
+file_fLitterSoil_monthly "fLitterSoil_monthly.out"
+file_fVegLitter_monthly "fVegLitter_monthly.out"
+file_gpp_monthly "gpp_monthly.out"
+file_grassFrac_monthly "grassFrac_monthly.out"
+file_lai_monthly "lai_monthly.out"
+file_landCoverFrac_monthly "landCoverFrac_monthly.out"
+file_mrro_monthly "mrro_monthly.out"
+file_mrros_monthly "mrros_monthly.out"
+file_mrso_monthly "mrso_monthly.out"
+file_mrsos_monthly "mrsos_monthly.out"
+file_nbp_monthly "nbp_monthly.out"
+file_npp_monthly "npp_monthly.out"
+file_pastureFrac_monthly "pastureFrac_monthly.out"
+file_prveg_monthly "prveg_monthly.out"
+file_ra_monthly "ra_monthly.out"
+file_residualFrac_monthly "residualFrac_monthly.out"
+file_rGrowth_monthly "rGrowth_monthly.out"
+file_rh_monthly "rh_monthly.out"
+file_rMaint_monthly "rMaint_monthly.out"
+file_shrubFrac_monthly "shrubFrac_monthly.out"
+file_tran_monthly "tran_monthly.out"
+file_treeFrac_monthly "treeFrac_monthly.out"
+file_tsl_monthly "tsl_monthly.out"
+file_ec_daily "ec_daily.out"
+file_et_daily "et_daily.out"
+file_evspsblpot_daily "evspsblpot_daily.out"
+file_lai_daily "lai_daily.out"
+file_mrsll_daily "mrsll_daily.out"
+file_mrso_daily "mrso_daily.out"
+file_mrsol_daily "mrsol_daily.out"
+file_mrsos_daily "mrsos_daily.out"
+file_mrro_daily "mrro_daily.out"
+file_prCrop_daily "prCrop_daily.out"
+file_tran_daily "tran_daily.out"
+file_tsl_daily "tsl_daily.out"
+file_prveg_daily "prveg_daily.out"
+file_pastureFrac_yearly  "pasturefrac_yearly.out"
+file_fVegOther_monthly  "fVegOther_monthly.out"
+file_fco2antt_monthly  "fco2antt_monthly.out"
+file_fco2nat_monthly  "fco2nat_monthly.out"

+ 1195 - 0
runtime/classic/ctrl/namcouple.sh

@@ -0,0 +1,1195 @@
+# namcouple.sh writes the OASIS3-MCT namcouple file to standard out. The
+# content of the file is based on the selected components in the $config
+# variable (function has_config)
+
+# Set coupling frequencies (in seconds) between components
+(( ${cpl_freq_atm_oce_sec:-}  )) && cpl_freq_atm_oce_sec=${cpl_freq_atm_oce_sec}
+(( ${cpl_freq_atm_ctm_hrs:-}  )) && cpl_freq_atm_ctm_sec=$(( cpl_freq_atm_ctm_hrs * 3600 ))
+(( ${cpl_freq_atm_lpjg_hrs:-} )) && cpl_freq_atm_lpjg_sec=$(( cpl_freq_atm_lpjg_hrs * 3600 ))
+cpl_freq_ccycle_sec=$(( 24 * 3600 ))
+
+# Set coupling field lags
+(( ${ifs_time_step_sec:-} )) && lag_atm_oce=${ifs_time_step_sec}
+(( ${nem_time_step_sec:-} )) && lag_oce_atm=${nem_time_step_sec}
+(( ${ifs_time_step_sec:-} )) && lag_atm_ctm=${ifs_time_step_sec}
+(( ${tm5_time_step_sec:-} )) && lag_ctm_atm=${tm5_time_step_sec}
+(( ${ifs_time_step_sec:-} )) && (( ${cpl_freq_atm_ctm_sec:-} )) && \
+    lag_atm_ctm_mid=$(( (((cpl_freq_atm_ctm_sec / ifs_time_step_sec)+1)/2 +1) * ifs_time_step_sec ))
+(( ${ifs_time_step_sec:-} )) && lag_atm_lpjg=${ifs_time_step_sec} || lag_atm_lpjg=0
+(( ${lpjg_time_step_sec:-} )) && lag_lpjg_atm=${lpjg_time_step_sec} || lag_lpjg_atm=0
+
+# Set lucia variable to produce the logs for a post processing analysis
+(( ${lucia:-} )) || lucia=''
+
+# Check consistency of model timesteps and coupling frequencies
+ck_cpl_freq(){
+    # expects to be called as: ck_cpl_freq  coupling_frequency  model_timestep
+    if (($(($1%$2))))
+    then
+        echo "*EE* model timestep $2 does not divide coupling frequency $1 " 1>&2
+        return 1
+    fi
+}
+
+if has_config ifs tm5
+then
+    ck_cpl_freq $cpl_freq_atm_ctm_sec $tm5_time_step_sec || exit 1 
+    ck_cpl_freq $cpl_freq_atm_ctm_sec $ifs_time_step_sec || exit 1 
+fi
+if has_config ifs nemo
+then
+    ck_cpl_freq $cpl_freq_atm_oce_sec $nem_time_step_sec || exit 1 
+    ck_cpl_freq $cpl_freq_atm_oce_sec $ifs_time_step_sec || exit 1 
+fi
+
+
+# Atmosphere/Land grids (note that TM5 and LPJG require IFS)
+if (( ${ifs_res_hor:-} ))
+then
+    # IFS grid point grids
+    case ${ifs_res_hor} in
+        159) atm_grid=A080
+             ;;
+        255) atm_grid=A128
+             ;;
+        511) atm_grid=A256
+             ;;
+        799) atm_grid=A400
+             ;;
+        *)   echo "*EE* Unsupported horizontal resolution (IFS): ${ifs_res_hor}" 1>&2
+             exit 1
+             ;;
+    esac
+
+    # LPJG
+    lpjg_grid=${atm_grid}
+
+    # IFS grid point grids without land-sea mask
+    atm_grid_nm=$(echo ${atm_grid} | sed 's/A/B/')
+
+    # IFS/TM5 spectral grids
+    atm_grid_sh=T${ifs_res_hor}
+    ctm_grid_sh=C${ifs_res_hor}
+
+    # TM5 grid point grids (C: no mask, L: land masked; O: ocean masked)
+    ctm_grid=CTM3
+    ctm_nx=120
+    ctm_ny=90
+    #
+    ctm_grid_sfc=CTM1
+    ctm_nx_sfc=360
+    ctm_ny_sfc=180
+fi
+
+# NEMO grids
+(( ${nem_res_hor:-} )) && case ${nem_res_hor} in
+      1) oce_grid=O1t0
+         ;;
+    025) oce_grid=Ot25
+         ;;
+    *)   echo "*EE* Unsupported horizontal resolution (NEMO): ${nem_res_hor}" 1>&2
+         exit 1
+         ;;
+esac
+
+
+# Functions expcat and explvl expand their arguments into coupling field names
+# with the appropriate extensions for categories/levels and according to the
+# syntax needed in the namcouple file.
+#
+# Usage: expcat NUM FLDA FLDB
+#        explvl NUM_START NUM_END FLDA FLDB
+#
+function expcat()
+{
+    printf  "$2.C%.3d" 1
+    [ $1 -gt 1 ] && printf ":$2.C%.3d" $(eval echo {2..$1})
+
+    printf  " $3.C%.3d" 1
+    [ $1 -gt 1 ] && printf ":$3.C%.3d" $(eval echo {2..$1})
+}
+function explvl()
+{
+    printf  "$3.L%.3d" $1
+    [ $2 -gt $1 ] && printf ":$3.L%.3d" $(eval echo {$(($1+1))..$2})
+
+    printf  " $4.L%.3d" $1
+    [ $2 -gt $1 ] && printf ":$4.L%.3d" $(eval echo {$(($1+1))..$2})
+}
+
+# Functions expfield_* split one 3D variable into \$nbundle namcouple entries.
+# They are dedicated to TM5-IFS coupling.
+# 
+# ***** MACHINE DEPENDENCY - there is an optimum number of levels you can bundle:
+# Set nbundle to \$tm5_exch_nlevs for one entry per level,
+# set it to 1 to bundle all levels into one entry.
+# The smaller nbundle is, the faster the coupling is. But if too small, the
+# model may start swapping. 
+# nbundle_cutoff is for the feedback (done with 24 of 34 levels, or all levels)
+
+if has_config tm5
+then
+    [[ ${tm5_exch_nlevs} == 34 ]] && nbundle=3 && nbundle_cutoff=2
+    [[ ${tm5_exch_nlevs} == 10 ]] && nbundle=1 && nbundle_cutoff=1
+    [[ ${tm5_exch_nlevs} == 4  ]] && nbundle=1 && nbundle_cutoff=1
+
+    nlev=${tm5_exch_nlevs:-999}
+    (( $nbundle > $nlev )) && nbundle=$nlev
+    ia=$(($nlev/$nbundle))
+    ib=$(($nlev%$nbundle))
+
+    nlev_cutoff=${tm5_exch_nlevs_cutoff:-999}
+    (( $nbundle_cutoff > $nlev_cutoff )) && nbundle_cutoff=$nlev_cutoff
+    ia_cutoff=$(($nlev_cutoff/$nbundle_cutoff))
+    ib_cutoff=$(($nlev_cutoff%$nbundle_cutoff))
+fi
+
+function expfield_sh()
+{
+    # args = ifs-var, tm5-var, CF-code, restart, header
+    for k in $(eval echo {1..$nbundle})
+    do
+        start=$(( (k-1)*ia+1 )) 
+        extra=$(( (k-1)<ib?(k-1):ib ))
+        start=$(( start+extra ))
+        end=$(( start + ia - 1 ))
+        (( ib>(k-1) )) && ((end+=1))
+        cat <<EOF
+#
+  $(explvl $start $end $1 $2) $3 ${cpl_freq_atm_ctm_sec} 1 $4 EXPORTED
+  ${atm_grid_sh} ${ctm_grid_sh} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  LOCTRANS
+   INSTANT
+EOF
+    done
+}
+
+function expfield_gg()
+{
+    # args = ifs-var, tm5-var, CF-code, restart, lag, header (not used)
+    for k in $(eval echo {1..$nbundle})
+    do
+        start=$(( (k-1)*ia+1 )) 
+        extra=$(( (k-1)<ib?(k-1):ib ))
+        start=$(( start+extra ))
+        end=$(( start + ia - 1 ))
+        (( ib>(k-1) )) && ((end+=1))
+        cat <<EOF
+#
+  $(explvl $start $end $1 $2) $3 ${cpl_freq_atm_ctm_sec} 1 $4 EXPORTED
+  ${atm_grid_nm} ${ctm_grid} LAG=$5
+  P  0  P  0
+  SCRIPR
+   GAUSWGT D SCALAR LATITUDE 90 9 2.0
+EOF
+    done
+}
+
+function expfield_gg_aver()
+{
+    # args = ifs-var, tm5-var, CF-code, restart, lag, header (not used)
+    for k in $(eval echo {1..$nbundle})
+    do
+        start=$(( (k-1)*ia+1 )) 
+        extra=$(( (k-1)<ib?(k-1):ib ))
+        start=$(( start+extra ))
+        end=$(( start + ia - 1 ))
+        (( ib>(k-1) )) && ((end+=1))
+        cat <<EOF
+#
+  $(explvl $start $end $1 $2) $3 ${cpl_freq_atm_ctm_sec} 2 $4 EXPORTED
+  ${atm_grid_nm} ${ctm_grid} LAG=$5
+  P  0  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   GAUSWGT D SCALAR LATITUDE 90 9 2.0
+EOF
+    done
+}
+
+function expfield_fbck()
+{
+    # args = tm5-var, ifs-var, CF-code, restart, lag, header (not used)
+    for k in $(eval echo {1..$nbundle})
+    do
+        start=$(( (k-1)*ia+1 )) 
+        extra=$(( (k-1)<ib?(k-1):ib ))
+        start=$(( start+extra ))
+        end=$(( start + ia - 1 ))
+        (( ib>(k-1) )) && ((end+=1))
+        cat <<EOF
+#
+  $(explvl $start $end $1 $2) $3 ${cpl_freq_atm_ctm_sec} 1 $4 EXPORTED
+  ${ctm_grid} ${atm_grid_nm} LAG=$5
+  P  0  P  0
+   SCRIPR
+   BILINEAR LR SCALAR LATITUDE 16
+EOF
+    done
+}
+
+
+function expfield_fbck_ccycle()
+{
+    # args = tm5-var, ifs-var, CF-code, restart, lag, header (not used)
+    for k in $(eval echo {1..$nbundle})
+    do
+        start=$(( (k-1)*ia+1 )) 
+        extra=$(( (k-1)<ib?(k-1):ib ))
+        start=$(( start+extra ))
+        end=$(( start + ia - 1 ))
+        (( ib>(k-1) )) && ((end+=1))
+        cat <<EOF
+#
+  $(explvl $start $end $1 $2) $3 ${cpl_freq_ccycle_sec} 1 $4 EXPORTED
+  ${ctm_grid} ${atm_grid_nm} LAG=$5
+  P  0  P  0
+   SCRIPR
+   BILINEAR LR SCALAR LATITUDE 16
+EOF
+    done
+}
+
+function expfield_fbck_cutoff()
+{
+    # args = tm5-var, ifs-var, CF-code, restart, lag, header (not used)
+    for k in $(eval echo {1..$nbundle_cutoff})
+    do
+        start=$(( (k-1)*ia_cutoff+1 ))
+        extra=$(( (k-1)<ib_cutoff?(k-1):ib_cutoff ))
+        start=$(( start+extra ))
+        end=$(( start + ia_cutoff - 1 ))
+        (( ib_cutoff>(k-1) )) && ((end+=1))
+        cat <<EOF
+#
+  $(explvl $start $end $1 $2) $3 ${cpl_freq_atm_ctm_sec} 1 $4 EXPORTED
+  ${ctm_grid} ${atm_grid_nm} LAG=$5
+  P  0  P  0
+   SCRIPR
+   BILINEAR LR SCALAR LATITUDE 16
+EOF
+    done
+}
+
+# workaround for lpjg_forcing and OSM (which replaces IFS as seen from LPJG)
+has_config lpjg_forcing && config=$config" "atm
+has_config osm && config=$config" "atm
+has_config ifs && config=$config" "atm
+
+# define output strategy for c-cycle fluxes
+[[ ${ccycle_debug_fluxes:-} == true ]] && ccycle_out_fluxes="EXPOUT" || ccycle_out_fluxes="EXPORTED"
+
+# Configure number of coupling fields
+# Note that the || : terms after the arithmetic expression is necessary to
+# prevent set -e from stopping the script depending on the outcome of the
+# expression.
+nfields=0
+
+has_config ifs nemo rnfmapper && (( nfields+=9  ))                || :
+has_config atm lpjg           && (( nfields+=20 ))                || :
+has_config ifs amip           && (( nfields+=1  ))                || :
+# ifs -> tm5
+has_config ifs tm5:co2        && (( nfields+=(12 +  8*nbundle) )) || :
+has_config ifs tm5:chem       && (( nfields+=(39 + 13*nbundle) )) || :
+# tm5 -> ifs
+has_config ifs tm5:o3fb       && (( nfields+=nbundle      ))      || :
+has_config ifs tm5:ch4fb      && (( nfields+=nbundle      ))      || :
+has_config ifs tm5:co2fb      && (( nfields+=nbundle      ))      || :
+has_config ifs tm5:aerfb      && (( nfields+=(67*nbundle_cutoff) )) || :
+# tm5 <-> lpjg
+has_config lpjg tm5:co2       && (( nfields+=2 ))                 || :
+# tm5 <-> pisces
+has_config pisces tm5:co2     && (( nfields+=2 ))                 || :
+
+# The following while loop reads the rest of this file (until the
+# END_OF_NAMCOUPLE marker) and processes any #defcfg and #enddef directives.
+# Note that the "IFS=" at the loop header is necessary to preserve leading
+# spaces. (IFS stands for Input Field Separator and has nothing to do with the
+# atmosphere model)
+#
+# The $lineout variable controls whether a particular line is send to standard
+# out. It is set to true before the loop as a default.
+#
+# Set 'set +u' is necessary because Bash here-documents (the part
+# between '<<END_OF_NAMCOUPLE' and 'END_OF_NAMCOUPLE') expands shell variables
+# and this part may contain undefined variables.
+lineout=1
+set +u
+while IFS= read line
+do
+    # Skip empty lines
+    [[ $line =~ ^[[:blank:]]*$ ]] && continue
+
+    # Process lines that start with #defcfg
+    if [[ $line =~ ^#defcfg ]]
+    then
+        # Get the config string, i.e. everything after #defcfg and before the
+        # second # character.
+        # Note the ||: at the end of the expression! It is necessary because
+        # set -e would otherwise abort the script when no comment is found.
+        cfgstring=$(expr "$line" : '^#defcfg[[:blank:]]*\([^#]*\)' || :)
+
+        # Set $lineout depending on whether has_config returns true or false
+        has_config $cfgstring && lineout=1 || lineout=0
+
+        # Get the comment, i.e. everyting starting from the second # character
+        # Note the ||: at the end of the expression!
+        comment=$(expr "$line" : '^#defcfg[^#]*[[:blank:]]*\(.*\)' || :)
+
+        # Output the comment (with the config string from defcfg added) if
+        # $lineout is true and if the comment is not empty
+        (( lineout )) && [[ -n "$comment" ]] && echo "$comment [$(echo $cfgstring)]"
+
+    # Process #enddef lines: reset $lineout
+    elif [[ $line =~ ^#enddef ]]
+    then
+        lineout=1
+
+    # Process lines that create bundles of 3D variables
+    elif [[ $line =~ ^expfield ]]
+    then
+        (( lineout )) && $line
+
+    # Process any other lines (output according to $lineout)
+    else
+        (( lineout )) && echo "$line"
+    fi
+done << END_OF_NAMCOUPLE
+# =================================================================================================
+# General OASIS configuration
+# =================================================================================================
+ \$NFIELDS
+    ${nfields}
+ \$END
+# -------------------------------------------------------------------------------------------------
+ \$RUNTIME
+    ${leg_length_sec}
+ \$END
+# -------------------------------------------------------------------------------------------------
+ \$NLOGPRT
+    0 ${lucia}
+ \$END
+# -------------------------------------------------------------------------------------------------
+ \$STRINGS
+
+#defcfg ifs nemo
+# =================================================================================================
+# Fields send from Atmosphere to Ocean
+# =================================================================================================
+#enddef
+
+#defcfg ifs nemo # --- Momentum fluxes for oce and ice on U grid ---
+  A_TauX_oce:A_TauY_oce:A_TauX_ice:A_TauY_ice O_OTaux1:O_OTauy1:O_ITaux1:O_ITauy1 1 ${cpl_freq_atm_oce_sec} 2 rstas.nc EXPORTED
+  ${atm_grid} ${oce_grid/t/u} LAG=${lag_atm_oce}
+  P  0  P  2
+  LOCTRANS SCRIPR
+   AVERAGE
+   GAUSWGT D SCALAR LATITUDE 1 9 2.0
+#enddef
+
+#defcfg ifs nemo # --- Momentum fluxes for oce and ice on V grid ---
+  A_TauX_oce:A_TauY_oce:A_TauX_ice:A_TauY_ice O_OTaux2:O_OTauy2:O_ITaux2:O_ITauy2 1 ${cpl_freq_atm_oce_sec} 2 rstas.nc EXPORTED
+  ${atm_grid} ${oce_grid/t/v} LAG=${lag_atm_oce}
+  P  0  P  2
+  LOCTRANS SCRIPR
+   AVERAGE
+   GAUSWGT D SCALAR LATITUDE 1 9 2.0
+#enddef
+
+#defcfg ifs nemo # --- Non-solar and solar radiation over ocean+ice, total evaporation, precipitation (conserved, preserved sign) ---
+  A_Qns_mix:A_Qs_mix:A_Evap_total:A_Precip_liquid:A_Precip_solid O_QnsMix:O_QsrMix:OTotEvap:OTotRain:OTotSnow 1 ${cpl_freq_atm_oce_sec} 3 rstas.nc EXPORTED
+  ${atm_grid} ${oce_grid} LAG=${lag_atm_oce}
+  P  0  P  2
+  LOCTRANS SCRIPR CONSERV
+   AVERAGE
+   GAUSWGT D SCALAR LATITUDE 1 9 2.0
+   GLBPOS opt
+#enddef
+
+#defcfg ifs nemo # --- Solar/non-solar radiation over ice, dQns/dT, evaporation over ice (not conserved) ---
+  A_Qs_ice:A_Qns_ice:A_dQns_dT:A_Evap_ice O_QsrIce:O_QnsIce:O_dQnsdT:OIceEvap 1 ${cpl_freq_atm_oce_sec} 2 rstas.nc EXPORTED
+  ${atm_grid} ${oce_grid} LAG=${lag_atm_oce}
+  P  0  P  2
+  LOCTRANS SCRIPR
+   AVERAGE
+   GAUSWGT D SCALAR LATITUDE 1 9 2.0
+#enddef
+
+#defcfg ifs rnfmapper
+# =================================================================================================
+# Fields send from Atmosphere to Runoff mapper
+# =================================================================================================
+#enddef
+
+#defcfg ifs rnfmapper # --- Runoff + Calving ---
+  A_Runoff:A_Calving R_Runoff_atm:R_Calving_atm 1 ${cpl_freq_atm_oce_sec} 3 rstas.nc EXPORTED
+  ${atm_grid/A/R} RnfA LAG=${lag_atm_oce}
+  P  0  P  0
+  LOCTRANS SCRIPR CONSERV
+   AVERAGE
+   GAUSWGT D SCALAR LATITUDE 1 9 2.0
+   GLBPOS opt
+#enddef
+
+#defcfg rnfmapper nemo
+# =================================================================================================
+# Fields send from Runoff mapper to the Ocean
+# =================================================================================================
+#enddef
+
+#defcfg rnfmapper nemo # --- Runoff ---
+  R_Runoff_oce O_Runoff 1 ${cpl_freq_atm_oce_sec} 3 rstas.nc EXPORTED
+  RnfO ${oce_grid} LAG=0
+  P  0  P  2
+  SCRIPR CONSERV BLASNEW
+   GAUSWGT LR SCALAR LATITUDE 1 9 2.0
+   GLBPOS opt
+   ${oas_mb_fluxcorr} 0
+#enddef
+
+#defcfg rnfmapper nemo # --- Calving ---
+  R_Calving_oce OCalving 1 ${cpl_freq_atm_oce_sec} 2 rstas.nc EXPORTED
+  RnfO ${oce_grid} LAG=0
+  P  0  P  2
+  SCRIPR CONSERV
+   GAUSWGT LR SCALAR LATITUDE 1 9 2.0
+   GLBPOS opt
+#enddef
+
+#defcfg ifs nemo
+# =================================================================================================
+# Fields send from Ocean to Atmosphere
+# =================================================================================================
+#enddef
+
+#defcfg ifs nemo # --- SST, ice temperature, albedo, fraction, thickness; snow thickness over ice ---
+  O_SSTSST:O_TepIce:O_AlbIce:OIceFrc:OIceTck:OSnwTck A_SST:A_Ice_temp:A_Ice_albedo:A_Ice_frac:A_Ice_thickness:A_Snow_thickness 1 ${cpl_freq_atm_oce_sec} 2 rstos.nc EXPORTED
+  ${oce_grid} ${atm_grid/A/L} LAG=${lag_oce_atm}
+  P  2  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   GAUSWGT LR SCALAR LATITUDE 1 9 2.0
+#enddef
+
+#defcfg ifs tm5
+# =================================================================================================
+# Fields send from Atmosphere to CTM
+# =================================================================================================
+#enddef
+
+#defcfg ifs tm5 # --- Surface air pressure ---
+  A_LNSP C_LNSP 348 ${cpl_freq_atm_ctm_sec}  1 r_s2d.nc EXPORTED
+  ${atm_grid_sh} ${ctm_grid_sh} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  LOCTRANS
+   INSTANT
+#enddef
+
+#defcfg ifs tm5 # --- Potential vorticity of atmosphere layer ---
+expfield_sh A_VOR C_VOR 273 r_vor.nc
+#enddef
+
+#defcfg ifs tm5 # --- Divergence of wind ---
+expfield_sh A_DIV C_DIV 168 r_div.nc
+#enddef
+
+#defcfg ifs tm5 # --- Geopotential  ---
+  A_OROG C_OROG 194 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5 # --- Surface air pressure ---
+  A_SPRES C_SPRES 33 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid} LAG=${lag_atm_ctm}
+  P  0  P  0
+  SCRIPR
+   GAUSWGT D SCALAR LATITUDE 90 9 2.0
+#enddef
+
+#defcfg ifs tm5 # --- Air temperature ---
+expfield_gg A_TMP C_TMP 110 r_tmp.nc ${lag_atm_ctm_mid} "# --------------- Field 7: Air temperature ---------------"
+#enddef
+
+#defcfg ifs tm5 # --- Relative humidity  ---
+expfield_gg A_HUM C_HUM 295 r_hum.nc ${lag_atm_ctm_mid} "# --------------- Field 8: Relative humidity  ---------------"
+#enddef
+
+#defcfg ifs tm5:chem # --- Atmosphere cloud liquid water content ---
+expfield_gg A_CLW C_CLW 119 r_clw.nc ${lag_atm_ctm_mid} "# --------------- Field 9: Atmosphere cloud liquid water content ---------------"
+#enddef
+
+#defcfg ifs tm5:chem # --- Atmosphere cloud ice content ---
+expfield_gg A_CIW C_CIW 118 r_ciw.nc ${lag_atm_ctm_mid} "# --------------- Field 10: Atmosphere cloud ice content ---------------"
+#enddef
+
+#defcfg ifs tm5:chem # --- Cloud area fraction ---
+expfield_gg A_CC  C_CC  143 r_cc_.nc ${lag_atm_ctm_mid} "# --------------- Field 11: Cloud area fraction ---------------"
+#enddef
+
+#defcfg ifs tm5:chem # --- Cloud area fraction ---
+expfield_gg A_CCO C_CCO 143 r_cco.nc ${lag_atm_ctm_mid} "# --------------- Field 12: Cloud area fraction ---------------"
+#enddef
+
+#defcfg ifs tm5:chem # --- Cloud area fraction ---
+expfield_gg A_CCU C_CCU 143 r_ccu.nc ${lag_atm_ctm_mid} "# --------------- Field 13: Cloud area fraction ---------------"
+#enddef
+
+#defcfg ifs tm5 # --- Mass transport ---
+expfield_gg_aver A_UMF C_UMF 245 r_umf.nc ${lag_atm_ctm}     "# --------------- Field 14: Untrainment ---------------"
+#enddef
+
+#defcfg ifs tm5 # --- Cloud area fraction ---
+expfield_gg_aver A_UDR C_UDR 245 r_udr.nc ${lag_atm_ctm}     "# --------------- Field 15: Untrainment ---------------"
+#enddef
+
+#defcfg ifs tm5 # --- Mass transport ---
+expfield_gg_aver A_DMF C_DMF 245 r_dmf.nc ${lag_atm_ctm}     "# --------------- Field 16: Detrainment ---------------"
+#enddef
+
+#defcfg ifs tm5 # --- Mass transport ---
+expfield_gg_aver A_DDR C_DDR 245 r_ddr.nc ${lag_atm_ctm}     "# --------------- Field 17: Detrainment ---------------"
+#enddef
+
+#defcfg ifs tm5 # --- Land Sea Mask ---
+  A_LSMSK C_LSMSK 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Surface albedo ---
+  A_ALB C_ALB 17 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5 # --- Surface roughness length ---
+  A_SR C_SR 370 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Sea ice area fraction ---
+  A_CI C_CI 44 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- SST ---
+  A_SSTChem C_SST 56 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5 # --- Wind speed at 10m ---
+  A_WSPD C_WSPD 56 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Moisture content of soil layer ---
+  A_SRC C_SRC 247 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Dew point temperature ---
+  A_D2M C_D2M 160 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Surface temperature ---
+  A_T2M C_T2M 34 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5 # --- Surface downward latent heat flux ---
+  A_SLHF C_SLHF 355 ${cpl_freq_atm_ctm_sec}  2 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm}
+  P  0  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5 # --- Surface downward sensible heat flux ---
+  A_SSHF C_SSHF 357 ${cpl_freq_atm_ctm_sec}  2 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm}
+  P  0  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5 # --- surface_downward_grid_eastward_stress ---
+  A_EWSS C_EWSS 23 ${cpl_freq_atm_ctm_sec}  2 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm}
+  P  0  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5 # --- surface_downward_grid_northward_stress ---
+  A_NSSS C_NSSS 24 ${cpl_freq_atm_ctm_sec}  2 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm}
+  P  0  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- convective_rainfall_flux ---
+  A_CP C_CP 154 ${cpl_freq_atm_ctm_sec}  2 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm}
+  P  0  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- large_scale_rainfall_flux ---
+  A_LSP C_LSP 212 ${cpl_freq_atm_ctm_sec}  2 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm}
+  P  0  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- surface_net_downward_shortwave_flux ---
+  A_SSR C_SSR 7 ${cpl_freq_atm_ctm_sec}  2 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm}
+  P  0  P  0
+  LOCTRANS SCRIPR
+   AVERAGE
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- surface_snow_amount ---
+  A_SD C_SD 373 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Mass fraction of unfrozen water in soil moisture ---
+  A_SWVL1 C_SWVL1 242 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV01 C_TV01 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV02 C_TV02 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV03 C_TV03 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV04 C_TV04 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV05 C_TV05 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV06 C_TV06 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV07 C_TV07 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV09 C_TV09 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV10 C_TV10 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV11 C_TV11 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV13 C_TV13 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV16 C_TV16 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV17 C_TV17 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV18 C_TV18 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Land area fraction ---
+  A_TV19 C_TV19 206 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- Low vegetation area fraction ---
+  A_CVL C_CVL 446 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg ifs tm5:chem # --- High vegetation area fraction ---
+  A_CVH C_CVH 446 ${cpl_freq_atm_ctm_sec}  1 r_g2d.nc EXPORTED
+  ${atm_grid_nm} ${ctm_grid_sfc} LAG=${lag_atm_ctm_mid}
+  P  0  P  0
+  SCRIPR
+   BILINEAR D SCALAR LATITUDE 90
+#enddef
+
+#defcfg any tm5:o3fb tm5:ch4fb tm5:aerfb
+# =================================================================================================
+# Fields send from CTM to Atmosphere
+# =================================================================================================
+#enddef
+
+#defcfg ifs tm5:o3fb # --- Ozone ---
+expfield_fbck C_O3 A_O3 244 o3ch4.nc ${lag_ctm_atm} "# --------------- Field 1: Ozone (O3) --------------"
+#enddef
+
+#defcfg ifs tm5:ch4fb # --- Methane ---
+expfield_fbck C_CH4 A_CH4 244 o3ch4.nc ${lag_ctm_atm} "# --------------- Field 2: Methane (CH4) --------------"
+#enddef
+
+#defcfg ifs tm5:co2fb # --- CO2 ---
+expfield_fbck_ccycle C_CO2 A_CO2 244 co2mx.nc ${lag_ctm_atm} "# --------------- Field 3: CO2 --------------"
+#enddef
+
+
+#defcfg ifs tm5:aerfb # --- Aerosols concentrations ---
+#
+# --------------- M7 tracers (25 entries) --------------
+#
+#expfield_fbck_cutoff C_N1  A_N1  244 C_N1_.nc ${lag_ctm_atm} "# --------------- N1  --------------"
+#expfield_fbck_cutoff C_SU1 A_SU1 244 C_SU1.nc ${lag_ctm_atm} "# --------------- SU1 --------------"
+expfield_fbck_cutoff C_N2  A_N2  244 C_N2_.nc ${lag_ctm_atm} "# --------------- N2  --------------"
+expfield_fbck_cutoff C_SU2 A_SU2 244 C_SU2.nc ${lag_ctm_atm} "# --------------- SU2 --------------"
+expfield_fbck_cutoff C_BC2 A_BC2 244 C_BC2.nc ${lag_ctm_atm} "# --------------- BC2 --------------"
+expfield_fbck_cutoff C_OC2 A_OM2 244 C_OC2.nc ${lag_ctm_atm} "# --------------- OC2 --------------"
+expfield_fbck_cutoff C_N3  A_N3  244 C_N3_.nc ${lag_ctm_atm} "# --------------- N3  --------------"
+expfield_fbck_cutoff C_SU3 A_SU3 244 C_SU3.nc ${lag_ctm_atm} "# --------------- SU3 --------------"
+expfield_fbck_cutoff C_BC3 A_BC3 244 C_BC3.nc ${lag_ctm_atm} "# --------------- BC3 --------------"
+expfield_fbck_cutoff C_OC3 A_OM3 244 C_OC3.nc ${lag_ctm_atm} "# --------------- OC3 --------------"
+expfield_fbck_cutoff C_SS3 A_SS3 244 C_SS3.nc ${lag_ctm_atm} "# --------------- SS3 --------------"
+expfield_fbck_cutoff C_DU3 A_DD3 244 C_DU3.nc ${lag_ctm_atm} "# --------------- DU3 --------------"
+expfield_fbck_cutoff C_N4  A_N4  244 C_N4_.nc ${lag_ctm_atm} "# --------------- N4  --------------"
+expfield_fbck_cutoff C_SU4 A_SU4 244 C_SU4.nc ${lag_ctm_atm} "# --------------- SU4 --------------"
+expfield_fbck_cutoff C_BC4 A_BC4 244 C_BC4.nc ${lag_ctm_atm} "# --------------- BC4 --------------"
+expfield_fbck_cutoff C_OC4 A_OM4 244 C_OC4.nc ${lag_ctm_atm} "# --------------- OC4 --------------"
+expfield_fbck_cutoff C_SS4 A_SS4 244 C_SS4.nc ${lag_ctm_atm} "# --------------- SS4 --------------"
+expfield_fbck_cutoff C_DU4 A_DD4 244 C_DU4.nc ${lag_ctm_atm} "# --------------- DU4 --------------"
+expfield_fbck_cutoff C_N5  A_N5  244 C_N5_.nc ${lag_ctm_atm} "# --------------- N5  --------------"
+expfield_fbck_cutoff C_BC5 A_BC5 244 C_BC5.nc ${lag_ctm_atm} "# --------------- BC5 --------------"
+expfield_fbck_cutoff C_OC5 A_OM5 244 C_OC5.nc ${lag_ctm_atm} "# --------------- OC5 --------------"
+expfield_fbck_cutoff C_N6  A_N6  244 C_N6_.nc ${lag_ctm_atm} "# --------------- N6  --------------"
+expfield_fbck_cutoff C_DU6 A_DD6 244 C_DU6.nc ${lag_ctm_atm} "# --------------- DU6 --------------"
+expfield_fbck_cutoff C_N7  A_N7  244 C_N7_.nc ${lag_ctm_atm} "# --------------- N7  --------------"
+expfield_fbck_cutoff C_DU7 A_DD7 244 C_DU7.nc ${lag_ctm_atm} "# --------------- DU7 --------------"
+expfield_fbck_cutoff C_NO3 A_NO3 244 C_NO3.nc ${lag_ctm_atm} "# --------------- NO3 --------------"
+expfield_fbck_cutoff C_MSA A_MSA 244 C_MSA.nc ${lag_ctm_atm} "# --------------- MSA --------------"
+#
+# --------------- AEROSOL OPTICAL PROPERTIES FOR THE 14 WAVELENGTHS --------------
+# ---------------  OF THE MCRAD RADIATION SCHEME (14*3 ENTRIES) --------------
+#
+expfield_fbck_cutoff C_AOD_01  A_AOD_01 244 C_AOD_01 ${lag_ctm_atm} "# ------------- AOD #1 --------------"
+expfield_fbck_cutoff C_AOD_02  A_AOD_02 244 C_AOD_02 ${lag_ctm_atm} "# ------------- AOD #2 --------------"
+expfield_fbck_cutoff C_AOD_03  A_AOD_03 244 C_AOD_03 ${lag_ctm_atm} "# ------------- AOD #3 --------------"
+expfield_fbck_cutoff C_AOD_04  A_AOD_04 244 C_AOD_04 ${lag_ctm_atm} "# ------------- AOD #4 --------------"
+expfield_fbck_cutoff C_AOD_05  A_AOD_05 244 C_AOD_05 ${lag_ctm_atm} "# ------------- AOD #5 --------------"
+expfield_fbck_cutoff C_AOD_06  A_AOD_06 244 C_AOD_06 ${lag_ctm_atm} "# ------------- AOD #6 --------------"
+expfield_fbck_cutoff C_AOD_07  A_AOD_07 244 C_AOD_07 ${lag_ctm_atm} "# ------------- AOD #7 --------------"
+expfield_fbck_cutoff C_AOD_08  A_AOD_08 244 C_AOD_08 ${lag_ctm_atm} "# ------------- AOD #8 --------------"
+expfield_fbck_cutoff C_AOD_09  A_AOD_09 244 C_AOD_09 ${lag_ctm_atm} "# ------------- AOD #9 --------------"
+expfield_fbck_cutoff C_AOD_10  A_AOD_10 244 C_AOD_10 ${lag_ctm_atm} "# ------------- AOD #10 -------------"
+expfield_fbck_cutoff C_AOD_11  A_AOD_11 244 C_AOD_11 ${lag_ctm_atm} "# ------------- AOD #11 -------------"
+expfield_fbck_cutoff C_AOD_12  A_AOD_12 244 C_AOD_12 ${lag_ctm_atm} "# ------------- AOD #12 -------------"
+expfield_fbck_cutoff C_AOD_13  A_AOD_13 244 C_AOD_13 ${lag_ctm_atm} "# ------------- AOD #13 -------------"
+expfield_fbck_cutoff C_AOD_14  A_AOD_14 244 C_AOD_14 ${lag_ctm_atm} "# ------------- AOD #14 -------------"
+expfield_fbck_cutoff C_SSA_01  A_SSA_01 244 C_SSA_01 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #1 ----"
+expfield_fbck_cutoff C_SSA_02  A_SSA_02 244 C_SSA_02 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #2 ----"
+expfield_fbck_cutoff C_SSA_03  A_SSA_03 244 C_SSA_03 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #3 ----"
+expfield_fbck_cutoff C_SSA_04  A_SSA_04 244 C_SSA_04 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #4 ----"
+expfield_fbck_cutoff C_SSA_05  A_SSA_05 244 C_SSA_05 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #5 ----"
+expfield_fbck_cutoff C_SSA_06  A_SSA_06 244 C_SSA_06 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #6 ----"
+expfield_fbck_cutoff C_SSA_07  A_SSA_07 244 C_SSA_07 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #7 ----"
+expfield_fbck_cutoff C_SSA_08  A_SSA_08 244 C_SSA_08 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #8 ----"
+expfield_fbck_cutoff C_SSA_09  A_SSA_09 244 C_SSA_09 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #9 ----"
+expfield_fbck_cutoff C_SSA_10  A_SSA_10 244 C_SSA_10 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #10 ---"
+expfield_fbck_cutoff C_SSA_11  A_SSA_11 244 C_SSA_11 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #11 ---"
+expfield_fbck_cutoff C_SSA_12  A_SSA_12 244 C_SSA_12 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #12 ---"
+expfield_fbck_cutoff C_SSA_13  A_SSA_13 244 C_SSA_13 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #13 ---"
+expfield_fbck_cutoff C_SSA_14  A_SSA_14 244 C_SSA_14 ${lag_ctm_atm} "# ----- Single-Scattering Albedo #14 ---"
+expfield_fbck_cutoff C_ASF_01  A_ASF_01 244 C_ASF_01 ${lag_ctm_atm} "# --------- Asymmetry Factor #1 --------"
+expfield_fbck_cutoff C_ASF_02  A_ASF_02 244 C_ASF_02 ${lag_ctm_atm} "# --------- Asymmetry Factor #2 --------"
+expfield_fbck_cutoff C_ASF_03  A_ASF_03 244 C_ASF_03 ${lag_ctm_atm} "# --------- Asymmetry Factor #3 --------"
+expfield_fbck_cutoff C_ASF_04  A_ASF_04 244 C_ASF_04 ${lag_ctm_atm} "# --------- Asymmetry Factor #4 --------"
+expfield_fbck_cutoff C_ASF_05  A_ASF_05 244 C_ASF_05 ${lag_ctm_atm} "# --------- Asymmetry Factor #5 --------"
+expfield_fbck_cutoff C_ASF_06  A_ASF_06 244 C_ASF_06 ${lag_ctm_atm} "# --------- Asymmetry Factor #6 --------"
+expfield_fbck_cutoff C_ASF_07  A_ASF_07 244 C_ASF_07 ${lag_ctm_atm} "# --------- Asymmetry Factor #7 --------"
+expfield_fbck_cutoff C_ASF_08  A_ASF_08 244 C_ASF_08 ${lag_ctm_atm} "# --------- Asymmetry Factor #8 --------"
+expfield_fbck_cutoff C_ASF_09  A_ASF_09 244 C_ASF_09 ${lag_ctm_atm} "# --------- Asymmetry Factor #9 --------"
+expfield_fbck_cutoff C_ASF_10  A_ASF_10 244 C_ASF_10 ${lag_ctm_atm} "# --------- Asymmetry Factor #10 -------"
+expfield_fbck_cutoff C_ASF_11  A_ASF_11 244 C_ASF_11 ${lag_ctm_atm} "# --------- Asymmetry Factor #11 -------"
+expfield_fbck_cutoff C_ASF_12  A_ASF_12 244 C_ASF_12 ${lag_ctm_atm} "# --------- Asymmetry Factor #12 -------"
+expfield_fbck_cutoff C_ASF_13  A_ASF_13 244 C_ASF_13 ${lag_ctm_atm} "# --------- Asymmetry Factor #13 -------"
+expfield_fbck_cutoff C_ASF_14  A_ASF_14 244 C_ASF_14 ${lag_ctm_atm} "# --------- Asymmetry Factor #14 -------"
+#enddef
+
+#defcfg atm lpjg
+# ====================================================================
+# Fields send from Atmosphere to LPJ-GUESS
+# ====================================================================
+#enddef
+
+#defcfg atm lpjg # --- '2m_temperature' 'K' --
+  T2MVeg T2M_LPJG 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg # --- 'Total precip' 'm_timestep-1' ---
+  TPVeg TPRE_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Mass snow' 'kg_m-2' ---
+  SDVeg SNOC_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Density snow' 'kg_m-3' ---
+  SDensVeg SNOD_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Soil T lay1' 'K' ---
+  SoilTVeg.L001 ST1L_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Soil T lay2' 'K' ---
+  SoilTVeg.L002 ST2L_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg # --- 'Soil T lay3' 'K' ---
+  SoilTVeg.L003 ST3L_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Soil T lay4' 'K' ---
+  SoilTVeg.L004 ST4L_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Soil M lay1' 'm3_m-3' ---
+  SoilMVeg.L001 SM1L_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Soil M lay2' 'm3_m-3' ---
+  SoilMVeg.L002 SM2L_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Soil M lay3' 'm3_m-3' ---
+  SoilMVeg.L003 SM3L_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'Soil M lay4' 'm3_m-3' ---
+  SoilMVeg.L004 SM4L_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'surf sol SW rad' 'J_m-2' ---
+  SSRVeg SWNR_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+#defcfg atm lpjg  # --- 'surf LW rad' 'J_m-2' ---
+  SLRVeg LWNR_LPJ 1 ${cpl_freq_atm_lpjg_sec} 1 vegin.nc EXPORTED
+  ${atm_grid} ${lpjg_grid} LAG=${lag_atm_lpjg}
+  P 0 P 0
+  LOCTRANS
+   AVERAGE
+#enddef
+
+
+#defcfg lpjg atm
+# ====================================================================
+# Fields send from LPJ-GUESS to Atmosphere
+# ====================================================================
+#enddef
+
+
+#defcfg atm lpjg  # --- 'low_LAI' 'm2_m-2' ---
+  GUE_LLAI LAILVeg 1 ${cpl_freq_atm_lpjg_sec} 1 lpjgv.nc EXPORTED
+  ${lpjg_grid} ${atm_grid} LAG=${lag_lpjg_atm}
+  P 0 P 0
+  LOCTRANS
+   INSTANT
+#enddef
+
+#defcfg atm lpjg  # --- 'high_LAI' 'm2 m-2' ---
+  GUE_HLAI LAIHVeg 1 ${cpl_freq_atm_lpjg_sec} 1 lpjgv.nc EXPORTED
+  ${lpjg_grid} ${atm_grid} LAG=${lag_lpjg_atm}
+  P 0 P 0
+  LOCTRANS
+   INSTANT
+#enddef
+
+#defcfg atm lpjg  # --- 'High Veg Type' '1-20' ---
+  GUE_TYPH TypeHVeg 1 ${cpl_freq_atm_lpjg_sec} 1 lpjgv.nc EXPORTED
+  ${lpjg_grid} ${atm_grid} LAG=${lag_lpjg_atm}
+  P 0 P 0
+  LOCTRANS
+   INSTANT
+#enddef
+
+#defcfg atm lpjg  # --- 'LPJG High Veg Frac' '0-1' ---
+  GUE_FRAH FracHVeg 1 ${cpl_freq_atm_lpjg_sec} 1 lpjgv.nc EXPORTED
+  ${lpjg_grid} ${atm_grid} LAG=${lag_lpjg_atm}
+  P 0 P 0
+  LOCTRANS
+   INSTANT
+#enddef
+
+#defcfg atm lpjg  # --- 'Low Veg Type' '1-20' ---
+  GUE_TYPL TypeLVeg 1 ${cpl_freq_atm_lpjg_sec} 1 lpjgv.nc EXPORTED
+  ${lpjg_grid} ${atm_grid} LAG=${lag_lpjg_atm}
+  P 0 P 0
+  LOCTRANS
+   INSTANT
+#enddef
+
+#defcfg atm lpjg  # --- 'LPJG Low Veg Frac' '0-1' ---
+  GUE_FRAL FracLVeg 1 ${cpl_freq_atm_lpjg_sec} 1 lpjgv.nc EXPORTED
+  ${lpjg_grid} ${atm_grid} LAG=${lag_lpjg_atm}
+  P 0 P 0
+  LOCTRANS
+   INSTANT
+#enddef
+
+
+#defcfg ifs amip
+# =================================================================================================
+# Fields send from AMIP to IFS
+# =================================================================================================
+#enddef
+
+#defcfg ifs amip # --- AMIP forcing data ---
+  AMIP_sst:AMIP_sic A_SST:A_Ice_frac 1 ${cpl_freq_amip_sec} 1 rstas.nc EXPORTED
+  AMIP ${atm_grid/A/L} LAG=0
+  P  0  P  0
+  SCRIPR
+   GAUSWGT LR SCALAR LATITUDE 1 9 2.0
+#enddef
+
+#defcfg lpjg tm5:co2
+# ====================================================================
+# Fields send from TM5-MP to LPJ-GUESS
+# ====================================================================
+#enddef
+
+#defcfg lpjg tm5:co2 # --- atmospheric CO2 concentrations (ppm - daily average/gridcell) ---
+  LCO2_TM5 CO2_LPJG 1 ${cpl_freq_ccycle_sec}  1 l_co2.nc EXPORTED
+  ${ctm_grid} ${atm_grid/A/B} LAG=${lag_ctm_atm}
+  P  0  P  0
+  SCRIPR
+   BILINEAR LR SCALAR LATITUDE 1
+#enddef
+
+#defcfg lpjg tm5:co2
+# ====================================================================
+# Fields send from LPJ-GUESS to TM5-MP
+# ====================================================================
+#enddef
+
+#defcfg lpjg tm5 # --- C fluxes (kg carbon/m2/d) ---
+  GUE_CNAT:GUE_CANT:GUE_CNPP TM5_LandCNAT:TM5_LandCANT:TM5_LandCNPP 1 ${cpl_freq_ccycle_sec}  2 rlpjg.nc ${ccycle_out_fluxes}
+  ${atm_grid/A/B} ${ctm_grid} LAG=${lag_lpjg_atm}
+  P  0  P  0
+  SCRIPR CONSERV
+   GAUSWGT D SCALAR LATITUDE 1 9 2.0
+   GLBPOS
+#enddef
+
+#defcfg pisces tm5:co2
+# ====================================================================
+# Fields send from TM5-MP to PISCES.
+#  - temporal interpolation: inst or daily mean?
+# ====================================================================
+#enddef
+
+#defcfg pisces tm5:co2 # --- atmospheric CO2 concentrations (ppm) ---
+  OCO2_TM5 O_AtmCO2 1 ${cpl_freq_ccycle_sec}  1 o_co2.nc EXPORTED
+  ${ctm_grid/C/L} ${oce_grid} LAG=${lag_ctm_atm}
+  P  0  P  2
+  SCRIPR
+   GAUSWGT LR SCALAR LATITUDE 1 9 2.0
+#enddef
+
+#defcfg pisces tm5:co2
+# ====================================================================
+# Fields send from PISCES to TM5-MP
+# ====================================================================
+#enddef
+
+#defcfg pisces tm5 # --- C fluxes (molC/m2/s) ---
+  O_CO2FLX TM5_OceCFLX 1 ${cpl_freq_ccycle_sec}  3 pisce.nc ${ccycle_out_fluxes}
+  ${oce_grid} ${ctm_grid/C/L} LAG=${lag_oce_atm}
+  P  2  P  0
+  LOCTRANS SCRIPR CONSERV
+   AVERAGE
+   GAUSWGT LR SCALAR LATITUDE 1 9 2.0
+   GLOBAL
+#enddef
+
+# -------------------------------------------------------------------------------------------------
+ \$END
+# =================================================================================================
+END_OF_NAMCOUPLE
+set -u

+ 21 - 0
runtime/classic/ctrl/namelist.amip.sh

@@ -0,0 +1,21 @@
+# flist_* can hold lists of files, separated by commas
+flist_sst=\'${ini_data_dir}/amip-forcing/tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-3_gn_187001-201706.nc\'
+flist_sic=\'${ini_data_dir}/amip-forcing/siconcbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-3_gn_187001-201706.nc\'
+
+cat << EOF
+!-----------------------------------------------------------------------
+&NAMAMIP
+!-----------------------------------------------------------------------
+    RunLengthSec = ${leg_length_sec}
+    TimeStepSec  = ${cpl_freq_amip_sec}
+    StartYear    = ${leg_start_date_yyyymmdd:0:4}
+    StartMonth   = ${leg_start_date_yyyymmdd:4:2}
+    StartDay     = ${leg_start_date_yyyymmdd:6:2}
+    FixYear      = ${ifs_cmip_fixyear}
+    FileListSST  = ${flist_sst}
+    FileListSIC  = ${flist_sic}
+    LDebug       = false
+    LInterpolate = true
+!-----------------------------------------------------------------------
+/
+EOF

+ 10 - 0
runtime/classic/ctrl/namelist.ccycle_coupling.sh

@@ -0,0 +1,10 @@
+cat << EOF
+!-----------------------------------------------------------------------
+&NAMCC_COUP
+!-----------------------------------------------------------------------
+    num_years = $(( ${leg_end_date_yyyy} - ${leg_start_date_yyyy} ))
+    start_year = ${leg_start_date_yyyy}
+    co2_ppm = ${ccycle_co2_init_ppm}
+!-----------------------------------------------------------------------
+/
+EOF

+ 125 - 0
runtime/classic/ctrl/namelist.cosp.alldiag.sh

@@ -0,0 +1,125 @@
+# Activate COSP output
+ifs_cosp_isccp=TRUE
+ifs_cosp_calipso=TRUE
+ifs_cosp_modis=TRUE
+
+cat << EOF
+! add extra output for COSP
+! Note 1: make sure to also add corresponding output request to the ppt files
+! Note 2: resolve conflicts with other PEXTRA declarations
+!         to do this, setting of NAMDPHY and NAMPHYDS has to be done elsewhere,
+!         moved out of namelist.cosp.sh
+&NAMCOSPINPUT
+  COSP_DEBUG=.FALSE.,
+  COSP_OUTPUT_FREQUENCY=$ifs_output_freq,
+  COSP_USE_VGRID=.TRUE.,
+  COSP_NCOLUMNS=50,
+  COSP_NPOINTS_IT=10000,
+  COSP_NLVGRID=40,
+  COSP_CSAT_VGRID=.TRUE.,
+  COSP_RADAR_FREQ=94.0,
+  COSP_SURFACE_RADAR=0,
+  COSP_USE_GAS_ABS=1,
+  COSP_DO_RAY=0,
+  COSP_K2=-1.0,
+  COSP_USE_MIE_TABLES=0,
+  COSP_USE_REFF=.TRUE.,
+  COSP_MELT_LAY=0,
+  COSP_EMSFC_LW=0.98, ! fraction of LW sfc em. From NOAA: possible: 0.98 or 1.0
+  COSP_NPRMTS_MAX_HYDRO=12,
+  COSP_NUMAERO=1,
+  COSP_NPRMTS_MAX_AERO=1,
+  COSP_LIDAR_ICE_TYPE=0,
+  COSP_OVERLAP=3, ! Overlap type: 1 = max, 2 = rand, 3 = max/rand
+  COSP_ISCCP_TOPHEIGHT=1,
+  COSP_ISCCP_TOPHEIGHT_DIRECTION=2,
+  COSP_USE_PRECIPITATION_FLUXES=.TRUE.,
+  ! MICROPHYSICAL SETTINGS FOR THE PRECIPITATION FLUX TO MIXING RATIO CONVERSION
+  COSP_CLOUDSAT_MICRO_SCHEME="MMF_V3_SINGLE_MOMENT",
+  ! Simulator flags
+  COSP_LRADAR_SIM=.FALSE.,
+  COSP_LLIDAR_SIM=$ifs_cosp_calipso,
+  COSP_LISCCP_SIM=$ifs_cosp_isccp,
+  COSP_LMISR_SIM=.FALSE.,
+  COSP_LMODIS_SIM=$ifs_cosp_modis,
+  COSP_LRTTOV_SIM=.FALSE.,
+/
+ ! Namelist that sets up output-related variables. It controls
+ ! the instrument simulators to run and the list of variables
+ ! to be written to file
+&NAMCOSPOUTPUT
+ ! THESE ARE PROVIDED FOR DEBUGGING OR SPECIAL PURPOSES
+ COSP_LFRACOUT=.FALSE.,
+ ! ISSCP
+ COSP_LPCTISCCP=.TRUE.,         ! ISCCP MEAN CLOUD TOP PRESSURE
+ COSP_LCLISCCP=.TRUE.,          ! ISCCP CLOUD AREA FRACTION
+ COSP_LBOXPTOPISCCP=.TRUE.,     ! ISCCP CTP IN EACH COLUMN
+ COSP_LBOXTAUISCCP=.TRUE.,      ! ISCCP OPTICAL EPTH IN EACH COLUMN
+ COSP_LTAUISCCP=.TRUE.,         ! ISCCP MEAN OPTICAL DEPTH
+ COSP_LCLTISCCP=.TRUE.,         ! ISCCP TOTAL CLOUD FRACTION
+ COSP_LMEANTBISCCP=.TRUE.,      ! ISCCP MEAN ALL-SKY 10.5MICRON BRIGHTNESS TEMP
+ COSP_LMEANTBCLRISCCP=.TRUE.,   ! ISCCP MEAN CLEAR-SKY 10.5MICRON BRIGHTNESS TEMP
+ COSP_LALBISCCP=.TRUE.,         ! ISCCP MEAN CLOUD ALBEDO
+ ! MISR
+ COSP_LCLMISR=.TRUE.,           ! MISR CLOUD FRACTION
+ ! MODIS
+ COSP_LCLTMODIS=.TRUE.,          ! MODIS TOTAL CLOUD FRACTION
+ COSP_LCLWMODIS=.TRUE.,          ! MODIS LIQUID CLOUD FRACTION
+ COSP_LCLIMODIS=.TRUE.,          ! MODIS ICE CLOUD FRACTION
+ COSP_LCLHMODIS=.FALSE.,         ! MODIS HIGH-LEVEL CLOUD FRACTION
+ COSP_LCLMMODIS=.FALSE.,         ! MODIS MID-LEVEL CLOUD FRACTION
+ COSP_LCLLMODIS=.FALSE.,         ! MODIS LOW-LEVEL CLOUD FRACTION
+ COSP_LTAUTMODIS=.FALSE.,        ! MODIS TOTAL CLOUD OPTICAL THICKNES
+ COSP_LTAUWMODIS=.FALSE.,        ! MODIS LIQUID OPTICAL THICKNESS
+ COSP_LTAUIMODIS=.FALSE.,        ! MODIS ICE OPTICAL THICKNESS
+ COSP_LTAUTLOGMODIS=.FALSE.,     ! MODIS TOTAL CLOUD OPTICAL THICKNESS (LOG10 MEAN)
+ COSP_LTAUWLOGMODIS=.FALSE.,     ! MODIS LIQUID OPTICAL THICKNESS (LOG10 MEAN)
+ COSP_LTAUILOGMODIS=.FALSE.,     ! MODIS ICE OPTICAL THICKNESS (LOG10 MEAN)
+ COSP_LREFFCLWMODIS=.FALSE.,     ! MODIS LIQUID CLOUD PARTICLE SIZE
+ COSP_LREFFCLIMODIS=.FALSE.,     ! MODIS ICE PARTICLE SIZE
+ COSP_LPCTMODIS=.FALSE.,         ! MODIS CLOUD TOP PRESSURE
+ COSP_LLWPMODIS=.FALSE.,         ! MODIS CLOUD LIQUID WATER PATH
+ COSP_LIWPMODIS=.FALSE.,         ! MODIS CLOUD ICE WATER PATH
+ COSP_LCLMODIS=.FALSE.,          ! MODIS CLOUD AREA FRACTION
+ ! CALIPSO 
+ COSP_LATB532=.FALSE.,           ! CALIPSO ATTENUATED TOTAL BACKSCATTER (532NM)
+ COSP_LLIDARBETAMOL532=.FALSE.,  ! CALIPSO MOLECULAR BACKSCATTER (532NM)
+ COSP_LCFADLIDARSR532=.FALSE.,   ! CALIPSO SCATTERING RATIO CFAD
+ COSP_LCLCALIPSO=.FALSE.,        ! CALIPSO CLOUD AREA FRACTION
+ COSP_LCLHCALIPSO=.TRUE.,       ! CALIPSO HIGH-LEVEL CLOUD FRACTION
+ COSP_LCLLCALIPSO=.TRUE.,       ! CALIPSO LOW-LEVEL CLOUD FRACTION
+ COSP_LCLMCALIPSO=.TRUE.,       ! CALIPSO MID-LEVEL CLOUD FRACTION
+ COSP_LCLTCALIPSO=.TRUE.,       ! CALIPSO TOTAL CLOUD FRACTION
+ COSP_LCLCALIPSOLIQ=.FALSE.,     ! CALIPSO LIQUID CLOUD AREA FRACTION
+ COSP_LCLCALIPSOICE=.FALSE.,     ! CALIPSO ICE CLOUD AREA FRACTION
+ COSP_LCLCALIPSOUN=.FALSE.,      ! CALIPSO UNDETECTED CLOUD AREA FRACTION
+ COSP_LCLCALIPSOTMP=.FALSE.,     ! CALIPSO UNDETECTED CLOUD AREA FRACTION
+ COSP_LCLCALIPSOTMPLIQ=.FALSE.,  ! CALIPSO LIQUID CLOUD AREA FRACTION
+ COSP_LCLCALIPSOTMPICE=.FALSE.,  ! CALIPSO ICE CLOUD AREA FRACTION
+ COSP_LCLCALIPSOTMPUN=.FALSE.,   ! CALIPSO UNDETECTED CLOUD AREA FRACTION
+ COSP_LCLTCALIPSOLIQ=.FALSE.,    ! CALIPSO LIQUID TOTAL CLOUD FRACTION
+ COSP_LCLTCALIPSOICE=.FALSE.,    ! CALIPSO ICE TOTAL CLOUD FRACTION
+ COSP_LCLTCALIPSOUN=.FALSE.,     ! CALIPSO UNDETECTED TOTAL CLOUD FRACTION
+ COSP_LCLHCALIPSOLIQ=.FALSE.,    ! CALIPSO HIGH-LEVEL LIQUID CLOUD FRACTION
+ COSP_LCLHCALIPSOICE=.FALSE.,    ! CALIPSO HIGH-LEVEL ICE CLOUD FRACTION
+ COSP_LCLHCALIPSOUN=.FALSE.,     ! CALIPSO HIGH-LEVEL UNDETECTED CLOUD FRACTION
+ COSP_LCLMCALIPSOLIQ=.FALSE.,    ! CALIPSO MID-LEVEL LIQUID CLOUD FRACTION
+ COSP_LCLMCALIPSOICE=.FALSE.,    ! CALIPSO MID-LEVEL ICE CLOUD FRACTION
+ COSP_LCLMCALIPSOUN=.FALSE.,     ! CALIPSO MID-LEVEL UNDETECTED CLOUD FRACTION
+ COSP_LCLLCALIPSOLIQ=.FALSE.,    ! CALIPSO LOW-LEVEL LIQUID CLOUD FRACTION
+ COSP_LCLLCALIPSOICE=.FALSE.,    ! CALIPSO LOW-LEVEL ICE CLOUD FRACTION
+ COSP_LCLLCALIPSOUN=.FALSE.,     ! CALIPSO LOW-LEVEL UNDETECTED CLOUD FRACTION
+ ! CLOUDSAT AND CALIPSO
+ COSP_LCLCALIPSO2=.FALSE.,      ! CALIPSO CLOUD FRACTION UNDETECTED BY CLOUDSAT
+ COSP_LCLTLIDARRADAR=.FALSE.,   ! CALIPSO-CLOUDSAT TOTAL CLOUD FRACTION
+ ! CLOUDSAT ONLY
+ COSP_LCFADDBZE94=.FALSE.,      ! CLOUDSAT RADAR REFLECTIVITY CFAD
+ COSP_LDBZE94=.FALSE.,          ! CLOUDSAT RADAR REFLECTIVITY
+ ! PARASOL
+ COSP_LPARASOLREFL=.FALSE.,     ! PARASOL REFLECTANCE
+ ! RTTOV
+ COSP_LTBRTTOV=.FALSE.,         ! RTTOV MEAN BRIGHTNESS TEMPERATURE
+ !- VARIABLES UNIQUE IN 1D (CURTAIN) MODE
+ COSP_LTOFFSET=.FALSE.,
+/
+EOF

+ 142 - 0
runtime/classic/ctrl/namelist.cosp.sh

@@ -0,0 +1,142 @@
+# Activate COSP output
+ifs_cosp_isccp=TRUE
+ifs_cosp_calipso=TRUE
+ifs_cosp_modis=TRUE
+
+cat << EOF
+! add extra output for COSP
+! Note 1: make sure to also add corresponding output request to the ppt files
+! Note 2: resolve conflicts with other PEXTRA declarations:
+!         remove the CVEXTR2 defintions if using in combination with
+!         other PEXTRA/PEXTR2 diagnostics
+&NAMDPHY
+    NVXTR2=10,
+    NCEXTR=91,
+/
+&NAMPHYDS
+    NVEXTR2GB=126040,126041,126042,126043,126044,126045,126046,126047,126048,126049,
+    CVEXTR2(1)='CALIPSO_LCC',
+    CVEXTR2(2)='CALIPSO_MCC',
+    CVEXTR2(3)='CALIPSO_HCC',
+    CVEXTR2(4)='CALIPSO_TCC',
+    CVEXTR2(5)='ISCCP_TOTALCLD',
+    CVEXTR2(6)='ISCCP_MEANPTOP',
+    CVEXTR2(7)='ISCCP_MEANALBCLD',
+    CVEXTR2(8)='MODIS CLDF_TOT',
+    CVEXTR2(9)='MODIS CLDF_WAT',
+    CVEXTR2(10)='MODIS CLDF_ICE',
+/
+&NAMCOSPINPUT
+  COSP_DEBUG=.FALSE.,
+  COSP_OUTPUT_FREQUENCY=$ifs_output_freq,
+  COSP_USE_VGRID=.TRUE.,
+  COSP_NCOLUMNS=50,
+  COSP_NPOINTS_IT=10000,
+  COSP_NLVGRID=40,
+  COSP_CSAT_VGRID=.TRUE.,
+  COSP_RADAR_FREQ=94.0,
+  COSP_SURFACE_RADAR=0,
+  COSP_USE_GAS_ABS=1,
+  COSP_DO_RAY=0,
+  COSP_K2=-1.0,
+  COSP_USE_MIE_TABLES=0,
+  COSP_USE_REFF=.TRUE.,
+  COSP_MELT_LAY=0,
+  COSP_EMSFC_LW=0.98, ! fraction of LW sfc em. From NOAA: possible: 0.98 or 1.0
+  COSP_NPRMTS_MAX_HYDRO=12,
+  COSP_NUMAERO=1,
+  COSP_NPRMTS_MAX_AERO=1,
+  COSP_LIDAR_ICE_TYPE=0,
+  COSP_OVERLAP=3, ! Overlap type: 1 = max, 2 = rand, 3 = max/rand
+  COSP_ISCCP_TOPHEIGHT=1,
+  COSP_ISCCP_TOPHEIGHT_DIRECTION=2,
+  COSP_USE_PRECIPITATION_FLUXES=.TRUE.,
+  ! MICROPHYSICAL SETTINGS FOR THE PRECIPITATION FLUX TO MIXING RATIO CONVERSION
+  COSP_CLOUDSAT_MICRO_SCHEME="MMF_V3_SINGLE_MOMENT",
+  ! Simulator flags
+  COSP_LRADAR_SIM=.FALSE.,
+  COSP_LLIDAR_SIM=$ifs_cosp_calipso,
+  COSP_LISCCP_SIM=$ifs_cosp_isccp,
+  COSP_LMISR_SIM=.FALSE.,
+  COSP_LMODIS_SIM=$ifs_cosp_modis,
+  COSP_LRTTOV_SIM=.FALSE.,
+/
+ ! Namelist that sets up output-related variables. It controls
+ ! the instrument simulators to run and the list of variables
+ ! to be written to file
+&NAMCOSPOUTPUT
+ ! THESE ARE PROVIDED FOR DEBUGGING OR SPECIAL PURPOSES
+ COSP_LFRACOUT=.FALSE.,
+ ! ISSCP
+ COSP_LPCTISCCP=.TRUE.,         ! ISCCP MEAN CLOUD TOP PRESSURE
+ COSP_LCLISCCP=.TRUE.,          ! ISCCP CLOUD AREA FRACTION
+ COSP_LBOXPTOPISCCP=.TRUE.,     ! ISCCP CTP IN EACH COLUMN
+ COSP_LBOXTAUISCCP=.TRUE.,      ! ISCCP OPTICAL EPTH IN EACH COLUMN
+ COSP_LTAUISCCP=.TRUE.,         ! ISCCP MEAN OPTICAL DEPTH
+ COSP_LCLTISCCP=.TRUE.,         ! ISCCP TOTAL CLOUD FRACTION
+ COSP_LMEANTBISCCP=.TRUE.,      ! ISCCP MEAN ALL-SKY 10.5MICRON BRIGHTNESS TEMP
+ COSP_LMEANTBCLRISCCP=.TRUE.,   ! ISCCP MEAN CLEAR-SKY 10.5MICRON BRIGHTNESS TEMP
+ COSP_LALBISCCP=.TRUE.,         ! ISCCP MEAN CLOUD ALBEDO
+ ! MISR
+ COSP_LCLMISR=.TRUE.,           ! MISR CLOUD FRACTION
+ ! MODIS
+ COSP_LCLTMODIS=.TRUE.,          ! MODIS TOTAL CLOUD FRACTION
+ COSP_LCLWMODIS=.TRUE.,          ! MODIS LIQUID CLOUD FRACTION
+ COSP_LCLIMODIS=.TRUE.,          ! MODIS ICE CLOUD FRACTION
+ COSP_LCLHMODIS=.FALSE.,         ! MODIS HIGH-LEVEL CLOUD FRACTION
+ COSP_LCLMMODIS=.FALSE.,         ! MODIS MID-LEVEL CLOUD FRACTION
+ COSP_LCLLMODIS=.FALSE.,         ! MODIS LOW-LEVEL CLOUD FRACTION
+ COSP_LTAUTMODIS=.FALSE.,        ! MODIS TOTAL CLOUD OPTICAL THICKNES
+ COSP_LTAUWMODIS=.FALSE.,        ! MODIS LIQUID OPTICAL THICKNESS
+ COSP_LTAUIMODIS=.FALSE.,        ! MODIS ICE OPTICAL THICKNESS
+ COSP_LTAUTLOGMODIS=.FALSE.,     ! MODIS TOTAL CLOUD OPTICAL THICKNESS (LOG10 MEAN)
+ COSP_LTAUWLOGMODIS=.FALSE.,     ! MODIS LIQUID OPTICAL THICKNESS (LOG10 MEAN)
+ COSP_LTAUILOGMODIS=.FALSE.,     ! MODIS ICE OPTICAL THICKNESS (LOG10 MEAN)
+ COSP_LREFFCLWMODIS=.FALSE.,     ! MODIS LIQUID CLOUD PARTICLE SIZE
+ COSP_LREFFCLIMODIS=.FALSE.,     ! MODIS ICE PARTICLE SIZE
+ COSP_LPCTMODIS=.FALSE.,         ! MODIS CLOUD TOP PRESSURE
+ COSP_LLWPMODIS=.FALSE.,         ! MODIS CLOUD LIQUID WATER PATH
+ COSP_LIWPMODIS=.FALSE.,         ! MODIS CLOUD ICE WATER PATH
+ COSP_LCLMODIS=.FALSE.,          ! MODIS CLOUD AREA FRACTION
+ ! CALIPSO 
+ COSP_LATB532=.FALSE.,           ! CALIPSO ATTENUATED TOTAL BACKSCATTER (532NM)
+ COSP_LLIDARBETAMOL532=.FALSE.,  ! CALIPSO MOLECULAR BACKSCATTER (532NM)
+ COSP_LCFADLIDARSR532=.FALSE.,   ! CALIPSO SCATTERING RATIO CFAD
+ COSP_LCLCALIPSO=.FALSE.,        ! CALIPSO CLOUD AREA FRACTION
+ COSP_LCLHCALIPSO=.TRUE.,       ! CALIPSO HIGH-LEVEL CLOUD FRACTION
+ COSP_LCLLCALIPSO=.TRUE.,       ! CALIPSO LOW-LEVEL CLOUD FRACTION
+ COSP_LCLMCALIPSO=.TRUE.,       ! CALIPSO MID-LEVEL CLOUD FRACTION
+ COSP_LCLTCALIPSO=.TRUE.,       ! CALIPSO TOTAL CLOUD FRACTION
+ COSP_LCLCALIPSOLIQ=.FALSE.,     ! CALIPSO LIQUID CLOUD AREA FRACTION
+ COSP_LCLCALIPSOICE=.FALSE.,     ! CALIPSO ICE CLOUD AREA FRACTION
+ COSP_LCLCALIPSOUN=.FALSE.,      ! CALIPSO UNDETECTED CLOUD AREA FRACTION
+ COSP_LCLCALIPSOTMP=.FALSE.,     ! CALIPSO UNDETECTED CLOUD AREA FRACTION
+ COSP_LCLCALIPSOTMPLIQ=.FALSE.,  ! CALIPSO LIQUID CLOUD AREA FRACTION
+ COSP_LCLCALIPSOTMPICE=.FALSE.,  ! CALIPSO ICE CLOUD AREA FRACTION
+ COSP_LCLCALIPSOTMPUN=.FALSE.,   ! CALIPSO UNDETECTED CLOUD AREA FRACTION
+ COSP_LCLTCALIPSOLIQ=.FALSE.,    ! CALIPSO LIQUID TOTAL CLOUD FRACTION
+ COSP_LCLTCALIPSOICE=.FALSE.,    ! CALIPSO ICE TOTAL CLOUD FRACTION
+ COSP_LCLTCALIPSOUN=.FALSE.,     ! CALIPSO UNDETECTED TOTAL CLOUD FRACTION
+ COSP_LCLHCALIPSOLIQ=.FALSE.,    ! CALIPSO HIGH-LEVEL LIQUID CLOUD FRACTION
+ COSP_LCLHCALIPSOICE=.FALSE.,    ! CALIPSO HIGH-LEVEL ICE CLOUD FRACTION
+ COSP_LCLHCALIPSOUN=.FALSE.,     ! CALIPSO HIGH-LEVEL UNDETECTED CLOUD FRACTION
+ COSP_LCLMCALIPSOLIQ=.FALSE.,    ! CALIPSO MID-LEVEL LIQUID CLOUD FRACTION
+ COSP_LCLMCALIPSOICE=.FALSE.,    ! CALIPSO MID-LEVEL ICE CLOUD FRACTION
+ COSP_LCLMCALIPSOUN=.FALSE.,     ! CALIPSO MID-LEVEL UNDETECTED CLOUD FRACTION
+ COSP_LCLLCALIPSOLIQ=.FALSE.,    ! CALIPSO LOW-LEVEL LIQUID CLOUD FRACTION
+ COSP_LCLLCALIPSOICE=.FALSE.,    ! CALIPSO LOW-LEVEL ICE CLOUD FRACTION
+ COSP_LCLLCALIPSOUN=.FALSE.,     ! CALIPSO LOW-LEVEL UNDETECTED CLOUD FRACTION
+ ! CLOUDSAT AND CALIPSO
+ COSP_LCLCALIPSO2=.FALSE.,      ! CALIPSO CLOUD FRACTION UNDETECTED BY CLOUDSAT
+ COSP_LCLTLIDARRADAR=.FALSE.,   ! CALIPSO-CLOUDSAT TOTAL CLOUD FRACTION
+ ! CLOUDSAT ONLY
+ COSP_LCFADDBZE94=.FALSE.,      ! CLOUDSAT RADAR REFLECTIVITY CFAD
+ COSP_LDBZE94=.FALSE.,          ! CLOUDSAT RADAR REFLECTIVITY
+ ! PARASOL
+ COSP_LPARASOLREFL=.FALSE.,     ! PARASOL REFLECTANCE
+ ! RTTOV
+ COSP_LTBRTTOV=.FALSE.,         ! RTTOV MEAN BRIGHTNESS TEMPERATURE
+ !- VARIABLES UNIQUE IN 1D (CURTAIN) MODE
+ COSP_LTOFFSET=.FALSE.,
+/
+EOF

+ 650 - 0
runtime/classic/ctrl/namelist.ifs-lbud23-tendencies.sh

@@ -0,0 +1,650 @@
+# namelist.ifs.sh
+
+# Set coupling frequencies for ocean and chemistry coupling
+(( ${cpl_freq_atm_oce_sec:-} )) && NFRCO=$(( cpl_freq_atm_oce_sec / ifs_time_step_sec )) || NFRCO=0
+(( ${cpl_freq_atm_ctm_hrs:-} )) && NFRCO_CHEM=$(( cpl_freq_atm_ctm_hrs * 3600 / ifs_time_step_sec )) || NFRCO_CHEM=0
+(( ${cpl_freq_atm_lpjg_hrs:-} )) && NFRCO_VEG=$(( cpl_freq_atm_lpjg_hrs * 3600 / ifs_time_step_sec )) || NFRCO_VEG=0
+
+# Activate warm ocean parametrisation only in AMIP runs
+(( ${cpl_freq_amip_sec:-} )) && LEOCWA=TRUE || LEOCWA=FALSE
+
+# Switch on/off TM5 feedback to IFS, and between CO2-only and full-chemistry TM5 configs 
+has_config tm5:o3fb  && LTM5O3=TRUE  || LTM5O3=FALSE
+has_config tm5:ch4fb && LTM5CH4=TRUE || LTM5CH4=FALSE
+has_config tm5:aerfb && LTM5AER=TRUE || LTM5AER=FALSE
+has_config tm5:co2   && LTM5CO2=TRUE || LTM5CO2=FALSE
+has_config tm5:co2fb && LTM5CO2FB=TRUE || LTM5CO2FB=FALSE
+NLEV_TM5=${tm5_exch_nlevs:-999}
+
+# Switch on/off SPPT and set the ensemble member number (defaults to zero)
+has_config sppt && LSPSDT=TRUE || LSPSDT=FALSE
+has_config sppt && LFIXSPPT=TRUE || LFIXSPPT=FALSE
+NENSFNB=${ifs_ensemble_forecast_number:-0}
+
+# Switch on/off LPJ-GUESS feedback to IFS
+(( ${lpjg_on:-}   )) && LLPJGON=TRUE  || LLPJGON=FALSE
+(( ${lpjg_fdbck:-}  )) && LLPJGFBON=TRUE || LLPJGFBON=FALSE
+
+# Switch on/off atmospheric nudging
+has_config atmnudg && LRLXG=TRUE || LRLXG=FALSE
+
+
+cat << EOF
+&NAMRES
+    NFRRES         = 1,
+    NRESTS         = -1,-$(( leg_end_sec / 3600 )),
+/
+&NAERAD
+    NRPROMA        = 0,
+    LCMIP6         = ${ifs_cmip6},
+    SSPNAME        = ${ifs_cmip6_scenario},
+    LSSP370_LOWCH4 = FALSE,
+    CMIP6DATADIR   = "${ini_data_dir}/ifs/cmip6-data/",
+    LA4xCO2        = ${ifs_A4xCO2},
+    L1PCTCO2       = ${ifs_1PCTCO2},
+    LCMIP5         = ${ifs_cmip5},
+    CMIP5DATADIR   = "${ini_data_dir}/ifs/cmip5-data",
+    NCMIPFIXYR     = ${ifs_cmip_fixyear},
+    NCMIPFIXYR_CH4 = ${ifs_cmip_fixyear_ch4},
+    NRCP           = ${ifs_cmip5_rcp},
+    LHVOLCA        = TRUE,
+    LTM5O3         = ${LTM5O3},
+    LTM5CH4        = ${LTM5CH4},
+    LTM5CO2FB      = ${LTM5CO2FB},
+    LTM5AER        = ${LTM5AER},
+    LLPJGON        = ${LLPJGON},
+    LLPJGFBON      = ${LLPJGFBON},
+    LCMIP6_PI_AEROSOLS = ${ifs_cmip6piaer},
+    LCMIP6_STRATAER_SIMP = ${lcmip6_strataer_simp},
+    LCMIP6_STRATAER_BCKGD = ${lcmip6_strataer_bckgd},
+    LCMIP6_STRATAER_FULL = ${lcmip6_strataer_full},
+    CCMIP6_STRAT_SIMP  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_total_AOD_masked_troposphere_mean_3.0.0.txt",
+    CCMIP6_STRAT_FULL  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_EC_EARTH_aerosol_radiation_2D_3.0.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_OPT      = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_opt_v4.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_CONC     = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_conc_v4.0_L${ifs_res_ver}.nc",
+    LMAC2SP            = ${ifs_mac2sp},
+    MAC2SPDIR          = "${ini_data_dir}/ifs/macv2sp-data/",
+    LMAC2SPACI         = TRUE,
+/
+&NAEPHY
+    LBUD23         = TRUE,
+    LEPHYS         = TRUE,
+    LEVDIF         = TRUE,
+    LESURF         = TRUE,
+    LECOND         = TRUE,
+    LECUMF         = TRUE,
+    LEPCLD         = TRUE,
+    LEEVAP         = TRUE,
+    LEVGEN         = TRUE,
+    LESSRO         = TRUE,
+    LECURR         = FALSE,
+    LEGWDG         = TRUE,
+    LEGWWMS        = TRUE,
+    LEOCWA         = ${LEOCWA},
+    LEOZOC         = TRUE,
+    LEQNGT         = TRUE,
+    LERADI         = TRUE,
+    LERADS         = TRUE,
+    LESICE         = TRUE,
+    LEO3CH         = FALSE,
+    LEDCLD         = TRUE,
+    LDUCTDIA       = FALSE,
+    LWCOU          = FALSE,
+    LWCOU2W        = TRUE,
+    NSTPW          = 1,
+    RDEGREW        = 1.5,
+    RSOUTW         = -81.0,
+    RNORTW         = 81.0,
+    N_COMPUTE_EFF_VEG_FRACTION = $n_compute_eff_veg_fraction
+/
+&NAMPAR1
+    LSPLIT         = TRUE,
+    NFLDIN         = 0,
+    NFLDOUT        = 50,
+    NSTRIN         = 1,
+/
+&NAMPAR0
+    LSTATS         = TRUE,
+    LDETAILED_STATS= FALSE,
+    LSYNCSTATS     = FALSE,
+    LSTATSCPU      = FALSE,
+    NPRNT_STATS    = 32,
+    LBARRIER_STATS = FALSE,
+    LBARRIER_STATS2= FALSE,
+    NPROC          = ${ifs_numproc},
+EOF
+
+# enforce layout for passing spectral fields to TM
+has_config tm5 &&
+cat << EOF
+    NPRTRW         = ${ifs_numproc},
+    NPRTRV         = 1,
+EOF
+
+cat << EOF
+    NOUTPUT        = 1,
+    MP_TYPE        = 2,
+    MBX_SIZE       = 128000000,
+/
+&NAMRLXSM
+    LRXSM          = ${ifs_lrxsm},
+    LRXSMT1        = ${ifs_lrxsmt1},
+    LRXSMT2        = ${ifs_lrxsmt2},
+    LRXSMT3        = ${ifs_lrxsmt3},
+    LRXSMT4        = ${ifs_lrxsmt4},
+    LRXSMS         = ${ifs_lrxsms},
+    RLXSMDIR       = "${ini_data_dir}/ifs/ERAILandClim",
+/
+&NAMDYNCORE
+    LAQUA          = FALSE,
+/
+&NAMDYN
+    TSTEP          = ${ifs_time_step_sec}.0,
+    LMASCOR        = TRUE,
+    LMASDRY        = TRUE,
+/
+&NAMNMI
+    LASSI          = FALSE,
+/
+&NAMIOS
+    CFRCF          = "rcf",
+    CIOSPRF        = "srf",
+/
+&NAMFPG
+/
+&NAMCT0
+    LNHDYN         = FALSE,
+    NCONF          = 1,
+    CTYPE          = "fc",
+    CNMEXP         = "test",
+    CFCLASS        = "se",
+    LECMWF         = TRUE,
+    LARPEGEF       = FALSE,
+    LFDBOP         = FALSE,
+    LFPOS          = TRUE,
+    LSMSSIG        = FALSE,
+    LSPRT          = TRUE,
+    LSLAG          = TRUE,
+    LTWOTL         = TRUE,
+    LVERTFE        = TRUE,
+    LAPRXPK        = TRUE,
+    LOPT_SCALAR    = TRUE,
+    LPC_FULL       = FALSE,
+    LPC_CHEAP      = FALSE,
+    LPC_NESC       = FALSE,
+    LPC_NESCT      = FALSE,
+    LSLPHY         = TRUE,
+    LRFRIC         = TRUE,
+    LFPSPEC        = FALSE,
+    N3DINI         = 0,
+    NSTOP          = $(( leg_end_sec / ifs_time_step_sec )),
+    NFRDHP         = ${ifs_ddh_freq},
+    NFRSDI         = ${ifs_di_freq},
+    NFRGDI         = ${ifs_di_freq},
+    NFRPOS         = ${ifs_output_freq},
+    NFRHIS         = ${ifs_output_freq},
+    NFRMASSCON     = $(( 6 * 3600 / ifs_time_step_sec )),
+    NPOSTS         = 0,
+    NHISTS         = 0,
+    NMASSCONS      = 0,
+    NFRCO          = ${NFRCO},
+    NFRCO_CHEM     = ${NFRCO_CHEM},
+    NFRCO_VEG      = ${NFRCO_VEG},
+    LTM5CO2        = ${LTM5CO2},
+    NLEV_TM5       = ${NLEV_TM5},
+    NFRDHFZ        = 48,
+    NDHFZTS        = 0,
+    NDHFDTS        = 0,
+    LWROUTLAST     = ${ifs_lastout},
+    CFDIRLST       = "dirlist",
+    CNPPATH        = "postins",
+/
+&NAMDDH
+    BDEDDH(1,1)    = 4.0,1.0,0.0,50.0,0.0,49.0,
+    NDHKD          = 120,
+    LHDZON         = FALSE,
+    LHDEFZ         = FALSE,
+    LHDDOP         = FALSE,
+    LHDEFD         = FALSE,
+    LHDGLB         = TRUE,
+    LHDPRG         = TRUE,
+    LHDHKS         = TRUE,
+/
+&NAMGFL
+    LTRCMFIX       = TRUE,
+    NERA40         = 0,
+    YQ_NL%LGP      = TRUE,
+    YQ_NL%LSP      = FALSE,
+    YL_NL%LGP      = TRUE,
+    YI_NL%LGP      = TRUE,
+    YA_NL%LGP      = TRUE,
+    YO3_NL%LGP     = FALSE,
+    YQ_NL%LGPINGP  = TRUE,
+    YL_NL%LQM      = TRUE,
+    YI_NL%LQM      = TRUE,
+    YR_NL%LQM      = TRUE,
+    YS_NL%LQM      = TRUE,
+    YQ_NL%LMASSFIX = TRUE,
+    YL_NL%LMASSFIX = TRUE,
+    YI_NL%LMASSFIX = TRUE,
+    YR_NL%LMASSFIX = TRUE,
+    YS_NL%LMASSFIX = TRUE,
+    YCDNC_NL%LGP   = TRUE,
+    YICNC_NL%LGP   = TRUE,
+    YRE_LIQ_NL%LGP = TRUE,
+    YRE_ICE_NL%LGP = TRUE,
+    YCDNC_NL%CNAME = "CDNC",
+    YICNC_NL%CNAME = "ICNC",
+    YRE_LIQ_NL%CNAME ="Reff_liq",
+    YRE_ICE_NL%CNAME ="Reff_ice",
+/
+&NAMFPC
+    CFPFMT         = "MODEL",
+    NFP3DFS        = 5,
+    NFP3DFP        = 7,
+    NFP3DFT        = 1,
+    NFP3DFV        = 1,
+    MFP3DFS        = 130,135,138,155,133,
+    MFP3DFP        = 129,130,135,138,155,157,133,
+    MFP3DFT        = 60,
+    MFP3DFV        = 133,
+    NFP2DF         = 2,
+    MFP2DF         = 129,152,
+    NFPPHY         = 78,
+    MFPPHY         = 31,32,33,34,35,36,37,38,39,40,41,42,44,45,49,50,57,58,59,78,79,129,136,137,139,141,142,143,144,145,146,147,148,151,159,164,165,166,167,168,169,170,172,175,176,177,178,179,180,181,182,183,186,187,188,189,195,196,197,198,201,202,205,208,209,210,211,235,236,238,243,244,245,229,230,231,232,213,
+    NRFP3S         = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,
+    RFP3P          = 100000.0,92500.0,85000.0,70000.0,50000.0,40000.0,30000.0,25000.0,20000.0,15000.0,10000.0,7000.0,5000.0,3000.0,2000.0,1000.0,700.0,500.0,300.0,200.0,100.0,
+    LFITP          = TRUE,
+    LFITT          = FALSE,
+    LFITV          = FALSE,
+    NFPCLI         = 0,
+    LFPQ           = FALSE,
+    LASQ           = FALSE,
+    LTRACEFP       = FALSE,
+    RFPCORR        = 60000.,
+/
+&NAMFPD
+/
+&NAMDIM
+    NPROMA         = 0,
+    NUNDEFLD       = 0,
+/
+&NAMVAR
+    LMODERR        = FALSE,
+    LJCDFI         = FALSE,
+    LUSEJCDFI      = FALSE,
+/
+&NAMMCC
+    LMCCIEC        = TRUE,
+    LMCCEC         = TRUE,
+    LMCC04         = TRUE,
+    NOACOMM        = 5,
+    LMCCICEIC      = FALSE,
+    LRDALB         = FALSE, 
+    LRDVEG         = TRUE, 
+    LPISM          = FALSE,
+    LLANDICE       = ${ifs_landice},
+/
+&NAMPPC
+    LRSACC         = TRUE,
+/
+&NAMORB
+    LCORBMD =  $ifs_orb_switch,
+    ORBMODE = '$ifs_orb_mode',
+    ORBIY   =  $ifs_orb_iyear,
+/
+EOF
+
+# Resolution-dependent gravity wave drag parametrisation - using cy41r2 version
+# GFLUXLAUN=GFLUXLAUN*(1.0_JPRB-MIN(1.0_JPRB,atan((MAX(KSMAX,700)-700)/REAL(6000-700))))
+case ${ifs_grid} in
+T799L91)
+GFLUXLAUN=0.00367996
+;;
+T1279L91)
+GFLUXLAUN=0.00334195
+;;
+*)
+GFLUXLAUN=0.00375
+;;
+esac
+
+cat << EOF
+&NAMGWWMS
+    GFLUXLAUN=$GFLUXLAUN
+    ZLAUNCHP=45000
+    LOZPR=true
+    NGAUSS=2
+    GGAUSSB=-0.55
+/
+&NAMGWD
+    GTENLIM=0.0222
+/
+EOF
+
+# Add COSP namelist if needed
+has_config ifs:cosp && . $ctrl_file_dir/namelist.cosp.sh
+
+cat << EOF
+&NAEAER
+/
+&NALBAR
+/
+&NALORI
+/
+&NAM_DISTRIBUTED_VECTORS
+/
+&NAM926
+/
+&NAMAFN
+/
+&NAMANA
+/
+&NAMARPHY
+/
+&NAMCA
+/
+&NAMCAPE
+/
+&NAMCFU
+/
+&NAMCHK
+/
+&NAMCHET
+/
+&NAMCLDP
+    NCLDDIAG   = 0,
+    RLCRITSNOW = $RLCRITSNOW,
+    RVICE      = $RVICE,
+    RCLDIFF    = $RCLDIFF,
+    RCLDIFFC   = $RCLDIFFC,
+    RTAUMEL    = 7200.0,
+    RSNOWLIN2  = $RSNOWLIN2,
+    RCLCRIT    = 0.4E-3,
+    NCLOUDACT  = 2,
+    NACTPDF    = 10,
+    NAERCLD    = 9,
+    RLCRIT_UPHYS=$RLCRIT_UPHYS,
+/
+&NAMCLTC
+/
+&NAMCOM
+/
+&NAMCOS
+/
+&NAMCTAN
+/
+&NAMCOSPINPUT
+/
+&NAMCOSPOUTPUT
+/
+&NAMCUMF
+    ENTRORG = $ENTRORG,
+    ENTRDD  = $ENTRDD,
+    RPRCON  = $RPRCON,
+    DETRPEN = $DETRPEN,
+    RMFDEPS = $RMFDEPS,
+/
+&NAMCUMFS
+/
+&NAMCT1
+/
+&NAMCVA
+/
+&NAMDFHD
+/
+&NAMDFI
+/
+&NAMDIF
+/
+&NAMDIMO
+/
+&NAMDMSP
+/
+&NAMDPHY
+    NVEXTR=25,
+    NCEXTR=91,
+    NVXTR2=6,
+/
+&NAMDYNA
+/
+&NAMEMIS_CONF
+/
+&NAMENKF
+/
+&NAMFA
+/
+&NAMFFT
+/
+&NAMFPDY2
+/
+&NAMFPDYH
+/
+&NAMFPDYP
+/
+&NAMFPDYS
+/
+&NAMFPDYT
+/
+&NAMFPDYV
+/
+&NAMFPEZO
+/
+&NAMFPF
+/
+&NAMFPIOS
+/
+&NAMFPPHY
+/
+&NAMFPSC2
+/
+&NAMFPSC2_DEP
+/
+&NAMFY2
+/
+&NAMGEM
+/
+&NAMGMS
+/
+&NAMGOES
+/
+&NAMGOM
+/
+&NAMGRIB
+    NENSFNB = ${NENSFNB},
+/
+&NAMGWD
+/
+&NAMGWWMS
+/
+&NAMHLOPT
+/
+&NAMINI
+/
+&NAMIOMI
+/
+&NAMJBCODES
+/
+&NAMJFH
+/
+&NAMJG
+/
+&NAMJO
+/
+&NAMKAP
+/
+&NAMLCZ
+/
+&NAMLEG
+/
+&NAMLFI
+/
+&NAMMCUF
+/
+&NAMMETEOSAT
+/
+&NAMMTS
+/
+&NAMMTSAT
+/
+&NAMMTT
+/
+&NAMMUL
+/
+&NAMNASA
+/
+&NAMNN
+/
+&NAMNPROF
+/
+&NAMNUD
+/
+&NAMOBS
+/
+&NAMONEDVAR
+/
+&NAMOPH
+/
+&NAMPARAR
+/
+&NAMPHY
+/
+&NAMPHY0
+/
+&NAMPHY1
+/
+&NAMPHY2
+/
+&NAMPHY3
+/
+&NAMPHYDS
+    NVEXTRAGB(1:5)   = 126255,126255,126255,126094,126095, 
+    NVEXTRAGB(6:10)  = 126255,126255,126255,126099,126255,
+    NVEXTRAGB(11:15) = 126255,126255,126255,126255,126105, 
+    NVEXTRAGB(16:20) = 126106,126255,126255,126255,126110,
+    NVEXTRAGB(21:25) = 126255
+/
+&NAMPONG
+/
+&NAMRAD15
+/
+&NAMRCOEF
+/
+&NAMRINC
+/
+&NAMRIP
+/
+&NAMRLX
+    LRLXG          = ${LRLXG},
+    LRLXVO         = FALSE,
+    LRLXDI         = FALSE,
+    LRLXTE         = FALSE,
+    LRLXQ          = FALSE,
+    LRLXQL         = FALSE,
+    LRLXQI         = FALSE,
+    LRLXQC         = FALSE,
+    LRLXLP         = FALSE,
+    XRLXVO         = 0.1,
+    XRLXDI         = 0.1,
+    XRLXTE         = 0.1,
+    XRLXQ          = 0.1,
+    XRLXLP         = 0.1,
+    ALATRLX1       = 90,
+    ALATRLX2       = -90,
+    ALONRLX1       = 0,
+    ALONRLX2       = 360,
+    AXRLX          = -0.5,
+    AYRLX          = -0.5,
+    AZRLX          = 1.0,
+    NRLXLMIN       = 1,
+    NRLXLMAX       = 91,
+/
+&NAMSCC
+/
+&NAMSCEN
+/
+&NAMSCM
+/
+&NAMSENS
+/
+&NAMSIMPHL
+/
+&NAMSKF
+/
+&NAMSPSDT
+    LFIXSPPT	    = ${LFIXSPPT},
+    LSPSDT          = ${LSPSDT},
+    LCLIP_SPEC_SDT  = TRUE,
+    LCLIP_GRID_SDT  = TRUE,
+    LWRITE_ARP      = FALSE,
+    LUSESETRAN_SDT  = TRUE,
+    LRESETSEED_SDT  = FALSE,
+    NSCALES_SDT     = 3,
+    CSPEC_SHAPE_SDT ='WeaverCourtier',
+    SDEV_SDT        = 0.52,0.18,0.06,
+    TAU_SDT         = 2.16E4,2.592E5,2.592E6,
+    XLCOR_SDT       = 500.E3,1000.E3,2000.E3,
+    XCLIP_RATIO_SDT = 1.8,
+    LTAPER_BL0      = TRUE,
+    XSIGMATOP       = 0.87,
+    XSIGMABOT       = 0.97,
+    LTAPER_ST0      = TRUE,
+    XPRESSTOP_ST0   = 50.E2,
+    XPRESSBOT_ST0   = 100.E2,
+    LQPERTLIMIT2    = TRUE,
+/
+&NAMSTA
+/
+&NAMSTOPH
+/
+&NAMTCWV
+/
+&NAMTESTVAR
+/
+&NAMTLEVOL
+/
+&NAMTOPH
+/
+&NAMTOVS
+/
+&NAMTRAJP
+/
+&NAMTRANS
+/
+&NAMTRM
+/
+&NAMVARBC
+/
+&NAMVARBC_AIREP
+/
+&NAMVARBC_ALLSKY
+/
+&NAMVARBC_RAD
+/
+&NAMVARBC_TCWV
+/
+&NAMVARBC_TO3
+/
+&NAMVAREPS
+/
+&NAMVDOZ
+/
+&NAMVFP
+/
+&NAMVRTL
+/
+&NAMVV1
+/
+&NAMVV2
+/
+&NAMVWRK
+/
+&NAMXFU
+/
+&NAMZDI
+/
+&NAPHLC
+/
+&NAV1IS
+/
+EOF

+ 651 - 0
runtime/classic/ctrl/namelist.ifs.alldiag.sh

@@ -0,0 +1,651 @@
+# namelist.ifs.sh
+
+# Set coupling frequencies for ocean and chemistry coupling
+(( ${cpl_freq_atm_oce_sec:-} )) && NFRCO=$(( cpl_freq_atm_oce_sec / ifs_time_step_sec )) || NFRCO=0
+(( ${cpl_freq_atm_ctm_hrs:-} )) && NFRCO_CHEM=$(( cpl_freq_atm_ctm_hrs * 3600 / ifs_time_step_sec )) || NFRCO_CHEM=0
+(( ${cpl_freq_atm_lpjg_hrs:-} )) && NFRCO_VEG=$(( cpl_freq_atm_lpjg_hrs * 3600 / ifs_time_step_sec )) || NFRCO_VEG=0
+
+# Activate warm ocean parametrisation only in AMIP runs
+(( ${cpl_freq_amip_sec:-} )) && LEOCWA=TRUE || LEOCWA=FALSE
+
+# Switch on/off TM5 feedback to IFS, and between CO2-only and full-chemistry TM5 configs 
+has_config tm5:o3fb  && LTM5O3=TRUE  || LTM5O3=FALSE
+has_config tm5:ch4fb && LTM5CH4=TRUE || LTM5CH4=FALSE
+has_config tm5:aerfb && LTM5AER=TRUE || LTM5AER=FALSE
+has_config tm5:co2   && LTM5CO2=TRUE || LTM5CO2=FALSE
+has_config tm5:co2fb && LTM5CO2FB=TRUE || LTM5CO2FB=FALSE
+NLEV_TM5=${tm5_exch_nlevs:-999}
+
+# Switch on/off SPPT and set the ensemble member number (defaults to zero)
+has_config sppt && LSPSDT=TRUE || LSPSDT=FALSE
+has_config sppt && LFIXSPPT=TRUE || LFIXSPPT=FALSE
+NENSFNB=${ifs_ensemble_forecast_number:-0}
+
+# Switch on/off LPJ-GUESS feedback to IFS
+(( ${lpjg_on:-}   )) && LLPJGON=TRUE  || LLPJGON=FALSE
+(( ${lpjg_fdbck:-}  )) && LLPJGFBON=TRUE || LLPJGFBON=FALSE
+
+# Switch on/off atmospheric nudging
+has_config atmnudg && LRLXG=TRUE || LRLXG=FALSE
+
+
+cat << EOF
+&NAMRES
+    NFRRES         = 1,
+    NRESTS         = -1,-$(( leg_end_sec / 3600 )),
+/
+&NAERAD
+    NRPROMA        = 0,
+    LCMIP6         = ${ifs_cmip6},
+    SSPNAME        = ${ifs_cmip6_scenario},
+    LSSP370_LOWCH4 = FALSE,
+    CMIP6DATADIR   = "${ini_data_dir}/ifs/cmip6-data/",
+    LA4xCO2        = ${ifs_A4xCO2},
+    L1PCTCO2       = ${ifs_1PCTCO2},
+    LCMIP5         = ${ifs_cmip5},
+    CMIP5DATADIR   = "${ini_data_dir}/ifs/cmip5-data",
+    NCMIPFIXYR     = ${ifs_cmip_fixyear},
+    NCMIPFIXYR_CH4 = ${ifs_cmip_fixyear_ch4},
+    NRCP           = ${ifs_cmip5_rcp},
+    LHVOLCA        = TRUE,
+    LTM5O3         = ${LTM5O3},
+    LTM5CH4        = ${LTM5CH4},
+    LTM5CO2FB      = ${LTM5CO2FB},
+    LTM5AER        = ${LTM5AER},
+    LLPJGON        = ${LLPJGON},
+    LLPJGFBON      = ${LLPJGFBON},
+    LCMIP6_PI_AEROSOLS = ${ifs_cmip6piaer},
+    LCMIP6_STRATAER_SIMP = ${lcmip6_strataer_simp},
+    LCMIP6_STRATAER_BCKGD = ${lcmip6_strataer_bckgd},
+    LCMIP6_STRATAER_FULL = ${lcmip6_strataer_full},
+    CCMIP6_STRAT_SIMP  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_total_AOD_masked_troposphere_mean_3.0.0.txt",
+    CCMIP6_STRAT_FULL  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_EC_EARTH_aerosol_radiation_2D_3.0.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_OPT      = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_opt_v4.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_CONC     = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_conc_v4.0_L${ifs_res_ver}.nc",
+    LMAC2SP            = ${ifs_mac2sp},
+    MAC2SPDIR          = "${ini_data_dir}/ifs/macv2sp-data/",
+    LMAC2SPACI         = TRUE,
+    L2RAD = TRUE,
+    L2RADACCU = TRUE,
+    L2RADTEND = FALSE,
+/
+&NAEPHY
+    LDYNVAR        = TRUE,
+    LEPHYS         = TRUE,
+    LEVDIF         = TRUE,
+    LESURF         = TRUE,
+    LECOND         = TRUE,
+    LECUMF         = TRUE,
+    LEPCLD         = TRUE,
+    LEEVAP         = TRUE,
+    LEVGEN         = TRUE,
+    LESSRO         = TRUE,
+    LECURR         = FALSE,
+    LEGWDG         = TRUE,
+    LEGWWMS        = TRUE,
+    LEOCWA         = ${LEOCWA},
+    LEOZOC         = TRUE,
+    LEQNGT         = TRUE,
+    LERADI         = TRUE,
+    LERADS         = TRUE,
+    LESICE         = TRUE,
+    LEO3CH         = FALSE,
+    LEDCLD         = TRUE,
+    LDUCTDIA       = FALSE,
+    LWCOU          = FALSE,
+    LWCOU2W        = TRUE,
+    NSTPW          = 1,
+    RDEGREW        = 1.5,
+    RSOUTW         = -81.0,
+    RNORTW         = 81.0,
+    N_COMPUTE_EFF_VEG_FRACTION = $n_compute_eff_veg_fraction
+/
+&NAMPAR1
+    LSPLIT         = TRUE,
+    NFLDIN         = 0,
+    NFLDOUT        = 50,
+    NSTRIN         = 1,
+/
+&NAMPAR0
+    LSTATS         = TRUE,
+    LDETAILED_STATS= FALSE,
+    LSYNCSTATS     = FALSE,
+    LSTATSCPU      = FALSE,
+    NPRNT_STATS    = 32,
+    LBARRIER_STATS = FALSE,
+    LBARRIER_STATS2= FALSE,
+    NPROC          = ${ifs_numproc},
+EOF
+
+# enforce layout for passing spectral fields to TM
+has_config tm5 &&
+cat << EOF
+    NPRTRW         = ${ifs_numproc},
+    NPRTRV         = 1,
+EOF
+
+cat << EOF
+    NOUTPUT        = 1,
+    MP_TYPE        = 2,
+    MBX_SIZE       = 128000000,
+/
+&NAMRLXSM
+    LRXSM          = ${ifs_lrxsm},
+    LRXSMT1        = ${ifs_lrxsmt1},
+    LRXSMT2        = ${ifs_lrxsmt2},
+    LRXSMT3        = ${ifs_lrxsmt3},
+    LRXSMT4        = ${ifs_lrxsmt4},
+    LRXSMS         = ${ifs_lrxsms},
+    RLXSMDIR       = "${ini_data_dir}/ifs/ERAILandClim",
+/
+&NAMDYNCORE
+    LAQUA          = FALSE,
+/
+&NAMDYN
+    TSTEP          = ${ifs_time_step_sec}.0,
+    LMASCOR        = TRUE,
+    LMASDRY        = TRUE,
+/
+&NAMNMI
+    LASSI          = FALSE,
+/
+&NAMIOS
+    CFRCF          = "rcf",
+    CIOSPRF        = "srf",
+/
+&NAMFPG
+/
+&NAMCT0
+    LNHDYN         = FALSE,
+    NCONF          = 1,
+    CTYPE          = "fc",
+    CNMEXP         = "test",
+    CFCLASS        = "se",
+    LECMWF         = TRUE,
+    LARPEGEF       = FALSE,
+    LFDBOP         = FALSE,
+    LFPOS          = TRUE,
+    LSMSSIG        = FALSE,
+    LSPRT          = TRUE,
+    LSLAG          = TRUE,
+    LTWOTL         = TRUE,
+    LVERTFE        = TRUE,
+    LAPRXPK        = TRUE,
+    LOPT_SCALAR    = TRUE,
+    LPC_FULL       = FALSE,
+    LPC_CHEAP      = FALSE,
+    LPC_NESC       = FALSE,
+    LPC_NESCT      = FALSE,
+    LSLPHY         = TRUE,
+    LRFRIC         = TRUE,
+    LFPSPEC        = FALSE,
+    N3DINI         = 0,
+    NSTOP          = $(( leg_end_sec / ifs_time_step_sec )),
+    NFRDHP         = ${ifs_ddh_freq},
+    NFRSDI         = ${ifs_di_freq},
+    NFRGDI         = ${ifs_di_freq},
+    NFRPOS         = ${ifs_output_freq},
+    NFRHIS         = ${ifs_output_freq},
+    NFRMASSCON     = $(( 6 * 3600 / ifs_time_step_sec )),
+    NPOSTS         = 0,
+    NHISTS         = 0,
+    NMASSCONS      = 0,
+    NFRCO          = ${NFRCO},
+    NFRCO_CHEM     = ${NFRCO_CHEM},
+    NFRCO_VEG      = ${NFRCO_VEG},
+    LTM5CO2        = ${LTM5CO2},
+    NLEV_TM5       = ${NLEV_TM5},
+    NFRDHFZ        = 48,
+    NDHFZTS        = 0,
+    NDHFDTS        = 0,
+    LWROUTLAST     = ${ifs_lastout},
+    CFDIRLST       = "dirlist",
+    CNPPATH        = "postins",
+/
+&NAMDDH
+    BDEDDH(1,1)    = 4.0,1.0,0.0,50.0,0.0,49.0,
+    NDHKD          = 120,
+    LHDZON         = FALSE,
+    LHDEFZ         = FALSE,
+    LHDDOP         = FALSE,
+    LHDEFD         = FALSE,
+    LHDGLB         = TRUE,
+    LHDPRG         = TRUE,
+    LHDHKS         = TRUE,
+/
+&NAMGFL
+    LTRCMFIX       = TRUE,
+    NERA40         = 0,
+    YQ_NL%LGP      = TRUE,
+    YQ_NL%LSP      = FALSE,
+    YL_NL%LGP      = TRUE,
+    YI_NL%LGP      = TRUE,
+    YA_NL%LGP      = TRUE,
+    YO3_NL%LGP     = FALSE,
+    YQ_NL%LGPINGP  = TRUE,
+    YL_NL%LQM      = TRUE,
+    YI_NL%LQM      = TRUE,
+    YR_NL%LQM      = TRUE,
+    YS_NL%LQM      = TRUE,
+    YQ_NL%LMASSFIX = TRUE,
+    YL_NL%LMASSFIX = TRUE,
+    YI_NL%LMASSFIX = TRUE,
+    YR_NL%LMASSFIX = TRUE,
+    YS_NL%LMASSFIX = TRUE,
+    YCDNC_NL%LGP   = TRUE,
+    YICNC_NL%LGP   = TRUE,
+    YRE_LIQ_NL%LGP = TRUE,
+    YRE_ICE_NL%LGP = TRUE,
+    YCDNC_NL%CNAME = "CDNC",
+    YICNC_NL%CNAME = "ICNC",
+    YRE_LIQ_NL%CNAME ="Reff_liq",
+    YRE_ICE_NL%CNAME ="Reff_ice",
+/
+&NAMFPC
+    CFPFMT         = "MODEL",
+    NFP3DFS        = 5,
+    NFP3DFP        = 7,
+    NFP3DFT        = 1,
+    NFP3DFV        = 1,
+    MFP3DFS        = 130,135,138,155,133,
+    MFP3DFP        = 129,130,135,138,155,157,133,
+    MFP3DFT        = 60,
+    MFP3DFV        = 133,
+    NFP2DF         = 2,
+    MFP2DF         = 129,152,
+    NFPPHY         = 78,
+    MFPPHY         = 31,32,33,34,35,36,37,38,39,40,41,42,44,45,49,50,57,58,59,78,79,129,136,137,139,141,142,143,144,145,146,147,148,151,159,164,165,166,167,168,169,170,172,175,176,177,178,179,180,181,182,183,186,187,188,189,195,196,197,198,201,202,205,208,209,210,211,235,236,238,243,244,245,229,230,231,232,213,
+    NRFP3S         = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,
+    RFP3P          = 100000.0,92500.0,85000.0,70000.0,50000.0,40000.0,30000.0,25000.0,20000.0,15000.0,10000.0,7000.0,5000.0,3000.0,2000.0,1000.0,700.0,500.0,300.0,200.0,100.0,
+    LFITP          = TRUE,
+    LFITT          = FALSE,
+    LFITV          = FALSE,
+    NFPCLI         = 0,
+    LFPQ           = FALSE,
+    LASQ           = FALSE,
+    LTRACEFP       = FALSE,
+    RFPCORR        = 60000.,
+/
+&NAMFPD
+/
+&NAMDIM
+    NPROMA         = 0,
+    NUNDEFLD       = 0,
+/
+&NAMVAR
+    LMODERR        = FALSE,
+    LJCDFI         = FALSE,
+    LUSEJCDFI      = FALSE,
+/
+&NAMMCC
+    LMCCIEC        = TRUE,
+    LMCCEC         = TRUE,
+    LMCC04         = TRUE,
+    NOACOMM        = 5,
+    LMCCICEIC      = FALSE,
+    LRDALB         = FALSE, 
+    LRDVEG         = TRUE, 
+    LPISM          = FALSE,
+    LLANDICE       = ${ifs_landice},
+/
+&NAMPPC
+    LRSACC         = TRUE,
+/
+&NAMORB
+    LCORBMD =  $ifs_orb_switch,
+    ORBMODE = '$ifs_orb_mode',
+    ORBIY   =  $ifs_orb_iyear,
+/
+EOF
+
+# Resolution-dependent gravity wave drag parametrisation - using cy41r2 version
+# GFLUXLAUN=GFLUXLAUN*(1.0_JPRB-MIN(1.0_JPRB,atan((MAX(KSMAX,700)-700)/REAL(6000-700))))
+case ${ifs_grid} in
+T799L91)
+GFLUXLAUN=0.00367996
+;;
+T1279L91)
+GFLUXLAUN=0.00334195
+;;
+*)
+GFLUXLAUN=0.00375
+;;
+esac
+
+cat << EOF
+&NAMGWWMS
+    GFLUXLAUN=$GFLUXLAUN
+    ZLAUNCHP=45000
+    LOZPR=true
+    NGAUSS=2
+    GGAUSSB=-0.55
+/
+&NAMGWD
+    GTENLIM=0.0222
+/
+EOF
+
+# Add COSP namelist if needed
+has_config ifs:cosp && . $ctrl_file_dir/namelist.cosp.alldiag.sh
+
+cat << EOF
+&NAEAER
+/
+&NALBAR
+/
+&NALORI
+/
+&NAM_DISTRIBUTED_VECTORS
+/
+&NAM926
+/
+&NAMAFN
+/
+&NAMANA
+/
+&NAMARPHY
+/
+&NAMCA
+/
+&NAMCAPE
+/
+&NAMCFU
+/
+&NAMCHK
+/
+&NAMCHET
+/
+&NAMCLDP
+    NCLDDIAG   = 0,
+    RLCRITSNOW = $RLCRITSNOW,
+    RVICE      = $RVICE,
+    RCLDIFF    = $RCLDIFF,
+    RCLDIFFC   = $RCLDIFFC,
+    RTAUMEL    = 7200.0,
+    RSNOWLIN2  = $RSNOWLIN2,
+    RCLCRIT    = 0.4E-3,
+    NCLOUDACT  = 2,
+    NACTPDF    = 10,
+    NAERCLD    = 9,
+    RLCRIT_UPHYS=$RLCRIT_UPHYS,
+    LACI_DIAG  = .TRUE.,
+/
+&NAMCLTC
+/
+&NAMCOM
+/
+&NAMCOS
+/
+&NAMCTAN
+/
+&NAMCOSPINPUT
+/
+&NAMCOSPOUTPUT
+/
+&NAMCUMF
+    ENTRORG = $ENTRORG,
+    ENTRDD  = $ENTRDD,
+    RPRCON  = $RPRCON,
+    DETRPEN = $DETRPEN,
+    RMFDEPS = $RMFDEPS,
+/
+&NAMCUMFS
+/
+&NAMCT1
+/
+&NAMCVA
+/
+&NAMDFHD
+/
+&NAMDFI
+/
+&NAMDIF
+/
+&NAMDIMO
+/
+&NAMDMSP
+/
+&NAMDPHY
+ NVXTR2=18,
+ NVEXTR=17,
+ NCEXTR=91,
+/
+&NAMDYNA
+/
+&NAMEMIS_CONF
+/
+&NAMENKF
+/
+&NAMFA
+/
+&NAMFFT
+/
+&NAMFPDY2
+/
+&NAMFPDYH
+/
+&NAMFPDYP
+/
+&NAMFPDYS
+/
+&NAMFPDYT
+/
+&NAMFPDYV
+/
+&NAMFPEZO
+/
+&NAMFPF
+/
+&NAMFPIOS
+/
+&NAMFPPHY
+/
+&NAMFPSC2
+/
+&NAMFPSC2_DEP
+/
+&NAMFY2
+/
+&NAMGEM
+/
+&NAMGMS
+/
+&NAMGOES
+/
+&NAMGOM
+/
+&NAMGRIB
+    NENSFNB = ${NENSFNB},
+/
+&NAMGWD
+/
+&NAMGWWMS
+/
+&NAMHLOPT
+/
+&NAMINI
+/
+&NAMIOMI
+/
+&NAMJBCODES
+/
+&NAMJFH
+/
+&NAMJG
+/
+&NAMJO
+/
+&NAMKAP
+/
+&NAMLCZ
+/
+&NAMLEG
+/
+&NAMLFI
+/
+&NAMMCUF
+/
+&NAMMETEOSAT
+/
+&NAMMTS
+/
+&NAMMTSAT
+/
+&NAMMTT
+/
+&NAMMUL
+/
+&NAMNASA
+/
+&NAMNN
+/
+&NAMNPROF
+/
+&NAMNUD
+/
+&NAMOBS
+/
+&NAMONEDVAR
+/
+&NAMOPH
+/
+&NAMPARAR
+/
+&NAMPHY
+/
+&NAMPHY0
+/
+&NAMPHY1
+/
+&NAMPHY2
+/
+&NAMPHY3
+/
+&NAMPHYDS
+ NVEXTRAGB=126020,126021,126022,126120,126121,126122,126123,126124,126125,126126,126127,126128,126129,126130,126131,126132,126133,
+ NVEXTR2GB=126040,126041,126042,126043,126044,126045,126046,126047,126048,126049,126068,126069,126070,126071,126072,126073,126074,126075,
+/
+&NAMPONG
+/
+&NAMRAD15
+/
+&NAMRCOEF
+/
+&NAMRINC
+/
+&NAMRIP
+/
+&NAMRLX
+    LRLXG          = ${LRLXG},
+    LRLXVO         = FALSE,
+    LRLXDI         = FALSE,
+    LRLXTE         = FALSE,
+    LRLXQ          = FALSE,
+    LRLXQL         = FALSE,
+    LRLXQI         = FALSE,
+    LRLXQC         = FALSE,
+    LRLXLP         = FALSE,
+    XRLXVO         = 0.1,
+    XRLXDI         = 0.1,
+    XRLXTE         = 0.1,
+    XRLXQ          = 0.1,
+    XRLXLP         = 0.1,
+    ALATRLX1       = 90,
+    ALATRLX2       = -90,
+    ALONRLX1       = 0,
+    ALONRLX2       = 360,
+    AXRLX          = -0.5,
+    AYRLX          = -0.5,
+    AZRLX          = 1.0,
+    NRLXLMIN       = 1,
+    NRLXLMAX       = 91,
+/
+&NAMSCC
+/
+&NAMSCEN
+/
+&NAMSCM
+/
+&NAMSENS
+/
+&NAMSIMPHL
+/
+&NAMSKF
+/
+&NAMSPSDT
+    LFIXSPPT	    = ${LFIXSPPT},
+    LSPSDT          = ${LSPSDT},
+    LCLIP_SPEC_SDT  = TRUE,
+    LCLIP_GRID_SDT  = TRUE,
+    LWRITE_ARP      = FALSE,
+    LUSESETRAN_SDT  = TRUE,
+    LRESETSEED_SDT  = FALSE,
+    NSCALES_SDT     = 3,
+    CSPEC_SHAPE_SDT ='WeaverCourtier',
+    SDEV_SDT        = 0.52,0.18,0.06,
+    TAU_SDT         = 2.16E4,2.592E5,2.592E6,
+    XLCOR_SDT       = 500.E3,1000.E3,2000.E3,
+    XCLIP_RATIO_SDT = 1.8,
+    LTAPER_BL0      = TRUE,
+    XSIGMATOP       = 0.87,
+    XSIGMABOT       = 0.97,
+    LTAPER_ST0      = TRUE,
+    XPRESSTOP_ST0   = 50.E2,
+    XPRESSBOT_ST0   = 100.E2,
+    LQPERTLIMIT2    = TRUE,
+/
+&NAMSTA
+/
+&NAMSTOPH
+/
+&NAMTCWV
+/
+&NAMTESTVAR
+/
+&NAMTLEVOL
+/
+&NAMTOPH
+/
+&NAMTOVS
+/
+&NAMTRAJP
+/
+&NAMTRANS
+/
+&NAMTRM
+/
+&NAMVARBC
+/
+&NAMVARBC_AIREP
+/
+&NAMVARBC_ALLSKY
+/
+&NAMVARBC_RAD
+/
+&NAMVARBC_TCWV
+/
+&NAMVARBC_TO3
+/
+&NAMVAREPS
+/
+&NAMVDOZ
+/
+&NAMVFP
+/
+&NAMVRTL
+/
+&NAMVV1
+/
+&NAMVV2
+/
+&NAMVWRK
+/
+&NAMXFU
+/
+&NAMZDI
+/
+&NAPHLC
+/
+&NAV1IS
+/
+EOF

+ 654 - 0
runtime/classic/ctrl/namelist.ifs.cloudact+diag.sh

@@ -0,0 +1,654 @@
+# namelist.ifs.sh
+
+# Set coupling frequencies for ocean and chemistry coupling
+(( ${cpl_freq_atm_oce_sec:-} )) && NFRCO=$(( cpl_freq_atm_oce_sec / ifs_time_step_sec )) || NFRCO=0
+(( ${cpl_freq_atm_ctm_hrs:-} )) && NFRCO_CHEM=$(( cpl_freq_atm_ctm_hrs * 3600 / ifs_time_step_sec )) || NFRCO_CHEM=0
+(( ${cpl_freq_atm_lpjg_hrs:-} )) && NFRCO_VEG=$(( cpl_freq_atm_lpjg_hrs * 3600 / ifs_time_step_sec )) || NFRCO_VEG=0
+
+# Activate warm ocean parametrisation only in AMIP runs
+(( ${cpl_freq_amip_sec:-} )) && LEOCWA=TRUE || LEOCWA=FALSE
+
+# Switch on/off TM5 feedback to IFS, and between CO2-only and full-chemistry TM5 configs 
+has_config tm5:o3fb  && LTM5O3=TRUE  || LTM5O3=FALSE
+has_config tm5:ch4fb && LTM5CH4=TRUE || LTM5CH4=FALSE
+has_config tm5:aerfb && LTM5AER=TRUE || LTM5AER=FALSE
+has_config tm5:co2   && LTM5CO2=TRUE || LTM5CO2=FALSE
+has_config tm5:co2fb && LTM5CO2FB=TRUE || LTM5CO2FB=FALSE
+NLEV_TM5=${tm5_exch_nlevs:-999}
+
+# Switch on/off SPPT and set the ensemble member number (defaults to zero)
+has_config sppt && LSPSDT=TRUE || LSPSDT=FALSE
+has_config sppt && LFIXSPPT=TRUE || LFIXSPPT=FALSE
+NENSFNB=${ifs_ensemble_forecast_number:-0}
+
+# Switch on/off LPJ-GUESS feedback to IFS
+(( ${lpjg_on:-}   )) && LLPJGON=TRUE  || LLPJGON=FALSE
+(( ${lpjg_fdbck:-}  )) && LLPJGFBON=TRUE || LLPJGFBON=FALSE
+
+# Switch on/off atmospheric nudging
+has_config atmnudg && LRLXG=TRUE || LRLXG=FALSE
+
+
+cat << EOF
+&NAMRES
+    NFRRES         = 1,
+    NRESTS         = -1,-$(( leg_end_sec / 3600 )),
+/
+&NAERAD
+    NRPROMA        = 0,
+    LCMIP6         = ${ifs_cmip6},
+    SSPNAME        = ${ifs_cmip6_scenario},
+    LCOVID19       = ${ifs_covid19},
+    COVID19SCEN    = ${ifs_covid19scen},
+    LSSP370_LOWCH4 = FALSE,
+    CMIP6DATADIR   = "${ini_data_dir}/ifs/cmip6-data/",
+    LA4xCO2        = ${ifs_A4xCO2},
+    L1PCTCO2       = ${ifs_1PCTCO2},
+    LCMIP5         = ${ifs_cmip5},
+    CMIP5DATADIR   = "${ini_data_dir}/ifs/cmip5-data",
+    NCMIPFIXYR     = ${ifs_cmip_fixyear},
+    NCMIPFIXYR_CH4 = ${ifs_cmip_fixyear_ch4},
+    NRCP           = ${ifs_cmip5_rcp},
+    LHVOLCA        = TRUE,
+    LTM5O3         = ${LTM5O3},
+    LTM5CH4        = ${LTM5CH4},
+    LTM5CO2FB      = ${LTM5CO2FB},
+    LTM5AER        = ${LTM5AER},
+    LLPJGON        = ${LLPJGON},
+    LLPJGFBON      = ${LLPJGFBON},
+    LCMIP6_PI_AEROSOLS = ${ifs_cmip6piaer},
+    LCMIP6_STRATAER_SIMP = ${lcmip6_strataer_simp},
+    LCMIP6_STRATAER_BCKGD = ${lcmip6_strataer_bckgd},
+    LCMIP6_STRATAER_FULL = ${lcmip6_strataer_full},
+    CCMIP6_STRAT_SIMP  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_total_AOD_masked_troposphere_mean_3.0.0.txt",
+    CCMIP6_STRAT_FULL  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_EC_EARTH_aerosol_radiation_2D_3.0.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_OPT      = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_opt_v4.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_CONC     = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_conc_v4.0_L${ifs_res_ver}.nc",
+    LMAC2SP            = ${ifs_mac2sp},
+    MAC2SPDIR          = "${ini_data_dir}/ifs/macv2sp-data/",
+    LMAC2SPACI         = TRUE,
+/
+&NAEPHY
+    LEPHYS         = TRUE,
+    LEVDIF         = TRUE,
+    LESURF         = TRUE,
+    LECOND         = TRUE,
+    LECUMF         = TRUE,
+    LEPCLD         = TRUE,
+    LEEVAP         = TRUE,
+    LEVGEN         = TRUE,
+    LESSRO         = TRUE,
+    LECURR         = FALSE,
+    LEGWDG         = TRUE,
+    LEGWWMS        = TRUE,
+    LEOCWA         = ${LEOCWA},
+    LEOZOC         = TRUE,
+    LEQNGT         = TRUE,
+    LERADI         = TRUE,
+    LERADS         = TRUE,
+    LESICE         = TRUE,
+    LEO3CH         = FALSE,
+    LEDCLD         = TRUE,
+    LDUCTDIA       = FALSE,
+    LWCOU          = FALSE,
+    LWCOU2W        = TRUE,
+    NSTPW          = 1,
+    RDEGREW        = 1.5,
+    RSOUTW         = -81.0,
+    RNORTW         = 81.0,
+    N_COMPUTE_EFF_VEG_FRACTION = $n_compute_eff_veg_fraction
+/
+&NAMPAR1
+    LSPLIT         = TRUE,
+    NFLDIN         = 0,
+    NFLDOUT        = 50,
+    NSTRIN         = 1,
+/
+&NAMPAR0
+    LSTATS         = TRUE,
+    LDETAILED_STATS= FALSE,
+    LSYNCSTATS     = FALSE,
+    LSTATSCPU      = FALSE,
+    NPRNT_STATS    = 32,
+    LBARRIER_STATS = FALSE,
+    LBARRIER_STATS2= FALSE,
+    NPROC          = ${ifs_numproc},
+EOF
+
+# enforce layout for passing spectral fields to TM
+has_config tm5 &&
+cat << EOF
+    NPRTRW         = ${ifs_numproc},
+    NPRTRV         = 1,
+EOF
+
+cat << EOF
+    NOUTPUT        = 1,
+    MP_TYPE        = 2,
+    MBX_SIZE       = 128000000,
+/
+&NAMRLXSM
+    LRXSM          = ${ifs_lrxsm},
+    LRXSMT1        = ${ifs_lrxsmt1},
+    LRXSMT2        = ${ifs_lrxsmt2},
+    LRXSMT3        = ${ifs_lrxsmt3},
+    LRXSMT4        = ${ifs_lrxsmt4},
+    LRXSMS         = ${ifs_lrxsms},
+    RLXSMDIR       = "${ini_data_dir}/ifs/ERAILandClim",
+/
+&NAMDYNCORE
+    LAQUA          = FALSE,
+/
+&NAMDYN
+    TSTEP          = ${ifs_time_step_sec}.0,
+    LMASCOR        = TRUE,
+    LMASDRY        = TRUE,
+/
+&NAMNMI
+    LASSI          = FALSE,
+/
+&NAMIOS
+    CFRCF          = "rcf",
+    CIOSPRF        = "srf",
+/
+&NAMFPG
+/
+&NAMCT0
+    LNHDYN         = FALSE,
+    NCONF          = 1,
+    CTYPE          = "fc",
+    CNMEXP         = "test",
+    CFCLASS        = "se",
+    LECMWF         = TRUE,
+    LARPEGEF       = FALSE,
+    LFDBOP         = FALSE,
+    LFPOS          = TRUE,
+    LSMSSIG        = FALSE,
+    LSPRT          = TRUE,
+    LSLAG          = TRUE,
+    LTWOTL         = TRUE,
+    LVERTFE        = TRUE,
+    LAPRXPK        = TRUE,
+    LOPT_SCALAR    = TRUE,
+    LPC_FULL       = FALSE,
+    LPC_CHEAP      = FALSE,
+    LPC_NESC       = FALSE,
+    LPC_NESCT      = FALSE,
+    LSLPHY         = TRUE,
+    LRFRIC         = TRUE,
+    LFPSPEC        = FALSE,
+    N3DINI         = 0,
+    NSTOP          = $(( leg_end_sec / ifs_time_step_sec )),
+    NFRDHP         = ${ifs_ddh_freq},
+    NFRSDI         = ${ifs_di_freq},
+    NFRGDI         = ${ifs_di_freq},
+    NFRPOS         = ${ifs_output_freq},
+    NFRHIS         = ${ifs_output_freq},
+    NFRMASSCON     = $(( 6 * 3600 / ifs_time_step_sec )),
+    NPOSTS         = 0,
+    NHISTS         = 0,
+    NMASSCONS      = 0,
+    NFRCO          = ${NFRCO},
+    NFRCO_CHEM     = ${NFRCO_CHEM},
+    NFRCO_VEG      = ${NFRCO_VEG},
+    LTM5CO2        = ${LTM5CO2},
+    NLEV_TM5       = ${NLEV_TM5},
+    NFRDHFZ        = 48,
+    NDHFZTS        = 0,
+    NDHFDTS        = 0,
+    LWROUTLAST     = ${ifs_lastout},
+    CFDIRLST       = "dirlist",
+    CNPPATH        = "postins",
+/
+&NAMDDH
+    BDEDDH(1,1)    = 4.0,1.0,0.0,50.0,0.0,49.0,
+    NDHKD          = 120,
+    LHDZON         = FALSE,
+    LHDEFZ         = FALSE,
+    LHDDOP         = FALSE,
+    LHDEFD         = FALSE,
+    LHDGLB         = TRUE,
+    LHDPRG         = TRUE,
+    LHDHKS         = TRUE,
+/
+&NAMGFL
+    LTRCMFIX       = TRUE,
+    NERA40         = 0,
+    YQ_NL%LGP      = TRUE,
+    YQ_NL%LSP      = FALSE,
+    YL_NL%LGP      = TRUE,
+    YI_NL%LGP      = TRUE,
+    YA_NL%LGP      = TRUE,
+    YO3_NL%LGP     = FALSE,
+    YQ_NL%LGPINGP  = TRUE,
+    YL_NL%LQM      = TRUE,
+    YI_NL%LQM      = TRUE,
+    YR_NL%LQM      = TRUE,
+    YS_NL%LQM      = TRUE,
+    YQ_NL%LMASSFIX = TRUE,
+    YL_NL%LMASSFIX = TRUE,
+    YI_NL%LMASSFIX = TRUE,
+    YR_NL%LMASSFIX = TRUE,
+    YS_NL%LMASSFIX = TRUE,
+    YCDNC_NL%LGP   = TRUE,
+    YICNC_NL%LGP   = TRUE,
+    YRE_LIQ_NL%LGP = TRUE,
+    YRE_ICE_NL%LGP = TRUE,
+    YCDNC_NL%CNAME = "CDNC",
+    YICNC_NL%CNAME = "ICNC",
+    YRE_LIQ_NL%CNAME ="Reff_liq",
+    YRE_ICE_NL%CNAME ="Reff_ice",
+/
+&NAMFPC
+    CFPFMT         = "MODEL",
+    NFP3DFS        = 5,
+    NFP3DFP        = 7,
+    NFP3DFT        = 1,
+    NFP3DFV        = 1,
+    MFP3DFS        = 130,135,138,155,133,
+    MFP3DFP        = 129,130,135,138,155,157,133,
+    MFP3DFT        = 60,
+    MFP3DFV        = 133,
+    NFP2DF         = 2,
+    MFP2DF         = 129,152,
+    NFPPHY         = 78,
+    MFPPHY         = 31,32,33,34,35,36,37,38,39,40,41,42,44,45,49,50,57,58,59,78,79,129,136,137,139,141,142,143,144,145,146,147,148,151,159,164,165,166,167,168,169,170,172,175,176,177,178,179,180,181,182,183,186,187,188,189,195,196,197,198,201,202,205,208,209,210,211,235,236,238,243,244,245,229,230,231,232,213,
+    NRFP3S         = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,
+    RFP3P          = 100000.0,92500.0,85000.0,70000.0,50000.0,40000.0,30000.0,25000.0,20000.0,15000.0,10000.0,7000.0,5000.0,3000.0,2000.0,1000.0,700.0,500.0,300.0,200.0,100.0,
+    LFITP          = TRUE,
+    LFITT          = FALSE,
+    LFITV          = FALSE,
+    NFPCLI         = 0,
+    LFPQ           = FALSE,
+    LASQ           = FALSE,
+    LTRACEFP       = FALSE,
+    RFPCORR        = 60000.,
+/
+&NAMFPD
+/
+&NAMDIM
+    NPROMA         = 0,
+    NUNDEFLD       = 0,
+/
+&NAMVAR
+    LMODERR        = FALSE,
+    LJCDFI         = FALSE,
+    LUSEJCDFI      = FALSE,
+/
+&NAMMCC
+    LMCCIEC        = TRUE,
+    LMCCEC         = TRUE,
+    LMCC04         = TRUE,
+    NOACOMM        = 5,
+    LMCCICEIC      = FALSE,
+    LRDALB         = FALSE, 
+    LRDVEG         = TRUE, 
+    LPISM          = FALSE,
+    LLANDICE       = ${ifs_landice},
+/
+&NAMPPC
+    LRSACC         = TRUE,
+/
+&NAMORB
+    LCORBMD =  $ifs_orb_switch,
+    ORBMODE = '$ifs_orb_mode',
+    ORBIY   =  $ifs_orb_iyear,
+/
+EOF
+
+# Resolution-dependent gravity wave drag parametrisation - using cy41r2 version
+# GFLUXLAUN=GFLUXLAUN*(1.0_JPRB-MIN(1.0_JPRB,atan((MAX(KSMAX,700)-700)/REAL(6000-700))))
+case ${ifs_grid} in
+T799L91)
+GFLUXLAUN=0.00367996
+;;
+T1279L91)
+GFLUXLAUN=0.00334195
+;;
+*)
+GFLUXLAUN=0.00375
+;;
+esac
+
+cat << EOF
+&NAMGWWMS
+    GFLUXLAUN=$GFLUXLAUN
+    ZLAUNCHP=45000
+    LOZPR=true
+    NGAUSS=2
+    GGAUSSB=-0.55
+/
+&NAMGWD
+    GTENLIM=0.0222
+/
+EOF
+
+# Add COSP namelist if needed
+has_config ifs:cosp && . $ctrl_file_dir/namelist.cosp.sh
+
+cat << EOF
+&NAEAER
+/
+&NALBAR
+/
+&NALORI
+/
+&NAM_DISTRIBUTED_VECTORS
+/
+&NAM926
+/
+&NAMAFN
+/
+&NAMANA
+/
+&NAMARPHY
+/
+&NAMCA
+/
+&NAMCAPE
+/
+&NAMCFU
+/
+&NAMCHK
+/
+&NAMCHET
+/
+&NAMCLDP
+    NCLDDIAG   = 0,
+    RLCRITSNOW = $RLCRITSNOW,
+    RVICE      = $RVICE,
+    RCLDIFF    = $RCLDIFF,
+    RCLDIFFC   = $RCLDIFFC,
+    RTAUMEL    = 7200.0,
+    RSNOWLIN2  = $RSNOWLIN2,
+    RCLCRIT    = 0.4E-3,
+    NCLOUDACT  = 2,
+    NACTPDF    = 10,
+    NAERCLD    = 9,
+    RLCRIT_UPHYS=$RLCRIT_UPHYS,
+    LACI_DIAG  = TRUE,
+/
+&NAMCLTC
+/
+&NAMCOM
+/
+&NAMCOS
+/
+&NAMCTAN
+/
+&NAMCOSPINPUT
+/
+&NAMCOSPOUTPUT
+/
+&NAMCUMF
+    ENTRORG = $ENTRORG,
+    ENTRDD  = $ENTRDD,
+    RPRCON  = $RPRCON,
+    DETRPEN = $DETRPEN,
+    RMFDEPS = $RMFDEPS,
+/
+&NAMCUMFS
+/
+&NAMCT1
+/
+&NAMCVA
+/
+&NAMDFHD
+/
+&NAMDFI
+/
+&NAMDIF
+/
+&NAMDIMO
+/
+&NAMDMSP
+/
+&NAMDPHY
+ NVEXTR=3,
+ NVEXTRDYN=0,
+ NCEXTR=91,
+/
+&NAMDYNA
+/
+&NAMEMIS_CONF
+/
+&NAMENKF
+/
+&NAMFA
+/
+&NAMFFT
+/
+&NAMFPDY2
+/
+&NAMFPDYH
+/
+&NAMFPDYP
+/
+&NAMFPDYS
+/
+&NAMFPDYT
+/
+&NAMFPDYV
+/
+&NAMFPEZO
+/
+&NAMFPF
+/
+&NAMFPIOS
+/
+&NAMFPPHY
+/
+&NAMFPSC2
+/
+&NAMFPSC2_DEP
+/
+&NAMFY2
+/
+&NAMGEM
+/
+&NAMGMS
+/
+&NAMGOES
+/
+&NAMGOM
+/
+&NAMGRIB
+    NENSFNB = ${NENSFNB},
+/
+&NAMGWD
+/
+&NAMGWWMS
+/
+&NAMHLOPT
+/
+&NAMINI
+/
+&NAMIOMI
+/
+&NAMJBCODES
+/
+&NAMJFH
+/
+&NAMJG
+/
+&NAMJO
+/
+&NAMKAP
+/
+&NAMLCZ
+/
+&NAMLEG
+/
+&NAMLFI
+/
+&NAMMCUF
+/
+&NAMMETEOSAT
+/
+&NAMMTS
+/
+&NAMMTSAT
+/
+&NAMMTT
+/
+&NAMMUL
+/
+&NAMNASA
+/
+&NAMNN
+/
+&NAMNPROF
+/
+&NAMNUD
+/
+&NAMOBS
+/
+&NAMONEDVAR
+/
+&NAMOPH
+/
+&NAMPARAR
+/
+&NAMPHY
+/
+&NAMPHY0
+/
+&NAMPHY1
+/
+&NAMPHY2
+/
+&NAMPHY3
+/
+! remove the CVEXTRA defintions if using in combination with
+! other PEXTRA/PEXTR2 diagnostics
+&NAMPHYDS
+ NVEXTRAGB=126020,126021,126022,
+ CVEXTRA(1)='CDNC',
+ CVEXTRA(2)='Re_liq',
+ CVEXTRA(3)='Liq cloud time',
+ VEXTRADF=0.,0.,0.,
+/
+&NAMPONG
+/
+&NAMRAD15
+/
+&NAMRCOEF
+/
+&NAMRINC
+/
+&NAMRIP
+/
+&NAMRLX
+    LRLXG          = ${LRLXG},
+    LRLXVO         = FALSE,
+    LRLXDI         = FALSE,
+    LRLXTE         = FALSE,
+    LRLXQ          = FALSE,
+    LRLXQL         = FALSE,
+    LRLXQI         = FALSE,
+    LRLXQC         = FALSE,
+    LRLXLP         = FALSE,
+    XRLXVO         = 0.1,
+    XRLXDI         = 0.1,
+    XRLXTE         = 0.1,
+    XRLXQ          = 0.1,
+    XRLXLP         = 0.1,
+    ALATRLX1       = 90,
+    ALATRLX2       = -90,
+    ALONRLX1       = 0,
+    ALONRLX2       = 360,
+    AXRLX          = -0.5,
+    AYRLX          = -0.5,
+    AZRLX          = 1.0,
+    NRLXLMIN       = 1,
+    NRLXLMAX       = 91,
+/
+&NAMSCC
+/
+&NAMSCEN
+/
+&NAMSCM
+/
+&NAMSENS
+/
+&NAMSIMPHL
+/
+&NAMSKF
+/
+&NAMSPSDT
+    LFIXSPPT	    = ${LFIXSPPT},
+    LSPSDT          = ${LSPSDT},
+    LCLIP_SPEC_SDT  = TRUE,
+    LCLIP_GRID_SDT  = TRUE,
+    LWRITE_ARP      = FALSE,
+    LUSESETRAN_SDT  = TRUE,
+    LRESETSEED_SDT  = FALSE,
+    NSCALES_SDT     = 3,
+    CSPEC_SHAPE_SDT ='WeaverCourtier',
+    SDEV_SDT        = 0.52,0.18,0.06,
+    TAU_SDT         = 2.16E4,2.592E5,2.592E6,
+    XLCOR_SDT       = 500.E3,1000.E3,2000.E3,
+    XCLIP_RATIO_SDT = 1.8,
+    LTAPER_BL0      = TRUE,
+    XSIGMATOP       = 0.87,
+    XSIGMABOT       = 0.97,
+    LTAPER_ST0      = TRUE,
+    XPRESSTOP_ST0   = 50.E2,
+    XPRESSBOT_ST0   = 100.E2,
+    LQPERTLIMIT2    = TRUE,
+/
+&NAMSTA
+/
+&NAMSTOPH
+/
+&NAMTCWV
+/
+&NAMTESTVAR
+/
+&NAMTLEVOL
+/
+&NAMTOPH
+/
+&NAMTOVS
+/
+&NAMTRAJP
+/
+&NAMTRANS
+/
+&NAMTRM
+/
+&NAMVARBC
+/
+&NAMVARBC_AIREP
+/
+&NAMVARBC_ALLSKY
+/
+&NAMVARBC_RAD
+/
+&NAMVARBC_TCWV
+/
+&NAMVARBC_TO3
+/
+&NAMVAREPS
+/
+&NAMVDOZ
+/
+&NAMVFP
+/
+&NAMVRTL
+/
+&NAMVV1
+/
+&NAMVV2
+/
+&NAMVWRK
+/
+&NAMXFU
+/
+&NAMZDI
+/
+&NAPHLC
+/
+&NAV1IS
+/
+EOF

+ 660 - 0
runtime/classic/ctrl/namelist.ifs.dblrad+diag.sh

@@ -0,0 +1,660 @@
+# namelist.ifs.sh
+
+# Set coupling frequencies for ocean and chemistry coupling
+(( ${cpl_freq_atm_oce_sec:-} )) && NFRCO=$(( cpl_freq_atm_oce_sec / ifs_time_step_sec )) || NFRCO=0
+(( ${cpl_freq_atm_ctm_hrs:-} )) && NFRCO_CHEM=$(( cpl_freq_atm_ctm_hrs * 3600 / ifs_time_step_sec )) || NFRCO_CHEM=0
+(( ${cpl_freq_atm_lpjg_hrs:-} )) && NFRCO_VEG=$(( cpl_freq_atm_lpjg_hrs * 3600 / ifs_time_step_sec )) || NFRCO_VEG=0
+
+# Activate warm ocean parametrisation only in AMIP runs
+(( ${cpl_freq_amip_sec:-} )) && LEOCWA=TRUE || LEOCWA=FALSE
+
+# Switch on/off TM5 feedback to IFS, and between CO2-only and full-chemistry TM5 configs 
+has_config tm5:o3fb  && LTM5O3=TRUE  || LTM5O3=FALSE
+has_config tm5:ch4fb && LTM5CH4=TRUE || LTM5CH4=FALSE
+has_config tm5:aerfb && LTM5AER=TRUE || LTM5AER=FALSE
+has_config tm5:co2   && LTM5CO2=TRUE || LTM5CO2=FALSE
+has_config tm5:co2fb && LTM5CO2FB=TRUE || LTM5CO2FB=FALSE
+NLEV_TM5=${tm5_exch_nlevs:-999}
+
+# Switch on/off SPPT and set the ensemble member number (defaults to zero)
+has_config sppt && LSPSDT=TRUE || LSPSDT=FALSE
+has_config sppt && LFIXSPPT=TRUE || LFIXSPPT=FALSE
+NENSFNB=${ifs_ensemble_forecast_number:-0}
+
+# Switch on/off LPJ-GUESS feedback to IFS
+(( ${lpjg_on:-}   )) && LLPJGON=TRUE  || LLPJGON=FALSE
+(( ${lpjg_fdbck:-}  )) && LLPJGFBON=TRUE || LLPJGFBON=FALSE
+
+# Switch on/off atmospheric nudging
+has_config atmnudg && LRLXG=TRUE || LRLXG=FALSE
+
+
+cat << EOF
+&NAMRES
+    NFRRES         = 1,
+    NRESTS         = -1,-$(( leg_end_sec / 3600 )),
+/
+&NAERAD
+    NRPROMA        = 0,
+    LCMIP6         = ${ifs_cmip6},
+    SSPNAME        = ${ifs_cmip6_scenario},
+    LCOVID19       = ${ifs_covid19},
+    COVID19SCEN    = ${ifs_covid19scen},
+    LSSP370_LOWCH4 = FALSE,
+    CMIP6DATADIR   = "${ini_data_dir}/ifs/cmip6-data/",
+    LA4xCO2        = ${ifs_A4xCO2},
+    L1PCTCO2       = ${ifs_1PCTCO2},
+    LCMIP5         = ${ifs_cmip5},
+    CMIP5DATADIR   = "${ini_data_dir}/ifs/cmip5-data",
+    NCMIPFIXYR     = ${ifs_cmip_fixyear},
+    NCMIPFIXYR_CH4 = ${ifs_cmip_fixyear_ch4},
+    NRCP           = ${ifs_cmip5_rcp},
+    LHVOLCA        = TRUE,
+    LTM5O3         = ${LTM5O3},
+    LTM5CH4        = ${LTM5CH4},
+    LTM5CO2FB      = ${LTM5CO2FB},
+    LTM5AER        = ${LTM5AER},
+    LLPJGON        = ${LLPJGON},
+    LLPJGFBON      = ${LLPJGFBON},
+    LCMIP6_PI_AEROSOLS = ${ifs_cmip6piaer},
+    LCMIP6_STRATAER_SIMP = ${lcmip6_strataer_simp},
+    LCMIP6_STRATAER_BCKGD = ${lcmip6_strataer_bckgd},
+    LCMIP6_STRATAER_FULL = ${lcmip6_strataer_full},
+    CCMIP6_STRAT_SIMP  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_total_AOD_masked_troposphere_mean_3.0.0.txt",
+    CCMIP6_STRAT_FULL  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_EC_EARTH_aerosol_radiation_2D_3.0.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_OPT      = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_opt_v4.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_CONC     = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_conc_v4.0_L${ifs_res_ver}.nc",
+    LMAC2SP            = ${ifs_mac2sp},
+    MAC2SPDIR          = "${ini_data_dir}/ifs/macv2sp-data/",
+    LMAC2SPACI         = TRUE,
+    L2RAD          = TRUE,
+    L2RADTEND      = FALSE,
+    L2RADACCU      = TRUE,
+/
+&NAEPHY
+    LEPHYS         = TRUE,
+    LEVDIF         = TRUE,
+    LESURF         = TRUE,
+    LECOND         = TRUE,
+    LECUMF         = TRUE,
+    LEPCLD         = TRUE,
+    LEEVAP         = TRUE,
+    LEVGEN         = TRUE,
+    LESSRO         = TRUE,
+    LECURR         = FALSE,
+    LEGWDG         = TRUE,
+    LEGWWMS        = TRUE,
+    LEOCWA         = ${LEOCWA},
+    LEOZOC         = TRUE,
+    LEQNGT         = TRUE,
+    LERADI         = TRUE,
+    LERADS         = TRUE,
+    LESICE         = TRUE,
+    LEO3CH         = FALSE,
+    LEDCLD         = TRUE,
+    LDUCTDIA       = FALSE,
+    LWCOU          = FALSE,
+    LWCOU2W        = TRUE,
+    NSTPW          = 1,
+    RDEGREW        = 1.5,
+    RSOUTW         = -81.0,
+    RNORTW         = 81.0,
+    N_COMPUTE_EFF_VEG_FRACTION = $n_compute_eff_veg_fraction
+/
+&NAMPAR1
+    LSPLIT         = TRUE,
+    NFLDIN         = 0,
+    NFLDOUT        = 50,
+    NSTRIN         = 1,
+/
+&NAMPAR0
+    LSTATS         = TRUE,
+    LDETAILED_STATS= FALSE,
+    LSYNCSTATS     = FALSE,
+    LSTATSCPU      = FALSE,
+    NPRNT_STATS    = 32,
+    LBARRIER_STATS = FALSE,
+    LBARRIER_STATS2= FALSE,
+    NPROC          = ${ifs_numproc},
+EOF
+
+# enforce layout for passing spectral fields to TM
+has_config tm5 &&
+cat << EOF
+    NPRTRW         = ${ifs_numproc},
+    NPRTRV         = 1,
+EOF
+
+cat << EOF
+    NOUTPUT        = 1,
+    MP_TYPE        = 2,
+    MBX_SIZE       = 128000000,
+/
+&NAMRLXSM
+    LRXSM          = ${ifs_lrxsm},
+    LRXSMT1        = ${ifs_lrxsmt1},
+    LRXSMT2        = ${ifs_lrxsmt2},
+    LRXSMT3        = ${ifs_lrxsmt3},
+    LRXSMT4        = ${ifs_lrxsmt4},
+    LRXSMS         = ${ifs_lrxsms},
+    RLXSMDIR       = "${ini_data_dir}/ifs/ERAILandClim",
+/
+&NAMDYNCORE
+    LAQUA          = FALSE,
+/
+&NAMDYN
+    TSTEP          = ${ifs_time_step_sec}.0,
+    LMASCOR        = TRUE,
+    LMASDRY        = TRUE,
+/
+&NAMNMI
+    LASSI          = FALSE,
+/
+&NAMIOS
+    CFRCF          = "rcf",
+    CIOSPRF        = "srf",
+/
+&NAMFPG
+/
+&NAMCT0
+    LNHDYN         = FALSE,
+    NCONF          = 1,
+    CTYPE          = "fc",
+    CNMEXP         = "test",
+    CFCLASS        = "se",
+    LECMWF         = TRUE,
+    LARPEGEF       = FALSE,
+    LFDBOP         = FALSE,
+    LFPOS          = TRUE,
+    LSMSSIG        = FALSE,
+    LSPRT          = TRUE,
+    LSLAG          = TRUE,
+    LTWOTL         = TRUE,
+    LVERTFE        = TRUE,
+    LAPRXPK        = TRUE,
+    LOPT_SCALAR    = TRUE,
+    LPC_FULL       = FALSE,
+    LPC_CHEAP      = FALSE,
+    LPC_NESC       = FALSE,
+    LPC_NESCT      = FALSE,
+    LSLPHY         = TRUE,
+    LRFRIC         = TRUE,
+    LFPSPEC        = FALSE,
+    N3DINI         = 0,
+    NSTOP          = $(( leg_end_sec / ifs_time_step_sec )),
+    NFRDHP         = ${ifs_ddh_freq},
+    NFRSDI         = ${ifs_di_freq},
+    NFRGDI         = ${ifs_di_freq},
+    NFRPOS         = ${ifs_output_freq},
+    NFRHIS         = ${ifs_output_freq},
+    NFRMASSCON     = $(( 6 * 3600 / ifs_time_step_sec )),
+    NPOSTS         = 0,
+    NHISTS         = 0,
+    NMASSCONS      = 0,
+    NFRCO          = ${NFRCO},
+    NFRCO_CHEM     = ${NFRCO_CHEM},
+    NFRCO_VEG      = ${NFRCO_VEG},
+    LTM5CO2        = ${LTM5CO2},
+    NLEV_TM5       = ${NLEV_TM5},
+    NFRDHFZ        = 48,
+    NDHFZTS        = 0,
+    NDHFDTS        = 0,
+    LWROUTLAST     = ${ifs_lastout},
+    CFDIRLST       = "dirlist",
+    CNPPATH        = "postins",
+/
+&NAMDDH
+    BDEDDH(1,1)    = 4.0,1.0,0.0,50.0,0.0,49.0,
+    NDHKD          = 120,
+    LHDZON         = FALSE,
+    LHDEFZ         = FALSE,
+    LHDDOP         = FALSE,
+    LHDEFD         = FALSE,
+    LHDGLB         = TRUE,
+    LHDPRG         = TRUE,
+    LHDHKS         = TRUE,
+/
+&NAMGFL
+    LTRCMFIX       = TRUE,
+    NERA40         = 0,
+    YQ_NL%LGP      = TRUE,
+    YQ_NL%LSP      = FALSE,
+    YL_NL%LGP      = TRUE,
+    YI_NL%LGP      = TRUE,
+    YA_NL%LGP      = TRUE,
+    YO3_NL%LGP     = FALSE,
+    YQ_NL%LGPINGP  = TRUE,
+    YL_NL%LQM      = TRUE,
+    YI_NL%LQM      = TRUE,
+    YR_NL%LQM      = TRUE,
+    YS_NL%LQM      = TRUE,
+    YQ_NL%LMASSFIX = TRUE,
+    YL_NL%LMASSFIX = TRUE,
+    YI_NL%LMASSFIX = TRUE,
+    YR_NL%LMASSFIX = TRUE,
+    YS_NL%LMASSFIX = TRUE,
+    YCDNC_NL%LGP   = TRUE,
+    YICNC_NL%LGP   = TRUE,
+    YRE_LIQ_NL%LGP = TRUE,
+    YRE_ICE_NL%LGP = TRUE,
+    YCDNC_NL%CNAME = "CDNC",
+    YICNC_NL%CNAME = "ICNC",
+    YRE_LIQ_NL%CNAME ="Reff_liq",
+    YRE_ICE_NL%CNAME ="Reff_ice",
+/
+&NAMFPC
+    CFPFMT         = "MODEL",
+    NFP3DFS        = 5,
+    NFP3DFP        = 7,
+    NFP3DFT        = 1,
+    NFP3DFV        = 1,
+    MFP3DFS        = 130,135,138,155,133,
+    MFP3DFP        = 129,130,135,138,155,157,133,
+    MFP3DFT        = 60,
+    MFP3DFV        = 133,
+    NFP2DF         = 2,
+    MFP2DF         = 129,152,
+    NFPPHY         = 78,
+    MFPPHY         = 31,32,33,34,35,36,37,38,39,40,41,42,44,45,49,50,57,58,59,78,79,129,136,137,139,141,142,143,144,145,146,147,148,151,159,164,165,166,167,168,169,170,172,175,176,177,178,179,180,181,182,183,186,187,188,189,195,196,197,198,201,202,205,208,209,210,211,235,236,238,243,244,245,229,230,231,232,213,
+    NRFP3S         = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,
+    RFP3P          = 100000.0,92500.0,85000.0,70000.0,50000.0,40000.0,30000.0,25000.0,20000.0,15000.0,10000.0,7000.0,5000.0,3000.0,2000.0,1000.0,700.0,500.0,300.0,200.0,100.0,
+    LFITP          = TRUE,
+    LFITT          = FALSE,
+    LFITV          = FALSE,
+    NFPCLI         = 0,
+    LFPQ           = FALSE,
+    LASQ           = FALSE,
+    LTRACEFP       = FALSE,
+    RFPCORR        = 60000.,
+/
+&NAMFPD
+/
+&NAMDIM
+    NPROMA         = 0,
+    NUNDEFLD       = 0,
+/
+&NAMVAR
+    LMODERR        = FALSE,
+    LJCDFI         = FALSE,
+    LUSEJCDFI      = FALSE,
+/
+&NAMMCC
+    LMCCIEC        = TRUE,
+    LMCCEC         = TRUE,
+    LMCC04         = TRUE,
+    NOACOMM        = 5,
+    LMCCICEIC      = FALSE,
+    LRDALB         = FALSE, 
+    LRDVEG         = TRUE, 
+    LPISM          = FALSE,
+    LLANDICE       = ${ifs_landice},
+/
+&NAMPPC
+    LRSACC         = TRUE,
+/
+&NAMORB
+    LCORBMD =  $ifs_orb_switch,
+    ORBMODE = '$ifs_orb_mode',
+    ORBIY   =  $ifs_orb_iyear,
+/
+EOF
+
+# Resolution-dependent gravity wave drag parametrisation - using cy41r2 version
+# GFLUXLAUN=GFLUXLAUN*(1.0_JPRB-MIN(1.0_JPRB,atan((MAX(KSMAX,700)-700)/REAL(6000-700))))
+case ${ifs_grid} in
+T799L91)
+GFLUXLAUN=0.00367996
+;;
+T1279L91)
+GFLUXLAUN=0.00334195
+;;
+*)
+GFLUXLAUN=0.00375
+;;
+esac
+
+cat << EOF
+&NAMGWWMS
+    GFLUXLAUN=$GFLUXLAUN
+    ZLAUNCHP=45000
+    LOZPR=true
+    NGAUSS=2
+    GGAUSSB=-0.55
+/
+&NAMGWD
+    GTENLIM=0.0222
+/
+EOF
+
+# Add COSP namelist if needed
+has_config ifs:cosp && . $ctrl_file_dir/namelist.cosp.sh
+
+cat << EOF
+&NAEAER
+/
+&NALBAR
+/
+&NALORI
+/
+&NAM_DISTRIBUTED_VECTORS
+/
+&NAM926
+/
+&NAMAFN
+/
+&NAMANA
+/
+&NAMARPHY
+/
+&NAMCA
+/
+&NAMCAPE
+/
+&NAMCFU
+/
+&NAMCHK
+/
+&NAMCHET
+/
+&NAMCLDP
+    NCLDDIAG   = 0,
+    RLCRITSNOW = $RLCRITSNOW,
+    RVICE      = $RVICE,
+    RCLDIFF    = $RCLDIFF,
+    RCLDIFFC   = $RCLDIFFC,
+    RTAUMEL    = 7200.0,
+    RSNOWLIN2  = $RSNOWLIN2,
+    RCLCRIT    = 0.4E-3,
+    NCLOUDACT  = 2,
+    NACTPDF    = 10,
+    NAERCLD    = 9,
+    RLCRIT_UPHYS=$RLCRIT_UPHYS,
+/
+&NAMCLTC
+/
+&NAMCOM
+/
+&NAMCOS
+/
+&NAMCTAN
+/
+&NAMCOSPINPUT
+/
+&NAMCOSPOUTPUT
+/
+&NAMCUMF
+    ENTRORG = $ENTRORG,
+    ENTRDD  = $ENTRDD,
+    RPRCON  = $RPRCON,
+    DETRPEN = $DETRPEN,
+    RMFDEPS = $RMFDEPS,
+/
+&NAMCUMFS
+/
+&NAMCT1
+/
+&NAMCVA
+/
+&NAMDFHD
+/
+&NAMDFI
+/
+&NAMDIF
+/
+&NAMDIMO
+/
+&NAMDMSP
+/
+&NAMDPHY
+ NVXTR2=8,
+ NVEXTRDYN=0,
+/
+&NAMDYNA
+/
+&NAMEMIS_CONF
+/
+&NAMENKF
+/
+&NAMFA
+/
+&NAMFFT
+/
+&NAMFPDY2
+/
+&NAMFPDYH
+/
+&NAMFPDYP
+/
+&NAMFPDYS
+/
+&NAMFPDYT
+/
+&NAMFPDYV
+/
+&NAMFPEZO
+/
+&NAMFPF
+/
+&NAMFPIOS
+/
+&NAMFPPHY
+/
+&NAMFPSC2
+/
+&NAMFPSC2_DEP
+/
+&NAMFY2
+/
+&NAMGEM
+/
+&NAMGMS
+/
+&NAMGOES
+/
+&NAMGOM
+/
+&NAMGRIB
+    NENSFNB = ${NENSFNB},
+/
+&NAMGWD
+/
+&NAMGWWMS
+/
+&NAMHLOPT
+/
+&NAMINI
+/
+&NAMIOMI
+/
+&NAMJBCODES
+/
+&NAMJFH
+/
+&NAMJG
+/
+&NAMJO
+/
+&NAMKAP
+/
+&NAMLCZ
+/
+&NAMLEG
+/
+&NAMLFI
+/
+&NAMMCUF
+/
+&NAMMETEOSAT
+/
+&NAMMTS
+/
+&NAMMTSAT
+/
+&NAMMTT
+/
+&NAMMUL
+/
+&NAMNASA
+/
+&NAMNN
+/
+&NAMNPROF
+/
+&NAMNUD
+/
+&NAMOBS
+/
+&NAMONEDVAR
+/
+&NAMOPH
+/
+&NAMPARAR
+/
+&NAMPHY
+/
+&NAMPHY0
+/
+&NAMPHY1
+/
+&NAMPHY2
+/
+&NAMPHY3
+/
+! remove the CVEXTR2 defintions if using in combination with
+! other PEXTRA/PEXTR2 diagnostics
+&NAMPHYDS
+ NVEXTR2GB=126068,126069,126070,126071,126072,126073,126074,126075,
+ CVEXTR2(1)='clear SW TOA', 
+ CVEXTR2(2)='total SW TOA', 
+ CVEXTR2(3)='clear SW surf', 
+ CVEXTR2(4)='total SW surf',  
+ CVEXTR2(5)='clear LW TOA',   
+ CVEXTR2(6)='total LW TOA', 
+ CVEXTR2(7)='clear LW surf', 
+ CVEXTR2(8)='total LW surf', 
+ VEXTR2DF=0.,0.,0.,0.,0.,0.,0.,0.,
+/
+&NAMPONG
+/
+&NAMRAD15
+/
+&NAMRCOEF
+/
+&NAMRINC
+/
+&NAMRIP
+/
+&NAMRLX
+    LRLXG          = ${LRLXG},
+    LRLXVO         = FALSE,
+    LRLXDI         = FALSE,
+    LRLXTE         = FALSE,
+    LRLXQ          = FALSE,
+    LRLXQL         = FALSE,
+    LRLXQI         = FALSE,
+    LRLXQC         = FALSE,
+    LRLXLP         = FALSE,
+    XRLXVO         = 0.1,
+    XRLXDI         = 0.1,
+    XRLXTE         = 0.1,
+    XRLXQ          = 0.1,
+    XRLXLP         = 0.1,
+    ALATRLX1       = 90,
+    ALATRLX2       = -90,
+    ALONRLX1       = 0,
+    ALONRLX2       = 360,
+    AXRLX          = -0.5,
+    AYRLX          = -0.5,
+    AZRLX          = 1.0,
+    NRLXLMIN       = 1,
+    NRLXLMAX       = 91,
+/
+&NAMSCC
+/
+&NAMSCEN
+/
+&NAMSCM
+/
+&NAMSENS
+/
+&NAMSIMPHL
+/
+&NAMSKF
+/
+&NAMSPSDT
+    LFIXSPPT	    = ${LFIXSPPT},
+    LSPSDT          = ${LSPSDT},
+    LCLIP_SPEC_SDT  = TRUE,
+    LCLIP_GRID_SDT  = TRUE,
+    LWRITE_ARP      = FALSE,
+    LUSESETRAN_SDT  = TRUE,
+    LRESETSEED_SDT  = FALSE,
+    NSCALES_SDT     = 3,
+    CSPEC_SHAPE_SDT ='WeaverCourtier',
+    SDEV_SDT        = 0.52,0.18,0.06,
+    TAU_SDT         = 2.16E4,2.592E5,2.592E6,
+    XLCOR_SDT       = 500.E3,1000.E3,2000.E3,
+    XCLIP_RATIO_SDT = 1.8,
+    LTAPER_BL0      = TRUE,
+    XSIGMATOP       = 0.87,
+    XSIGMABOT       = 0.97,
+    LTAPER_ST0      = TRUE,
+    XPRESSTOP_ST0   = 50.E2,
+    XPRESSBOT_ST0   = 100.E2,
+    LQPERTLIMIT2    = TRUE,
+/
+&NAMSTA
+/
+&NAMSTOPH
+/
+&NAMTCWV
+/
+&NAMTESTVAR
+/
+&NAMTLEVOL
+/
+&NAMTOPH
+/
+&NAMTOVS
+/
+&NAMTRAJP
+/
+&NAMTRANS
+/
+&NAMTRM
+/
+&NAMVARBC
+/
+&NAMVARBC_AIREP
+/
+&NAMVARBC_ALLSKY
+/
+&NAMVARBC_RAD
+/
+&NAMVARBC_TCWV
+/
+&NAMVARBC_TO3
+/
+&NAMVAREPS
+/
+&NAMVDOZ
+/
+&NAMVFP
+/
+&NAMVRTL
+/
+&NAMVV1
+/
+&NAMVV2
+/
+&NAMVWRK
+/
+&NAMXFU
+/
+&NAMZDI
+/
+&NAPHLC
+/
+&NAV1IS
+/
+EOF

+ 658 - 0
runtime/classic/ctrl/namelist.ifs.rlxsm.sh

@@ -0,0 +1,658 @@
+# namelist.ifs.sh
+
+# Set coupling frequencies for ocean and chemistry coupling
+(( ${cpl_freq_atm_oce_sec:-} )) && NFRCO=$(( cpl_freq_atm_oce_sec / ifs_time_step_sec )) || NFRCO=0
+(( ${cpl_freq_atm_ctm_hrs:-} )) && NFRCO_CHEM=$(( cpl_freq_atm_ctm_hrs * 3600 / ifs_time_step_sec )) || NFRCO_CHEM=0
+(( ${cpl_freq_atm_lpjg_hrs:-} )) && NFRCO_VEG=$(( cpl_freq_atm_lpjg_hrs * 3600 / ifs_time_step_sec )) || NFRCO_VEG=0
+
+# Activate warm ocean parametrisation only in AMIP runs
+(( ${cpl_freq_amip_sec:-} )) && LEOCWA=TRUE || LEOCWA=FALSE
+
+# Switch on/off TM5 feedback to IFS, and between CO2-only and full-chemistry TM5 configs 
+has_config tm5:o3fb  && LTM5O3=TRUE  || LTM5O3=FALSE
+has_config tm5:ch4fb && LTM5CH4=TRUE || LTM5CH4=FALSE
+has_config tm5:aerfb && LTM5AER=TRUE || LTM5AER=FALSE
+has_config tm5:co2   && LTM5CO2=TRUE || LTM5CO2=FALSE
+has_config tm5:co2fb && LTM5CO2FB=TRUE || LTM5CO2FB=FALSE
+NLEV_TM5=${tm5_exch_nlevs:-999}
+
+# Switch on/off SPPT and set the ensemble member number (defaults to zero)
+has_config sppt && LSPSDT=TRUE || LSPSDT=FALSE
+has_config sppt && LFIXSPPT=TRUE || LFIXSPPT=FALSE
+NENSFNB=${ifs_ensemble_forecast_number:-0}
+
+# Switch on/off LPJ-GUESS feedback to IFS
+(( ${lpjg_on:-}   )) && LLPJGON=TRUE  || LLPJGON=FALSE
+(( ${lpjg_fdbck:-}  )) && LLPJGFBON=TRUE || LLPJGFBON=FALSE
+
+# Switch on/off atmospheric nudging
+has_config atmnudg && LRLXG=TRUE || LRLXG=FALSE
+
+
+cat << EOF
+&NAMRES
+    NFRRES         = 1,
+    NRESTS         = -1,-$(( leg_end_sec / 3600 )),
+/
+&NAERAD
+    NRPROMA        = 0,
+    LCMIP6         = ${ifs_cmip6},
+    SSPNAME        = ${ifs_cmip6_scenario},
+    LCOVID19       = ${ifs_covid19},
+    COVID19SCEN    = ${ifs_covid19scen},
+    LSSP370_LOWCH4 = FALSE,
+    CMIP6DATADIR   = "${ini_data_dir}/ifs/cmip6-data/",
+    LA4xCO2        = ${ifs_A4xCO2},
+    L1PCTCO2       = ${ifs_1PCTCO2},
+    LCMIP5         = ${ifs_cmip5},
+    CMIP5DATADIR   = "${ini_data_dir}/ifs/cmip5-data",
+    NCMIPFIXYR     = ${ifs_cmip_fixyear},
+    NCMIPFIXYR_CH4 = ${ifs_cmip_fixyear_ch4},
+    NRCP           = ${ifs_cmip5_rcp},
+    LHVOLCA        = TRUE,
+    LTM5O3         = ${LTM5O3},
+    LTM5CH4        = ${LTM5CH4},
+    LTM5CO2FB      = ${LTM5CO2FB},
+    LTM5AER        = ${LTM5AER},
+    LLPJGON        = ${LLPJGON},
+    LLPJGFBON      = ${LLPJGFBON},
+    LCMIP6_PI_AEROSOLS = ${ifs_cmip6piaer},
+    LCMIP6_STRATAER_SIMP = ${lcmip6_strataer_simp},
+    LCMIP6_STRATAER_BCKGD = ${lcmip6_strataer_bckgd},
+    LCMIP6_STRATAER_FULL = ${lcmip6_strataer_full},
+    CCMIP6_STRAT_SIMP  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_total_AOD_masked_troposphere_mean_3.0.0.txt",
+    CCMIP6_STRAT_FULL  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_EC_EARTH_aerosol_radiation_2D_3.0.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_OPT      = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_opt_v4.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_CONC     = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_conc_v4.0_L${ifs_res_ver}.nc",
+    LMAC2SP            = ${ifs_mac2sp},
+    MAC2SPDIR          = "${ini_data_dir}/ifs/macv2sp-data/",
+    LMAC2SPACI         = TRUE,
+/
+&NAEPHY
+    LEPHYS         = TRUE,
+    LEVDIF         = TRUE,
+    LESURF         = TRUE,
+    LECOND         = TRUE,
+    LECUMF         = TRUE,
+    LEPCLD         = TRUE,
+    LEEVAP         = TRUE,
+    LEVGEN         = TRUE,
+    LESSRO         = TRUE,
+    LECURR         = FALSE,
+    LEGWDG         = TRUE,
+    LEGWWMS        = TRUE,
+    LEOCWA         = ${LEOCWA},
+    LEOZOC         = TRUE,
+    LEQNGT         = TRUE,
+    LERADI         = TRUE,
+    LERADS         = TRUE,
+    LESICE         = TRUE,
+    LEO3CH         = FALSE,
+    LEDCLD         = TRUE,
+    LDUCTDIA       = FALSE,
+    LWCOU          = FALSE,
+    LWCOU2W        = TRUE,
+    NSTPW          = 1,
+    RDEGREW        = 1.5,
+    RSOUTW         = -81.0,
+    RNORTW         = 81.0,
+    N_COMPUTE_EFF_VEG_FRACTION = $n_compute_eff_veg_fraction
+/
+&NAMPAR1
+    LSPLIT         = TRUE,
+    NFLDIN         = 0,
+    NFLDOUT        = 50,
+    NSTRIN         = 1,
+/
+&NAMPAR0
+    LSTATS         = TRUE,
+    LDETAILED_STATS= FALSE,
+    LSYNCSTATS     = FALSE,
+    LSTATSCPU      = FALSE,
+    NPRNT_STATS    = 32,
+    LBARRIER_STATS = FALSE,
+    LBARRIER_STATS2= FALSE,
+    NPROC          = ${ifs_numproc},
+EOF
+
+# enforce layout for passing spectral fields to TM
+has_config tm5 &&
+cat << EOF
+    NPRTRW         = ${ifs_numproc},
+    NPRTRV         = 1,
+EOF
+
+cat << EOF
+    NOUTPUT        = 1,
+    MP_TYPE        = 2,
+    MBX_SIZE       = 128000000,
+/
+&NAMRLXSM
+    LRXSM          = ${ifs_lrxsm},
+    LRXSMT1        = ${ifs_lrxsmt1},
+    LRXSMT2        = ${ifs_lrxsmt2},
+    LRXSMT3        = ${ifs_lrxsmt3},
+    LRXSMT4        = ${ifs_lrxsmt4},
+    LRXSMS         = ${ifs_lrxsms},
+    RLXSMDIR       = "${ini_data_dir}/ifs/ERAILandClim",
+/
+&NAMDYNCORE
+    LAQUA          = FALSE,
+/
+&NAMDYN
+    TSTEP          = ${ifs_time_step_sec}.0,
+    LMASCOR        = TRUE,
+    LMASDRY        = TRUE,
+/
+&NAMNMI
+    LASSI          = FALSE,
+/
+&NAMIOS
+    CFRCF          = "rcf",
+    CIOSPRF        = "srf",
+/
+&NAMFPG
+/
+&NAMCT0
+    LNHDYN         = FALSE,
+    NCONF          = 1,
+    CTYPE          = "fc",
+    CNMEXP         = "test",
+    CFCLASS        = "se",
+    LECMWF         = TRUE,
+    LARPEGEF       = FALSE,
+    LFDBOP         = FALSE,
+    LFPOS          = TRUE,
+    LSMSSIG        = FALSE,
+    LSPRT          = TRUE,
+    LSLAG          = TRUE,
+    LTWOTL         = TRUE,
+    LVERTFE        = TRUE,
+    LAPRXPK        = TRUE,
+    LOPT_SCALAR    = TRUE,
+    LPC_FULL       = FALSE,
+    LPC_CHEAP      = FALSE,
+    LPC_NESC       = FALSE,
+    LPC_NESCT      = FALSE,
+    LSLPHY         = TRUE,
+    LRFRIC         = TRUE,
+    LFPSPEC        = FALSE,
+    N3DINI         = 0,
+    NSTOP          = $(( leg_end_sec / ifs_time_step_sec )),
+    NFRDHP         = ${ifs_ddh_freq},
+    NFRSDI         = ${ifs_di_freq},
+    NFRGDI         = ${ifs_di_freq},
+    NFRPOS         = ${ifs_output_freq},
+    NFRHIS         = ${ifs_output_freq},
+    NFRMASSCON     = $(( 6 * 3600 / ifs_time_step_sec )),
+    NPOSTS         = 0,
+    NHISTS         = 0,
+    NMASSCONS      = 0,
+    NFRCO          = ${NFRCO},
+    NFRCO_CHEM     = ${NFRCO_CHEM},
+    NFRCO_VEG      = ${NFRCO_VEG},
+    LTM5CO2        = ${LTM5CO2},
+    NLEV_TM5       = ${NLEV_TM5},
+    NFRDHFZ        = 48,
+    NDHFZTS        = 0,
+    NDHFDTS        = 0,
+    LWROUTLAST     = ${ifs_lastout},
+    CFDIRLST       = "dirlist",
+    CNPPATH        = "postins",
+/
+&NAMDDH
+    BDEDDH(1,1)    = 4.0,1.0,0.0,50.0,0.0,49.0,
+    NDHKD          = 120,
+    LHDZON         = FALSE,
+    LHDEFZ         = FALSE,
+    LHDDOP         = FALSE,
+    LHDEFD         = FALSE,
+    LHDGLB         = TRUE,
+    LHDPRG         = TRUE,
+    LHDHKS         = TRUE,
+/
+&NAMGFL
+    LTRCMFIX       = TRUE,
+    NERA40         = 0,
+    YQ_NL%LGP      = TRUE,
+    YQ_NL%LSP      = FALSE,
+    YL_NL%LGP      = TRUE,
+    YI_NL%LGP      = TRUE,
+    YA_NL%LGP      = TRUE,
+    YO3_NL%LGP     = FALSE,
+    YQ_NL%LGPINGP  = TRUE,
+    YL_NL%LQM      = TRUE,
+    YI_NL%LQM      = TRUE,
+    YR_NL%LQM      = TRUE,
+    YS_NL%LQM      = TRUE,
+    YQ_NL%LMASSFIX = TRUE,
+    YL_NL%LMASSFIX = TRUE,
+    YI_NL%LMASSFIX = TRUE,
+    YR_NL%LMASSFIX = TRUE,
+    YS_NL%LMASSFIX = TRUE,
+    YCDNC_NL%LGP   = TRUE,
+    YICNC_NL%LGP   = TRUE,
+    YRE_LIQ_NL%LGP = TRUE,
+    YRE_ICE_NL%LGP = TRUE,
+    YCDNC_NL%CNAME = "CDNC",
+    YICNC_NL%CNAME = "ICNC",
+    YRE_LIQ_NL%CNAME ="Reff_liq",
+    YRE_ICE_NL%CNAME ="Reff_ice",
+/
+&NAMFPC
+    CFPFMT         = "MODEL",
+    NFP3DFS        = 5,
+    NFP3DFP        = 7,
+    NFP3DFT        = 1,
+    NFP3DFV        = 1,
+    MFP3DFS        = 130,135,138,155,133,
+    MFP3DFP        = 129,130,135,138,155,157,133,
+    MFP3DFT        = 60,
+    MFP3DFV        = 133,
+    NFP2DF         = 2,
+    MFP2DF         = 129,152,
+    NFPPHY         = 78,
+    MFPPHY         = 31,32,33,34,35,36,37,38,39,40,41,42,44,45,49,50,57,58,59,78,79,129,136,137,139,141,142,143,144,145,146,147,148,151,159,164,165,166,167,168,169,170,172,175,176,177,178,179,180,181,182,183,186,187,188,189,195,196,197,198,201,202,205,208,209,210,211,235,236,238,243,244,245,229,230,231,232,213,
+    NRFP3S         = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,
+    RFP3P          = 100000.0,92500.0,85000.0,70000.0,50000.0,40000.0,30000.0,25000.0,20000.0,15000.0,10000.0,7000.0,5000.0,3000.0,2000.0,1000.0,700.0,500.0,300.0,200.0,100.0,
+    LFITP          = TRUE,
+    LFITT          = FALSE,
+    LFITV          = FALSE,
+    NFPCLI         = 0,
+    LFPQ           = FALSE,
+    LASQ           = FALSE,
+    LTRACEFP       = FALSE,
+    RFPCORR        = 60000.,
+/
+&NAMFPD
+/
+&NAMDIM
+    NPROMA         = 0,
+    NUNDEFLD       = 0,
+/
+&NAMVAR
+    LMODERR        = FALSE,
+    LJCDFI         = FALSE,
+    LUSEJCDFI      = FALSE,
+/
+&NAMMCC
+    LMCCIEC        = TRUE,
+    LMCCEC         = TRUE,
+    LMCC04         = TRUE,
+    NOACOMM        = 5,
+    LMCCICEIC      = FALSE,
+    LRDALB         = FALSE, 
+    LRDVEG         = TRUE, 
+    LPISM          = FALSE,
+    LLANDICE       = ${ifs_landice},
+/
+&NAMPPC
+    LRSACC         = TRUE,
+/
+&NAMORB
+    LCORBMD =  $ifs_orb_switch,
+    ORBMODE = '$ifs_orb_mode',
+    ORBIY   =  $ifs_orb_iyear,
+/
+EOF
+
+# Resolution-dependent gravity wave drag parametrisation - using cy41r2 version
+# GFLUXLAUN=GFLUXLAUN*(1.0_JPRB-MIN(1.0_JPRB,atan((MAX(KSMAX,700)-700)/REAL(6000-700))))
+case ${ifs_grid} in
+T799L91)
+GFLUXLAUN=0.00367996
+;;
+T1279L91)
+GFLUXLAUN=0.00334195
+;;
+*)
+GFLUXLAUN=0.00375
+;;
+esac
+
+cat << EOF
+&NAMGWWMS
+    GFLUXLAUN=$GFLUXLAUN
+    ZLAUNCHP=45000
+    LOZPR=true
+    NGAUSS=2
+    GGAUSSB=-0.55
+/
+&NAMGWD
+    GTENLIM=0.0222
+/
+EOF
+
+# Add COSP namelist if needed
+has_config ifs:cosp && . $ctrl_file_dir/namelist.cosp.sh
+
+cat << EOF
+&NAEAER
+/
+&NALBAR
+/
+&NALORI
+/
+&NAM_DISTRIBUTED_VECTORS
+/
+&NAM926
+/
+&NAMAFN
+/
+&NAMANA
+/
+&NAMARPHY
+/
+&NAMCA
+/
+&NAMCAPE
+/
+&NAMCFU
+/
+&NAMCHK
+/
+&NAMCHET
+/
+&NAMCLDP
+    NCLDDIAG   = 0,
+    RLCRITSNOW = $RLCRITSNOW,
+    RVICE      = $RVICE,
+    RCLDIFF    = $RCLDIFF,
+    RCLDIFFC   = $RCLDIFFC,
+    RTAUMEL    = 7200.0,
+    RSNOWLIN2  = $RSNOWLIN2,
+    RCLCRIT    = 0.4E-3,
+    NCLOUDACT  = 2,
+    NACTPDF    = 10,
+    NAERCLD    = 9,
+    RLCRIT_UPHYS=$RLCRIT_UPHYS,
+/
+&NAMCLTC
+/
+&NAMCOM
+/
+&NAMCOS
+/
+&NAMCTAN
+/
+&NAMCOSPINPUT
+/
+&NAMCOSPOUTPUT
+/
+&NAMCUMF
+    ENTRORG = $ENTRORG,
+    ENTRDD  = $ENTRDD,
+    RPRCON  = $RPRCON,
+    DETRPEN = $DETRPEN,
+    RMFDEPS = $RMFDEPS,
+/
+&NAMCUMFS
+/
+&NAMCT1
+/
+&NAMCVA
+/
+&NAMDFHD
+/
+&NAMDFI
+/
+&NAMDIF
+/
+&NAMDIMO
+/
+&NAMDMSP
+/
+&NAMDPHY
+NVXTR2=12,
+/
+&NAMDYNA
+/
+&NAMEMIS_CONF
+/
+&NAMENKF
+/
+&NAMFA
+/
+&NAMFFT
+/
+&NAMFPDY2
+/
+&NAMFPDYH
+/
+&NAMFPDYP
+/
+&NAMFPDYS
+/
+&NAMFPDYT
+/
+&NAMFPDYV
+/
+&NAMFPEZO
+/
+&NAMFPF
+/
+&NAMFPIOS
+/
+&NAMFPPHY
+/
+&NAMFPSC2
+/
+&NAMFPSC2_DEP
+/
+&NAMFY2
+/
+&NAMGEM
+/
+&NAMGMS
+/
+&NAMGOES
+/
+&NAMGOM
+/
+&NAMGRIB
+    NENSFNB = ${NENSFNB},
+/
+&NAMGWD
+/
+&NAMGWWMS
+/
+&NAMHLOPT
+/
+&NAMINI
+/
+&NAMIOMI
+/
+&NAMJBCODES
+/
+&NAMJFH
+/
+&NAMJG
+/
+&NAMJO
+/
+&NAMKAP
+/
+&NAMLCZ
+/
+&NAMLEG
+/
+&NAMLFI
+/
+&NAMMCUF
+/
+&NAMMETEOSAT
+/
+&NAMMTS
+/
+&NAMMTSAT
+/
+&NAMMTT
+/
+&NAMMUL
+/
+&NAMNASA
+/
+&NAMNN
+/
+&NAMNPROF
+/
+&NAMNUD
+/
+&NAMOBS
+/
+&NAMONEDVAR
+/
+&NAMOPH
+/
+&NAMPARAR
+/
+&NAMPHY
+/
+&NAMPHY0
+/
+&NAMPHY1
+/
+&NAMPHY2
+/
+&NAMPHY3
+/
+&NAMPHYDS
+NVEXTR2GB=126089,126090,126091,126092,126099,126100,126101,126102,126109,126110,126111,126112,
+CVEXTR2(1)='089_swvl1_before_relaxation',
+CVEXTR2(2)='090_swvl2_before_relaxation',
+CVEXTR2(3)='091_swvl3_before_relaxation',
+CVEXTR2(4)='092_swvl4_before_relaxation',
+CVEXTR2(5)='099_swvl1_relaxation_difference',
+CVEXTR2(6)='100_swvl2_relaxation_difference',
+CVEXTR2(7)='101_swvl3_relaxation_difference',
+CVEXTR2(8)='102_swvl4_relaxation_difference',
+CVEXTR2(9)='109_swvl1_after_relaxation',
+CVEXTR2(10)='110_swvl2_after_relaxation',
+CVEXTR2(11)='111_swvl3_after_relaxation',
+CVEXTR2(12)='112_swvl4_after_relaxation',
+VEXTR2DF=0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+/
+&NAMPONG
+/
+&NAMRAD15
+/
+&NAMRCOEF
+/
+&NAMRINC
+/
+&NAMRIP
+/
+&NAMRLX
+    LRLXG          = ${LRLXG},
+    LRLXVO         = FALSE,
+    LRLXDI         = FALSE,
+    LRLXTE         = FALSE,
+    LRLXQ          = FALSE,
+    LRLXQL         = FALSE,
+    LRLXQI         = FALSE,
+    LRLXQC         = FALSE,
+    LRLXLP         = FALSE,
+    XRLXVO         = 0.1,
+    XRLXDI         = 0.1,
+    XRLXTE         = 0.1,
+    XRLXQ          = 0.1,
+    XRLXLP         = 0.1,
+    ALATRLX1       = 90,
+    ALATRLX2       = -90,
+    ALONRLX1       = 0,
+    ALONRLX2       = 360,
+    AXRLX          = -0.5,
+    AYRLX          = -0.5,
+    AZRLX          = 1.0,
+    NRLXLMIN       = 1,
+    NRLXLMAX       = 91,
+/
+&NAMSCC
+/
+&NAMSCEN
+/
+&NAMSCM
+/
+&NAMSENS
+/
+&NAMSIMPHL
+/
+&NAMSKF
+/
+&NAMSPSDT
+    LFIXSPPT	    = ${LFIXSPPT},
+    LSPSDT          = ${LSPSDT},
+    LCLIP_SPEC_SDT  = TRUE,
+    LCLIP_GRID_SDT  = TRUE,
+    LWRITE_ARP      = FALSE,
+    LUSESETRAN_SDT  = TRUE,
+    LRESETSEED_SDT  = FALSE,
+    NSCALES_SDT     = 3,
+    CSPEC_SHAPE_SDT ='WeaverCourtier',
+    SDEV_SDT        = 0.52,0.18,0.06,
+    TAU_SDT         = 2.16E4,2.592E5,2.592E6,
+    XLCOR_SDT       = 500.E3,1000.E3,2000.E3,
+    XCLIP_RATIO_SDT = 1.8,
+    LTAPER_BL0      = TRUE,
+    XSIGMATOP       = 0.87,
+    XSIGMABOT       = 0.97,
+    LTAPER_ST0      = TRUE,
+    XPRESSTOP_ST0   = 50.E2,
+    XPRESSBOT_ST0   = 100.E2,
+    LQPERTLIMIT2    = TRUE,
+/
+&NAMSTA
+/
+&NAMSTOPH
+/
+&NAMTCWV
+/
+&NAMTESTVAR
+/
+&NAMTLEVOL
+/
+&NAMTOPH
+/
+&NAMTOVS
+/
+&NAMTRAJP
+/
+&NAMTRANS
+/
+&NAMTRM
+/
+&NAMVARBC
+/
+&NAMVARBC_AIREP
+/
+&NAMVARBC_ALLSKY
+/
+&NAMVARBC_RAD
+/
+&NAMVARBC_TCWV
+/
+&NAMVARBC_TO3
+/
+&NAMVAREPS
+/
+&NAMVDOZ
+/
+&NAMVFP
+/
+&NAMVRTL
+/
+&NAMVV1
+/
+&NAMVV2
+/
+&NAMVWRK
+/
+&NAMXFU
+/
+&NAMZDI
+/
+&NAPHLC
+/
+&NAV1IS
+/
+EOF

+ 643 - 0
runtime/classic/ctrl/namelist.ifs.sh

@@ -0,0 +1,643 @@
+# namelist.ifs.sh
+
+# Set coupling frequencies for ocean and chemistry coupling
+(( ${cpl_freq_atm_oce_sec:-} )) && NFRCO=$(( cpl_freq_atm_oce_sec / ifs_time_step_sec )) || NFRCO=0
+(( ${cpl_freq_atm_ctm_hrs:-} )) && NFRCO_CHEM=$(( cpl_freq_atm_ctm_hrs * 3600 / ifs_time_step_sec )) || NFRCO_CHEM=0
+(( ${cpl_freq_atm_lpjg_hrs:-} )) && NFRCO_VEG=$(( cpl_freq_atm_lpjg_hrs * 3600 / ifs_time_step_sec )) || NFRCO_VEG=0
+
+# Activate warm ocean parametrisation only in AMIP runs
+(( ${cpl_freq_amip_sec:-} )) && LEOCWA=TRUE || LEOCWA=FALSE
+
+# Switch on/off TM5 feedback to IFS, and between CO2-only and full-chemistry TM5 configs 
+has_config tm5:o3fb  && LTM5O3=TRUE  || LTM5O3=FALSE
+has_config tm5:ch4fb && LTM5CH4=TRUE || LTM5CH4=FALSE
+has_config tm5:aerfb && LTM5AER=TRUE || LTM5AER=FALSE
+has_config tm5:co2   && LTM5CO2=TRUE || LTM5CO2=FALSE
+has_config tm5:co2fb && LTM5CO2FB=TRUE || LTM5CO2FB=FALSE
+NLEV_TM5=${tm5_exch_nlevs:-999}
+
+# Switch on/off SPPT and set the ensemble member number (defaults to zero)
+has_config sppt && LSPSDT=TRUE || LSPSDT=FALSE
+has_config sppt && LFIXSPPT=TRUE || LFIXSPPT=FALSE
+NENSFNB=${ifs_ensemble_forecast_number:-0}
+
+# Switch on/off LPJ-GUESS feedback to IFS
+(( ${lpjg_on:-}   )) && LLPJGON=TRUE  || LLPJGON=FALSE
+(( ${lpjg_fdbck:-}  )) && LLPJGFBON=TRUE || LLPJGFBON=FALSE
+
+# Switch on/off atmospheric nudging
+has_config atmnudg && LRLXG=TRUE || LRLXG=FALSE
+
+
+cat << EOF
+&NAMRES
+    NFRRES         = 1,
+    NRESTS         = -1,-$(( leg_end_sec / 3600 )),
+/
+&NAERAD
+    NRPROMA        = 0,
+    LCMIP6         = ${ifs_cmip6},
+    SSPNAME        = ${ifs_cmip6_scenario},
+    LCOVID19       = ${ifs_covid19},
+    COVID19SCEN    = ${ifs_covid19scen},
+    LSSP370_LOWCH4 = FALSE,
+    CMIP6DATADIR   = "${ini_data_dir}/ifs/cmip6-data/",
+    LA4xCO2        = ${ifs_A4xCO2},
+    L1PCTCO2       = ${ifs_1PCTCO2},
+    LCMIP5         = ${ifs_cmip5},
+    CMIP5DATADIR   = "${ini_data_dir}/ifs/cmip5-data",
+    NCMIPFIXYR     = ${ifs_cmip_fixyear},
+    NCMIPFIXYR_CH4 = ${ifs_cmip_fixyear_ch4},
+    NRCP           = ${ifs_cmip5_rcp},
+    LHVOLCA        = TRUE,
+    LTM5O3         = ${LTM5O3},
+    LTM5CH4        = ${LTM5CH4},
+    LTM5CO2FB      = ${LTM5CO2FB},
+    LTM5AER        = ${LTM5AER},
+    LLPJGON        = ${LLPJGON},
+    LLPJGFBON      = ${LLPJGFBON},
+    LCMIP6_PI_AEROSOLS = ${ifs_cmip6piaer},
+    LCMIP6_STRATAER_SIMP = ${lcmip6_strataer_simp},
+    LCMIP6_STRATAER_BCKGD = ${lcmip6_strataer_bckgd},
+    LCMIP6_STRATAER_FULL = ${lcmip6_strataer_full},
+    CCMIP6_STRAT_SIMP  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_total_AOD_masked_troposphere_mean_3.0.0.txt",
+    CCMIP6_STRAT_FULL  = "${ini_data_dir}/ifs/cmip6-data/CMIP6_1850_2014_EC_EARTH_aerosol_radiation_2D_3.0.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_OPT      = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_opt_v4.0_L${ifs_res_ver}.nc",
+    AEROPIFIL_CONC     = "${ini_data_dir}/ifs/macv2sp-data/tm5_clim_pi_aerosol_conc_v4.0_L${ifs_res_ver}.nc",
+    LMAC2SP            = ${ifs_mac2sp},
+    MAC2SPDIR          = "${ini_data_dir}/ifs/macv2sp-data/",
+    LMAC2SPACI         = TRUE,
+/
+&NAEPHY
+    LEPHYS         = TRUE,
+    LEVDIF         = TRUE,
+    LESURF         = TRUE,
+    LECOND         = TRUE,
+    LECUMF         = TRUE,
+    LEPCLD         = TRUE,
+    LEEVAP         = TRUE,
+    LEVGEN         = TRUE,
+    LESSRO         = TRUE,
+    LECURR         = FALSE,
+    LEGWDG         = TRUE,
+    LEGWWMS        = TRUE,
+    LEOCWA         = ${LEOCWA},
+    LEOZOC         = TRUE,
+    LEQNGT         = TRUE,
+    LERADI         = TRUE,
+    LERADS         = TRUE,
+    LESICE         = TRUE,
+    LEO3CH         = FALSE,
+    LEDCLD         = TRUE,
+    LDUCTDIA       = FALSE,
+    LWCOU          = FALSE,
+    LWCOU2W        = TRUE,
+    NSTPW          = 1,
+    RDEGREW        = 1.5,
+    RSOUTW         = -81.0,
+    RNORTW         = 81.0,
+    N_COMPUTE_EFF_VEG_FRACTION = $n_compute_eff_veg_fraction
+/
+&NAMPAR1
+    LSPLIT         = TRUE,
+    NFLDIN         = 0,
+    NFLDOUT        = 50,
+    NSTRIN         = 1,
+/
+&NAMPAR0
+    LSTATS         = TRUE,
+    LDETAILED_STATS= FALSE,
+    LSYNCSTATS     = FALSE,
+    LSTATSCPU      = FALSE,
+    NPRNT_STATS    = 32,
+    LBARRIER_STATS = FALSE,
+    LBARRIER_STATS2= FALSE,
+    NPROC          = ${ifs_numproc},
+EOF
+
+# enforce layout for passing spectral fields to TM
+has_config tm5 &&
+cat << EOF
+    NPRTRW         = ${ifs_numproc},
+    NPRTRV         = 1,
+EOF
+
+cat << EOF
+    NOUTPUT        = 1,
+    MP_TYPE        = 2,
+    MBX_SIZE       = 128000000,
+/
+&NAMRLXSM
+    LRXSM          = ${ifs_lrxsm},
+    LRXSMT1        = ${ifs_lrxsmt1},
+    LRXSMT2        = ${ifs_lrxsmt2},
+    LRXSMT3        = ${ifs_lrxsmt3},
+    LRXSMT4        = ${ifs_lrxsmt4},
+    LRXSMS         = ${ifs_lrxsms},
+    RLXSMDIR       = "${ini_data_dir}/ifs/ERAILandClim",
+/
+&NAMDYNCORE
+    LAQUA          = FALSE,
+/
+&NAMDYN
+    TSTEP          = ${ifs_time_step_sec}.0,
+    LMASCOR        = TRUE,
+    LMASDRY        = TRUE,
+/
+&NAMNMI
+    LASSI          = FALSE,
+/
+&NAMIOS
+    CFRCF          = "rcf",
+    CIOSPRF        = "srf",
+/
+&NAMFPG
+/
+&NAMCT0
+    LNHDYN         = FALSE,
+    NCONF          = 1,
+    CTYPE          = "fc",
+    CNMEXP         = "test",
+    CFCLASS        = "se",
+    LECMWF         = TRUE,
+    LARPEGEF       = FALSE,
+    LFDBOP         = FALSE,
+    LFPOS          = TRUE,
+    LSMSSIG        = FALSE,
+    LSPRT          = TRUE,
+    LSLAG          = TRUE,
+    LTWOTL         = TRUE,
+    LVERTFE        = TRUE,
+    LAPRXPK        = TRUE,
+    LOPT_SCALAR    = TRUE,
+    LPC_FULL       = FALSE,
+    LPC_CHEAP      = FALSE,
+    LPC_NESC       = FALSE,
+    LPC_NESCT      = FALSE,
+    LSLPHY         = TRUE,
+    LRFRIC         = TRUE,
+    LFPSPEC        = FALSE,
+    N3DINI         = 0,
+    NSTOP          = $(( leg_end_sec / ifs_time_step_sec )),
+    NFRDHP         = ${ifs_ddh_freq},
+    NFRSDI         = ${ifs_di_freq},
+    NFRGDI         = ${ifs_di_freq},
+    NFRPOS         = ${ifs_output_freq},
+    NFRHIS         = ${ifs_output_freq},
+    NFRMASSCON     = $(( 6 * 3600 / ifs_time_step_sec )),
+    NPOSTS         = 0,
+    NHISTS         = 0,
+    NMASSCONS      = 0,
+    NFRCO          = ${NFRCO},
+    NFRCO_CHEM     = ${NFRCO_CHEM},
+    NFRCO_VEG      = ${NFRCO_VEG},
+    LTM5CO2        = ${LTM5CO2},
+    NLEV_TM5       = ${NLEV_TM5},
+    NFRDHFZ        = 48,
+    NDHFZTS        = 0,
+    NDHFDTS        = 0,
+    LWROUTLAST     = ${ifs_lastout},
+    CFDIRLST       = "dirlist",
+    CNPPATH        = "postins",
+/
+&NAMDDH
+    BDEDDH(1,1)    = 4.0,1.0,0.0,50.0,0.0,49.0,
+    NDHKD          = 120,
+    LHDZON         = FALSE,
+    LHDEFZ         = FALSE,
+    LHDDOP         = FALSE,
+    LHDEFD         = FALSE,
+    LHDGLB         = TRUE,
+    LHDPRG         = TRUE,
+    LHDHKS         = TRUE,
+/
+&NAMGFL
+    LTRCMFIX       = TRUE,
+    NERA40         = 0,
+    YQ_NL%LGP      = TRUE,
+    YQ_NL%LSP      = FALSE,
+    YL_NL%LGP      = TRUE,
+    YI_NL%LGP      = TRUE,
+    YA_NL%LGP      = TRUE,
+    YO3_NL%LGP     = FALSE,
+    YQ_NL%LGPINGP  = TRUE,
+    YL_NL%LQM      = TRUE,
+    YI_NL%LQM      = TRUE,
+    YR_NL%LQM      = TRUE,
+    YS_NL%LQM      = TRUE,
+    YQ_NL%LMASSFIX = TRUE,
+    YL_NL%LMASSFIX = TRUE,
+    YI_NL%LMASSFIX = TRUE,
+    YR_NL%LMASSFIX = TRUE,
+    YS_NL%LMASSFIX = TRUE,
+    YCDNC_NL%LGP   = TRUE,
+    YICNC_NL%LGP   = TRUE,
+    YRE_LIQ_NL%LGP = TRUE,
+    YRE_ICE_NL%LGP = TRUE,
+    YCDNC_NL%CNAME = "CDNC",
+    YICNC_NL%CNAME = "ICNC",
+    YRE_LIQ_NL%CNAME ="Reff_liq",
+    YRE_ICE_NL%CNAME ="Reff_ice",
+/
+&NAMFPC
+    CFPFMT         = "MODEL",
+    NFP3DFS        = 5,
+    NFP3DFP        = 7,
+    NFP3DFT        = 1,
+    NFP3DFV        = 1,
+    MFP3DFS        = 130,135,138,155,133,
+    MFP3DFP        = 129,130,135,138,155,157,133,
+    MFP3DFT        = 60,
+    MFP3DFV        = 133,
+    NFP2DF         = 2,
+    MFP2DF         = 129,152,
+    NFPPHY         = 78,
+    MFPPHY         = 31,32,33,34,35,36,37,38,39,40,41,42,44,45,49,50,57,58,59,78,79,129,136,137,139,141,142,143,144,145,146,147,148,151,159,164,165,166,167,168,169,170,172,175,176,177,178,179,180,181,182,183,186,187,188,189,195,196,197,198,201,202,205,208,209,210,211,235,236,238,243,244,245,229,230,231,232,213,
+    NRFP3S         = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,
+    RFP3P          = 100000.0,92500.0,85000.0,70000.0,50000.0,40000.0,30000.0,25000.0,20000.0,15000.0,10000.0,7000.0,5000.0,3000.0,2000.0,1000.0,700.0,500.0,300.0,200.0,100.0,
+    LFITP          = TRUE,
+    LFITT          = FALSE,
+    LFITV          = FALSE,
+    NFPCLI         = 0,
+    LFPQ           = FALSE,
+    LASQ           = FALSE,
+    LTRACEFP       = FALSE,
+    RFPCORR        = 60000.,
+/
+&NAMFPD
+/
+&NAMDIM
+    NPROMA         = 0,
+    NUNDEFLD       = 0,
+/
+&NAMVAR
+    LMODERR        = FALSE,
+    LJCDFI         = FALSE,
+    LUSEJCDFI      = FALSE,
+/
+&NAMMCC
+    LMCCIEC        = TRUE,
+    LMCCEC         = TRUE,
+    LMCC04         = TRUE,
+    NOACOMM        = 5,
+    LMCCICEIC      = FALSE,
+    LRDALB         = FALSE, 
+    LRDVEG         = TRUE, 
+    LPISM          = FALSE,
+    LLANDICE       = ${ifs_landice},
+/
+&NAMPPC
+    LRSACC         = TRUE,
+/
+&NAMORB
+    LCORBMD =  $ifs_orb_switch,
+    ORBMODE = '$ifs_orb_mode',
+    ORBIY   =  $ifs_orb_iyear,
+/
+EOF
+
+# Resolution-dependent gravity wave drag parametrisation - using cy41r2 version
+# GFLUXLAUN=GFLUXLAUN*(1.0_JPRB-MIN(1.0_JPRB,atan((MAX(KSMAX,700)-700)/REAL(6000-700))))
+case ${ifs_grid} in
+T799L91)
+GFLUXLAUN=0.00367996
+;;
+T1279L91)
+GFLUXLAUN=0.00334195
+;;
+*)
+GFLUXLAUN=0.00375
+;;
+esac
+
+cat << EOF
+&NAMGWWMS
+    GFLUXLAUN=$GFLUXLAUN
+    ZLAUNCHP=45000
+    LOZPR=true
+    NGAUSS=2
+    GGAUSSB=-0.55
+/
+&NAMGWD
+    GTENLIM=0.0222
+/
+EOF
+
+# Add COSP namelist if needed
+has_config ifs:cosp && . $ctrl_file_dir/namelist.cosp.sh
+
+cat << EOF
+&NAEAER
+/
+&NALBAR
+/
+&NALORI
+/
+&NAM_DISTRIBUTED_VECTORS
+/
+&NAM926
+/
+&NAMAFN
+/
+&NAMANA
+/
+&NAMARPHY
+/
+&NAMCA
+/
+&NAMCAPE
+/
+&NAMCFU
+/
+&NAMCHK
+/
+&NAMCHET
+/
+&NAMCLDP
+    NCLDDIAG   = 0,
+    RLCRITSNOW = $RLCRITSNOW,
+    RVICE      = $RVICE,
+    RCLDIFF    = $RCLDIFF,
+    RCLDIFFC   = $RCLDIFFC,
+    RTAUMEL    = 7200.0,
+    RSNOWLIN2  = $RSNOWLIN2,
+    RCLCRIT    = 0.4E-3,
+    NCLOUDACT  = 2,
+    NACTPDF    = 10,
+    NAERCLD    = 9,
+    RLCRIT_UPHYS=$RLCRIT_UPHYS,
+/
+&NAMCLTC
+/
+&NAMCOM
+/
+&NAMCOS
+/
+&NAMCTAN
+/
+&NAMCOSPINPUT
+/
+&NAMCOSPOUTPUT
+/
+&NAMCUMF
+    ENTRORG = $ENTRORG,
+    ENTRDD  = $ENTRDD,
+    RPRCON  = $RPRCON,
+    DETRPEN = $DETRPEN,
+    RMFDEPS = $RMFDEPS,
+/
+&NAMCUMFS
+/
+&NAMCT1
+/
+&NAMCVA
+/
+&NAMDFHD
+/
+&NAMDFI
+/
+&NAMDIF
+/
+&NAMDIMO
+/
+&NAMDMSP
+/
+&NAMDPHY
+/
+&NAMDYNA
+/
+&NAMEMIS_CONF
+/
+&NAMENKF
+/
+&NAMFA
+/
+&NAMFFT
+/
+&NAMFPDY2
+/
+&NAMFPDYH
+/
+&NAMFPDYP
+/
+&NAMFPDYS
+/
+&NAMFPDYT
+/
+&NAMFPDYV
+/
+&NAMFPEZO
+/
+&NAMFPF
+/
+&NAMFPIOS
+/
+&NAMFPPHY
+/
+&NAMFPSC2
+/
+&NAMFPSC2_DEP
+/
+&NAMFY2
+/
+&NAMGEM
+/
+&NAMGMS
+/
+&NAMGOES
+/
+&NAMGOM
+/
+&NAMGRIB
+    NENSFNB = ${NENSFNB},
+/
+&NAMGWD
+/
+&NAMGWWMS
+/
+&NAMHLOPT
+/
+&NAMINI
+/
+&NAMIOMI
+/
+&NAMJBCODES
+/
+&NAMJFH
+/
+&NAMJG
+/
+&NAMJO
+/
+&NAMKAP
+/
+&NAMLCZ
+/
+&NAMLEG
+/
+&NAMLFI
+/
+&NAMMCUF
+/
+&NAMMETEOSAT
+/
+&NAMMTS
+/
+&NAMMTSAT
+/
+&NAMMTT
+/
+&NAMMUL
+/
+&NAMNASA
+/
+&NAMNN
+/
+&NAMNPROF
+/
+&NAMNUD
+/
+&NAMOBS
+/
+&NAMONEDVAR
+/
+&NAMOPH
+/
+&NAMPARAR
+/
+&NAMPHY
+/
+&NAMPHY0
+/
+&NAMPHY1
+/
+&NAMPHY2
+/
+&NAMPHY3
+/
+&NAMPHYDS
+/
+&NAMPONG
+/
+&NAMRAD15
+/
+&NAMRCOEF
+/
+&NAMRINC
+/
+&NAMRIP
+/
+&NAMRLX
+    LRLXG          = ${LRLXG},
+    LRLXVO         = FALSE,
+    LRLXDI         = FALSE,
+    LRLXTE         = FALSE,
+    LRLXQ          = FALSE,
+    LRLXQL         = FALSE,
+    LRLXQI         = FALSE,
+    LRLXQC         = FALSE,
+    LRLXLP         = FALSE,
+    XRLXVO         = 0.1,
+    XRLXDI         = 0.1,
+    XRLXTE         = 0.1,
+    XRLXQ          = 0.1,
+    XRLXLP         = 0.1,
+    ALATRLX1       = 90,
+    ALATRLX2       = -90,
+    ALONRLX1       = 0,
+    ALONRLX2       = 360,
+    AXRLX          = -0.5,
+    AYRLX          = -0.5,
+    AZRLX          = 1.0,
+    NRLXLMIN       = 1,
+    NRLXLMAX       = 91,
+/
+&NAMSCC
+/
+&NAMSCEN
+/
+&NAMSCM
+/
+&NAMSENS
+/
+&NAMSIMPHL
+/
+&NAMSKF
+/
+&NAMSPSDT
+    LFIXSPPT	    = ${LFIXSPPT},
+    LSPSDT          = ${LSPSDT},
+    LCLIP_SPEC_SDT  = TRUE,
+    LCLIP_GRID_SDT  = TRUE,
+    LWRITE_ARP      = FALSE,
+    LUSESETRAN_SDT  = TRUE,
+    LRESETSEED_SDT  = FALSE,
+    NSCALES_SDT     = 3,
+    CSPEC_SHAPE_SDT ='WeaverCourtier',
+    SDEV_SDT        = 0.52,0.18,0.06,
+    TAU_SDT         = 2.16E4,2.592E5,2.592E6,
+    XLCOR_SDT       = 500.E3,1000.E3,2000.E3,
+    XCLIP_RATIO_SDT = 1.8,
+    LTAPER_BL0      = TRUE,
+    XSIGMATOP       = 0.87,
+    XSIGMABOT       = 0.97,
+    LTAPER_ST0      = TRUE,
+    XPRESSTOP_ST0   = 50.E2,
+    XPRESSBOT_ST0   = 100.E2,
+    LQPERTLIMIT2    = TRUE,
+/
+&NAMSTA
+/
+&NAMSTOPH
+/
+&NAMTCWV
+/
+&NAMTESTVAR
+/
+&NAMTLEVOL
+/
+&NAMTOPH
+/
+&NAMTOVS
+/
+&NAMTRAJP
+/
+&NAMTRANS
+/
+&NAMTRM
+/
+&NAMVARBC
+/
+&NAMVARBC_AIREP
+/
+&NAMVARBC_ALLSKY
+/
+&NAMVARBC_RAD
+/
+&NAMVARBC_TCWV
+/
+&NAMVARBC_TO3
+/
+&NAMVAREPS
+/
+&NAMVDOZ
+/
+&NAMVFP
+/
+&NAMVRTL
+/
+&NAMVV1
+/
+&NAMVV2
+/
+&NAMVWRK
+/
+&NAMXFU
+/
+&NAMZDI
+/
+&NAPHLC
+/
+&NAV1IS
+/
+EOF

+ 43 - 0
runtime/classic/ctrl/namelist.lim3-ORCA025L75.cfg.sh

@@ -0,0 +1,43 @@
+# namelist.lim3-ORCA1L46.cfg.sh writes the LIM3 namelist for ORCA1L46 to
+# standard output. This namelist will overwrite the reference namelist
+# (namelist.lim3.ref.sh). Hence, only parameters specific to the ORCA1L46
+# configuration should be specified here.
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-3 : Ice configuration namelist. Overwrites SHARED/namelist_ice_lim_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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
+!-----------------------------------------------------------------------
+/
+EOF

+ 48 - 0
runtime/classic/ctrl/namelist.lim3-ORCA1L75.cfg.sh

@@ -0,0 +1,48 @@
+# namelist.lim3-ORCA1L46.cfg.sh writes the LIM3 namelist for ORCA1L46 to
+# standard output. This namelist will overwrite the reference namelist
+# (namelist.lim3.ref.sh). Hence, only parameters specific to the ORCA1L46
+# configuration should be specified here.
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-3 : Ice configuration namelist. Overwrites SHARED/namelist_ice_lim3_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+/
+!------------------------------------------------------------------------------
+&namicehdf     !   Ice horizontal diffusion
+!------------------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+   rn_cdsn     = $nem_rn_cdsn
+/
+!-----------------------------------------------------------------------
+&namicesal     !   ice salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceitdme   !   parameters for mechanical redistribution of ice 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+/
+!------------------------------------------------------------------------------
+&namiceitd     !   Ice discretization
+!------------------------------------------------------------------------------
+/
+EOF

+ 148 - 0
runtime/classic/ctrl/namelist.lim3.ref.sh

@@ -0,0 +1,148 @@
+# namelist.lim3.ref.sh writes the reference namelist for LIM3 to standard out.
+# Note that this namelist will be overwritten by the namelist specific to the
+# configuration (namelist.lim3-*.cfg.sh). Hence, only parameters common to all
+# configurations shoule be specified here.
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! LIM3 namelist :  
+!!              1 - Generic parameters                 (namicerun)
+!!              2 - Ice initialization                 (namiceini)
+!!              3 - Ice discretization                 (namiceitd)
+!!              4 - Ice dynamics and transport         (namicedyn)
+!!              5 - Ice thermodynamics                 (namicethd)
+!!              6 - Ice salinity                       (namicesal)
+!!              7 - Ice mechanical redistribution      (namiceitdme)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!------------------------------------------------------------------------------
+&namicerun     !   Generic parameters
+!------------------------------------------------------------------------------
+   jpl            =    5           !  number of ice  categories
+   nlay_i         =    2           !  number of ice  layers
+   nlay_s         =    1           !  number of snow layers (only 1 is working)
+   cn_icerst_in  = "restart_ice"   !  suffix of ice restart name (input)
+   cn_icerst_indir = "."           !  directory from which to read input ice restarts
+   cn_icerst_out = "restart_ice"   !  suffix of ice restart name (output)
+   cn_icerst_outdir = "."          !  directory in which to write output ice restarts
+   ln_limdyn     = .true.          !  ice dynamics (T) or thermodynamics only (F)
+   rn_amax_n     = 0.997           !  maximum tolerated ice concentration NH
+   rn_amax_s     = 0.95            !  maximum tolerated ice concentration SH
+   ln_limdiahsb  = .false.         !  check the heat and salt budgets (T) or not (F)
+   ln_limdiaout  = .true.          !  output the heat and salt budgets (T) or not (F)
+   ln_icectl     = .false.         !  ice points output for debug (T or F)
+   iiceprt       = 10              !  i-index for debug
+   jiceprt       = 10              !  j-index for debug
+/
+!------------------------------------------------------------------------------
+&namiceini     !   Ice initialization
+!------------------------------------------------------------------------------
+   ln_iceini      = .true.         !  activate ice initialization (T) or not (F)
+   rn_thres_sst   =  2.0           !  maximum water temperature with initial ice (degC)
+   rn_hts_ini_n   =  0.3           !  initial real snow thickness (m), North
+   rn_hts_ini_s   =  0.3           !        "            "             South
+   rn_hti_ini_n   =  3.0           !  initial real ice thickness  (m), North
+   rn_hti_ini_s   =  1.0           !        "            "             South
+   rn_ati_ini_n   =  0.9           !  initial ice concentration   (-), North
+   rn_ati_ini_s   =  0.9           !        "            "             South
+   rn_smi_ini_n   =  6.3           !  initial ice salinity     (g/kg), North
+   rn_smi_ini_s   =  6.3           !        "            "             South
+   rn_tmi_ini_n   =  270.          !  initial ice/snw temperature (K), North
+   rn_tmi_ini_s   =  270.          !        "            "             South
+/
+!------------------------------------------------------------------------------
+&namiceitd     !   Ice discretization
+!------------------------------------------------------------------------------
+   nn_catbnd      =    2           !  computation of ice category boundaries based on
+                                   !      1: tanh function
+                                   !      2: h^(-alpha), function of rn_himean
+   rn_himean      =    2.0         !  expected domain-average ice thickness (m), nn_catbnd = 2 only
+/
+!------------------------------------------------------------------------------
+&namicedyn     !   Ice dynamics and transport
+!------------------------------------------------------------------------------
+   nn_icestr      =    0           !  ice strength parameteriztaion                      
+                                   !     0: Hibler_79     P = pstar*<h>*exp(-c_rhg*A)
+                                   !     1: Rothrock_75   P = Cf*coeff*integral(wr.h^2)    
+   ln_icestr_bvf  =    .false.     !  ice strength function brine volume (T) or not (F)     
+   rn_pe_rdg      =   17.0         !  ridging work divided by pot. energy change in ridging, if nn_icestr = 1
+   rn_pstar       =    2.0e+04     !  ice strength thickness parameter (N/m2), nn_icestr = 0 
+   rn_crhg        =   20.0         !  ice strength conc. parameter (-), nn_icestr = 0       
+   rn_cio         =    5.0e-03     !  ice-ocean drag coefficient           (-)             
+   rn_creepl      =    1.0e-12     !  creep limit (s-1)                                   
+   rn_ecc         =    2.0         !  eccentricity of the elliptical yield curve          
+   nn_nevp        =  120           !  number of EVP subcycles                             
+   rn_relast      =    0.333       !  ratio of elastic timescale to ice time step: Telast = dt_ice * rn_relast 
+                                   !     advised value: 1/3 (rn_nevp=120) or 1/9 (rn_nevp=300)
+/
+!------------------------------------------------------------------------------
+&namicehdf     !   Ice horizontal diffusion
+!------------------------------------------------------------------------------
+   nn_ahi0        =  2          !  horizontal diffusivity computation
+                                   !    -1: no diffusion (bypass limhdf)
+                                   !     0: use rn_ahi0_ref
+                                   !     1: use rn_ahi0_ref x mean grid cell length / ( 2deg mean grid cell length )
+                                   !     2: use rn_ahi0_ref x grid cell length      / ( 2deg mean grid cell length )
+   rn_ahi0_ref    = 350.0          !  horizontal sea ice diffusivity (m2/s)
+                                   !     if nn_ahi0 > 0, rn_ahi0_ref is the reference value at a nominal 2 deg resolution
+   nn_convfrq     = 5              !  convergence check frequency of the Crant-Nicholson scheme (perf. optimization)
+/
+!------------------------------------------------------------------------------
+&namicethd     !   Ice thermodynamics
+!------------------------------------------------------------------------------
+   rn_hnewice  = 0.1               !  thickness for new ice formation in open water (m)
+   ln_frazil   = .false.           !  use frazil ice collection thickness as a function of wind (T) or not (F)
+   rn_maxfrazb = 1.0               !  maximum fraction of frazil ice collecting at the ice base
+   rn_vfrazb   = 0.417             !  thresold drift speed for frazil ice collecting at the ice bottom (m/s)
+   rn_Cfrazb   = 5.0               !  squeezing coefficient for frazil ice collecting at the ice bottom
+   rn_himin    = 0.10              !  minimum ice thickness (m) used in remapping, must be smaller than rn_hnewice
+   rn_betas    = 0.66              !  exponent in lead-ice repratition of snow precipitation
+                                   !     betas = 1 -> equipartition, betas < 1 -> more on leads
+   rn_kappa_i  = 1.0               !  radiation attenuation coefficient in sea ice (m-1)
+   nn_conv_dif = 50                !  maximal number of iterations for heat diffusion computation
+   rn_terr_dif = 0.0001            !  maximum temperature after heat diffusion (degC)
+   nn_ice_thcon= 1                 !  sea ice thermal conductivity
+                                   !     0: k = k0 + beta.S/T (Untersteiner, 1964)
+                                   !     1: k = k0 + beta1.S/T - beta2.T (Pringle et al., 2007)
+   rn_cdsn     = 0.27              !  thermal conductivity of the snow (0.31 W/m/K, Maykut and Untersteiner, 1971)
+                                   !  (set to 0.40 after EC-Earth tuning)
+                                   !  Obs: 0.1-0.5 (Lecomte et al, JAMES 2013)
+   nn_monocat  = 0                 !  virtual ITD mono-category parameterizations (1, jpl = 1 only) or not (0)
+                                   !     2: simple piling instead of ridging --- temporary option
+                                   !     3: activate G(he) only              --- temporary option
+                                   !     4: activate lateral melting only    --- temporary option
+  ln_it_qnsice = .true.            !  iterate the surface non-solar flux with surface temperature (T) or not (F)
+/
+!------------------------------------------------------------------------------
+&namicesal     !   Ice salinity
+!------------------------------------------------------------------------------
+   nn_icesal   =  2                !  ice salinity option
+                                   !     1: constant ice salinity (S=rn_icesal)
+                                   !     2: varying salinity parameterization S(z,t)
+                                   !     3: prescribed salinity profile S(z), Schwarzacher, 1959
+   rn_icesal   =  4.               !  ice salinity (g/kg, nn_icesal = 1 only)
+   rn_sal_gd   =  5.               !  restoring ice salinity, gravity drainage (g/kg)
+   rn_time_gd  =  1.73e+6          !  restoring time scale, gravity drainage  (s)
+   rn_sal_fl   =  2.               !  restoring ice salinity, flushing (g/kg)
+   rn_time_fl  =  8.64e+5          !  restoring time scale, flushing (s)
+   rn_simax    = 20.               !  maximum tolerated ice salinity (g/kg)
+   rn_simin    =  0.1              !  minimum tolerated ice salinity (g/kg)
+/
+!------------------------------------------------------------------------------
+&namiceitdme   !   Ice mechanical redistribution (ridging and rafting)
+!------------------------------------------------------------------------------
+   rn_Cs       =   0.5             !  fraction of shearing energy contributing to ridging
+   rn_fsnowrdg =   0.5             !  snow volume fraction that survives in ridging
+   rn_fsnowrft =   0.5             !  snow volume fraction that survives in rafting
+   nn_partfun  =   1               !  type of ridging participation function
+                                   !     0: linear (Thorndike et al, 1975)
+                                   !     1: exponential (Lipscomb, 2007
+   rn_gstar    =   0.15            !  fractional area of thin ice being ridged (nn_partfun = 0)
+   rn_astar    =   0.05            !  exponential measure of ridging ice fraction (nn_partfun = 1)
+   rn_hstar    = 100.0             !  determines the maximum thickness of ridged ice (m) (Hibler, 1980)
+   ln_rafting  =   .true.          !  rafting activated (T) or not (F)
+   rn_hraft    =   0.75            !  threshold thickness for rafting (m)
+   rn_craft    =   5.0             !  squeezing coefficient used in the rafting function
+   rn_por_rdg  =   0.3             !  porosity of newly ridged ice (Lepparanta et al., 1995)
+/
+EOF

+ 21 - 0
runtime/classic/ctrl/namelist.lpjg.sh

@@ -0,0 +1,21 @@
+cpl_freq_ifs_lpjg_sec=$(( cpl_freq_atm_lpjg_hrs * 3600 ))
+start_year=${leg_start_date_yyyy}
+start_month=$(date -u -d "${leg_start_date}" +%m)
+start_day=$(date -u -d "${leg_start_date}" +%d)
+nb_day=$(( leg_length_sec/86400 ))
+
+cat << EOF
+${cpl_freq_ifs_lpjg_sec}
+${start_year}
+${start_month}
+${start_day}
+${nb_day}
+${ifs_res_hor}
+${lpjg_fdbck_tm5}
+${ifs_A4xCO2}
+${bgc_1PCTCO2}
+${ifs_cmip_fixyear}
+${lpjg_fixNdepafter}
+${lpjg_fixLUafter}
+EOF
+

+ 11 - 0
runtime/classic/ctrl/namelist.lpjg_forcing.sh

@@ -0,0 +1,11 @@
+cat << EOF
+!-----------------------------------------------------------------------
+&NAMLPJGFORC
+!-----------------------------------------------------------------------
+    num_years = $(( ${leg_end_date_yyyy} - ${leg_start_date_yyyy} ))
+    start_year = ${leg_start_date_yyyy}
+    num_loops = 1
+    nc_file_path = "${lpjg_forcing_dir}"
+!-----------------------------------------------------------------------
+/
+EOF

+ 651 - 0
runtime/classic/ctrl/namelist.nemo-ORCA025L75-coupled.cfg.sh

@@ -0,0 +1,651 @@
+# namelist.nemo-ORCA1L46.cfg.sh writes the NEMO namelist for ORCA1L46 in
+# coupled mode to standard output. This namelist will overwrite the reference
+# namelist (namelist.nemo.ref.sh). Hence, only parameters specific to the
+# ORCA1L46/coupled configuration should be specified here.
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!!======================================================================
+!!                   ***  Run management namelists  ***
+!!======================================================================
+!!   namrun       parameters of the run
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_leapy      =  1             !  Leap year calendar (1) or not (0)
+/
+!
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
+!!   namcfg       parameters of the configuration
+!!   namzgr       vertical coordinate
+!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
+!!   namdom       space and time domain (bathymetry, mesh, timestep)
+!!   namtsd       data: temperature & salinity
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =     025               !  resolution of the configuration
+   jpidta      =    1442               !  1st lateral dimension ( >= jpi )
+   jpjdta      =    1050               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      75               !  number of levels      ( >= jpk )
+   jpiglo      =    1442               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =    1050               !  2nd    -                  -    --> j  =jpjdta
+   jperio      =       4               !  lateral cond. type (between 0 and 6)
+                                       !  = 0 closed                 ;   = 1 cyclic East-West
+                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot
+                                       !  = 4 cyclic East-West AND North fold T-point pivot
+                                       !  = 5 North fold F-point pivot
+                                       !  = 6 cyclic East-West AND North fold F-point pivot
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+   ln_zco      = .false.   !  z-coordinate - full    steps   (T/F)      ("key_zco" may also be defined)
+   ln_zps      = .true.    !  z-coordinate - partial steps   (T/F)
+   ln_sco      = .false.   !  s- or hybrid z-s-coordinate    (T/F)
+   ln_isfcav   = .false.   !  ice shelf cavity               (T/F)
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+   ln_s_sh94   = .true.    !  Song & Haidvogel 1994 hybrid S-sigma   (T)|
+   ln_s_sf12   = .false.   !  Siddorn & Furner 2012 hybrid S-z-sigma (T)| if both are false the NEMO tanh stretching is applied
+   ln_sigcrit  = .false.   !  use sigma coordinates below critical depth (T) or Z coordinates (F) for Siddorn & Furner stretch
+                           !  stretching coefficients for all functions
+   rn_sbot_min =   10.0    !  minimum depth of s-bottom surface (>0) (m)
+   rn_sbot_max = 7000.0    !  maximum depth of s-bottom surface (= ocean depth) (>0) (m)
+   rn_hc       =  150.0    !  critical depth for transition to stretched coordinates
+                        !!!!!!!  Envelop bathymetry
+   rn_rmax     =    0.3    !  maximum cut-off r-value allowed (0<r_max<1)
+                        !!!!!!!  SH94 stretching coefficients  (ln_s_sh94 = .true.)
+   rn_theta    =    6.0    !  surface control parameter (0<=theta<=20)
+   rn_bb       =    0.8    !  stretching with SH94 s-sigma
+                        !!!!!!!  SF12 stretching coefficient  (ln_s_sf12 = .true.)
+   rn_alpha    =    4.4    !  stretching with SF12 s-sigma
+   rn_efold    =    0.0    !  efold length scale for transition to stretched coord
+   rn_zs       =    1.0    !  depth of surface grid box
+                           !  bottom cell depth (Zb) is a linear function of water depth Zb = H*a + b
+   rn_zb_a     =    0.024  !  bathymetry scaling factor for calculating Zb
+   rn_zb_b     =   -0.2    !  offset for calculating Zb
+                        !!!!!!!! Other stretching (not SH94 or SF12) [also uses rn_theta above]
+   rn_thetb    =    1.0    !  bottom control parameter  (0<=thetb<= 1)
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   rn_hmin     =   10.     !  min depth of the ocean (>0) or min number of ocean level (<0)
+   rn_e3zps_min=   25.     !  partial step thickness is set larger than the minimum of
+   rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
+                           !
+   rn_rdt      = ${nem_time_step_sec} !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_atfp     =    0.1    !  asselin time filter parameter
+   nn_acc      =    0      !  acceleration of convergence : =1      used, rdt < rdttra(k)
+                                 !                          =0, not used, rdt = rdttra
+   rn_rdtmin   = 28800.          !  minimum time step on tracers (used if nn_acc=1)
+   rn_rdtmax   = 28800.          !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdth     =  800.           !  depth variation of tracer time step  (used if nn_acc=1)
+   ln_crs      = .false.      !  Logical switch for coarsening module
+   jphgr_msh   =       0               !  type of horizontal mesh
+                                       !  = 0 curvilinear coordinate on the sphere read in coordinate.nc
+                                       !  = 1 geographical mesh on the sphere with regular grid-spacing
+                                       !  = 2 f-plane with regular grid-spacing
+                                       !  = 3 beta-plane with regular grid-spacing
+                                       !  = 4 Mercator grid with T/U point at the equator
+   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.9530096000000 ! (default coefficients)
+   ppa1        =       2.415951269000000   !
+   ppkth       =      15.35101370000000    !
+   ppacr       =       7.0             !
+   ppdzmin     =  999999.0             !  Minimum vertical spacing
+   pphmax      =  999999.0             !  Maximum depth
+   ldbletanh   =    .TRUE.             !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =      100.760928500000 !  Double tanh function parameters
+   ppkth2      =       48.029893720000 !
+   ppacr2      =       13.000000000000 !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+   ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
+   ln_bt_av      =    .TRUE.           !  Time filtering of barotropic variables
+   ln_bt_nn_auto =    .TRUE.           !  Set nn_baro automatically to be just below
+                                       !  a user defined maximum courant number (rn_bt_cmax)
+   nn_baro       =    80               !  Number of iterations of barotropic mode
+                                       !  during rn_rdt seconds. Only used if ln_bt_nn_auto=F
+   rn_bt_cmax    =    0.7              !  Maximum courant number allowed if ln_bt_nn_auto=T 
+   nn_bt_flt     =    1                !  Time filter choice
+                                       !  = 0 None
+                                       !  = 1 Boxcar over   nn_baro barotropic steps
+                                       !  = 2 Boxcar over 2*nn_baro     "        "
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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', -1 ,'votemper' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca025_bilinear.nc' , '' , ''
+   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim'       , -1 ,'vosaline' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca025_bilinear.nc' , '' , ''
+   ln_tsd_tradmp = ${ln_tsd_tradmp}  !  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)
+   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_cpl      = .true.    !  Coupled formulation                       (T => fill namsbc_cpl )
+   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
+   ln_rnf      = .true.    !  runoffs                                   (T   => fill namsbc_rnf)
+   nn_isf      = 0         !  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)
+   ln_ssr      = ${ln_ssr} !  Sea Surface Restoring on T and/or S (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+                           !     =2 annual global mean of e-p-r set to zero
+   nn_limflx   =  2        !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)
+                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled
+                           !  = 0  Average per-category fluxes (forced and coupled mode)
+                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled
+                           !  = 2  Redistribute a single flux over categories (coupled mode only)
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+!                ! description      !  multiple  !    vector   !      vector          ! vector !
+!                !                  ! categories !  reference  !    orientation       ! grids  !
+! send
+   sn_snd_temp   =   'oce and ice'  ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_alb    =   'ice'          ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_thick  =   'ice and snow' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_crt    =   'none'         ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'
+   sn_snd_co2    =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+! receive
+   sn_rcv_w10m   =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_taumod =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_tau    =   'oce and ice'  ,    'no'    , 'spherical' , 'eastward-northward' ,   'U,V'
+   sn_rcv_dqnsdt =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qsr    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qns    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_emp    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_rnf    =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_cal    =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_co2    =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_iceflx =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+!
+   nn_cplmodel   =     1     !  Maximum number of models to/from which NEMO is potentialy sending/receiving data
+   ln_usecplmask = .false.   !  use a coupling mask file to merge data received from several models
+                             !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel)
+/
+!-----------------------------------------------------------------------
+&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 !
+!         !                    !  (if <0  months)  !   name     !   (logical)  ! (T/F) ! 'monthly' ! filename ! pairing  !
+   sn_rnf = 'ORCA_R025_runoff_v1.1.nc', -1        , 'sornficb' , .true.       , .true., 'yearly'  ,    ''    ,    ''    , ''
+   sn_cnf = 'ORCA_R025_runoff_v1.1.nc',  0        , 'socoefr'  , .false.      , .true., 'yearly'  ,    ''    ,    ''    , ''
+   sn_dep_rnf = 'runoff_depth' ,     0             , 'rodepth'  ,    .false.   , .true.,  'yearly' ,     ''   , ''       , ''
+                !
+   cn_dir       = './'       !  root directory for the location of the runoff files
+   ln_rnf_mouth = .false.    !  specific treatment at rivers mouths
+   rn_hrnf      =  10.       !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =   2.e-3    !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0     !  multiplicative factor for runoff
+   ln_rnf_depth = .true.     !  read in depth information for runoff 
+   ln_rnf_tem   = .false.    !  read in temperature information for runoff
+   ln_rnf_sal   = .false.    !  read in salinity information for runoff
+   ln_rnf_depth_ini = .false.   ! compute depth at initialisation from runoff file
+   rn_rnf_max   = 5.735e-4   !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+   rn_dep_max   = 150.       !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
+   nn_rnf_depth_file = 0     !  create (=1) a runoff depth file or not (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!
+! 07/2018 - Yohan Ruprich-Robert chages: add mask_ssr reading option and take into account last shaconemo update (06/2018)
+!
+   !             ! filename          ! freq  ! variable name  ! time     ! clim     ! year or   ! weights   ! rot     ! mask
+   !             !                   !       !                ! interp   !          ! monthly   ! filename  ! pair    ! filename
+   !----------------------------------------------------------------------------------------------------------------------------------------
+   sn_sss      = 'sss_restore_data'  , -1.   , 'so'           , .true.   , .true.  , 'yearly'   , ''        , ''      , ''
+   sn_sst      = 'sst_restore_data'  , -1.   , 'thetao'       , .true.   , .true.  , 'yearly'   , ''        , ''      , ''
+   sn_msk      = 'mask_restore'      , -12.  , 'mask_ssr'     , .false.  , .true.  , 'yearly'   , ''        , ''      , ''
+   !
+   cn_dir      = './'    !  root directory for the location of the runoff files  
+   nn_sstr     = 1       !  add a retroaction term in the surface heat flux (=1) or not (=0)
+   nn_sssr     = 2       !  add a damping term in the surface freshwater flux (=2) or to SSS only (=1) or no damping term (=0)
+   nn_icedmp   = 0       !  Cntrl of surface restoration under ice nn_icedmp 
+                         !  ( 0   =  no restoration under ice )
+                         !  ( 1   =  restoration everywhere  )
+                         !  ( > 1 =  reinforced damping (x nn_icedmp) under ice
+   nn_msk      = 1       !  add a sub-regional masking to the surface restoring (=1) or not (=0)
+                         !  sn_msk can be empty if nn_msk = 0
+   rn_dqdt     = -40.    !  magnitude of the retroaction on temperature   [W/m2/K]
+   rn_deds     = -166.67 ! -864 magnitude of the damping on salinity   [kg/m2/s/psu]
+   ln_sssr_bnd = .false. ! .true. !  flag to bound erp term (associated with nn_sssr=2)
+   rn_sssr_bnd = 4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] (associated with nn_sssr=2)
+   ln_sssd_bnd = .false. ! .true. !  flag to bound S-S* term (associated with nn_ssr=2)
+   rn_sssd_bnd = 0.01    !  ABS(Max./Min.) value of S-S* term [psu] (associated with nn_ssr=2)
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    0.0    !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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
+   rn_bfri1    =    4.e-4  !  bottom drag coefficient (linear case)
+   rn_bfri2    =    1.e-3  !  bottom drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
+   rn_bfri2_max =   1.e-1  !  max. bottom drag coefficient (non linear case and ln_loglayer=T)
+   rn_bfeb2    =    2.5e-3 !  bottom turbulent kinetic energy background  (m2/s2)
+   rn_bfrz0    =    3.e-3  !  bottom roughness [m] if ln_loglayer=T
+   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file )
+   rn_bfrien   =    10.    !  local multiplying factor of bfr (ln_bfr2d=T)
+   rn_tfri1    =    4.e-4  !  top drag coefficient (linear case)
+   rn_tfri2    =    2.5e-3 !  top drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
+   rn_tfri2_max =   1.e-1  !  max. top drag coefficient (non linear case and ln_loglayer=T)
+   rn_tfeb2    =    0.0    !  top turbulent kinetic energy background  (m2/s2)
+   rn_tfrz0    =    3.e-3  !  top roughness [m] if ln_loglayer=T
+   ln_tfr2d    = .false.   !  horizontal variation of the top friction coef (read a 2D mask file )
+   rn_tfrien   =    50.    !  local multiplying factor of tfr (ln_tfr2d=T)
+
+   ln_bfrimp   = .false.   !  implicit bottom friction (requires ln_zdfexp = .false. if true)
+   ln_loglayer = .false.   !  logarithmic formulation (non linear case)
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+   sn_qgh      = 'Goutorbe_ghflux.nc', -12. , 'gh_flux' , .false. , .true. , 'yearly' , 'weights_Goutorbe1_2_orca025_bilinear.nc' , '' , ''
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_cen2   =  .false.   !  2nd order centered scheme
+   ln_traadv_tvd    =  .true.    !  TVD scheme
+   ln_traadv_muscl  =  .false.   !  MUSCL scheme
+   ln_traadv_muscl2 =  .false.   !  MUSCL2 scheme + cen2 at boundaries
+   ln_traadv_ubs    =  .false.   !  UBS scheme
+   ln_traadv_qck    =  .false.   !  QUICKEST scheme
+   ln_traadv_msc_ups=  .false.   !  use upstream scheme within muscl
+   ln_traadv_tvd_zts=  .false.  !  TVD scheme with sub-timestepping of vertical tracer advection
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !   mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+   ln_mle    = .false.      ! (T) use the Mixed Layer Eddy (MLE) parameterisation
+   rn_ce     = 0.06        ! magnitude of the MLE (typical value: 0.06 to 0.08)
+   nn_mle    = 1           ! MLE type: =0 standard Fox-Kemper ; =1 new formulation
+   rn_lf     = 5.e+3       ! typical scale of mixed layer front (meters)                      (case rn_mle=0)
+   rn_time   = 172800.     ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0)
+   rn_lat    = 20.         ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1)
+   nn_mld_uv = 0           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max)
+   nn_conv   = 0           ! =1 no MLE in case of convection ; =0 always MLE
+   rn_rho_c_mle  = 0.01    ! delta rho criterion used to calculate MLD for FK
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   !                       !  Operator type:
+   ln_traldf_lap    =  .true.   !  laplacian operator
+   ln_traldf_bilap  =  .false.  !  bilaplacian operator
+   !                       !  Direction of action:
+   ln_traldf_level  =  .false.  !  iso-level
+   ln_traldf_hor    =  .false.  !  horizontal (geopotential)   (needs "key_ldfslp" when ln_sco=T)
+   ln_traldf_iso    =  .true.   !  iso-neutral                 (needs "key_ldfslp")
+   !		       	   !  Griffies parameters              (all need "key_ldfslp")
+   ln_traldf_grif   =  .false.  !  use griffies triads
+   ln_traldf_gdia   =  .false.  !  output griffies eddy velocities
+   ln_triad_iso     =  .false.  !  pure lateral mixing in ML
+   ln_botmix_grif   =  .false.  !  lateral mixing on bottom
+   !                       !  Coefficients
+   ! Eddy-induced (GM) advection always used with Griffies; otherwise needs "key_traldf_eiv"
+   ! Value rn_aeiv_0 is ignored unless = 0 with Held-Larichev spatially varying aeiv
+   !                                  (key_traldf_c2d & key_traldf_eiv & key_orca_r2, _r1 or _r05)
+   rn_aeiv_0        =  0.     !  eddy induced velocity coefficient [m2/s]
+   rn_aht_0         =  300.     !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_ahtb_0        =     0.    !  background eddy diffusivity for ldf_iso [m2/s]
+   !                                           (normally=0; not used with Griffies)
+   rn_slpmax        =     0.01  !  slope limit
+   rn_chsmag        =     1.    !  multiplicative factor in Smagorinsky diffusivity
+   rn_smsh          =     0.    !  Smagorinsky diffusivity: = 0 - use only sheer
+   rn_aht_m         =  2000.    !  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  ${ln_tradmp}  !  add a damping termn (T) or not (F)
+   nn_zdmp     =    2      !  vertical   shape =0    damping throughout the water column
+                          !                   =1 no damping in the mixing layer (kz  criteria)
+                          !                   =2 no damping in the mixed  layer (rho crieria)
+   cn_resto    = 'resto.nc' ! Name of file containing restoration coefficient field (use dmp_tools to create this)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   nn_dynkeg     = 1       ! scheme for grad(KE): =0   C2  ;  =1   Hollingsworth correction
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+   ln_dynzad_zts = .false. !  Use (T) sub timestepping for vertical momentum advection
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+   ln_vvl_zstar  = .true.           !  zstar vertical coordinate
+   ln_vvl_ztilde = .false.          !  ztilde vertical coordinate: only high frequency variations
+   ln_vvl_layer  = .false.          !  full layer vertical coordinate
+   ln_vvl_ztilde_as_zstar = .false. !  ztilde vertical coordinate emulating zstar
+   ln_vvl_zstar_at_eqtor = .false.  !  ztilde near the equator
+   rn_ahe3       = 0.0e0            !  thickness diffusion coefficient
+   rn_rst_e3t    = 30.e0            !  ztilde to zstar restoration timescale [days]
+   rn_lf_cutoff  = 5.0e0            !  cutoff frequency for low-pass filter  [days]
+   rn_zdef_max   = 0.9e0            !  maximum fractional e3t deformation
+   ln_vvl_dbg    = .true.           !  debug prints    (T/F)
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+   ln_dynvor_ene = .false. !  enstrophy conserving scheme
+   ln_dynvor_ens = .false. !  energy conserving scheme
+   ln_dynvor_mix = .false. !  mixed scheme
+   ln_dynvor_een = .true.  !  energy & enstrophy scheme
+   ln_dynvor_een_old = .false.  !  energy & enstrophy scheme - original formulation
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zco  = .false.   !  z-coordinate - full steps
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .true.    !  s-coordinate (standard jacobian formulation)
+   ln_hpg_isf  = .false.   !  s-coordinate (sco ) adapted to isf
+   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
+   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
+   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
+                           !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   !                       !  Type of the operator :
+   ln_dynldf_lap    =  .false.  !  laplacian operator
+   ln_dynldf_bilap  =  .true.   !  bilaplacian operator
+   !                       !  Direction of action  :
+   ln_dynldf_level  =  .false.  !  iso-level
+   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.)
+   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp")
+   !                       !  Coefficient
+   rn_ahm_0_lap     =     0.    !  horizontal laplacian eddy viscosity   [m2/s]
+   rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s]
+   rn_ahm_0_blp     =    -6.4e11!  horizontal bilaplacian eddy viscosity [m4/s]
+   rn_cmsmag_1      =     3.    !  constant in laplacian Smagorinsky viscosity
+   rn_cmsmag_2      =     3     !  constant in bilaplacian Smagorinsky viscosity
+   rn_cmsh          =     0.    !  1 or 0 , if 0 -use only shear for Smagorinsky viscosity
+   rn_ahm_m_blp     =    -1.e12 !  upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
+   rn_ahm_m_lap     = 40000.    !  upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
+/
+
+!!======================================================================
+!!             Tracers & Dynamics vertical physics namelists
+!!======================================================================
+!!    namzdf        vertical physics
+!!    namzdf_ric    richardson number dependent vertical mixing         ("key_zdfric")
+!!    namzdf_tke    TKE dependent vertical mixing                       ("key_zdftke")
+!!    namzdf_kpp    KPP dependent vertical mixing                       ("key_zdfkpp")
+!!    namzdf_ddm    double diffusive mixing parameterization            ("key_zdfddm")
+!!    namzdf_tmx    tidal mixing parameterization                       ("key_zdftmx")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+   rn_avm0     =   1.e-4   !  vertical eddy viscosity   [m2/s]          (background Kz if not "key_zdfcst")
+   rn_avt0     =   1.e-5   !  vertical eddy diffusivity [m2/s]          (background Kz if not "key_zdfcst")
+   nn_avb      =    0      !  profile for background avt & avm (=1) or not (=0)
+   nn_havtb    =    1      !  horizontal shape for avtb (=1) or not (=0)
+   ln_zdfevd   = .true.    !  enhanced vertical diffusion (evd) (T) or not (F)
+   nn_evdm     =    1      !  evd apply on tracer (=0) or on tracer and momentum (=1)
+   rn_avevd    =   10.     !  evd mixing coefficient [m2/s]
+   ln_zdfnpc   = .false.   !  Non-Penetrative Convective algorithm (T) or not (F)
+   nn_npc      =    1            !  frequency of application of npc
+   nn_npcp     =  365            !  npc control print frequency
+   ln_zdfexp   = .false.   !  time-stepping: split-explicit (T) or implicit (F) time stepping
+   nn_zdfexp   =    3            !  number of sub-timestep for ln_zdfexp=T
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+   rn_ediff    =   0.1     !  coef. for vertical eddy coef. (avt=rn_ediff*mxl*sqrt(e) )
+   rn_ediss    =   0.7     !  coef. of the Kolmogoroff dissipation
+   rn_ebb      =  67.83    !  coef. of the surface input of tke (=67.83 suggested when ln_mxl0=T)
+   rn_emin     =   1.e-6   !  minimum value of tke [m2/s2]
+   rn_emin0    =   1.e-4   !  surface minimum value of tke [m2/s2]
+   rn_bshear   =   1.e-20  ! background shear (>0) currently a numerical threshold (do not change it)
+   nn_mxl      =   3       !  mixing length: = 0 bounded by the distance to surface and bottom
+                           !                 = 1 bounded by the local vertical scale factor
+                           !                 = 2 first vertical derivative of mixing length bounded by 1
+                           !                 = 3 as =2 with distinct disspipative an mixing length scale
+   nn_pdl      =   1       !  Prandtl number function of richarson number (=1, avt=pdl(Ri)*avm) or not (=0, avt=avm)
+   ln_mxl0     = .true.    !  surface mixing length scale = F(wind stress) (T) or not (F)
+   rn_mxl0     =   0.01    !  surface  buoyancy lenght scale minimum value
+   ln_lc       = .true.    !  Langmuir cell parameterisation (Axell 2002)
+   rn_lc       =   0.20    !  coef. associated to Langmuir cells
+   nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_oasis3")
+   rn_efr      =   0.05    !  fraction of surface tke value which penetrates below the ML (nn_etau=1 or 2)
+   nn_htau     =   1       !  type of exponential decrease of tke penetration below the ML
+                           !        = 0  constant 10 m length scale
+                           !        = 1  0.5m at the equator to 30m poleward of 40 degrees
+/
+!------------------------------------------------------------------------
+&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")
+!-----------------------------------------------------------------------
+   rn_avts     = 1.e-4     !  maximum avs (vertical mixing on salinity)
+   rn_hsbfr    = 1.6       !  heat/salt buoyancy flux ratio
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   rn_htmx     = 500.      !  vertical decay scale for turbulence (meters)
+   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1)
+   rn_tfe      = 0.333     !  tidal dissipation efficiency
+   rn_me       = 0.2       !  mixing efficiency
+   ln_tmx_itf  = .true.    !  ITF specific parameterisation
+   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx_new    !   new tidal mixing parameterization                ("key_zdftmx_new")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
+                           !                   =2 successive-over-relaxation (sor)
+   nn_sol_arp  =      0    !  absolute/relative (0/1) precision convergence test
+   rn_eps      =  1.e-6    !  absolute precision of the solver
+   nn_nmin     =    300    !  minimum of iterations for the SOR solver
+   nn_nmax     =    800    !  maximum of iterations for the SOR solver
+   nn_nmod     =     10    !  frequency of test for the SOR solver
+   rn_resmax   =  1.e-10   !  absolute precision for the SOR solver
+   rn_sor      =  1.92     !  optimal coefficient for SOR solver (to be adjusted with the domain)
+/
+!-----------------------------------------------------------------------
+&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

+ 649 - 0
runtime/classic/ctrl/namelist.nemo-ORCA025L75-standalone.cfg.sh

@@ -0,0 +1,649 @@
+# namelist.nemo-ORCA1L46.cfg.sh writes the NEMO namelist for ORCA1L46 in
+# coupled mode to standard output. This namelist will overwrite the reference
+# namelist (namelist.nemo.ref.sh). Hence, only parameters specific to the
+# ORCA1L46/coupled configuration should be specified here.
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!!======================================================================
+!!                   ***  Run management namelists  ***
+!!======================================================================
+!!   namrun       parameters of the run
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_leapy      =  0             !  Leap year calendar (1) or not (0)
+/
+!
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
+!!   namcfg       parameters of the configuration
+!!   namzgr       vertical coordinate
+!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
+!!   namdom       space and time domain (bathymetry, mesh, timestep)
+!!   namtsd       data: temperature & salinity
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =     025               !  resolution of the configuration
+   jpidta      =    1442               !  1st lateral dimension ( >= jpi )
+   jpjdta      =    1050               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      75               !  number of levels      ( >= jpk )
+   jpiglo      =    1442               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =    1050               !  2nd    -                  -    --> j  =jpjdta
+   jperio      =       4               !  lateral cond. type (between 0 and 6)
+                                       !  = 0 closed                 ;   = 1 cyclic East-West
+                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot
+                                       !  = 4 cyclic East-West AND North fold T-point pivot
+                                       !  = 5 North fold F-point pivot
+                                       !  = 6 cyclic East-West AND North fold F-point pivot
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   rn_hmin     =   10.     !  min depth of the ocean (>0) or min number of ocean level (<0)
+   rn_e3zps_min=   25.     !  partial step thickness is set larger than the minimum of
+   rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
+                           !
+   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.9530096000000 ! (default coefficients)
+   ppa1        =       2.415951269000000   !
+   ppkth       =      15.35101370000000    !
+   ppacr       =       7.0             !
+   ppdzmin     =  999999.0             !  Minimum vertical spacing
+   pphmax      =  999999.0             !  Maximum depth
+   ldbletanh   =    .TRUE.             !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =      100.760928500000 !  Double tanh function parameters
+   ppkth2      =       48.029893720000 !
+   ppacr2      =       13.000000000000 !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+   ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
+   ln_bt_av      =    .TRUE.           !  Time filtering of barotropic variables
+   ln_bt_nn_auto =    .TRUE.           !  Set nn_baro automatically to be just below
+                                       !  a user defined maximum courant number (rn_bt_cmax)
+   nn_baro       =    80               !  Number of iterations of barotropic mode
+                                       !  during rn_rdt seconds. Only used if ln_bt_nn_auto=F
+   rn_bt_cmax    =    0.8              !  Maximum courant number allowed if ln_bt_nn_auto=T
+   nn_bt_flt     =    1                !  Time filter choice
+                                       !  = 0 None
+                                       !  = 1 Boxcar over   nn_baro barotropic steps
+                                       !  = 2 Boxcar over 2*nn_baro     "        "
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+   nn_factx    = 3         !  Reduction factor of x-direction
+   nn_facty    = 3         !  Reduction factor of y-direction
+   nn_binref   = 0         !  Bin centering preference: NORTH or EQUAT
+                           !  0, coarse grid is binned with preferential treatment of the north fold
+                           !  1, coarse grid is binned with centering at the equator
+                           !    Symmetry with nn_facty being odd-numbered. Asymmetry with even-numbered nn_facty.
+   nn_msh_crs  = 0         !  create (=1) a mesh file or not (=0)
+   nn_crs_kz   = 0         ! 0, MEAN of volume boxes
+                           ! 1, MAX of boxes
+                           ! 2, MIN of boxes
+   ln_crs_wn   = .true.    ! wn coarsened (T) or computed using horizontal divergence ( F )
+/
+!-----------------------------------------------------------------------
+&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', -1 ,'votemper' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca025_bilinear.nc' , '' , ''
+   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim'       , -1 ,'vosaline' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca025_bilinear.nc' , '' , ''
+   ln_tsd_tradmp = ${ln_tsd_tradmp}  !  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)
+   ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana )
+   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx )
+   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)
+   ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs )
+   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
+   nn_ice      = 2         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2")
+   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = ${ln_dm2dc}!  daily mean to diurnal cycle on short wave
+   ln_rnf      = .true.    !  runoffs                                   (T   => fill namsbc_rnf)
+   nn_isf      = 0         !  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)
+   ln_ssr      = ${ln_ssr}   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 2         !  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
+   ln_wave = .false.       !  Activate coupling with wave (either Stokes Drift or Drag coefficient, or both)  (T => fill namsbc_wave)
+   ln_cdgw = .false.       !  Neutral drag coefficient read from wave model (T => fill namsbc_wave)
+   ln_sdw  = .false.       !  Computation of 3D stokes drift                (T => fill namsbc_wave)
+   nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,
+                           !  =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field)
+   nn_limflx = -1          !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)
+                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled
+                           !  = 0  Average per-category fluxes (forced and coupled mode)
+                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled
+                           !  = 2  Redistribute a single flux over categories (coupled mode only)
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+   nn_tau000   =   0       !  gently increase the stress over the first ntau_rst time-steps
+   rn_utau0    =   0.5     !  uniform value for the i-stress
+   rn_vtau0    =   0.e0    !  uniform value for the j-stress
+   rn_qns0     =   0.e0    !  uniform value for the total heat flux
+   rn_qsr0     =   0.e0    !  uniform value for the solar radiation
+   rn_emp0     =   0.e0    !  uniform value for the freswater budget (E-P)
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation !
+!              !             !  (if <0  months)  !   name   !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  !
+$( . ${ctrl_file_dir}/namelist.nemo.forcing_${nem_forcing_set}.sh )
+
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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 !
+!         !                    !  (if <0  months)  !   name     !   (logical)  ! (T/F) ! 'monthly' ! filename ! pairing  !
+   sn_rnf = 'ORCA_R025_runoff_v1.1.nc', -1        , 'sornficb' , .true.       , .true., 'yearly'  ,    ''    ,    ''    , ''
+   sn_cnf = 'ORCA_R025_runoff_v1.1.nc',  0        , 'socoefr'  , .false.      , .true., 'yearly'  ,    ''    ,    ''    , ''
+   sn_dep_rnf = 'runoff_depth' ,     0             , 'rodepth'  ,    .false.   , .true.,  'yearly' ,     ''   , ''       , ''
+                !
+   cn_dir       = './'       !  root directory for the location of the runoff files
+   ln_rnf_mouth = .false.    !  specific treatment at rivers mouths
+   rn_hrnf      =  10.       !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =   2.e-3    !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0     !  multiplicative factor for runoff
+   ln_rnf_depth = .true.     !  read in depth information for runoff 
+   ln_rnf_tem   = .false.    !  read in temperature information for runoff
+   ln_rnf_sal   = .false.    !  read in salinity information for runoff
+   ln_rnf_depth_ini = .false.!  compute depth at initialisation from runoff file
+   rn_rnf_max   = 0.0065     !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+   rn_dep_max   = 150.       !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
+   nn_rnf_depth_file = 0     !  create (=1) a runoff depth file or not (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!
+! 07/2018 - Yohan Ruprich-Robert chages: add mask_ssr reading option and take into account last shaconemo update (06/2018)
+!
+   !             ! filename          ! freq  ! variable name  ! time     ! clim     ! year or   ! weights   ! rot     ! mask
+   !             !                   !       !                ! interp   !          ! monthly   ! filename  ! pair    ! filename
+   !----------------------------------------------------------------------------------------------------------------------------------------
+   sn_sss      = 'sss_restore_data'  , -1.   , 'so'           , .true.   , .true.  , 'yearly'   , ''        , ''      , ''
+   sn_sst      = 'sst_restore_data'  , -1.   , 'thetao'       , .true.   , .true.  , 'yearly'   , ''        , ''      , ''
+   sn_msk      = 'mask_restore'      , -12.  , 'mask_ssr'     , .false.  , .true.  , 'yearly'   , ''        , ''      , ''
+   !
+   cn_dir      = './'    !  root directory for the location of the runoff files  
+   nn_sstr     = 1       !  add a retroaction term in the surface heat flux (=1) or not (=0)
+   nn_sssr     = 2       !  add a damping term in the surface freshwater flux (=2) or to SSS only (=1) or no damping term (=0)
+   nn_icedmp   = 0       !  Cntrl of surface restoration under ice nn_icedmp 
+                         !  ( 0   =  no restoration under ice )
+                         !  ( 1   =  restoration everywhere  )
+                         !  ( > 1 =  reinforced damping (x nn_icedmp) under ice
+   nn_msk      = 0       !  add a sub-regional masking to the surface restoring (=1) or not (=0)
+                         !  sn_msk can be empty if nn_msk = 0
+   rn_dqdt     = -40.    !  magnitude of the retroaction on temperature   [W/m2/K]
+   rn_deds     = -166.67 ! -864 magnitude of the damping on salinity   [kg/m2/s/psu]
+   ln_sssr_bnd = .false. ! .true. !  flag to bound erp term (associated with nn_sssr=2)
+   rn_sssr_bnd = 4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] (associated with nn_sssr=2)
+   ln_sssd_bnd = .false. ! .true. !  flag to bound S-S* term (associated with nn_ssr=2)
+   rn_sssd_bnd = 0.01    !  ABS(Max./Min.) value of S-S* term [psu] (associated with nn_ssr=2)
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    0.0    !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+   ln_vorlat   = .false.   !  consistency of vorticity boundary condition with analytical eqs.
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+   nn_cla      =    0      !  advection between 2 ocean pts separates by land
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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
+   rn_bfri1    =    4.e-4  !  bottom drag coefficient (linear case)
+   rn_bfri2    =    1.e-3  !  bottom drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
+   rn_bfri2_max =   1.e-1  !  max. bottom drag coefficient (non linear case and ln_loglayer=T)
+   rn_bfeb2    =    2.5e-3 !  bottom turbulent kinetic energy background  (m2/s2)
+   rn_bfrz0    =    3.e-3  !  bottom roughness [m] if ln_loglayer=T
+   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file )
+   rn_bfrien   =    10.    !  local multiplying factor of bfr (ln_bfr2d=T)
+   rn_tfri1    =    4.e-4  !  top drag coefficient (linear case)
+   rn_tfri2    =    2.5e-3 !  top drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
+   rn_tfri2_max =   1.e-1  !  max. top drag coefficient (non linear case and ln_loglayer=T)
+   rn_tfeb2    =    0.0    !  top turbulent kinetic energy background  (m2/s2)
+   rn_tfrz0    =    3.e-3  !  top roughness [m] if ln_loglayer=T
+   ln_tfr2d    = .false.   !  horizontal variation of the top friction coef (read a 2D mask file )
+   rn_tfrien   =    50.    !  local multiplying factor of tfr (ln_tfr2d=T)
+
+   ln_bfrimp   = .false.   !  implicit bottom friction (requires ln_zdfexp = .false. if true)
+   ln_loglayer = .false.   !  logarithmic formulation (non linear case)
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+   sn_qgh      = 'Goutorbe_ghflux.nc', -12. , 'gh_flux' , .false. , .true. , 'yearly' , 'weights_Goutorbe1_2_orca025_bilinear.nc' , '' , ''
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+   nn_bbl_ldf  =  1      !  diffusive bbl (=1)   or not (=0)
+   nn_bbl_adv  =  1      !  advective bbl (=1/2) or not (=0)
+   rn_ahtbbl   =  1000.  !  lateral mixing coefficient in the bbl  [m2/s]
+   rn_gambbl   =  10.    !  advective bbl coefficient                 [s]
+/
+
+!!======================================================================
+!!                        Tracer (T & S ) namelists
+!!======================================================================
+!!   nameos        equation of state
+!!   namtra_adv    advection scheme
+!!   namtra_adv_mle   mixed layer eddy param. (Fox-Kemper param.)
+!!   namtra_ldf    lateral diffusion scheme
+!!   namtra_dmp    T & S newtonian damping
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_cen2   =  .false.  !  2nd order centered scheme
+   ln_traadv_tvd    =  .true.   !  TVD scheme
+   ln_traadv_muscl  =  .false.  !  MUSCL scheme
+   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries
+   ln_traadv_ubs    =  .false.  !  UBS scheme
+   ln_traadv_qck    =  .false.  !  QUICKEST scheme
+   ln_traadv_msc_ups=  .false.  !  use upstream scheme within muscl
+   ln_traadv_tvd_zts=  .false.  !  TVD scheme with sub-timestepping of vertical tracer advection
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !   mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+   ln_mle    = .false.     ! (T) use the Mixed Layer Eddy (MLE) parameterisation
+   rn_ce     = 0.06        ! magnitude of the MLE (typical value: 0.06 to 0.08)
+   nn_mle    = 1           ! MLE type: =0 standard Fox-Kemper ; =1 new formulation
+   rn_lf     = 5.e+3       ! typical scale of mixed layer front (meters)                      (case rn_mle=0)
+   rn_time   = 172800.     ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0)
+   rn_lat    = 20.         ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1)
+   nn_mld_uv = 0           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max)
+   nn_conv   = 0           ! =1 no MLE in case of convection ; =0 always MLE
+   rn_rho_c_mle  = 0.01    ! delta rho criterion used to calculate MLD for FK
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   !                       !  Operator type:
+   ln_traldf_lap    =  .true.   !  laplacian operator
+   ln_traldf_iso    =  .true.   !  iso-neutral                 (needs "key_ldfslp")
+   !                       !  Coefficients
+   ! Eddy-induced (GM) advection always used with Griffies; otherwise needs "key_traldf_eiv"
+   ! Value rn_aeiv_0 is ignored unless = 0 with Held-Larichev spatially varying aeiv
+   !                                  (key_traldf_c2d & key_traldf_eiv & key_orca_r2, _r1 or _r05)
+   rn_aeiv_0        =  0.     !  eddy induced velocity coefficient [m2/s]
+   rn_aht_0         =  300.     !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_ahtb_0        =     0.    !  background eddy diffusivity for ldf_iso [m2/s]
+   !                                           (normally=0; not used with Griffies)
+   rn_slpmax        =     0.01  !  slope limit
+   rn_chsmag        =     1.    !  multiplicative factor in Smagorinsky diffusivity
+   rn_smsh          =     0.    !  Smagorinsky diffusivity: = 0 - use only sheer
+   rn_aht_m         =  2000.    !  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  ${ln_tradmp}  !  add a damping termn (T) or not (F)
+   nn_zdmp     =    2      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   cn_resto    = 'resto.nc' ! Name of file containing restoration coefficient field (use dmp_tools to create this)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+   ln_dynzad_zts = .false. !  Use (T) sub timestepping for vertical momentum advection
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+   ln_dynvor_ene = .false. !  enstrophy conserving scheme
+   ln_dynvor_ens = .false. !  energy conserving scheme
+   ln_dynvor_mix = .false. !  mixed scheme
+   ln_dynvor_een = .true.  !  energy & enstrophy scheme
+   ln_dynvor_een_old = .false.  !  energy & enstrophy scheme - original formulation
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zco  = .false.   !  z-coordinate - full steps
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation)
+   ln_hpg_isf  = .false.   !  s-coordinate (sco ) adapted to isf
+   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
+   ln_hpg_prj  = .true.    !  s-coordinate (Pressure Jacobian scheme)
+   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
+                           !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   !                       !  Type of the operator :
+   ln_dynldf_lap    =  .false.  !  laplacian operator
+   ln_dynldf_bilap  =  .true.   !  bilaplacian operator
+   !                       !  Direction of action  :
+   ln_dynldf_level  =  .false.  !  iso-level
+   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.)
+   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp")
+   !                       !  Coefficient
+   rn_ahm_0_lap     =     0.    !  horizontal laplacian eddy viscosity   [m2/s]
+   rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s]
+   rn_ahm_0_blp     =    -6.4e11!  horizontal bilaplacian eddy viscosity [m4/s]
+   rn_cmsmag_1      =     3.    !  constant in laplacian Smagorinsky viscosity
+   rn_cmsmag_2      =     3     !  constant in bilaplacian Smagorinsky viscosity
+   rn_cmsh          =     0.    !  1 or 0 , if 0 -use only shear for Smagorinsky viscosity
+   rn_ahm_m_blp     =    -1.e12 !  upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
+   rn_ahm_m_lap     = 40000.    !  upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+   rn_avm0     =   1.e-4   !  vertical eddy viscosity   [m2/s]          (background Kz if not "key_zdfcst")
+   rn_avt0     =   1.e-5   !  vertical eddy diffusivity [m2/s]          (background Kz if not "key_zdfcst")
+   nn_avb      =    0      !  profile for background avt & avm (=1) or not (=0)
+   nn_havtb    =    1      !  horizontal shape for avtb (=1) or not (=0)
+   ln_zdfevd   = .true.    !  enhanced vertical diffusion (evd) (T) or not (F)
+   nn_evdm     =    1      !  evd apply on tracer (=0) or on tracer and momentum (=1)
+   rn_avevd    =   10.     !  evd mixing coefficient [m2/s]
+   ln_zdfnpc   = .false.   !  Non-Penetrative Convective algorithm (T) or not (F)
+   nn_npc      =    1            !  frequency of application of npc
+   nn_npcp     =  365            !  npc control print frequency
+   ln_zdfexp   = .false.   !  time-stepping: split-explicit (T) or implicit (F) time stepping
+   nn_zdfexp   =    3            !  number of sub-timestep for ln_zdfexp=T
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+   rn_avmri    = 100.e-4   !  maximum value of the vertical viscosity
+   rn_alp      =   5.      !  coefficient of the parameterization
+   nn_ric      =   2       !  coefficient of the parameterization
+   rn_ekmfc    =   0.7     !  Factor in the Ekman depth Equation
+   rn_mldmin   =   1.0     !  minimum allowable mixed-layer depth estimate (m)
+   rn_mldmax   =1000.0     !  maximum allowable mixed-layer depth estimate (m)
+   rn_wtmix    =  10.0     !  vertical eddy viscosity coeff [m2/s] in the mixed-layer
+   rn_wvmix    =  10.0     !  vertical eddy diffusion coeff [m2/s] in the mixed-layer
+   ln_mldw     = .true.    !  Flag to use or not the mized layer depth param.
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+   rn_ediff    =   0.1     !  coef. for vertical eddy coef. (avt=rn_ediff*mxl*sqrt(e) )
+   rn_ediss    =   0.7     !  coef. of the Kolmogoroff dissipation
+   rn_ebb      =  67.83    !  coef. of the surface input of tke (=67.83 suggested when ln_mxl0=T)
+   rn_emin     =   1.e-6   !  minimum value of tke [m2/s2]
+   rn_emin0    =   1.e-4   !  surface minimum value of tke [m2/s2]
+   rn_bshear   =   1.e-20  ! background shear (>0) currently a numerical threshold (do not change it)
+   nn_mxl      =   3       !  mixing length: = 0 bounded by the distance to surface and bottom
+                           !                 = 1 bounded by the local vertical scale factor
+                           !                 = 2 first vertical derivative of mixing length bounded by 1
+                           !                 = 3 as =2 with distinct disspipative an mixing length scale
+   nn_pdl      =   1       !  Prandtl number function of richarson number (=1, avt=pdl(Ri)*avm) or not (=0, avt=avm)
+   ln_mxl0     = .true.    !  surface mixing length scale = F(wind stress) (T) or not (F)
+   rn_mxl0     =   0.01    !  surface  buoyancy lenght scale minimum value
+   ln_lc       = .true.    !  Langmuir cell parameterisation (Axell 2002)
+   rn_lc       =   0.15    !  coef. associated to Langmuir cells
+   nn_etau     =   1       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_coupled")
+   rn_efr      =   0.05    !  fraction of surface tke value which penetrates below the ML (nn_etau=1 or 2)
+   nn_htau     =   1       !  type of exponential decrease of tke penetration below the ML
+                           !        = 0  constant 10 m length scale
+                           !        = 1  0.5m at the equator to 30m poleward of 40 degrees
+/
+!------------------------------------------------------------------------
+&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
+!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
+   ln_kpprimix = .true.    !  shear instability mixing
+   rn_difmiw   =  1.0e-04  !  constant internal wave viscosity [m2/s]
+   rn_difsiw   =  0.1e-04  !  constant internal wave diffusivity [m2/s]
+   rn_riinfty  =  0.8      !  local Richardson Number limit for shear instability
+   rn_difri    =  0.0050   !  maximum shear mixing at Rig = 0    [m2/s]
+   rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2]
+   rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s]
+   nn_avb      =  0        !  horizontal averaged (=1) or not (=0) on avt and amv
+   nn_ave      =  1        !  constant (=0) or profile (=1) background on avt
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+   rn_emin       = 1.e-6   !  minimum value of e   [m2/s2]
+   rn_epsmin     = 1.e-12  !  minimum value of eps [m2/s3]
+   ln_length_lim = .true.  !  limit on the dissipation rate under stable stratification (Galperin et al., 1988)
+   rn_clim_galp  = 0.53    !  galperin limit
+   ln_sigpsi     = .true.  !  Activate or not Burchard 2001 mods on psi schmidt number in the wb case
+   rn_crban      = 100.    !  Craig and Banner 1994 constant for wb tke flux
+   rn_charn      = 70000.  !  Charnock constant for wb induced roughness length
+   rn_hsro       =  0.02   !  Minimum surface roughness
+   rn_frac_hs    =   1.3   !  Fraction of wave height as roughness (if nn_z0_met=2)
+   nn_z0_met     =     2   !  Method for surface roughness computation (0/1/2)
+   nn_bc_surf    =     1   !  surface condition (0/1=Dir/Neum)
+   nn_bc_bot     =     1   !  bottom condition (0/1=Dir/Neum)
+   nn_stab_func  =     2   !  stability function (0=Galp, 1= KC94, 2=CanutoA, 3=CanutoB)
+   nn_clos       =     1   !  predefined closure type (0=MY82, 1=k-eps, 2=k-w, 3=Gen)
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+   rn_avts     = 1.e-4     !  maximum avs (vertical mixing on salinity)
+   rn_hsbfr    = 1.6       !  heat/salt buoyancy flux ratio
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   rn_htmx     = 500.      !  vertical decay scale for turbulence (meters)
+   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1)
+   rn_tfe      = 0.333     !  tidal dissipation efficiency
+   rn_me       = 0.2       !  mixing efficiency
+   ln_tmx_itf  = .true.    !  ITF specific parameterisation
+   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx_new    !   new tidal mixing parameterization                ("key_zdftmx_new")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
+                           !                   =2 successive-over-relaxation (sor)
+   nn_sol_arp  =      0    !  absolute/relative (0/1) precision convergence test
+   rn_eps      =  1.e-6    !  absolute precision of the solver
+   nn_nmin     =    300    !  minimum of iterations for the SOR solver
+   nn_nmax     =    800    !  maximum of iterations for the SOR solver
+   nn_nmod     =     10    !  frequency of test for the SOR solver
+   rn_resmax   =  1.e-10   !  absolute precision for the SOR solver
+   rn_sor      =  1.92     !  optimal coefficient for SOR solver (to be adjusted with the domain)
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+ln_ctl = .false.
+nn_timing   =    0         ! timing by routine activated (=1) creates timing.output file, or not (=0)
+/
+!-----------------------------------------------------------------------
+&namc1d        !   1D configuration options                             ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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

+ 432 - 0
runtime/classic/ctrl/namelist.nemo-ORCA1L75-carboncycle.cfg.sh

@@ -0,0 +1,432 @@
+# namelist.nemo-ORCA1L46.cfg.sh writes the NEMO namelist for ORCA1L46 in
+# coupled mode to standard output. This namelist will overwrite the reference
+# namelist (namelist.nemo.ref.sh). Hence, only parameters specific to the
+# ORCA1L46/coupled configuration should be specified here.
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!!======================================================================
+!!                   ***  Run management namelists  ***
+!!======================================================================
+!!   namrun       parameters of the run
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_leapy      =  1             !  Leap year calendar (1) or not (0)
+/
+!
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
+!!   namcfg       parameters of the configuration
+!!   namzgr       vertical coordinate
+!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
+!!   namdom       space and time domain (bathymetry, mesh, timestep)
+!!   namtsd       data: temperature & salinity
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&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               !lolo  number of levels      ( >= jpk )
+   jpiglo      =     362               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     292               !  2nd    -                  -    --> j  =jpjdta
+   jperio      =       6               !  lateral cond. type (between 0 and 6)
+                                       !  = 0 closed                 ;   = 1 cyclic East-West
+                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot
+                                       !  = 4 cyclic East-West AND North fold T-point pivot
+                                       !  = 5 North fold F-point pivot
+                                       !  = 6 cyclic East-West AND North fold F-point pivot
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   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.9530096000000 ! (default coefficients)
+   ppa1        =       2.415951269000000   !
+   ppkth       =      15.35101370000000    !
+   ppacr       =       7.0             !
+   ppdzmin     =  999999.0             !  Minimum vertical spacing
+   pphmax      =  999999.0             !  Maximum depth
+   ldbletanh   =   .TRUE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =     100.7609285000000 !  Double tanh function parameters
+   ppkth2      =      48.02989372000000    !
+   ppacr2      =      13.00000000000   !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters  ("key_dynspg_ts") !lolo compiled with!
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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', -1 ,'votemper' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca1_bilinear.nc' , '' , ''
+   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim'       , -1 ,'vosaline' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca1_bilinear.nc' , '' , ''
+/
+!-----------------------------------------------------------------------
+&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)
+   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_cpl      = .true.    !  Coupled formulation                       (T => fill namsbc_cpl )
+   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .false.   !lolo only for ocean standalone! only for ocean standalone!  daily mean to diurnal cycle on short wave   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
+   ln_rnf      = .true.    !  runoffs                                   (T   => fill namsbc_rnf)
+   nn_isf      = 0         !  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)
+   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+                           !     =2 annual global mean of e-p-r set to zero
+   nn_limflx   =  2        !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)
+                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled
+                           !  = 0  Average per-category fluxes (forced and coupled mode)
+                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled
+                           !  = 2  Redistribute a single flux over categories (coupled mode only)
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+!                ! description      !  multiple  !    vector   !      vector          ! vector !
+!                !                  ! categories !  reference  !    orientation       ! grids  !
+! send
+   sn_snd_temp   =   'oce and ice'  ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_alb    =   'ice'          ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_thick  =   'ice and snow' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_crt    =   'none'         ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'
+   sn_snd_co2    =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+! receive
+   sn_rcv_w10m   =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_taumod =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_tau    =   'oce and ice'  ,    'no'    , 'spherical' , 'eastward-northward' ,   'U,V'
+   sn_rcv_dqnsdt =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qsr    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qns    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_emp    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_rnf    =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_cal    =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_co2    =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_iceflx =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+!
+   nn_cplmodel   =     1     !  Maximum number of models to/from which NEMO is potentialy sending/receiving data
+   ln_usecplmask = .false.   !  use a coupling mask file to merge data received from several models
+                             !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel)
+/
+!-----------------------------------------------------------------------
+&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 !
+!         !                    !  (if <0  months)  !   name     !   (logical)  ! (T/F) ! 'monthly' ! filename ! pairing  !
+   sn_rnf = 'runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc', -1 , 'sorunoff', .true.  , .true. , 'yearly'  , '' , '' , ''
+   sn_cnf = 'runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc',  0 , 'socoeff' , .false. , .true. , 'yearly'  , '' , '' , ''
+   sn_dep_rnf = 'runoff_depth' ,     0             , 'rodepth'  ,    .false.   , .true.,  'yearly' ,     ''   , ''       , ''
+                !
+   cn_dir       = './'       !  root directory for the location of the runoff files
+   ln_rnf_mouth = .false.    !  specific treatment at rivers mouths
+   rn_hrnf      =  15.e0     !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =   1.e-3    !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0     !  multiplicative factor for runoff
+   ln_rnf_depth = .true.     !  read in depth information for runoff 
+   ln_rnf_tem   = .false.    !  read in temperature information for runoff
+   ln_rnf_sal   = .false.    !  read in salinity information for runoff
+   ln_rnf_depth_ini = .false.!  compute depth at initialisation from runoff file
+   rn_rnf_max   = 0.0065     !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+   rn_dep_max = 150.         !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
+   nn_rnf_depth_file = 0     !  create (=1) a runoff depth file or not (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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
+!-----------------------------------------------------------------------
+   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+   sn_qgh      = 'Goutorbe_ghflux.nc', -12. , 'gh_flux' , .false. , .true. , 'yearly' , 'weights_Goutorbe1_2_orca1_bilinear.nc' , '' , ''
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_tvd    =  .false.  !  TVD scheme
+   ln_traadv_ubs    =  .false.  !  UBS scheme
+   ln_traadv_tvd_zts=  .true.   !lolo  TVD scheme with sub-timestepping of vertical tracer advection
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   ln_traldf_grif   =  .false.   !  griffies skew flux formulation       (require "key_ldfslp")
+   ln_traldf_gdia   =  .false.   !  griffies operator strfn diagnostics  (require "key_ldfslp")
+   ln_botmix_grif   =  .false.   !  griffies operator with lateral mixing on bottom (require "key_ldfslp")
+   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
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+   ln_dynzad_zts = .true.  !lolo  Use (T) sub timestepping for vertical 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_zco  = .false.   !  z-coordinate - full steps
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .true.    !lolo  s-coordinate (standard jacobian formulation)
+   ln_hpg_isf  = .false.   !  s-coordinate (sco ) adapted to isf
+   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
+   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
+   ln_dynhpg_imp = .false.   !  time stepping: semi-implicit time scheme  (T)
+                              !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+&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")
+!-----------------------------------------------------------------------
+   rn_lc       =   0.20    !  coef. associated to Langmuir cells
+   nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_coupled")
+/
+!------------------------------------------------------------------------
+&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)
+!-----------------------------------------------------------------------
+   jpni        =   ${nem_jpni:-0}       !  jpni   number of processors following i (set automatically if < 1)
+   jpnj        =   ${nem_jpnj:-0}       !  jpnj   number of processors following j (set automatically if < 1)
+   jpnij       =   ${nem_numproc:-0}    !  jpnij  number of local domains (set automatically if < 1)
+/
+!-----------------------------------------------------------------------
+&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

+ 461 - 0
runtime/classic/ctrl/namelist.nemo-ORCA1L75-coupled.cfg.sh

@@ -0,0 +1,461 @@
+# namelist.nemo-ORCA1L46.cfg.sh writes the NEMO namelist for ORCA1L46 in
+# coupled mode to standard output. This namelist will overwrite the reference
+# namelist (namelist.nemo.ref.sh). Hence, only parameters specific to the
+# ORCA1L46/coupled configuration should be specified here.
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!!======================================================================
+!!                   ***  Run management namelists  ***
+!!======================================================================
+!!   namrun       parameters of the run
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_leapy      =  1             !  Leap year calendar (1) or not (0)
+/
+!
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
+!!   namcfg       parameters of the configuration
+!!   namzgr       vertical coordinate
+!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
+!!   namdom       space and time domain (bathymetry, mesh, timestep)
+!!   namtsd       data: temperature & salinity
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&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               !lolo  number of levels      ( >= jpk )
+   jpiglo      =     362               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     292               !  2nd    -                  -    --> j  =jpjdta
+   jperio      =       6               !  lateral cond. type (between 0 and 6)
+                                       !  = 0 closed                 ;   = 1 cyclic East-West
+                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot
+                                       !  = 4 cyclic East-West AND North fold T-point pivot
+                                       !  = 5 North fold F-point pivot
+                                       !  = 6 cyclic East-West AND North fold F-point pivot
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   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.9530096000000 ! (default coefficients)
+   ppa1        =       2.415951269000000   !
+   ppkth       =      15.35101370000000    !
+   ppacr       =       7.0             !
+   ppdzmin     =  999999.0             !  Minimum vertical spacing
+   pphmax      =  999999.0             !  Maximum depth
+   ldbletanh   =   .TRUE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =     100.7609285000000 !  Double tanh function parameters
+   ppkth2      =      48.02989372000000    !
+   ppacr2      =      13.00000000000   !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters  ("key_dynspg_ts") !lolo compiled with!
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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', -1 ,'votemper' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca1_bilinear.nc' , '' , ''
+   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim'       , -1 ,'vosaline' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca1_bilinear.nc' , '' , ''
+   ln_tsd_tradmp = ${ln_tsd_tradmp}  !  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)
+   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_cpl      = .true.    !  Coupled formulation                       (T => fill namsbc_cpl )
+   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .false.   !lolo only for ocean standalone! only for ocean standalone!  daily mean to diurnal cycle on short wave   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
+   ln_rnf      = .true.    !  runoffs                                   (T   => fill namsbc_rnf)
+   nn_isf      = 0         !  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)
+   ln_ssr      = ${ln_ssr} !  Sea Surface Restoring on T and/or S (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+                           !     =2 annual global mean of e-p-r set to zero
+   nn_limflx   =  2        !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)
+                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled
+                           !  = 0  Average per-category fluxes (forced and coupled mode)
+                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled
+                           !  = 2  Redistribute a single flux over categories (coupled mode only)
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+!                ! description      !  multiple  !    vector   !      vector          ! vector !
+!                !                  ! categories !  reference  !    orientation       ! grids  !
+! send
+   sn_snd_temp   =   'oce and ice'  ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_alb    =   'ice'          ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_thick  =   'ice and snow' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_crt    =   'none'         ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'
+   sn_snd_co2    =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+! receive
+   sn_rcv_w10m   =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_taumod =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_tau    =   'oce and ice'  ,    'no'    , 'spherical' , 'eastward-northward' ,   'U,V'
+   sn_rcv_dqnsdt =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qsr    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qns    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_emp    =   'conservative' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_rnf    =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_cal    =   'coupled'      ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_co2    =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_iceflx =   'none'         ,    'no'    ,     ''      ,         ''           ,   ''
+!
+   nn_cplmodel   =     1     !  Maximum number of models to/from which NEMO is potentialy sending/receiving data
+   ln_usecplmask = .false.   !  use a coupling mask file to merge data received from several models
+                             !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel)
+/
+!-----------------------------------------------------------------------
+&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 !
+!         !                    !  (if <0  months)  !   name     !   (logical)  ! (T/F) ! 'monthly' ! filename ! pairing  !
+   sn_rnf = 'runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc', -1 , 'sorunoff', .true.  , .true. , 'yearly'  , '' , '' , ''
+   sn_i_rnf = 'runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc', -1 , 'Icb_flux', .true.  , .true. , 'yearly'  , '' , '' , ''
+   sn_cnf = 'runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc',  0 , 'socoeff' , .false. , .true. , 'yearly'  , '' , '' , ''
+   sn_dep_rnf = 'runoff_depth' ,     0             , 'rodepth'  ,    .false.   , .true.,  'yearly' ,     ''   , ''       , ''
+                !
+   cn_dir       = './'       !  root directory for the location of the runoff files
+   ln_rnf_icb   = .true.     !  read in iceberg flux
+   ln_rnf_mouth = .false.    !  specific treatment at rivers mouths
+   rn_hrnf      =  15.e0     !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =   1.e-3    !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0     !  multiplicative factor for runoff
+   ln_rnf_depth = .true.     !  read in depth information for runoff 
+   ln_rnf_tem   = .false.    !  read in temperature information for runoff
+   ln_rnf_sal   = .false.    !  read in salinity information for runoff
+   ln_rnf_depth_ini = .false.!  compute depth at initialisation from runoff file
+   rn_rnf_max   = 0.0065     !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+   rn_dep_max = 150.         !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
+   nn_rnf_depth_file = 0     !  create (=1) a runoff depth file or not (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!
+! 07/2018 - Yohan Ruprich-Robert chages: add mask_ssr reading option and take into account last shaconemo update (06/2018)
+!
+   !             ! filename          ! freq  ! variable name  ! time     ! clim     ! year or   ! weights   ! rot     ! mask
+   !             !                   !       !                ! interp   !          ! monthly   ! filename  ! pair    ! filename
+   !----------------------------------------------------------------------------------------------------------------------------------------
+   sn_sss      = 'sss_restore_data'  , -1.   , 'so'           , .true.   , .false.  , 'yearly'   , ''        , ''      , ''
+   sn_sst      = 'sst_restore_data'  , -1.   , 'thetao'       , .true.   , .false.  , 'yearly'   , ''        , ''      , ''
+   sn_msk      = 'mask_restore'      , -12.  , 'mask_ssr'     , .false.  , .true.  , 'yearly'   , ''        , ''      , ''
+   !
+   cn_dir      = './'    !  root directory for the location of the runoff files  
+   nn_sstr     = 1       !  add a retroaction term in the surface heat flux (=1) or not (=0)
+   nn_sssr     = 2       !  add a damping term in the surface freshwater flux (=2) or to SSS only (=1) or no damping term (=0)
+   nn_icedmp   = 0       !  Cntrl of surface restoration under ice nn_icedmp 
+                         !  ( 0   =  no restoration under ice )
+                         !  ( 1   =  restoration everywhere  )
+                         !  ( > 1 =  reinforced damping (x nn_icedmp) under ice
+   nn_msk      = 1       !  add a sub-regional masking to the surface restoring (=1) or not (=0)
+                         !  sn_msk can be empty if nn_msk = 0
+   rn_dqdt     = -40.    !  magnitude of the retroaction on temperature   [W/m2/K]
+   rn_deds     = -27.7   ! -864 magnitude of the damping on salinity   [kg/m2/s/psu]
+   ln_sssr_bnd = .false. ! .true. !  flag to bound erp term (associated with nn_sssr=2)
+   rn_sssr_bnd = 4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] (associated with nn_sssr=2)
+   ln_sssd_bnd = .false. ! .true. !  flag to bound S-S* term (associated with nn_ssr=2)
+   rn_sssd_bnd = 0.01    !  ABS(Max./Min.) value of S-S* term [psu] (associated with nn_ssr=2)
+/
+!-----------------------------------------------------------------------
+&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
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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
+!-----------------------------------------------------------------------
+   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+   sn_qgh      = 'Goutorbe_ghflux.nc', -12. , 'gh_flux' , .false. , .true. , 'yearly' , 'weights_Goutorbe1_2_orca1_bilinear.nc' , '' , ''
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_tvd    =  .false.  !  TVD scheme
+   ln_traadv_ubs    =  .false.  !  UBS scheme
+   ln_traadv_tvd_zts=  .true.   !lolo  TVD scheme with sub-timestepping of vertical tracer advection
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   ln_traldf_grif   =  .false.   !  griffies skew flux formulation       (require "key_ldfslp")
+   ln_traldf_gdia   =  .false.   !  griffies operator strfn diagnostics  (require "key_ldfslp")
+   ln_botmix_grif   =  .false.   !  griffies operator with lateral mixing on bottom (require "key_ldfslp")
+   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   =  ${ln_tradmp}  !  add a damping termn (T) or not (F)
+   nn_zdmp     =    2      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   cn_resto    = 'resto.nc' ! Name of file containing restoration coefficient field (use dmp_tools to create this)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+   ln_dynzad_zts = .true.  !lolo  Use (T) sub timestepping for vertical 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_zco  = .false.   !  z-coordinate - full steps
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .true.    !lolo  s-coordinate (standard jacobian formulation)
+   ln_hpg_isf  = .false.   !  s-coordinate (sco ) adapted to isf
+   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
+   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
+   ln_dynhpg_imp = .false.   !  time stepping: semi-implicit time scheme  (T)
+                              !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+&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")
+!-----------------------------------------------------------------------
+   rn_lc       =   0.20    !  coef. associated to Langmuir cells
+   nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_coupled")
+/
+!------------------------------------------------------------------------
+&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

+ 510 - 0
runtime/classic/ctrl/namelist.nemo-ORCA1L75-standalone.cfg.sh

@@ -0,0 +1,510 @@
+# namelist.nemo-ORCA1L46.cfg.sh writes the NEMO namelist for ORCA1L46 in
+# coupled mode to standard output. This namelist will overwrite the reference
+# namelist (namelist.nemo.ref.sh). Hence, only parameters specific to the
+# ORCA1L46/coupled configuration should be specified here.
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!!======================================================================
+!!                   ***  Run management namelists  ***
+!!======================================================================
+!!   namrun       parameters of the run
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_leapy      =  0             !  Leap year calendar (1) or not (0)
+/
+!
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
+!!   namcfg       parameters of the configuration
+!!   namzgr       vertical coordinate
+!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
+!!   namdom       space and time domain (bathymetry, mesh, timestep)
+!!   namtsd       data: temperature & salinity
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&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               !lolo  number of levels      ( >= jpk )
+   jpiglo      =     362               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     292               !  2nd    -                  -    --> j  =jpjdta
+   jperio      =       6               !  lateral cond. type (between 0 and 6)
+                                       !  = 0 closed                 ;   = 1 cyclic East-West
+                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot
+                                       !  = 4 cyclic East-West AND North fold T-point pivot
+                                       !  = 5 North fold F-point pivot
+                                       !  = 6 cyclic East-West AND North fold F-point pivot
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   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.9530096000000 ! (default coefficients)
+   ppa1        =       2.415951269000000   !
+   ppkth       =      15.35101370000000    !
+   ppacr       =       7.0             !
+   ppdzmin     =  999999.0             !  Minimum vertical spacing
+   pphmax      =  999999.0             !  Maximum depth
+   ldbletanh   =   .TRUE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =     100.7609285000000 !  Double tanh function parameters
+   ppkth2      =      48.02989372000000    !
+   ppacr2      =      13.00000000000   !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters  ("key_dynspg_ts") !lolo compiled with!
+!-----------------------------------------------------------------------
+   ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
+   ln_bt_av      =    .TRUE.           !  Time filtering of barotropic variables
+   ln_bt_nn_auto =    .TRUE.           !  Set nn_baro automatically to be just below
+                                       !  a user defined maximum courant number (rn_bt_cmax)
+   nn_baro       =    30               !  Number of iterations of barotropic mode
+                                       !  during rn_rdt seconds. Only used if ln_bt_nn_auto=F
+   rn_bt_cmax    =    0.8              !  Maximum courant number allowed if ln_bt_nn_auto=T
+   nn_bt_flt     =    1                !  Time filter choice
+                                       !  = 0 None
+                                       !  = 1 Boxcar over   nn_baro barotropic steps
+                                       !  = 2 Boxcar over 2*nn_baro     "        "
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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', -1 ,'votemper' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca1_bilinear.nc' , '' , ''
+   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim'       , -1 ,'vosaline' , .true. , .true. , 'yearly' , 'weights_WOA13d1_2_orca1_bilinear.nc' , '' , ''
+   ln_tsd_tradmp = ${ln_tsd_tradmp}  !  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)
+   ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana )
+   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx )
+   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)
+   ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs )
+   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
+   nn_ice      = 2         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2")
+   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = ${ln_dm2dc}!  daily mean to diurnal cycle on short wave
+   ln_rnf      = .true.    !  runoffs                                   (T   => fill namsbc_rnf)
+   nn_isf      = 0         !  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)
+   ln_ssr      = ${ln_ssr}   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 2         !  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
+   ln_wave = .false.       !  Activate coupling with wave (either Stokes Drift or Drag coefficient, or both)  (T => fill namsbc_wave)
+   ln_cdgw = .false.       !  Neutral drag coefficient read from wave model (T => fill namsbc_wave)
+   ln_sdw  = .false.       !  Computation of 3D stokes drift                (T => fill namsbc_wave)
+   nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,
+                           !  =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field)
+   nn_limflx = -1          !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)
+                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled
+                           !  = 0  Average per-category fluxes (forced and coupled mode)
+                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled
+                           !  = 2  Redistribute a single flux over categories (coupled mode only)
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation !
+!              !             !  (if <0  months)  !   name   !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  !
+$( . ${ctrl_file_dir}/namelist.nemo.forcing_${nem_forcing_set}.sh )
+
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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 !
+!         !                    !  (if <0  months)  !   name     !   (logical)  ! (T/F) ! 'monthly' ! filename ! pairing  !
+$( . ${ctrl_file_dir}/${forcing_runoff}.sh )
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!
+! 07/2018 - Yohan Ruprich-Robert chages: add mask_ssr reading option and take into account last shaconemo update (06/2018)
+!
+   !             ! filename          ! freq  ! variable name  ! time     ! clim     ! year or   ! weights   ! rot     ! mask
+   !             !                   !       !                ! interp   !          ! monthly   ! filename  ! pair    ! filename
+   !----------------------------------------------------------------------------------------------------------------------------------------
+   sn_sss      = 'sss_restore_data'  , -1.   , 'so'           , .true.   , .true.  , 'yearly'   , ''        , ''      , ''
+   sn_sst      = 'sst_restore_data'  , -1.   , 'thetao'       , .true.   , .true.  , 'yearly'   , ''        , ''      , ''
+   sn_msk      = 'mask_restore'      , -12.  , 'mask_ssr'     , .false.  , .true.  , 'yearly'   , ''        , ''      , ''
+   !
+   cn_dir      = './'    !  root directory for the location of the runoff files  
+   nn_sstr     = 1       !  add a retroaction term in the surface heat flux (=1) or not (=0)
+   nn_sssr     = 2       !  add a damping term in the surface freshwater flux (=2) or to SSS only (=1) or no damping term (=0)
+   nn_icedmp   = 0       !  Cntrl of surface restoration under ice nn_icedmp 
+                         !  ( 0   =  no restoration under ice )
+                         !  ( 1   =  restoration everywhere  )
+                         !  ( > 1 =  reinforced damping (x nn_icedmp) under ice
+   nn_msk      = 0       !  add a sub-regional masking to the surface restoring (=1) or not (=0)
+                         !  sn_msk can be empty if nn_msk = 0
+   rn_dqdt     = -40.    !  magnitude of the retroaction on temperature   [W/m2/K]
+   rn_deds     = -166.67 ! -864 magnitude of the damping on salinity   [kg/m2/s/psu]
+   ln_sssr_bnd = .false. ! .true. !  flag to bound erp term (associated with nn_sssr=2)
+   rn_sssr_bnd = 4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] (associated with nn_sssr=2)
+   ln_sssd_bnd = .false. ! .true. !  flag to bound S-S* term (associated with nn_ssr=2)
+   rn_sssd_bnd = 0.01    !  ABS(Max./Min.) value of S-S* term [psu] (associated with nn_ssr=2)
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    0.0    !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+   ln_vorlat   = .false.   !  consistency of vorticity boundary condition with analytical eqs.
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+   nn_cla      =    0      !  advection between 2 ocean pts separates by land
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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
+!-----------------------------------------------------------------------
+   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+   sn_qgh      = 'Goutorbe_ghflux.nc', -12. , 'gh_flux' , .false. , .true. , 'yearly' , 'weights_Goutorbe1_2_orca1_bilinear.nc' , '' , ''
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+   nn_bbl_ldf  =  1      !  diffusive bbl (=1)   or not (=0)
+   nn_bbl_adv  =  0      !  advective bbl (=1/2) or not (=0)
+   rn_ahtbbl   =  1000.  !  lateral mixing coefficient in the bbl  [m2/s]
+   rn_gambbl   =  10.    !  advective bbl coefficient                 [s]
+/
+
+!!======================================================================
+!!                        Tracer (T & S ) namelists
+!!======================================================================
+!!   nameos        equation of state
+!!   namtra_adv    advection scheme
+!!   namtra_adv_mle   mixed layer eddy param. (Fox-Kemper param.)
+!!   namtra_ldf    lateral diffusion scheme
+!!   namtra_dmp    T & S newtonian damping
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_tvd    =  .false.  !  TVD scheme
+   ln_traadv_ubs    =  .false.  !  UBS scheme
+   ln_traadv_tvd_zts=  .true.   !lolo  TVD scheme with sub-timestepping of vertical tracer advection
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   !                       !  Operator type:
+   ln_traldf_lap    =  .true.   !  laplacian operator
+   ln_traldf_iso    =  .true.   !  iso-neutral                 (needs "key_ldfslp")
+   !                       !  Coefficients
+   ! Eddy-induced (GM) advection always used with Griffies; otherwise needs "key_traldf_eiv"
+   ! Value rn_aeiv_0 is ignored unless = 0 with Held-Larichev spatially varying aeiv
+   !                                  (key_traldf_c2d & key_traldf_eiv & key_orca_r2, _r1 or _r05)
+   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")
+/
+!----------------------------------------------------------------------------------
+&namdta_dyn        !   offline dynamics read in files                ("key_offline")
+!-----------------------------------------------------------------------
+!            !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation !
+!            !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  !
+   sn_uwd  = 'OfflineForcing_grid_U' , 24   , 'uocetr_eff' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_vwd  = 'OfflineForcing_grid_V' , 24   , 'vocetr_eff' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_wwd  = 'OfflineForcing_grid_W' , 24   , 'wocetr_eff' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_emp  = 'OfflineForcing_grid_T' , 24   , 'wfo' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_avt  = 'OfflineForcing_grid_W' , 24   , 'difvsolog' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_tem  = 'OfflineForcing_grid_T' , 24   , 'thetao' ,  .true.    , .true. ,   'yearly'  , ''    , '' , '' 
+   sn_sal  = 'OfflineForcing_grid_T' , 24   , 'so' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_mld  = 'OfflineForcing_grid_T' , 24   , 'mldr10_1' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_qsr  = 'OfflineForcing_grid_T' , 24   , 'rsntds' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_wnd  = 'OfflineForcing_grid_T' , 24   , 'windsp' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_ice  = 'OfflineForcing_grid_T' , 24   , 'iceconc' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_fmf  = 'OfflineForcing_grid_T' , 24   , 'fmmflx' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_ubl  = 'OfflineForcing_grid_U' , 24   , 'ahu_bbl' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_vbl  = 'OfflineForcing_grid_V' , 24   , 'ahv_bbl' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_rnf  = 'OfflineForcing_grid_T' , 24   , 'friver' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_empb = 'OfflineForcing_grid_T' , 24   , 'wfob' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+   sn_div  = 'OfflineForcing_grid_T' , 24   , 'hdivtr' ,  .true.    , .true. ,   'yearly'  , ''    , '' , ''
+!
+   cn_dir      = './'      !  root directory for the location of the dynamical files
+!   ln_degrad   =  .false.  !  flag for degradation -                requires ("key_degrad")
+!   ln_dynwzv   =  .false.   !  computation of vertical velocity instead of using the one read in file
+!   ln_dynbbl   =  .false.   !  bbl coef are in files, so read them - requires ("key_trabbl")
+
+   ln_dynrnf   =  .false
+   ln_dynrnf_depth  =  .false.
+   ln_ssh_ini  =  .false.
+   fwbcorr     = 0.0
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  ${ln_tradmp}  !  add a damping termn (T) or not (F)
+   nn_zdmp     =    2      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   cn_resto    = 'resto.nc' ! Name of file containing restoration coefficient field (use dmp_tools to create this)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+   ln_dynzad_zts = .true.  !lolo  Use (T) sub timestepping for vertical 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_zco  = .false.   !  z-coordinate - full steps
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .true.    !lolo  s-coordinate (standard jacobian formulation)
+   ln_hpg_isf  = .false.   !  s-coordinate (sco ) adapted to isf
+   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
+   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
+   ln_dynhpg_imp = .false.   !  time stepping: semi-implicit time scheme  (T)
+                              !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+&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")
+!-----------------------------------------------------------------------
+   rn_lc       =   0.20    !  coef. associated to Langmuir cells
+   nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_coupled")
+/
+!------------------------------------------------------------------------
+&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
+!-----------------------------------------------------------------------
+ln_ctl = .false.
+nn_timing   =    0         ! timing by routine activated (=1) creates timing.output file, or not (=0)
+/
+!-----------------------------------------------------------------------
+&namc1d        !   1D configuration options                             ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&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

+ 18 - 0
runtime/classic/ctrl/namelist.nemo-runoff-JRA55_1.4.sh

@@ -0,0 +1,18 @@
+cat << EOF
+   sn_rnf = 'friver', 24 , 'friver', .true.  , .false. , 'yearly'  , '' , '' , ''
+   sn_cnf = 'runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc',  0 , 'socoeff' , .false. , .true. , 'yearly'  , '' , '' , ''
+   sn_dep_rnf = 'runoff_depth_JRA' ,                              0 , 'rodepth' , .false. , .true. , 'yearly'  , '' , '' , ''
+          !
+   cn_dir       = './'       !  root directory for the location of the runoff files
+   ln_rnf_mouth = .false.    !  specific treatment at rivers mouths
+   rn_hrnf      =  0.        !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =  0.        !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0     !  multiplicative factor for runoff
+   ln_rnf_depth = .true.     !  read in depth information for runoff
+   ln_rnf_tem   = .false.    !  read in temperature information for runoff
+   ln_rnf_sal   = .false.    !  read in salinity information for runoff
+   ln_rnf_depth_ini = .false.!  compute depth at initialisation from runoff file
+   rn_rnf_max   = 0.0065     !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+   rn_dep_max   = 150.       !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
+   nn_rnf_depth_file = 0     !  create (=1) a runoff depth file or not (=0)
+EOF

+ 18 - 0
runtime/classic/ctrl/namelist.nemo-runoff-default.sh

@@ -0,0 +1,18 @@
+cat << EOF
+   sn_rnf = 'runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc', -1 , 'sorunoff', .true.  , .true. , 'yearly'  , '' , '' , ''
+   sn_cnf = 'runoff-icb_DaiTrenberth_Depoorter_ORCA1_JD.nc',  0 , 'socoeff' , .false. , .true. , 'yearly'  , '' , '' , ''
+   sn_dep_rnf = 'runoff_depth' ,                              0 , 'rodepth' , .false. , .true. , 'yearly'  , '' , '' , ''
+          !
+   cn_dir       = './'       !  root directory for the location of the runoff files
+   ln_rnf_mouth = .false.    !  specific treatment at rivers mouths
+   rn_hrnf      =  0.        !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =  0.        !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0     !  multiplicative factor for runoff
+   ln_rnf_depth = .true.     !  read in depth information for runoff
+   ln_rnf_tem   = .false.    !  read in temperature information for runoff
+   ln_rnf_sal   = .false.    !  read in salinity information for runoff
+   ln_rnf_depth_ini = .false.!  compute depth at initialisation from runoff file
+   rn_rnf_max   = 0.0065     !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+   rn_dep_max   = 150.       !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
+   nn_rnf_depth_file = 0     !  create (=1) a runoff depth file or not (=0)
+EOF

+ 9 - 0
runtime/classic/ctrl/namelist.nemo.age.cfg.sh

@@ -0,0 +1,9 @@
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! AGE  :       1  - dates                                 (namage)
+!! configuration namelists    
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namage     !   dates
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+EOF

+ 11 - 0
runtime/classic/ctrl/namelist.nemo.age.ref.sh

@@ -0,0 +1,11 @@
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! AGE  :       1  - dates                                 (namage)
+!! namelists    
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namage     !   dates
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   rn_age_depth       = 10            ! depth over which age tracer reset to zero
+   rn_age_kill_rate   = -0.000138888  !  = -1/7200 recip of relaxation timescale (s) for  age tracer shallower than age_depth
+/
+EOF

+ 19 - 0
runtime/classic/ctrl/namelist.nemo.c14b.ref.sh

@@ -0,0 +1,19 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! Bomb C14  :       1  - dates                             (namc14date)
+!! namelists    
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namc14date     !   dates
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ndate_beg_b  = 650101    !  datedeb1
+   nyear_res_b  = 1955      !  iannee1
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namc14dia     !   additional 2D/3D tracers diagnostics ("key_trc_diaadd")
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !    name   !           title of the field          !     units      !
+!              !           !                                       !                !
+   c14dia2d(1)  = 'qtr_c14  ' , 'Air-sea flux                      ',  'mol/m2/s    '
+   c14dia2d(2)  = 'qint_c14 ' , 'Cumulative air-sea flux           ',  'mol/m2      '
+   c14dia3d(1)  = 'decay    ' , 'Radiactive decay                  ',  'mol/m3      '
+/

+ 15 - 0
runtime/classic/ctrl/namelist.nemo.cfc.cfg.sh

@@ -0,0 +1,15 @@
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! CFC  :       1  - dates                                 (namcfcdate)
+!! namelists    
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namcfcdate     !   dates
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namcfcdia     !   additional 2D/3D tracers diagnostics 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !    name   !           title of the field          !     units      !
+/
+EOF

+ 43 - 0
runtime/classic/ctrl/namelist.nemo.cfc.ref.sh

@@ -0,0 +1,43 @@
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! CFC  :       1  - dates                                 (namcfcdate)
+!! namelists    
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namcfcdate     !   dates
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ndate_beg  = 300101    !  datedeb1
+   nyear_res  = 1932      !  iannee1
+   ! Formatted file of annual hemisperic CFCs concentration in the atmosphere (ppt)
+   clnamecfc   = 'CFCs_CDIAC.dat'
+   cfc_offset = 0
+!   cfc_offset = -183  ! offset introduced to deal with 6 repeating cycles for OMIP. 
+!
+! 1st OMIP-2 cycle ----> cfc_offset = -305
+! 2nd OMIP-2 cycle ----> cfc_offset = -244
+! 3rd OMIP-2 cycle ----> cfc_offset = -183
+! 4th OMIP-2 cycle ----> cfc_offset = -122
+! 5th OMIP-2 cycle ----> cfc_offset = -61
+! 6th OMIP-2 cycle ----> cfc_offset = 0
+!
+! 1st OMIP-1 cycle ----> cfc_offset = -310
+! 2nd OMIP-1 cycle ----> cfc_offset = -248
+! 3rd OMIP-1 cycle ----> cfc_offset = -186
+! 4th OMIP-1 cycle ----> cfc_offset = -124
+! 5th OMIP-1 cycle ----> cfc_offset = -62
+! 6th OMIP-1 cycle ----> cfc_offset = 0
+!
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namcfcdia     !   additional 2D/3D tracers diagnostics 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !    name   !           title of the field          !     units      !
+!              !           !                                       !                !
+!   cfcdia2d(1)  = 'qtr_c11 ' , 'Air-sea flux of CFC-11           ',  'mol/m2/s    '
+!   cfcdia2d(2)  = 'qint_c11' , 'Cumulative air-sea flux of CFC-11 ', 'mol/m2      '
+!   cfcdia2d(3)  = 'qtr_c12 ' , 'Air-sea flux of CFC-12           ',  'mol/m2/s    '
+!   cfcdia2d(4)  = 'qint_c12' , 'Cumulative air-sea flux of CFC-12 ', 'mol/m2      '
+!   cfcdia2d(5)  = 'qtr_sf6 ' , 'Air-sea flux of SF6               ',  'mol/m2/s    '
+!   cfcdia2d(6)  = 'qint_sf6' , 'Cumulative air-sea flux of SF6    ', 'mol/m2      '
+/
+EOF

+ 19 - 0
runtime/classic/ctrl/namelist.nemo.forcing_CoreII.sh

@@ -0,0 +1,19 @@
+cat << EOF
+   sn_wndi     = 'u_10.15JUNE2009_fill'       ,         6         , 'U_10_MOD',   .true.     ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca${nem_res_hor}_bicubic.nc'  , 'U1'
+   sn_wndj     = 'v_10.15JUNE2009_fill'       ,         6         , 'V_10_MOD',   .true.     ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca${nem_res_hor}_bicubic.nc'  , 'V1'
+   sn_qsr      = 'ncar_rad.15JUNE2009_fill'   ,        24         , 'SWDN_MOD',   .false.    ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca${nem_res_hor}_bilinear.nc' , ''
+   sn_qlw      = 'ncar_rad.15JUNE2009_fill'   ,        24         , 'LWDN_MOD',   .true.     ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca${nem_res_hor}_bilinear.nc' , ''
+   sn_tair     = 't_10.15JUNE2009_fill'       ,         6         , 'T_10_MOD',   .false.    ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca${nem_res_hor}_bilinear.nc' , ''
+   sn_humi     = 'q_10.15JUNE2009_fill'       ,         6         , 'Q_10_MOD',   .false.    ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca${nem_res_hor}_bilinear.nc' , ''
+   sn_prec     = 'ncar_precip.15JUNE2009_fill',        -1         , 'PRC_MOD1',   .true.     ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca${nem_res_hor}_bilinear.nc' , ''
+   sn_snow     = 'ncar_precip.15JUNE2009_fill',        -1         , 'SNOW'    ,   .true.     ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca${nem_res_hor}_bilinear.nc' , ''
+               !
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 10.       !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 10.       !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+EOF

+ 19 - 0
runtime/classic/ctrl/namelist.nemo.forcing_CoreII_interannual.sh

@@ -0,0 +1,19 @@
+cat << EOF
+   sn_wndi     = 'u10'       ,        6  , 'U_10_MOD'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca1_bicubic.nc'  , 'U1'
+   sn_wndj     = 'v10'       ,        6  , 'V_10_MOD'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca1_bicubic.nc'  , 'V1'
+   sn_qsr      = 'rad'       ,        24 , 'SWDN_MOD'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca1_bilinear.nc' , ''
+   sn_qlw      = 'rad'       ,        24 , 'LWDN_MOD'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca1_bilinear.nc' , ''
+   sn_tair     = 't10'       ,        6  , 'T_10_MOD'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca1_bilinear.nc' , ''
+   sn_humi     = 'q10'       ,        6  , 'Q_10_MOD'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca1_bilinear.nc' , ''
+   sn_prec     = 'precip'    ,        -1 , 'RAIN'        , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca1_bilinear.nc' , ''
+   sn_snow     = 'precip'    ,        -1 , 'SNOW'        , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_coreII_2_orca1_bilinear.nc' , ''
+               !
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 10.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 10.       !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+EOF

+ 19 - 0
runtime/classic/ctrl/namelist.nemo.forcing_DFS5.2.sh

@@ -0,0 +1,19 @@
+cat << EOF
+   sn_wndi     = 'u10'       ,        3 , 'u10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bicubic_512x256-ORCA${nem_res_hor}.nc'  , 'Uwnd'
+   sn_wndj     = 'v10'       ,        3 , 'v10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bicubic_512x256-ORCA${nem_res_hor}.nc'  , 'Vwnd'
+   sn_qsr      = 'qsw'       ,        24 , 'radsw' , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc' , ''
+   sn_qlw      = 'qlw'       ,        24 , 'radlw' , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc' , ''
+   sn_tair     = 't2'        ,        3  , 't2'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc' , ''
+   sn_humi     = 'q2'        ,        3  , 'q2'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc' , ''
+   sn_prec     = 'precip'    ,        24, 'precip' , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc' , ''
+   sn_snow     = 'snow'      ,        24, 'snow'   , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc' , ''
+               !
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 2.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 10.       !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+EOF

+ 19 - 0
runtime/classic/ctrl/namelist.nemo.forcing_ERA5_ENDA.sh

@@ -0,0 +1,19 @@
+cat << EOF
+   sn_wndi     = 'u10'       ,        3 , 'u10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bicubic_ERA5-n160_ORCA${nem_res_hor}.nc'   , 'Uwnd'
+   sn_wndj     = 'v10'       ,        3 , 'v10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bicubic_ERA5-n160_ORCA${nem_res_hor}.nc'   , 'Vwnd'
+   sn_qsr      = 'qsw'       ,        3 , 'qsw'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n160_ORCA${nem_res_hor}.nc'  , ''
+   sn_qlw      = 'qlw'       ,        3 , 'qlw'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n160_ORCA${nem_res_hor}.nc'  , ''
+   sn_tair     = 't10'       ,        3 , 't10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n160_ORCA${nem_res_hor}.nc'  , ''
+   sn_humi     = 'q10'       ,        3 , 'q10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n160_ORCA${nem_res_hor}.nc'  , ''
+   sn_prec     = 'precip'    ,        3 , 'precip' , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n160_ORCA${nem_res_hor}.nc'  , ''
+   sn_snow     = 'snow'      ,        3 , 'snow'   , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n160_ORCA${nem_res_hor}.nc'  , ''
+               !
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 10.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 10.       !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+EOF

+ 19 - 0
runtime/classic/ctrl/namelist.nemo.forcing_ERA5_HRES.sh

@@ -0,0 +1,19 @@
+cat << EOF
+   sn_wndi     = 'u10'       ,        3 , 'u10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bicubic_ERA5-n320_ORCA${nem_res_hor}.nc'   , 'Uwnd'
+   sn_wndj     = 'v10'       ,        3 , 'v10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bicubic_ERA5-n320_ORCA${nem_res_hor}.nc'   , 'Vwnd'
+   sn_qsr      = 'qsw'       ,        3 , 'qsw'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n320_ORCA${nem_res_hor}.nc'  , ''
+   sn_qlw      = 'qlw'       ,        3 , 'qlw'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n320_ORCA${nem_res_hor}.nc'  , ''
+   sn_tair     = 't10'       ,        3 , 't10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n320_ORCA${nem_res_hor}.nc'  , ''
+   sn_humi     = 'q10'       ,        3 , 'q10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n320_ORCA${nem_res_hor}.nc'  , ''
+   sn_prec     = 'precip'    ,        3 , 'precip' , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n320_ORCA${nem_res_hor}.nc'  , ''
+   sn_snow     = 'snow'      ,        3 , 'snow'   , .true.  ,  ${is_climatology} , 'yearly'  , 'weights_bilinear_ERA5-n320_ORCA${nem_res_hor}.nc'  , ''
+               !
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 10.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 10.       !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+EOF

+ 18 - 0
runtime/classic/ctrl/namelist.nemo.forcing_JRA55_1.4.sh

@@ -0,0 +1,18 @@
+cat << EOF
+   sn_wndi     = 'uas'     ,   3 , 'uas',  .true. ,  ${is_climatology} , 'yearly'  , 'weights_JRA55_ORCA1_bicub.nc' , 'U1'
+   sn_wndj     = 'vas'     ,   3 , 'vas',  .true. ,  ${is_climatology} , 'yearly'  , 'weights_JRA55_ORCA1_bicub.nc' , 'V1'
+   sn_qsr      = 'rsds'    ,   3 , 'rsds', .true. ,  ${is_climatology} , 'yearly'  , 'weights_JRA55_ORCA1_bilin.nc' , ''
+   sn_qlw      = 'rlds'    ,   3 , 'rlds', .true. ,  ${is_climatology} , 'yearly'  , 'weights_JRA55_ORCA1_bilin.nc' , ''
+   sn_tair     = 'tas'     ,   3 , 'tas',  .true. ,  ${is_climatology} , 'yearly'  , 'weights_JRA55_ORCA1_bilin.nc' , ''
+   sn_humi     = 'huss'    ,   3 , 'huss', .true. ,  ${is_climatology} , 'yearly'  , 'weights_JRA55_ORCA1_bilin.nc' , ''
+   sn_prec     = 'prra'    ,   3 , 'prra', .true. ,  ${is_climatology} , 'yearly'  , 'weights_JRA55_ORCA1_bilin.nc' , ''
+   sn_snow     = 'prsn'    ,   3 , 'prsn', .true. ,  ${is_climatology} , 'yearly'  , 'weights_JRA55_ORCA1_bilin.nc' , ''
+               !
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 10.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 10.       !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+EOF

+ 19 - 0
runtime/classic/ctrl/namelist.nemo.forcing_era5.sh

@@ -0,0 +1,19 @@
+cat << EOF
+   sn_wndi     = 'u10'       ,        3 , 'u10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bicubic_512x256-ORCA${nem_res_hor}.nc'   , 'Uwnd'
+   sn_wndj     = 'v10'       ,        3 , 'v10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bicubic_512x256-ORCA${nem_res_hor}.nc'   , 'Vwnd'
+   sn_qsr      = 'qsw'       ,        3 , 'qsw'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc'  , ''
+   sn_qlw      = 'qlw'       ,        3 , 'qlw'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc'  , ''
+   sn_tair     = 't10'       ,        3 , 't10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc'  , ''
+   sn_humi     = 'q10'       ,        3 , 'q10'    , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc'  , ''
+   sn_prec     = 'precip'    ,        3 , 'precip' , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc'  , ''
+   sn_snow     = 'snow'      ,        3 , 'snow'   , .true.  ,  ${is_climatology} , 'yearly'  , 'weight_bilinear_512x256-ORCA${nem_res_hor}.nc'  , ''
+               !
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 10.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 10.       !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+EOF

+ 19 - 0
runtime/classic/ctrl/namelist.nemo.forcing_eraint.sh

@@ -0,0 +1,19 @@
+cat << EOF
+   sn_wndi     = 'u10'       ,        6  , 'uraw'  , .true.  ,  ${is_climatology}  , 'yearly'  , '' , ''
+   sn_wndj     = 'v10'       ,        6  , 'vraw'  , .true.  ,  ${is_climatology}  , 'yearly'  , '' , ''
+   sn_qsr      = 'qsw'       ,        24 , 'qsw'   , .true.  ,  ${is_climatology}  , 'yearly'  , '' , ''
+   sn_qlw      = 'qlw'       ,        24 , 'qlw'   , .true.  ,  ${is_climatology}  , 'yearly'  , '' , ''
+   sn_tair     = 't2'        ,        6  , 't2'    , .true.  ,  ${is_climatology}  , 'yearly'  , '' , ''
+   sn_humi     = 'q2'        ,        6  , 'q2'    , .true.  ,  ${is_climatology}  , 'yearly'  , '' , ''
+   sn_prec     = 'precip'    ,       -1  , 'precip', .true.  ,  ${is_climatology}  , 'yearly'  , '' , ''
+   sn_snow     = 'snow'      ,       -1  , 'snow'  , .true.  ,  ${is_climatology}  , 'yearly'  , '' , ''
+               !
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 2.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 10.       !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+EOF

+ 114 - 0
runtime/classic/ctrl/namelist.nemo.pisces.cfg.sh

@@ -0,0 +1,114 @@
+# when running in standalone mode, change ln_co2init here and other values below
+if ! has_config ifs ; then
+  ln_co2init=".false."
+# when running coupled, ln_co2init is defined by the runscript, change other values below
+else
+  if { [ $ifs_cmip_fixyear -gt 0 ] || [[ "${ifs_A4xCO2}" = "TRUE" ]]; } && [[ "${bgc_1PCTCO2}" = "FALSE" ]] ; then
+      ln_co2init=".false."
+  else
+      ln_co2init=".true."
+  fi
+fi
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES  :   Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_pis_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisext     !   air-sea exchange
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_co2int  =  ${ln_co2init} ! read atm pco2 from a file (T) or constant (F)
+   atcco2     =  284.32  ! Constant value atmospheric pCO2 - ln_co2int = F - use 284.32 for piControl and 1137.28 for A4XCO2
+   clname     =  'atcco2.txt'  ! Name of atm pCO2 file - ln_co2int = T
+   nn_offset  =  0       ! Offset model-data start year - ln_co2int = T
+!                        ! If your model year is iyy, nn_offset=(years(1)-iyy) 
+!                        ! then the first atmospheric CO2 record read is at years(1)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisatm     !  Atmospheric prrssure 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisbio     !   biological parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampislim     !   parameters for nutrient limitations
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisopt     !   parameters for optics
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  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_par      = 'par_fraction_gewex_clim90s00s_ORCA_R1.nc',     24            , 'fr_par'  ,  .true.      , .true. , 'yearly'  , ''       , ''       , ''
+   ln_varpar   =  .false.  ! boolean for PAR variable
+/ 
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisprod     !   parameters for phytoplankton growth
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismort     !   parameters for phytoplankton sinks
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismes     !   parameters for mesozooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiszoo     !   parameters for microzooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisfer     !   parameters for iron chemistry
+   ln_fechem =  .true.   ! complex iron chemistry ( T/F )
+   ln_ligvar =  .true.   ! variable ligand concentration
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/  
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisrem     !   parameters for remineralization
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiscal     !   parameters for Calcite chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampissbc     !   parameters for inputs deposition
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  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_dust     = 'dust_INCA_ORCA_R1.nc'              ,     -1            , 'dust'        ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_solub    = 'Solubility_T62_Mahowald_ORCA_R1.nc',    -12            , 'solubility2' ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdic = 'river_global_news_ORCA_R1.nc'      ,    -1             , 'riverdic'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdoc = 'river_global_news_ORCA_R1.nc'      ,    -1             , 'riverdoc'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdin = 'river_global_news_ORCA_R1.nc'      ,    -1             , 'riverdin'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdon = 'river_global_news_ORCA_R1.nc'      ,    -1             , 'riverdon'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdip = 'river_global_news_ORCA_R1.nc'      ,    -1             , 'riverdip'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdop = 'river_global_news_ORCA_R1.nc'      ,    -1             , 'riverdop'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdsi = 'river_global_news_ORCA_R1.nc'      ,    -1             , 'riverdsi'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_ndepo    = 'ndeposition_Duce_ORCA_R1.nc'       ,    -12            , 'ndep'        ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_ironsed  = 'pmarge_etopo_ORCA_R1.nc'           ,    -12            , 'bathy'       ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+!
+   cn_dir      = './'      !  root directory for the location of the dynamical files
+   ln_dust     =  .true.   ! boolean for dust input from the atmosphere
+   ln_solub    =  .true.   ! boolean for variable solubility of atm. Iron
+   ln_river    =  .true.   ! boolean for river input of nutrients
+   ln_ndepo    =  .true.   ! boolean for atmospheric deposition of N
+   ln_ironsed  =  .true.   ! boolean for Fe input from sediments
+   ln_ironice  =  .true.   ! boolean for Fe input from sea ice
+   ln_hydrofe  =  .false.  ! boolean for from hydrothermal vents
+   sedfeinput  =  1.e-9    ! Coastal release of Iron
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdmp     !  Damping 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_pisdmp    =  .true.    !  Relaxation fo some tracers to a mean value
+   nn_pisdmp   =  11680       !  Frequency of Relaxation
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismass     !  Mass conservation
+   ln_check_mass =  .true.    !  Check mass conservation
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+EOF

+ 415 - 0
runtime/classic/ctrl/namelist.nemo.pisces.ref.sh

@@ -0,0 +1,415 @@
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES  (key_pisces) reference namelist (see below for key_pisces_reduced)
+!!              1  - air-sea exchange                         (nampisext)
+!!              2  - biological parameters                    (nampisbio)
+!!              3  - parameters for nutrient limitations      (nampislim)    
+!!              4  - parameters for phytoplankton             (nampisprod,nampismort)
+!!              5  - parameters for zooplankton               (nampismes,nampiszoo)
+!!              6  - parameters for remineralization          (nampisrem)
+!!              7  - parameters for calcite chemistry         (nampiscal)
+!!              8  - parameters for inputs deposition         (nampissed)
+!!              9  - parameters for Kriest parameterization   (nampiskrp, nampiskrs)
+!!              10 - additional 2D/3D  diagnostics            (nampisdia)
+!!              11 - Damping                                  (nampisdmp)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisext     !   air-sea exchange
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_co2int  =  .false. ! read atm pco2 from a file (T) or constant (F)
+   atcco2     =  280.    ! Constant value atmospheric pCO2 - ln_co2int = F
+   clname     =  'atcco2.txt'  ! Name of atm pCO2 file - ln_co2int = T
+   nn_offset  =  0       ! Offset model-data start year - ln_co2int = T
+!                        ! If your model year is iyy, nn_offset=(years(1)-iyy) 
+!                        ! then the first atmospheric CO2 record read is at years(1)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisatm     !  Atmospheric prrssure 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  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_patm     = 'presatm'    ,     -1            , 'patm'    ,  .true.      , .true. , 'yearly'  , ''       , ''       , ''
+   cn_dir      = './'     !  root directory for the location of the dynamical files
+!
+   ln_presatm  = .false.   ! constant atmopsheric pressure (F) or from a file (T)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisbio     !   biological parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   nrdttrc    =  1        ! time step frequency for biology
+   wsbio      =  2.       ! POC sinking speed
+   xkmort     =  2.E-7    ! half saturation constant for mortality
+   ferat3     =  10.E-6   ! Fe/C in zooplankton 
+   wsbio2     =  30.      ! Big particles sinking speed
+   niter1max  =  1        ! Maximum number of iterations for POC
+   niter2max  =  1        ! Maximum number of iterations for GOC
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampislim     !   parameters for nutrient limitations
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   concnno3   =  1.e-6    ! Nitrate half saturation of nanophytoplankton
+   concdno3   =  3.E-6    ! Nitrate half saturation for diatoms
+   concnnh4   =  1.E-7    ! NH4 half saturation for phyto
+   concdnh4   =  3.E-7    ! NH4 half saturation for diatoms
+   concnfer   =  1.E-9    ! Iron half saturation for phyto
+   concdfer   =  3.E-9    ! Iron half saturation for diatoms
+   concbfe    =  1.E-11   ! Iron half-saturation for DOC remin.
+   concbnh4   =  2.E-8    ! NH4 half saturation for DOC remin.
+   concbno3   =  2.E-7    ! Nitrate half saturation for DOC remin.
+   xsizedia   =  1.E-6    ! Minimum size criteria for diatoms
+   xsizephy   =  1.E-6    ! Minimum size criteria for phyto
+   xsizern    =  3.0      ! Size ratio for nanophytoplankton
+   xsizerd    =  3.0      ! Size ratio for diatoms
+   xksi1      =  2.E-6    ! half saturation constant for Si uptake
+   xksi2      =  20E-6    ! half saturation constant for Si/C
+   xkdoc      =  417.E-6  ! half-saturation constant of DOC remineralization
+   qnfelim    =  7.E-6    ! Optimal quota of phyto
+   qdfelim    =  7.E-6    ! Optimal quota of diatoms
+   caco3r     =  0.3      ! mean rain ratio
+   oxymin    =  1.E-6     ! Half-saturation constant for anoxia
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisopt     !   parameters for optics
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  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_par      = 'par.orca'       ,     24            , 'fr_par'  ,  .true.      , .true. , 'yearly'  , ''       , ''       , ''
+   cn_dir      = './'      !  root directory for the location of the dynamical files
+   ln_varpar   =  .true.   ! boolean for PAR variable
+   parlux      =  0.43      ! Fraction of shortwave as PAR
+/ 
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisprod     !   parameters for phytoplankton growth
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   pislope    =  2.       ! P-I slope
+   pislope2   =  2.       ! P-I slope  for diatoms
+   xadap      =  0.       ! Adaptation factor to low light
+   excret     =  0.05     ! excretion ratio of phytoplankton
+   excret2    =  0.05     ! excretion ratio of diatoms
+   ln_newprod =  .true.   ! Enable new parame. of production (T/F) 
+   bresp      =  0.033    ! Basal respiration rate
+   chlcnm     =  0.033    ! Maximum Chl/C in nanophytoplankton
+   chlcdm     =  0.05     ! Maximum Chl/C in diatoms
+   chlcmin    =  0.004    ! Minimum Chl/c in phytoplankton
+   fecnm      =  40E-6    ! Maximum Fe/C in nanophytoplankton
+   fecdm      =  40E-6    ! Maximum Fe/C in diatoms
+   grosip     =  0.159    ! mean Si/C ratio
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismort     !   parameters for phytoplankton sinks
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   wchl       =  0.01    ! quadratic mortality of phytoplankton
+   wchld      =  0.01     ! maximum quadratic mortality of diatoms
+   wchldm     =  0.03     ! maximum quadratic mortality of diatoms
+   mprat      =  0.01     ! phytoplankton mortality rate
+   mprat2     =  0.01     ! Diatoms mortality rate
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismes     !   parameters for mesozooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   part2      =  0.75     ! part of calcite not dissolved in mesozoo guts
+   grazrat2   =  0.75     ! maximal mesozoo grazing rate
+   resrat2    =  0.005    ! exsudation rate of mesozooplankton
+   mzrat2     =  0.03     ! mesozooplankton mortality rate
+   xprefc     =  1.       ! mesozoo preference for diatoms
+   xprefp     =  0.3      ! mesozoo preference for nanophyto.
+   xprefz     =  1.       ! mesozoo preference for microzoo.
+   xprefpoc   =  0.3      ! mesozoo preference for poc
+   xthresh2zoo = 1E-8     ! zoo feeding threshold for mesozooplankton 
+   xthresh2dia = 1E-8     ! diatoms feeding threshold for mesozooplankton 
+   xthresh2phy = 1E-8     ! nanophyto feeding threshold for mesozooplankton 
+   xthresh2poc = 1E-8     ! poc feeding threshold for mesozooplankton 
+   xthresh2   =  3E-7     ! Food threshold for grazing
+   xkgraz2    =  20.E-6   ! half saturation constant for meso grazing
+   epsher2    =  0.35     ! Efficicency of Mesozoo growth
+   sigma2     =  0.6      ! Fraction of mesozoo excretion as DOM
+   unass2     =  0.3      ! non assimilated fraction of P by mesozoo
+   grazflux   =  2.e3     ! flux-feeding rate
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiszoo     !   parameters for microzooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   part       =  0.5      ! part of calcite not dissolved in microzoo gutsa
+   grazrat    =  3.0      ! maximal zoo grazing rate
+   resrat     =  0.03     ! exsudation rate of zooplankton
+   mzrat      =  0.004    ! zooplankton mortality rate
+   xpref2c    =  0.1      ! Microzoo preference for POM
+   xpref2p    =  1.       ! Microzoo preference for Nanophyto
+   xpref2d    =  0.5      ! Microzoo preference for Diatoms
+   xthreshdia =  1.E-8    ! Diatoms feeding threshold for microzooplankton 
+   xthreshphy =  1.E-8    ! Nanophyto feeding threshold for microzooplankton 
+   xthreshpoc =  1.E-8    ! POC feeding threshold for microzooplankton 
+   xthresh    =  3.E-7    ! Food threshold for feeding
+   xkgraz     =  20.E-6   ! half sturation constant for grazing
+   epsher     =  0.3      ! Efficiency of microzoo growth
+   sigma1     =  0.6      ! Fraction of microzoo excretion as DOM
+   unass      =  0.3      ! non assimilated fraction of phyto by zoo
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisfer     !   parameters for iron chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_fechem =  .false.   ! complex iron chemistry ( T/F )
+   ln_ligvar =  .false.   ! variable ligand concentration
+   xlam1     =  0.005     ! scavenging rate of Iron
+   xlamdust  =  150.0     ! Scavenging rate of dust
+   ligand    =  0.6E-9    ! Ligands concentration 
+/  
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisrem     !   parameters for remineralization
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xremik    =  0.3       ! remineralization rate of DOC
+   xremip    =  0.025     ! remineralisation rate of POC
+   nitrif    =  0.05      ! NH4 nitrification rate
+   xsirem    =  0.003     ! remineralization rate of Si
+   xsiremlab =  0.03      ! fast remineralization rate of Si
+   xsilab    =  0.5       ! Fraction of labile biogenic silica
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiscal     !   parameters for Calcite chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   kdca       =  6.       ! calcite dissolution rate constant (1/time)
+   nca        =  1.       ! order of dissolution reaction (dimensionless)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampissbc     !   parameters for inputs deposition
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  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_dust     = 'dust.orca'       ,     -1            , 'dust'        ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_solub    = 'solubility.orca' ,    -12            , 'solubility1' ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdic = 'river.orca'      ,    120            , 'riverdic'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdoc = 'river.orca'      ,    120            , 'riverdoc'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdin = 'river.orca'      ,    120            , 'riverdin'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdon = 'river.orca'      ,    120            , 'riverdon'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdip = 'river.orca'      ,    120            , 'riverdip'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdop = 'river.orca'      ,    120            , 'riverdop'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdsi = 'river.orca'      ,    120            , 'riverdsi'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_ndepo    = 'ndeposition.orca',    -12            , 'ndep'        ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_ironsed  = 'bathy.orca'      ,    -12            , 'bathy'       ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_hydrofe  = 'hydrofe.orca'    ,    -12            , 'epsdb'       ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+!
+   cn_dir      = './'      !  root directory for the location of the dynamical files
+   ln_dust     =  .true.   ! boolean for dust input from the atmosphere
+   ln_solub    =  .true.   ! boolean for variable solubility of atm. Iron
+   ln_river    =  .true.   ! boolean for river input of nutrients
+   ln_ndepo    =  .true.   ! boolean for atmospheric deposition of N
+   ln_ironsed  =  .true.   ! boolean for Fe input from sediments
+   ln_ironice  =  .true.   ! boolean for Fe input from sea ice
+   ln_hydrofe  =  .false.  ! boolean for from hydrothermal vents
+   sedfeinput  =  2.e-9    ! Coastal release of Iron
+   dustsolub   =  0.02     ! Solubility of the dusta
+   mfrac       =  0.035    ! Fe mineral fraction of dust
+   wdust       =  2.0      ! Dust sinking speed 
+   icefeinput  =  15.e-9   ! Iron concentration in sea ice
+   nitrfix     =  1.e-7    ! Nitrogen fixation rate
+   diazolight  =  50.      ! Diazotrophs sensitivity to light (W/m2)
+   concfediaz  =  1.e-10   ! Diazotrophs half-saturation Cste for Iron
+   hratio      =  1.e+7    ! Fe to 3He ratio assumed for vent iron supply 
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisice      !  Prescribed sea ice tracers
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+! constant ocean tracer concentrations are defined in trcice_pisces.F90 (Global, Arctic, Antarctic and Baltic)
+! trc_ice_ratio     * betw 0 and 1: prescribed ice/ocean tracer concentration ratio
+!                   * -1 => the ice-ocean tracer concentration ratio follows the 
+!                           ice-ocean salinity ratio
+!                   * -2 => tracer concentration in sea ice is prescribed and 
+!                           trc_ice_prescr is used
+! trc_ice_prescr    * prescribed tracer concentration. used only if 
+!                     trc_ice_ratio = -2. equals -99 if not used.
+! cn_trc_o          * 'GL' use global ocean values making the Baltic distinction only
+!                     'AA' use specific Arctic/Antarctic/Baltic values
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!    sn_tri_ ! trc_ice_ratio ! trc_ice_prescr !     cn_trc_o
+   sn_tri_dic =           -1.,           -99.,          'AA'
+   sn_tri_doc =            0.,           -99.,          'AA'
+   sn_tri_tal =           -1.,           -99.,          'AA'
+   sn_tri_oxy =           -1.,           -99.,          'AA'
+   sn_tri_cal =            0.,           -99.,          'AA'
+   sn_tri_po4 =           -1.,           -99.,          'AA'
+   sn_tri_poc =            0.,           -99.,          'AA'
+   sn_tri_goc =            0.,           -99.,          'AA'
+   sn_tri_bfe =            0.,           -99.,          'AA'
+   sn_tri_num =            0.,           -99.,          'AA'
+   sn_tri_sil =           -1.,           -99.,          'AA'
+   sn_tri_dsi =            0.,           -99.,          'AA'
+   sn_tri_gsi =            0.,           -99.,          'AA'
+   sn_tri_phy =            0.,           -99.,          'AA'
+   sn_tri_dia =            0.,           -99.,          'AA'
+   sn_tri_zoo =            0.,           -99.,          'AA'
+   sn_tri_mes =            0.,           -99.,          'AA'
+   sn_tri_fer =           -2.,          15E-9,          'AA'
+   sn_tri_sfe =            0.,           -99.,          'AA'
+   sn_tri_dfe =            0.,           -99.,          'AA'
+   sn_tri_nfe =            0.,           -99.,          'AA'
+   sn_tri_nch =            0.,           -99.,          'AA'
+   sn_tri_dch =            0.,           -99.,          'AA'
+   sn_tri_no3 =           -1.,           -99.,          'AA'
+   sn_tri_nh4 =            1.,           -99.,          'AA'
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiskrp     !   Kriest parameterization : parameters     "key_kriest"
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkr_eta      = 1.17    ! Sinking  exponent
+   xkr_zeta     = 2.28    ! N content exponent
+   xkr_ncontent = 5.7E-6  ! N content factor
+   xkr_mass_min = 0.0002  ! Minimum mass for Aggregates
+   xkr_mass_max = 1.      ! Maximum mass for Aggregates
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiskrs     !   Kriest parameterization : size classes  "key_kriest"
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkr_sfact    = 942.    ! Sinking factor
+   xkr_stick    = 0.5     ! Stickiness
+   xkr_nnano    = 2.337   ! Nbr of cell in nano size class
+   xkr_ndiat    = 3.718   ! Nbr of cell in diatoms size class
+   xkr_nmeso    = 7.147   ! Nbr of cell in mesozoo size class
+   xkr_naggr    = 9.877   ! Nbr of cell in aggregates  size class
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdia     !   additional 2D/3D tracers diagnostics 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !    name   !           title of the field          !     units      !
+!              !           !                                       !                !  
+   pisdia2d(1)  = 'Cflx     ' , 'DIC flux                          ',  'molC/m2/s    '
+   pisdia2d(2)  = 'Oflx     ' , 'Oxygen flux                       ',  'molC/m2/s    '
+   pisdia2d(3)  = 'Kg       ' , 'Gas transfer                      ',  'mol/m2/s/uatm'
+   pisdia2d(4)  = 'Delc     ' , 'Delta CO2                         ',  'uatm         '
+   pisdia2d(5)  = 'PMO      ' , 'POC export                        ',  'molC/m2/s    '
+   pisdia2d(6)  = 'PMO2     ' , 'GOC export                        ',  'molC/m2/s    '
+   pisdia2d(7)  = 'ExpFe1   ' , 'Nano iron export                  ',  'molFe/m2/s   '
+   pisdia2d(8)  = 'ExpFe2   ' , 'Diatoms iron export               ',  'molFe/m2/s   '
+   pisdia2d(9)  = 'ExpSi    ' , 'Silicate export                   ',  'molSi/m2/s   '
+   pisdia2d(10) = 'ExpCaCO3 ' , 'Calcite export                    ',  'molC/m2/s    '
+   pisdia2d(11) = 'heup     ' , 'euphotic layer depth              ',  'm            '
+   pisdia2d(12) = 'Fedep    ' , 'Iron dep                          ',  'molFe/m2/s   '
+   pisdia2d(13) = 'Nfix     ' , 'Nitrogen Fixation                 ',  'molN/m2/s    '
+   pisdia3d(1)  = 'PH       ' , 'PH                                ',  '-            '
+   pisdia3d(2)  = 'CO3      ' , 'Bicarbonates                      ',  'mol/l        '
+   pisdia3d(3)  = 'CO3sat   ' , 'CO3 saturation                    ',  'mol/l        '
+   pisdia3d(4)  = 'PAR      ' , 'light penetration                 ',  'W/m2         '
+   pisdia3d(5)  = 'PPPHY    ' , 'Primary production of nanophyto   ',  'molC/m3/s    '
+   pisdia3d(6)  = 'PPPHY2   ' , 'Primary production of diatoms     ',  'molC/m3/s    '
+   pisdia3d(7)  = 'PPNEWN   ' , 'New Primary production of nano    ',  'molC/m3/s    '
+   pisdia3d(8)  = 'PPNEWD   ' , 'New Primary production of diat    ',  'molC/m3/s    '
+   pisdia3d(9)  = 'PBSi     ' , 'Primary production of Si diatoms  ',  'molSi/m3/s   '
+   pisdia3d(10) = 'PFeN     ' , 'Primary production of nano iron   ',  'molFe/m3/s   '
+   pisdia3d(11) = 'PFeD     ' , 'Primary production of diatoms iron',  'molFe/m3/s   '
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdmp     !  Damping 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_pisdmp    =  .true.     !  Relaxation fo some tracers to a mean value
+   nn_pisdmp    =  5475       !  Frequency of Relaxation 
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismass     !  Mass conservation
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_check_mass =  .false.    !  Check mass conservation
+/
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES reduced (key_pisces_reduced, ex LOBSTER) : namelists
+!!              1  - biological parameters for phytoplankton    (namlobphy)
+!!              2  - biological parameters for nutrients        (namlobnut)
+!!              3  - biological parameters for zooplankton      (namlobzoo)    
+!!              4  - biological parameters for detritus         (namlobdet)
+!!              5  - biological parameters for DOM              (namlobdom)
+!!              6  - parameters from aphotic layers to sediment (namlobsed)
+!!              7  - general coefficients                       (namlobrat)
+!!              8  - optical parameters                         (namlobopt)
+
+!!              10 - biological diagnostics trends              (namlobdbi) 
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobphy     !   biological parameters for phytoplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   tmumax  =  1.21e-5   ! maximal phytoplankton growth rate            [s-1] 
+   rgamma  =  0.05      ! phytoplankton exudation fraction             [%]
+   fphylab =  0.75      ! NH4 fraction of phytoplankton exsudation     
+   tmminp  =  5.8e-7    ! minimal phytoplancton mortality rate         [0.05/86400 s-1=20 days] 
+   aki     =  33.       ! light photosynthesis half saturation constant[W/m2]
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobnut     !   biological parameters for nutrients
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   akno3   =  0.7       ! nitrate limitation half-saturation value     [mmol/m3]
+   aknh4   =  0.001     ! ammonium limitation half-saturation value    [mmol/m3]
+   taunn   =  5.80e-7   ! nitrification rate                           [s-1]  
+   psinut  =  3.        ! inhibition of nitrate uptake by ammonium
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobzoo     !   biological parameters for zooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   rppz    = 0.8        ! zooplankton nominal preference for phytoplancton food  [%]
+   taus    = 9.26E-6    ! specific zooplankton maximal grazing rate              [s-1] 
+!                       ! 0.75/86400 s-1=8.680555E-6    1/86400 = 1.15e-5
+   aks     = 1.         ! half-saturation constant for total zooplankton grazing [mmolN.m-3]
+   rpnaz   = 0.3        ! non-assimilated phytoplankton by zooplancton           [%]
+   rdnaz   = 0.3        ! non-assimilated detritus by zooplankton                [%] 
+   tauzn   = 8.1e-7     ! zooplancton specific excretion rate                    [0.1/86400 s-1=10 days] 
+   fzoolab = 0.5        ! NH4 fraction of zooplankton excretion
+   fdbod   = 0.5        ! zooplankton mortality fraction that goes to detritus
+   tmminz  = 2.31e-6    ! minimal zooplankton mortality rate                     [(mmolN/m3)-1 d-1]
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobdet     !   biological parameters for detritus
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   taudn   = 5.80e-7    ! detritus breakdown rate                        [0.1/86400 s-1=10 days]
+   fdetlab = 0.         ! NH4 fraction of detritus dissolution           
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobdom     !   biological parameters for DOM
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   taudomn = 6.43e-8    ! DOM breakdown rate                             [s-1] 
+!                       ! slow remineralization rate of semi-labile dom to nh4 (1 month)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobsed     !   parameters from aphotic layers to sediment
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   sedlam     = 3.86e-7    ! time coefficient of POC remineralization in sediments [s-1]
+   sedlostpoc = 0.         ! mass of POC lost in sediments
+   vsed       = 3.47e-5    ! detritus sedimentation speed                   [m/s]
+   xhr        = -0.858     ! coeff for martin''s remineralisation profile
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobrat     !   general coefficients
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   rcchl   = 60.       ! Carbone/Chlorophyl ratio                     [mgC.mgChla-1]
+   redf    = 6.56       ! redfield ratio (C:N) for phyto
+   reddom  = 6.56       ! redfield ratio (C:N) for DOM
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobopt     !   optical parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkg0   = 0.0232     ! green absorption coefficient of water
+   xkr0   = 0.225      ! red absorption coefficent of water
+   xkgp   = 0.074      ! green absorption coefficient of chl
+   xkrp   = 0.037      ! red absorption coefficient of chl
+   xlg    = 0.674      ! green chl exposant for absorption
+   xlr    = 0.629      ! red chl exposant for absorption
+   rpig   = 0.7        ! chla/chla+pheo ratio
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdbi     !   biological diagnostics trends     
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!                !  2D bio diagnostics   units : mmole/m2/s   ("key_trdmld_trc")
+!                !  name    !       title of the field      !     units      !
+   pisdiabio(1)  = 'NO3PHY' , 'Flux from NO3 to PHY          ',  'mmole/m3/s'
+   pisdiabio(2)  = 'NH4PHY' , 'Flux from NH4 to PHY          ',  'mmole/m3/s'
+   pisdiabio(3)  = 'PHYNH4' , 'Flux from PHY to NH4          ',  'mmole/m3/s'
+   pisdiabio(4)  = 'PHYDOM' , 'Flux from PHY to DOM          ',  'mmole/m3/s'
+   pisdiabio(5)  = 'PHYZOO' , 'Flux from PHY to ZOO          ',  'mmole/m3/s'
+   pisdiabio(6)  = 'PHYDET' , 'Flux from PHY to DET          ',  'mmole/m3/s'
+   pisdiabio(7)  = 'DETZOO' , 'Flux from DET to ZOO          ',  'mmole/m3/s'
+   pisdiabio(8)  = 'DETSED' , 'Flux from DET to SED          ',  'mmole/m3/s'
+   pisdiabio(9)  = 'ZOODET' , 'Flux from ZOO to DET          ',  'mmole/m3/s'
+   pisdiabio(10)  = 'ZOOBOD' , 'Zooplankton closure          ',  'mmole/m3/s'
+   pisdiabio(11)  = 'ZOONH4' , 'Flux from ZOO to NH4         ',  'mmole/m3/s'
+   pisdiabio(12)  = 'ZOODOM' , 'Flux from ZOO to DOM         ',  'mmole/m3/s'
+   pisdiabio(13)  = 'NH4NO3' , 'Flux from NH4 to NO3         ',  'mmole/m3/s'
+   pisdiabio(14)  = 'DOMNH4' , 'Flux from DOM to NH4         ',  'mmole/m3/s'
+   pisdiabio(15)  = 'DETNH4' , 'Flux from DET to NH4         ',  'mmole/m3/s'
+   pisdiabio(16)  = 'DETDOM' , 'Flux from DET to DOM         ',  'mmole/m3/s'
+   pisdiabio(17)  = 'SEDNO3' , 'NO3 remineralization from SED',  'mmole/m3/s'
+/
+EOF

+ 1328 - 0
runtime/classic/ctrl/namelist.nemo.ref.sh

@@ -0,0 +1,1328 @@
+# namelist.nemo.ref.sh writes the reference namelist for NEMO to standard out.
+# Note that this namelist will be overwritten by the namelist specific to the
+# configuration (namelist.nemo-*.cfg.sh). Hence, only parameters common to all
+# configurations shoule be specified here.
+
+if $leg_is_restart
+then
+    nemo_restart=".TRUE."
+    nemo_rst_ctl=1
+elif $(has_config nemo:start_from_restart)
+then
+    nemo_restart=".TRUE."
+    nemo_rst_ctl=0
+else
+    nemo_restart=".FALSE."
+    # Note that nemo_rst_ctl doesn't matter in that case,
+    # but we have to set it to some value
+    nemo_rst_ctl=0
+fi
+
+if $(has_config nemo:surfresto)
+then
+    ln_ssr=".TRUE."
+else
+    ln_ssr=".FALSE."
+fi
+if $(has_config nemo:ocenudg)
+then
+    ln_tradmp=".TRUE."
+    ln_tsd_tradmp=".TRUE."    
+else
+    ln_tradmp=".FALSE."
+    ln_tsd_tradmp=".FALSE."
+fi
+
+# if new initial conditions are requested, we must set nemo_rst_list=".true." and insert the timesteps in nemo_stocklist
+[ -z "${do_save_ic-}" ] && do_save_ic=false
+if $do_save_ic
+then
+    nemo_rst_list=".true."
+    nemo_stock="0"
+    #nemo_stocklist is defined in save_ic_prepare_output()
+else
+    nemo_rst_list=".false."
+    nemo_stock="0"
+    nemo_stocklist="0,0,0,0,0,0,0,0,0,0"
+fi
+
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  :  1 - run manager      (namrun)
+!! namelists    2 - Domain           (namcfg, namzgr, namzgr_sco, namdom, namtsd)
+!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core, namsbc_sas
+!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,
+!!                                    namsbc_apr, namsbc_ssr, namsbc_alb)
+!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide)
+!!              5 - bottom  boundary (nambfr, nambbc, nambbl)
+!!              6 - Tracer           (nameos, namtra_adv, namtra_ldf, namtra_dmp)
+!!              7 - dynamics         (namdyn_adv, namdyn_vor, namdyn_hpg, namdyn_spg, namdyn_ldf)
+!!              8 - Verical physics  (namzdf, namzdf_ric, namzdf_tke, namzdf_kpp, namzdf_ddm, namzdf_tmx)
+!!              9 - diagnostics      (namnc4, namtrd, namspr, namflo, namhsb, namsto)
+!!             10 - miscellaneous    (namsol, nammpp, namctl)
+!!             11 - Obs & Assim      (namobs, nam_asminc)
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!!======================================================================
+!!                   ***  Run management namelists  ***
+!!======================================================================
+!!   namrun       parameters of the run
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_no         =  0             !  job number (no more used...)
+   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)
+   nn_leapy      =  1             !  Leap year calendar (1) or not (0)
+   ln_rstart     = ${nemo_restart} ! start from rest (F) or from a restart file (T)
+   nn_euler      =  1             !  = 0 : start with forward time step if ln_rstart=T
+   nn_rstctl     = ${nemo_rst_ctl} ! 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_indir = "."          !  directory from which to read input ocean restarts
+   cn_ocerst_out = "restart_oce"  !  suffix of ocean restart name (output)
+   cn_ocerst_outdir = "."         !  directory in which to write output ocean restarts
+   nn_istate     =  0             !  output the initial state (1) or not (0)
+   ln_rst_list   = ${nemo_rst_list} !  output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F)
+   nn_stock      = ${nemo_stock}  !  frequency of creation of a restart file (modulo referenced to 1)
+   nn_stocklist  = ${nemo_stocklist} ! List of timesteps when a restart file is to be written
+   nn_write      = -1             !  frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_dimgnnn    = .false.        !  DIMG file format: 1 file for all processors (F) or by processor (T)
+   ln_mskland    = .true.         !  mask land points in NetCDF outputs (costly: + ~15%)
+   ln_mskutil    = .false.
+   ln_cfmeta     = .false.        !  output additional data to netCDF files required for compliance with the CF metadata standard
+   ln_clobber    = .true.         !  clobber (overwrite) an existing file
+   nn_chunksz    =  0             !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
+/
+!
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
+!!   namcfg       parameters of the configuration
+!!   namzgr       vertical coordinate
+!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
+!!   namdom       space and time domain (bathymetry, mesh, timestep)
+!!   namtsd       data: temperature & salinity
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namcfg     !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "default"            !  name of the configuration
+   cp_cfz      =  "no zoom"            !  name of the zoom of configuration
+   jp_cfg      =       0               !  resolution of the configuration
+   jpidta      =      10               !  1st lateral dimension ( >= jpi )
+   jpjdta      =      12               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =      10               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =      12               !  2nd    -                  -    --> j =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       0               !  lateral cond. type (between 0 and 6)
+                                       !  = 0 closed                 ;   = 1 cyclic East-West
+                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot
+                                       !  = 4 cyclic East-West AND North fold T-point pivot
+                                       !  = 5 North fold F-point pivot
+                                       !  = 6 cyclic East-West AND North fold F-point pivot
+   ln_use_jattr = .false.              !  use (T) the file attribute: open_ocean_jstart, if present
+                                       !  in netcdf input files, as the start j-row for reading
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+   ln_zco      = .false.   !  z-coordinate - full    steps   (T/F)      ("key_zco" may also be defined)
+   ln_zps      = .true.    !  z-coordinate - partial steps   (T/F)
+   ln_sco      = .false.   !  s- or hybrid z-s-coordinate    (T/F)
+   ln_isfcav   = .false.   !  ice shelf cavity               (T/F)
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+   ln_s_sh94   = .true.    !  Song & Haidvogel 1994 hybrid S-sigma   (T)|
+   ln_s_sf12   = .false.   !  Siddorn & Furner 2012 hybrid S-z-sigma (T)| if both are false the NEMO tanh stretching is applied
+   ln_sigcrit  = .false.   !  use sigma coordinates below critical depth (T) or Z coordinates (F) for Siddorn & Furner stretch
+                           !  stretching coefficients for all functions
+   rn_sbot_min =   10.0    !  minimum depth of s-bottom surface (>0) (m)
+   rn_sbot_max = 7000.0    !  maximum depth of s-bottom surface (= ocean depth) (>0) (m)
+   rn_hc       =  150.0    !  critical depth for transition to stretched coordinates
+                        !!!!!!!  Envelop bathymetry
+   rn_rmax     =    0.3    !  maximum cut-off r-value allowed (0<r_max<1)
+                        !!!!!!!  SH94 stretching coefficients  (ln_s_sh94 = .true.)
+   rn_theta    =    6.0    !  surface control parameter (0<=theta<=20)
+   rn_bb       =    0.8    !  stretching with SH94 s-sigma
+                        !!!!!!!  SF12 stretching coefficient  (ln_s_sf12 = .true.)
+   rn_alpha    =    4.4    !  stretching with SF12 s-sigma
+   rn_efold    =    0.0    !  efold length scale for transition to stretched coord
+   rn_zs       =    1.0    !  depth of surface grid box
+                           !  bottom cell depth (Zb) is a linear function of water depth Zb = H*a + b
+   rn_zb_a     =    0.024  !  bathymetry scaling factor for calculating Zb
+   rn_zb_b     =   -0.2    !  offset for calculating Zb
+                        !!!!!!!! Other stretching (not SH94 or SF12) [also uses rn_theta above]
+   rn_thetb    =    1.0    !  bottom control parameter  (0<=thetb<= 1)
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file
+   rn_bathy    =    0.     !  value of the bathymetry. if (=0) bottom flat at jpkm1
+   nn_closea   =    0      !  remove (=0) or keep (=1) closed seas and lakes (ORCA)
+   nn_msh      =    0      !  create (=1) a mesh file or not (=0)
+   rn_hmin     =   -3.     !  min depth of the ocean (>0) or min number of ocean level (<0)
+   rn_e3zps_min=   20.     !  partial step thickness is set larger than the minimum of
+   rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
+                           !
+   rn_rdt      = 5760.     !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_atfp     =    0.1    !  asselin time filter parameter
+   nn_acc      =    0      !  acceleration of convergence : =1      used, rdt < rdttra(k)
+                                 !                          =0, not used, rdt = rdttra
+   rn_rdtmin   = 28800.          !  minimum time step on tracers (used if nn_acc=1)
+   rn_rdtmax   = 28800.          !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdth     =  800.           !  depth variation of tracer time step  (used if nn_acc=1)
+   ln_crs      = .false.      !  Logical switch for coarsening module
+   jphgr_msh   =       0               !  type of horizontal mesh
+                                       !  = 0 curvilinear coordinate on the sphere read in coordinate.nc
+                                       !  = 1 geographical mesh on the sphere with regular grid-spacing
+                                       !  = 2 f-plane with regular grid-spacing
+                                       !  = 3 beta-plane with regular grid-spacing
+                                       !  = 4 Mercator grid with T/U point at the equator
+   ppglam0     =       0.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =     -35.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =       1.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =       0.5             !  meridional grid-spacing (degrees)
+   ppe1_m      =    5000.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =    5000.0             !  meridional grid-spacing (degrees)
+   ppsur       =    -4762.96143546300  !  ORCA r4, r2 and r05 coefficients
+   ppa0        =      255.58049070440  ! (default coefficients)
+   ppa1        =      245.58132232490  !
+   ppkth       =       21.43336197938  !
+   ppacr       =        3.0            !
+   ppdzmin     =       10.             !  Minimum vertical spacing
+   pphmax      =     5000.             !  Maximum depth
+   ldbletanh   =    .TRUE.             !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =      100.760928500000 !  Double tanh function parameters
+   ppkth2      =       48.029893720000 !
+   ppacr2      =       13.000000000000 !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+   ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
+   ln_bt_av      =    .TRUE.           !  Time filtering of barotropic variables
+   ln_bt_nn_auto =    .TRUE.           !  Set nn_baro automatically to be just below
+                                       !  a user defined maximum courant number (rn_bt_cmax)
+   nn_baro       =    30               !  Number of iterations of barotropic mode
+                                       !  during rn_rdt seconds. Only used if ln_bt_nn_auto=F
+   rn_bt_cmax    =    0.8              !  Maximum courant number allowed if ln_bt_nn_auto=T
+   nn_bt_flt     =    1                !  Time filter choice
+                                       !  = 0 None
+                                       !  = 1 Boxcar over   nn_baro barotropic steps
+                                       !  = 2 Boxcar over 2*nn_baro     "        "
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+   nn_factx    = 3         !  Reduction factor of x-direction
+   nn_facty    = 3         !  Reduction factor of y-direction
+   nn_binref   = 0         !  Bin centering preference: NORTH or EQUAT
+                           !  0, coarse grid is binned with preferential treatment of the north fold
+                           !  1, coarse grid is binned with centering at the equator
+                           !    Symmetry with nn_facty being odd-numbered. Asymmetry with even-numbered nn_facty.
+   nn_msh_crs  = 1         !  create (=1) a mesh file or not (=0)
+   nn_crs_kz   = 0         ! 0, MEAN of volume boxes
+                           ! 1, MAX of boxes
+                           ! 2, MIN of boxes
+   ln_crs_wn   = .true.    ! wn coarsened (T) or computed using horizontal divergence ( F )
+/
+!-----------------------------------------------------------------------
+&namc1d        !   1D configuration options                             ("key_c1d")
+!-----------------------------------------------------------------------
+   rn_lat1d    =      50   !  Column latitude (default at PAPA station)
+   rn_lon1d    =    -145   !  Column longitude (default at PAPA station)
+   ln_c1d_locpt=  .true.   ! Localization of 1D config in a grid (T) or independant point (F)
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+!-----------------------------------------------------------------------
+   cn_dir        = './'     !  root directory for the location of the runoff files
+   ln_tsd_init   = .true.   !  Initialisation of ocean T & S with T &S input data (T) or not (F)
+   ln_tsd_tradmp = .false.  !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!!======================================================================
+!!            ***  Surface Boundary Condition namelists  ***
+!!======================================================================
+!!   namsbc          surface boundary condition
+!!   namsbc_ana      analytical         formulation
+!!   namsbc_flx      flux               formulation
+!!   namsbc_clio     CLIO bulk formulae formulation
+!!   namsbc_core     CORE bulk formulae formulation
+!!   namsbc_mfs      MFS  bulk formulae formulation
+!!   namsbc_cpl      CouPLed            formulation                     ("key_oasis3")
+!!   namsbc_sas      StAndalone Surface module
+!!   namtra_qsr      penetrative solar radiation
+!!   namsbc_rnf      river runoffs
+!!   namsbc_isf      ice shelf melting/freezing
+!!   namsbc_apr      Atmospheric Pressure
+!!   namsbc_ssr      sea surface restoring term (for T and/or S)
+!!   namsbc_alb      albedo parameters
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = 5         !  frequency of surface boundary condition computation
+                           !     (also = the frequency of sea-ice model call)
+   ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana )
+   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx )
+   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)
+   ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs )
+   ln_cpl      = .false.   !  atmosphere coupled   formulation          ( requires key_oasis3 )
+   ln_mixcpl   = .false.   !  forced-coupled mixed formulation          ( requires key_oasis3 )
+   nn_components = 0       !  configuration of the opa-sas OASIS coupling
+                           !  =0 no opa-sas OASIS coupling: default single executable configuration
+                           !  =1 opa-sas OASIS coupling: multi executable configuration, OPA component
+                           !  =2 opa-sas OASIS coupling: multi executable configuration, SAS component 
+   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
+   nn_ice      = 2         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2")
+   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
+   ln_rnf      = .true.    !  runoffs                                   (T   => fill namsbc_rnf)
+   nn_isf      = 0         !  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)
+   ln_ssr      = .true.    !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 2         !  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
+   ln_wave = .false.       !  Activate coupling with wave (either Stokes Drift or Drag coefficient, or both)  (T => fill namsbc_wave)
+   ln_cdgw = .false.       !  Neutral drag coefficient read from wave model (T => fill namsbc_wave)
+   ln_sdw  = .false.       !  Computation of 3D stokes drift                (T => fill namsbc_wave)
+   nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,
+                           !  =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field)
+   nn_limflx = -1          !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)
+                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled
+                           !  = 0  Average per-category fluxes (forced and coupled mode)
+                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled
+                           !  = 2  Redistribute a single flux over categories (coupled mode only)
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+   nn_tau000   =   0       !  gently increase the stress over the first ntau_rst time-steps
+   rn_utau0    =   0.5     !  uniform value for the i-stress
+   rn_vtau0    =   0.e0    !  uniform value for the j-stress
+   rn_qns0     =   0.e0    !  uniform value for the total heat flux
+   rn_qsr0     =   0.e0    !  uniform value for the solar radiation
+   rn_emp0     =   0.e0    !  uniform value for the freswater budget (E-P)
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_utau     = 'utau'      ,        24         , 'utau'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_vtau     = 'vtau'      ,        24         , 'vtau'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_qtot     = 'qtot'      ,        24         , 'qtot'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_qsr      = 'qsr'       ,        24         , 'qsr'     , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_emp      = 'emp'       ,        24         , 'emp'     , .false.      , .false., 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the flux files
+/
+!-----------------------------------------------------------------------
+&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     = 'taux_1m'   ,       -1          , 'sozotaux',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_vtau     = 'tauy_1m'   ,       -1          , 'sometauy',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_wndm     = 'flx'       ,       -1          , 'socliowi',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_tair     = 'flx'       ,       -1          , 'socliot2',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_humi     = 'flx'       ,       -1          , 'socliohu',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_ccov     = 'flx'       ,       -1          , 'socliocl',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+   sn_prec     = 'flx'       ,       -1          , 'socliopl',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the bulk files are
+/
+!-----------------------------------------------------------------------
+&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     = 'u_10.15JUNE2009_fill'        ,         6         , 'U_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bicubic_noc.nc'   , 'Uwnd'   , ''
+   sn_wndj     = 'v_10.15JUNE2009_fill'        ,         6         , 'V_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bicubic_noc.nc'   , 'Vwnd'   , ''
+   sn_qsr      = 'ncar_rad.15JUNE2009_fill'    ,        24         , 'SWDN_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_qlw      = 'ncar_rad.15JUNE2009_fill'    ,        24         , 'LWDN_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_tair     = 't_10.15JUNE2009_fill'        ,         6         , 'T_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_humi     = 'q_10.15JUNE2009_fill'        ,         6         , 'Q_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_prec     = 'ncar_precip.15JUNE2009_fill' ,        -1         , 'PRC_MOD1',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_snow     = 'ncar_precip.15JUNE2009_fill' ,        -1         , 'SNOW'    ,   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_tdif     = 'taudif_core'                 ,        24         , 'taudif'  ,   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 10.        !  Air temperature and humidity reference height (m)
+   rn_zu       = 10.        !  Wind vector reference height (m)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS 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     =   'ecmwf'   ,        6          , 'u10'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_wndj     =   'ecmwf'   ,        6          , 'v10'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_clc      =   'ecmwf'   ,        6          , 'clc'     ,    .true.    , .false. , 'daily'  ,'bilinear.nc', ''       , ''
+   sn_msl      =   'ecmwf'   ,        6          , 'msl'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_tair     =   'ecmwf'   ,        6          , 't2'      ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_rhm      =   'ecmwf'   ,        6          , 'rh'      ,    .true.    , .false. , 'daily'  ,'bilinear.nc', ''       , ''
+   sn_prec     =   'ecmwf'   ,        6          , 'precip'  ,    .true.    , .true.  , 'daily'  ,'bicubic.nc' , ''       , ''
+
+   cn_dir      = './ECMWF/'      !  root directory for the location of the bulk files
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_oasis3")
+!-----------------------------------------------------------------------
+!                    !     description       !  multiple  !    vector   !      vector          ! vector !
+!                    !                       ! categories !  reference  !    orientation       ! grids  !
+! send
+   sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''
+   sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'
+   sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+! receive
+   sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'
+   sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+!
+   nn_cplmodel   =     1     !  Maximum number of models to/from which NEMO is potentialy sending/receiving data
+   ln_usecplmask = .false.   !  use a coupling mask file to merge data received from several models
+                             !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel)
+/
+!-----------------------------------------------------------------------
+&namsbc_sas    !   analytical 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_usp      = 'sas_grid_U' ,    120           , 'vozocrtx' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_vsp      = 'sas_grid_V' ,    120           , 'vomecrty' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_tem      = 'sas_grid_T' ,    120           , 'sosstsst' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_sal      = 'sas_grid_T' ,    120           , 'sosaline' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_ssh      = 'sas_grid_T' ,    120           , 'sossheig' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_e3t      = 'sas_grid_T' ,    120           , 'e3t_m'    ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_frq      = 'sas_grid_T' ,    120           , 'frq_m'    ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+
+   ln_3d_uve   = .true.    !  specify whether we are supplying a 3D u,v and e3 field
+   ln_read_frq = .false.    !  specify whether we must read frq or not
+   cn_dir      = './'      !  root directory for the location of the bulk files are
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+!              !  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_chl      ='chlorophyll',        -1         , 'CHLA'    ,   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the runoff files
+   ln_traqsr   = .true.    !  Light penetration (T) or not (F)
+   ln_qsr_rgb  = .true.    !  RGB (Red-Green-Blue) light penetration
+   ln_qsr_2bd  = .false.   !  2 bands              light penetration
+   ln_qsr_bio  = .false.   !  bio-model light penetration
+   nn_chldta   =      1    !  RGB : 2D Chl data (=1), 3D Chl data (=2) or cst value (=0)
+   rn_abs      =   0.58    !  RGB & 2 bands: fraction of light (rn_si1)
+   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction
+   rn_si1      =   23.0    !  2 bands: longest depth of extinction
+   ln_qsr_ice  = .true.    !  light penetration for ice-model LIM3
+/
+!-----------------------------------------------------------------------
+&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      = 'runoff_core_monthly',        -1         , 'sorunoff',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_cnf      = 'runoff_core_monthly',         0         , 'socoefr0',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+   sn_s_rnf    = 'runoffs'            ,        24         , 'rosaline',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_t_rnf    = 'runoffs'            ,        24         , 'rotemper',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_dep_rnf  = 'runoffs'            ,         0         , 'rodepth' ,   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir       = './'      !  root directory for the location of the runoff files
+   ln_rnf_mouth = .true.    !  specific treatment at rivers mouths
+   rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0    !  multiplicative factor for runoff
+   ln_rnf_depth = .false.   !  read in depth information for runoff
+   ln_rnf_tem   = .false.   !  read in temperature information for runoff
+   ln_rnf_sal   = .false.   !  read in salinity information for runoff
+   ln_rnf_depth_ini = .false.  ! compute depth at initialisation from runoff file
+   rn_rnf_max   = 5.735e-4  !  max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true )
+   rn_dep_max   = 150.      !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
+   nn_rnf_depth_file = 0    !  create (=1) a runoff depth file or not (=0)
+/
+!-----------------------------------------------------------------------
+&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  !
+! nn_isf == 4
+   sn_qisf      = 'rnfisf' ,         -12      ,'sohflisf',    .false.      , .true.  , 'yearly'  ,  ''      ,   ''
+   sn_fwfisf    = 'rnfisf' ,         -12      ,'sowflisf',    .false.      , .true.  , 'yearly'  ,  ''      ,   ''
+! nn_isf == 3
+   sn_rnfisf    = 'runoffs' ,         -12      ,'sofwfisf',    .false.      , .true.  , 'yearly'  ,  ''      ,   ''
+! nn_isf == 2 and 3
+   sn_depmax_isf = 'runoffs' ,       -12        ,'sozisfmax' ,   .false.  , .true.  , 'yearly'  ,  ''      ,   ''
+   sn_depmin_isf = 'runoffs' ,       -12        ,'sozisfmin' ,   .false.  , .true.  , 'yearly'  ,  ''      ,   ''
+! nn_isf == 2
+   sn_Leff_isf = 'rnfisf' ,       0          ,'Leff'         ,   .false.  , .true.  , 'yearly'  ,  ''      ,   ''
+! for all case
+   ln_divisf   = .true.  ! apply isf melting as a mass flux or in the salinity trend. (maybe I should remove this option as for runoff?)
+! only for nn_isf = 1 or 2
+   rn_gammat0  = 1.0e-4   ! gammat coefficient used in blk formula
+   rn_gammas0  = 1.0e-4   ! gammas coefficient used in blk formula
+! only for nn_isf = 1
+   nn_isfblk   =  1       ! 1 ISOMIP ; 2 conservative (3 equation formulation, Jenkins et al. 1991 ??)
+   rn_hisf_tbl =  30.      ! thickness of the top boundary layer           (Losh et al. 2008)
+                          ! 0 => thickness of the tbl = thickness of the first wet cell
+   ln_conserve = .true.   ! conservative case (take into account meltwater advection)
+   nn_gammablk = 1        ! 0 = cst Gammat (= gammat/s)
+                          ! 1 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010)
+                          !     if you want to keep the cd as in global config, adjust rn_gammat0 to compensate
+                          ! 2 = velocity and stability dependent Gamma    Holland et al. 1999
+/
+!-----------------------------------------------------------------------
+&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_apr      = 'patm'      ,         -1        ,'somslpre',    .true.     , .true. , 'yearly'  ,  ''      ,   ''     , ''
+
+   cn_dir      = './'       !  root directory for the location of the bulk files
+   rn_pref     = 101000.    !  reference atmospheric pressure   [N/m2]/
+   ln_ref_apr  = .false.    !  ref. pressure: global mean Patm (T) or a constant (F)
+   ln_apr_obc  = .false.    !  inverse barometer added to OBC ssh data
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_sst      = 'sst_data'  ,        24         ,  'sst'    ,    .false.   , .false., 'yearly'  , ''       , ''       , ''
+   sn_sss      = 'sss_data'  ,        -1         ,  'sss'    ,    .true.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the runoff files
+   nn_sstr     =     0     !  add a retroaction term in the surface heat       flux (=1) or not (=0)
+   nn_sssr     =     2     !  add a damping     term in the surface freshwater flux (=2)
+                           !  or to SSS only (=1) or no damping term (=0)
+   rn_dqdt     =   -40.    !  magnitude of the retroaction on temperature   [W/m2/K]
+   rn_deds     =  -166.67  !  magnitude of the damping on salinity   [mm/day]
+   ln_sssr_bnd =   .true.  !  flag to bound erp term (associated with nn_sssr=2)
+   rn_sssr_bnd =   4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day]
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+   nn_ice_alb   =    1   !  parameterization of ice/snow albedo
+                         !     0: Shine & Henderson-Sellers (JGR 1985), giving clear-sky albedo
+                         !     1: "home made" based on Brandt et al. (JClim 2005) and Grenfell & Perovich (JGR 2004),
+                         !        giving cloud-sky albedo
+   rn_alb_sdry  =  0.85  !  dry snow albedo         : 0.80 (nn_ice_alb = 0); 0.85 (nn_ice_alb = 1); obs 0.85-0.87 (cloud-sky)
+   rn_alb_smlt  =  0.75  !  melting snow albedo     : 0.65 ( '' )          ; 0.75 ( '' )          ; obs 0.72-0.82 ( '' )
+   rn_alb_idry  =  0.60  !  dry ice albedo          : 0.72 ( '' )          ; 0.60 ( '' )          ; obs 0.54-0.65 ( '' )
+   rn_alb_imlt  =  0.50  !  bare puddled ice albedo : 0.53 ( '' )          ; 0.50 ( '' )          ; obs 0.49-0.58 ( '' )
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+      ln_icebergs              = .false.
+      ln_bergdia               = .true.               ! Calculate budgets
+      nn_verbose_level         = 1                    ! Turn on more verbose output if level > 0
+      nn_verbose_write         = 15                   ! Timesteps between verbose messages
+      nn_sample_rate           = 1                    ! Timesteps between sampling for trajectory storage
+                                                      ! Initial mass required for an iceberg of each class
+      rn_initial_mass          = 8.8e7, 4.1e8, 3.3e9, 1.8e10, 3.8e10, 7.5e10, 1.2e11, 2.2e11, 3.9e11, 7.4e11
+                                                      ! Proportion of calving mass to apportion to each class
+      rn_distribution          = 0.24, 0.12, 0.15, 0.18, 0.12, 0.07, 0.03, 0.03, 0.03, 0.02
+                                                      ! Ratio between effective and real iceberg mass (non-dim)
+                                                      ! i.e. number of icebergs represented at a point
+      rn_mass_scaling          = 2000, 200, 50, 20, 10, 5, 2, 1, 1, 1
+                                                      ! thickness of newly calved bergs (m)
+      rn_initial_thickness     = 40., 67., 133., 175., 250., 250., 250., 250., 250., 250.
+      rn_rho_bergs             = 850.                 ! Density of icebergs
+      rn_LoW_ratio             = 1.5                  ! Initial ratio L/W for newly calved icebergs
+      ln_operator_splitting    = .true.               ! Use first order operator splitting for thermodynamics
+      rn_bits_erosion_fraction = 0.                   ! Fraction of erosion melt flux to divert to bergy bits
+      rn_sicn_shift            = 0.                   ! Shift of sea-ice concn in erosion flux (0<sicn_shift<1)
+      ln_passive_mode          = .false.              ! iceberg - ocean decoupling
+      nn_test_icebergs         =  10                  ! Create test icebergs of this class (-1 = no)
+                                                      ! Put a test iceberg at each gridpoint in box (lon1,lon2,lat1,lat2)
+      rn_test_box              = 108.0,  116.0, -66.0, -58.0
+      rn_speed_limit           = 0.                   ! CFL speed limit for a berg
+
+!              ! 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_icb =  'calving' ,       -1           , 'calvingmask',  .true.        , .true.  , 'yearly'  , ''       , ''       , ''
+
+      cn_dir = './'
+/
+
+!!======================================================================
+!!               ***  Lateral boundary condition  ***
+!!======================================================================
+!!   namlbc        lateral momentum boundary condition
+!!   namcla        cross land advection
+!!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif")
+!!   nambdy        Unstructured open boundaries                         ("key_bdy")
+!!   namtide       Tidal forcing at open boundaries                     ("key_bdy_tides")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    2.     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+   ln_vorlat   = .false.   !  consistency of vorticity boundary condition with analytical eqs.
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+   nn_cla      =    0      !  advection between 2 ocean pts separates by land
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+   nn_cln_update =    3    !  baroclinic update frequency
+   ln_spc_dyn    = .true.  !  use 0 as special value for dynamics
+   rn_sponge_tra = 2880.   !  coefficient for tracer   sponge layer [m2/s]
+   rn_sponge_dyn = 2880.   !  coefficient for dynamics sponge layer [m2/s]
+/
+!-----------------------------------------------------------------------
+&nam_tide      !   tide parameters (#ifdef key_tide)
+!-----------------------------------------------------------------------
+   ln_tide_pot   = .true.   !  use tidal potential forcing
+   ln_tide_ramp  = .false.  !
+   rdttideramp   =    0.    !
+   clname(1)     = 'DUMMY'  !  name of constituent - all tidal components must be set in namelist_cfg
+/
+!-----------------------------------------------------------------------
+&nambdy        !  unstructured open boundaries                          ("key_bdy")
+!-----------------------------------------------------------------------
+    nb_bdy         = 0                    !  number of open boundary sets
+    ln_coords_file = .true.               !  =T : read bdy coordinates from file
+    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files
+    ln_mask_file   = .false.              !  =T : read mask from file
+    cn_mask_file   = ''                   !  name of mask file (if ln_mask_file=.TRUE.)
+    cn_dyn2d       = 'none'               !
+    nn_dyn2d_dta   =  0                   !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+                                          !  = 2, use tidal harmonic forcing data from files
+                                          !  = 3, use external data AND tidal harmonic forcing
+    cn_dyn3d      =  'none'               !
+    nn_dyn3d_dta  =  0                    !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    cn_tra        =  'none'               !
+    nn_tra_dta    =  0                    !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    cn_ice_lim      =  'none'             !
+    nn_ice_lim_dta  =  0                  !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    rn_ice_tem      = 270.                !  lim3 only: arbitrary temperature of incoming sea ice
+    rn_ice_sal      = 10.                 !  lim3 only:      --   salinity           --
+    rn_ice_age      = 30.                 !  lim3 only:      --   age                --
+
+    ln_tra_dmp    =.false.                !  open boudaries conditions for tracers
+    ln_dyn3d_dmp  =.false.                !  open boundary condition for baroclinic velocities
+    rn_time_dmp   =  1.                   ! Damping time scale in days
+    rn_time_dmp_out =  1.                 ! Outflow damping time scale
+    nn_rimwidth   = 10                    !  width of the relaxation zone
+    ln_vol        = .false.               !  total volume correction (see nn_volctl parameter)
+    nn_volctl     = 1                     !  = 0, the total water flux across open boundaries is zero
+/
+!-----------------------------------------------------------------------
+&nambdy_dta      !  open boundaries - external data           ("key_bdy")
+!-----------------------------------------------------------------------
+!              !  file name      ! frequency (hours) ! variable   ! time interp.   !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                 !  (if <0  months)  !   name     !   (logical)    !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      !
+   bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+! for lim2
+!   bn_frld  =    'amm12_bdyT_ice' ,         24        , 'ileadfra' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_hicif =    'amm12_bdyT_ice' ,         24        , 'iicethic' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_hsnif =    'amm12_bdyT_ice' ,         24        , 'isnowthi' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+! for lim3
+!   bn_a_i  =    'amm12_bdyT_ice' ,         24        , 'ileadfra' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_ht_i =    'amm12_bdyT_ice' ,         24        , 'iicethic' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_ht_s =    'amm12_bdyT_ice' ,         24        , 'isnowthi' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   cn_dir  =    'bdydta/'
+   ln_full_vel = .false.
+/
+!-----------------------------------------------------------------------
+&nambdy_tide     ! tidal forcing at open boundaries
+!-----------------------------------------------------------------------
+   filtide          = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files
+   ln_bdytide_2ddta = .false.
+   ln_bdytide_conj  = .false.
+/
+!!======================================================================
+!!                 ***  Bottom boundary condition  ***
+!!======================================================================
+!!   nambfr        bottom friction
+!!   nambbc        bottom temperature boundary condition
+!!   nambbl        bottom boundary layer scheme                         ("key_trabbl")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    1      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+                           !                              = 2 : nonlinear friction
+   rn_bfri1    =    4.e-4  !  bottom drag coefficient (linear case)
+   rn_bfri2    =    1.e-3  !  bottom drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
+   rn_bfri2_max =   1.e-1  !  max. bottom drag coefficient (non linear case and ln_loglayer=T)
+   rn_bfeb2    =    2.5e-3 !  bottom turbulent kinetic energy background  (m2/s2)
+   rn_bfrz0    =    3.e-3  !  bottom roughness [m] if ln_loglayer=T
+   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file )
+   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T)
+   rn_tfri1    =    4.e-4  !  top drag coefficient (linear case)
+   rn_tfri2    =    2.5e-3 !  top drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
+   rn_tfri2_max =   1.e-1  !  max. top drag coefficient (non linear case and ln_loglayer=T)
+   rn_tfeb2    =    0.0    !  top turbulent kinetic energy background  (m2/s2)
+   rn_tfrz0    =    3.e-3  !  top roughness [m] if ln_loglayer=T
+   ln_tfr2d    = .false.   !  horizontal variation of the top friction coef (read a 2D mask file )
+   rn_tfrien   =    50.    !  local multiplying factor of tfr (ln_tfr2d=T)
+
+   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true)
+   ln_loglayer = .false.   !  logarithmic formulation (non linear case)
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+!              !                              !  (if <0  months)  !  
+!              !  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_qgh      ='geothermal_heating.nc',  -12.  , 'heatflow'      ,   .false.      , .true.  , 'yearly'  , ''       , ''       , ''
+   !
+   cn_dir      = './'      !  root directory for the location of the runoff files
+   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+   rn_geoflx_cst = 86.4e-3 !  Constant value of geothermal heat flux [W/m2]
+
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+   nn_bbl_ldf  =  1      !  diffusive bbl (=1)   or not (=0)
+   nn_bbl_adv  =  0      !  advective bbl (=1/2) or not (=0)
+   rn_ahtbbl   =  1000.  !  lateral mixing coefficient in the bbl  [m2/s]
+   rn_gambbl   =  10.    !  advective bbl coefficient                 [s]
+/
+
+!!======================================================================
+!!                        Tracer (T & S ) namelists
+!!======================================================================
+!!   nameos        equation of state
+!!   namtra_adv    advection scheme
+!!   namtra_adv_mle   mixed layer eddy param. (Fox-Kemper param.)
+!!   namtra_ldf    lateral diffusion scheme
+!!   namtra_dmp    T & S newtonian damping
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+   nn_eos      =  -1     !  type of equation of state and Brunt-Vaisala frequency
+                                 !  =-1, TEOS-10
+                                 !  = 0, EOS-80
+                                 !  = 1, S-EOS   (simplified eos)
+   ln_useCT    = .true.  ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm
+   !                             !
+   !                     ! S-EOS coefficients :
+   !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS
+   rn_a0       =  1.6550e-1      !  thermal expension coefficient (nn_eos= 1)
+   rn_b0       =  7.6554e-1      !  saline  expension coefficient (nn_eos= 1)
+   rn_lambda1  =  5.9520e-2      !  cabbeling coeff in T^2  (=0 for linear eos)
+   rn_lambda2  =  7.4914e-4      !  cabbeling coeff in S^2  (=0 for linear eos)
+   rn_mu1      =  1.4970e-4      !  thermobaric coeff. in T (=0 for linear eos)
+   rn_mu2      =  1.1090e-5      !  thermobaric coeff. in S (=0 for linear eos)
+   rn_nu       =  2.4341e-3      !  cabbeling coeff in T*S  (=0 for linear eos)
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_cen2   =  .false.   !  2nd order centered scheme
+   ln_traadv_tvd    =  .true.    !  TVD scheme
+   ln_traadv_muscl  =  .false.   !  MUSCL scheme
+   ln_traadv_muscl2 =  .false.   !  MUSCL2 scheme + cen2 at boundaries
+   ln_traadv_ubs    =  .false.   !  UBS scheme
+   ln_traadv_qck    =  .false.   !  QUICKEST scheme
+   ln_traadv_msc_ups=  .false.   !  use upstream scheme within muscl
+   ln_traadv_tvd_zts=  .false.  !  TVD scheme with sub-timestepping of vertical tracer advection
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !   mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+   ln_mle    = .true.      ! (T) use the Mixed Layer Eddy (MLE) parameterisation
+   rn_ce     = 0.06        ! magnitude of the MLE (typical value: 0.06 to 0.08)
+   nn_mle    = 1           ! MLE type: =0 standard Fox-Kemper ; =1 new formulation
+   rn_lf     = 5.e+3       ! typical scale of mixed layer front (meters)                      (case rn_mle=0)
+   rn_time   = 172800.     ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0)
+   rn_lat    = 20.         ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1)
+   nn_mld_uv = 0           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max)
+   nn_conv   = 0           ! =1 no MLE in case of convection ; =0 always MLE
+   rn_rho_c_mle  = 0.01    ! delta rho criterion used to calculate MLD for FK
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   !                       !  Operator type:
+   ln_traldf_lap    =  .true.   !  laplacian operator
+   ln_traldf_bilap  =  .false.  !  bilaplacian operator
+   !                       !  Direction of action:
+   ln_traldf_level  =  .false.  !  iso-level
+   ln_traldf_hor    =  .false.  !  horizontal (geopotential)   (needs "key_ldfslp" when ln_sco=T)
+   ln_traldf_iso    =  .true.   !  iso-neutral                 (needs "key_ldfslp")
+   !		       	   !  Griffies parameters              (all need "key_ldfslp")
+   ln_traldf_grif   =  .false.  !  use griffies triads
+   ln_traldf_gdia   =  .false.  !  output griffies eddy velocities
+   ln_triad_iso     =  .false.  !  pure lateral mixing in ML
+   ln_botmix_grif   =  .false.  !  lateral mixing on bottom
+   !                       !  Coefficients
+   ! Eddy-induced (GM) advection always used with Griffies; otherwise needs "key_traldf_eiv"
+   ! Value rn_aeiv_0 is ignored unless = 0 with Held-Larichev spatially varying aeiv
+   !                                  (key_traldf_c2d & key_traldf_eiv & key_orca_r2, _r1 or _r05)
+   rn_aeiv_0        =  2000.    !  eddy induced velocity coefficient [m2/s]
+   rn_aht_0         =  2000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_ahtb_0        =     0.    !  background eddy diffusivity for ldf_iso [m2/s]
+   !                                           (normally=0; not used with Griffies)
+   rn_slpmax        =     0.01  !  slope limit
+   rn_chsmag        =     1.    !  multiplicative factor in Smagorinsky diffusivity
+   rn_smsh          =     1.    !  Smagorinsky diffusivity: = 0 - use only sheer
+   rn_aht_m         =  2000.    !  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .true.   !  add a damping termn (T) or not (F)
+   nn_zdmp     =    0      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   cn_resto    = 'resto.nc' ! Name of file containing restoration coefficient field (use dmp_tools to create this)
+/
+
+!!======================================================================
+!!                      ***  Dynamics namelists  ***
+!!======================================================================
+!!   namdyn_adv    formulation of the momentum advection
+!!   namdyn_vor    advection scheme
+!!   namdyn_hpg    hydrostatic pressure gradient
+!!   namdyn_spg    surface pressure gradient                            (CPP key only)
+!!   namdyn_ldf    lateral diffusion scheme
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   nn_dynkeg     = 0       ! scheme for grad(KE): =0   C2  ;  =1   Hollingsworth correction
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+   ln_dynzad_zts = .false. !  Use (T) sub timestepping for vertical momentum advection
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+   ln_vvl_zstar  = .true.           !  zstar vertical coordinate
+   ln_vvl_ztilde = .false.          !  ztilde vertical coordinate: only high frequency variations
+   ln_vvl_layer  = .false.          !  full layer vertical coordinate
+   ln_vvl_ztilde_as_zstar = .false. !  ztilde vertical coordinate emulating zstar
+   ln_vvl_zstar_at_eqtor = .false.  !  ztilde near the equator
+   rn_ahe3       = 0.0e0            !  thickness diffusion coefficient
+   rn_rst_e3t    = 30.e0            !  ztilde to zstar restoration timescale [days]
+   rn_lf_cutoff  = 5.0e0            !  cutoff frequency for low-pass filter  [days]
+   rn_zdef_max   = 0.9e0            !  maximum fractional e3t deformation
+   ln_vvl_dbg    = .false.          !  debug prints    (T/F)
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+   ln_dynvor_ene = .false. !  enstrophy conserving scheme
+   ln_dynvor_ens = .false. !  energy conserving scheme
+   ln_dynvor_mix = .false. !  mixed scheme
+   ln_dynvor_een = .true.  !  energy & enstrophy scheme
+   ln_dynvor_een_old = .false.  !  energy & enstrophy scheme - original formulation
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zco  = .false.   !  z-coordinate - full steps
+   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation)
+   ln_hpg_isf  = .false.   !  s-coordinate (sco ) adapted to isf
+   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
+   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
+   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
+                                 !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+!namdyn_spg    !   surface pressure gradient   (CPP key only)
+!-----------------------------------------------------------------------
+!                          !  explicit free surface                     ("key_dynspg_exp")
+!                          !  filtered free surface                     ("key_dynspg_flt")
+!                          !  split-explicit free surface               ("key_dynspg_ts")
+
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   !                       !  Type of the operator :
+   ln_dynldf_lap    =  .true.   !  laplacian operator
+   ln_dynldf_bilap  =  .false.  !  bilaplacian operator
+   !                       !  Direction of action  :
+   ln_dynldf_level  =  .false.  !  iso-level
+   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.)
+   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp")
+   !                       !  Coefficient
+   rn_ahm_0_lap     = 40000.    !  horizontal laplacian eddy viscosity   [m2/s]
+   rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s]
+   rn_ahm_0_blp     =     0.    !  horizontal bilaplacian eddy viscosity [m4/s]
+   rn_cmsmag_1      =     3.    !  constant in laplacian Smagorinsky viscosity
+   rn_cmsmag_2      =     3     !  constant in bilaplacian Smagorinsky viscosity
+   rn_cmsh          =     1.    !  1 or 0 , if 0 -use only shear for Smagorinsky viscosity
+   rn_ahm_m_blp     =    -1.e12 !  upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
+   rn_ahm_m_lap     = 40000.    !  upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
+/
+
+!!======================================================================
+!!             Tracers & Dynamics vertical physics namelists
+!!======================================================================
+!!    namzdf            vertical physics
+!!    namzdf_ric        richardson number dependent vertical mixing     ("key_zdfric")
+!!    namzdf_tke        TKE dependent vertical mixing                   ("key_zdftke")
+!!    namzdf_kpp        KPP dependent vertical mixing                   ("key_zdfkpp")
+!!    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")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+   rn_avm0     =   1.2e-4  !  vertical eddy viscosity   [m2/s]          (background Kz if not "key_zdfcst")
+   rn_avt0     =   1.2e-5  !  vertical eddy diffusivity [m2/s]          (background Kz if not "key_zdfcst")
+   nn_avb      =    0      !  profile for background avt & avm (=1) or not (=0)
+   nn_havtb    =    0      !  horizontal shape for avtb (=1) or not (=0)
+   ln_zdfevd   = .true.    !  enhanced vertical diffusion (evd) (T) or not (F)
+   nn_evdm     =    0      !  evd apply on tracer (=0) or on tracer and momentum (=1)
+   rn_avevd    =  100.     !  evd mixing coefficient [m2/s]
+   ln_zdfnpc   = .false.   !  Non-Penetrative Convective algorithm (T) or not (F)
+   nn_npc      =    1            !  frequency of application of npc
+   nn_npcp     =  365            !  npc control print frequency
+   ln_zdfexp   = .false.   !  time-stepping: split-explicit (T) or implicit (F) time stepping
+   nn_zdfexp   =    3            !  number of sub-timestep for ln_zdfexp=T
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+   rn_avmri    = 100.e-4   !  maximum value of the vertical viscosity
+   rn_alp      =   5.      !  coefficient of the parameterization
+   nn_ric      =   2       !  coefficient of the parameterization
+   rn_ekmfc    =   0.7     !  Factor in the Ekman depth Equation
+   rn_mldmin   =   1.0     !  minimum allowable mixed-layer depth estimate (m)
+   rn_mldmax   =1000.0     !  maximum allowable mixed-layer depth estimate (m)
+   rn_wtmix    =  10.0     !  vertical eddy viscosity coeff [m2/s] in the mixed-layer
+   rn_wvmix    =  10.0     !  vertical eddy diffusion coeff [m2/s] in the mixed-layer
+   ln_mldw     = .true.    !  Flag to use or not the mized layer depth param.
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+   rn_ediff    =   0.1     !  coef. for vertical eddy coef. (avt=rn_ediff*mxl*sqrt(e) )
+   rn_ediss    =   0.7     !  coef. of the Kolmogoroff dissipation
+   rn_ebb      =  67.83    !  coef. of the surface input of tke (=67.83 suggested when ln_mxl0=T)
+   rn_emin     =   1.e-6   !  minimum value of tke [m2/s2]
+   rn_emin0    =   1.e-4   !  surface minimum value of tke [m2/s2]
+   rn_bshear   =   1.e-20  ! background shear (>0) currently a numerical threshold (do not change it)
+   nn_mxl      =   2       !  mixing length: = 0 bounded by the distance to surface and bottom
+                           !                 = 1 bounded by the local vertical scale factor
+                           !                 = 2 first vertical derivative of mixing length bounded by 1
+                           !                 = 3 as =2 with distinct disspipative an mixing length scale
+   nn_pdl      =   1       !  Prandtl number function of richarson number (=1, avt=pdl(Ri)*avm) or not (=0, avt=avm)
+   ln_mxl0     = .true.    !  surface mixing length scale = F(wind stress) (T) or not (F)
+   rn_mxl0     =   0.04    !  surface  buoyancy lenght scale minimum value
+   ln_lc       = .true.    !  Langmuir cell parameterisation (Axell 2002)
+   rn_lc       =   0.15    !  coef. associated to Langmuir cells
+   nn_etau     =   1       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_oasis3")
+   rn_efr      =   0.05    !  fraction of surface tke value which penetrates below the ML (nn_etau=1 or 2)
+   nn_htau     =   1       !  type of exponential decrease of tke penetration below the ML
+                           !        = 0  constant 10 m length scale
+                           !        = 1  0.5m at the equator to 30m poleward of 40 degrees
+/
+!------------------------------------------------------------------------
+&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
+!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
+   ln_kpprimix = .true.    !  shear instability mixing
+   rn_difmiw   =  1.0e-04  !  constant internal wave viscosity [m2/s]
+   rn_difsiw   =  0.1e-04  !  constant internal wave diffusivity [m2/s]
+   rn_riinfty  =  0.8      !  local Richardson Number limit for shear instability
+   rn_difri    =  0.0050   !  maximum shear mixing at Rig = 0    [m2/s]
+   rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2]
+   rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s]
+   nn_avb      =  0        !  horizontal averaged (=1) or not (=0) on avt and amv
+   nn_ave      =  1        !  constant (=0) or profile (=1) background on avt
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+   rn_emin       = 1.e-7   !  minimum value of e   [m2/s2]
+   rn_epsmin     = 1.e-12  !  minimum value of eps [m2/s3]
+   ln_length_lim = .true.  !  limit on the dissipation rate under stable stratification (Galperin et al., 1988)
+   rn_clim_galp  = 0.267   !  galperin limit
+   ln_sigpsi     = .true.  !  Activate or not Burchard 2001 mods on psi schmidt number in the wb case
+   rn_crban      = 100.    !  Craig and Banner 1994 constant for wb tke flux
+   rn_charn      = 70000.  !  Charnock constant for wb induced roughness length
+   rn_hsro       =  0.02   !  Minimum surface roughness
+   rn_frac_hs    =   1.3   !  Fraction of wave height as roughness (if nn_z0_met=2)
+   nn_z0_met     =     2   !  Method for surface roughness computation (0/1/2)
+   nn_bc_surf    =     1   !  surface condition (0/1=Dir/Neum)
+   nn_bc_bot     =     1   !  bottom condition (0/1=Dir/Neum)
+   nn_stab_func  =     2   !  stability function (0=Galp, 1= KC94, 2=CanutoA, 3=CanutoB)
+   nn_clos       =     1   !  predefined closure type (0=MY82, 1=k-eps, 2=k-w, 3=Gen)
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+   rn_avts     = 1.e-4     !  maximum avs (vertical mixing on salinity)
+   rn_hsbfr    = 1.6       !  heat/salt buoyancy flux ratio
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   rn_htmx     = 500.      !  vertical decay scale for turbulence (meters)
+   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1)
+   rn_tfe      = 0.333     !  tidal dissipation efficiency
+   rn_me       = 0.2       !  mixing efficiency
+   ln_tmx_itf  = .true.    !  ITF specific parameterisation
+   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx_new    !   new tidal mixing parameterization                ("key_zdftmx_new")
+!-----------------------------------------------------------------------
+   nn_zpyc     = 2         !  pycnocline-intensified dissipation scales as N (=1) or N^2 (=2)
+   ln_mevar    = .true.    !  variable (T) or constant (F) mixing efficiency
+   ln_tsdiff   = .true.    !  account for differential T/S mixing (T) or not (F)
+/
+!!======================================================================
+!!                  ***  Miscellaneous namelists  ***
+!!======================================================================
+!!   namsol            elliptic solver / island / free surface
+!!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi)
+!!   namctl            Control prints & Benchmark
+!!   namc1d            1D configuration options                         ("key_c1d")
+!!   namc1d_uvd        data: U & V currents                             ("key_c1d")
+!!   namc1d_dyndmp     U & V newtonian damping                          ("key_c1d")
+!!   namsto            Stochastic parametrization of EOS
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
+                           !                   =2 successive-over-relaxation (sor)
+   nn_sol_arp  =      0    !  absolute/relative (0/1) precision convergence test
+   rn_eps      =  1.e-6    !  absolute precision of the solver
+   nn_nmin     =    300    !  minimum of iterations for the SOR solver
+   nn_nmax     =    800    !  maximum of iterations for the SOR solver
+   nn_nmod     =     10    !  frequency of test for the SOR solver
+   rn_resmax   =  1.e-10   !  absolute precision for the SOR solver
+   rn_sor      =  1.92     !  optimal coefficient for SOR solver (to be adjusted with the domain)
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+   cn_mpi_send =  'I'                !  mpi send/recieve type   ='S', 'B', or 'I' for standard send,
+                                     !  buffer blocking send or immediate non-blocking sends, resp.
+   nn_buffer   =   0                 !  size in bytes of exported buffer ('B' case), 0 no exportation
+   ln_nnogather=  .true.             !  activate code to avoid mpi_allgather use at the northfold
+   jpni        =   ${nem_jpni:-0}    !  jpni   number of processors following i (set automatically if < 1)
+   jpnj        =   ${nem_jpnj:-0}    !  jpnj   number of processors following j (set automatically if < 1)
+   jpnij       =   ${nem_numproc:-0} !  jpnij  number of local domains (set automatically if < 1)
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+   ln_ctl      = .false.   !  trends control print (expensive!)
+   nn_print    =    0      !  level of print (0 no extra print)
+   nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus
+   nn_ictle    =    0      !  end   i indice of control sum        multi processor runs
+   nn_jctls    =    0      !  start j indice of control               over a subdomain)
+   nn_jctle    =    0      !  end   j indice of control
+   nn_isplt    =    1      !  number of processors in i-direction
+   nn_jsplt    =    1      !  number of processors in j-direction
+   nn_bench    =    0      !  Bench mode (1/0): CAUTION use zero except for bench
+                           !     (no physical validity of the results)
+   nn_timing   =    0      !  timing by routine activated (=1) creates timing.output file, or not (=0)
+/
+!-----------------------------------------------------------------------
+&namc1d_uvd    !   data: U & V currents                                 ("key_c1d")
+!-----------------------------------------------------------------------
+!              !  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_ucur     = 'ucurrent'  ,         -1        ,'u_current',   .false.    , .true. , 'monthly' ,  ''      ,  'Ume'   , ''
+   sn_vcur     = 'vcurrent'  ,         -1        ,'v_current',   .false.    , .true. , 'monthly' ,  ''      ,  'Vme'   , ''
+!
+   cn_dir        = './'    !  root directory for the location of the files
+   ln_uvd_init   = .false. !  Initialisation of ocean U & V with U & V input data (T) or not (F)
+   ln_uvd_dyndmp = .false. !  damping of ocean U & V toward U & V input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d")
+!-----------------------------------------------------------------------
+   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namsto       ! Stochastic parametrization of EOS
+!-----------------------------------------------------------------------
+   ln_rststo = .false.           ! start from mean parameter (F) or from restart file (T)
+   ln_rstseed = .true.           ! read seed of RNG from restart file
+   cn_storst_in  = "restart_sto" !  suffix of stochastic parameter restart file (input)
+   cn_storst_out = "restart_sto" !  suffix of stochastic parameter restart file (output)
+
+   ln_sto_eos = .false.          ! stochastic equation of state
+   nn_sto_eos = 1                ! number of independent random walks
+   rn_eos_stdxy = 1.4            ! random walk horz. standard deviation (in grid points)
+   rn_eos_stdz  = 0.7            ! random walk vert. standard deviation (in grid points)
+   rn_eos_tcor  = 1440.0         ! random walk time correlation (in timesteps)
+   nn_eos_ord  = 1               ! order of autoregressive processes
+   nn_eos_flt  = 0               ! passes of Laplacian filter
+   rn_eos_lim  = 2.0             ! limitation factor (default = 3.0)
+/
+
+!!======================================================================
+!!                  ***  Diagnostics namelists  ***
+!!======================================================================
+!!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4")
+!!   namtrd       dynamics and/or tracer trends
+!!   namptr       Poleward Transport Diagnostics
+!!   namflo       float parameters                                      ("key_float")
+!!   namhsb       Heat and salt budgets
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
+!-----------------------------------------------------------------------
+   nn_nchunks_i=   4       !  number of chunks in i-dimension
+   nn_nchunks_j=   4       !  number of chunks in j-dimension
+   nn_nchunks_k=   31      !  number of chunks in k-dimension
+                           !  setting nn_nchunks_k = jpk will give a chunk size of 1 in the vertical which
+                           !  is optimal for postprocessing which works exclusively with horizontal slabs
+   ln_nc4zip   = .true.    !  (T) use netcdf4 chunking and compression
+                           !  (F) ignore chunking information and produce netcdf3-compatible files
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends
+!              !       and/or mixed-layer trends and/or barotropic vorticity
+!-----------------------------------------------------------------------
+   ln_glo_trd  = .false.   ! (T) global domain averaged diag for T, T^2, KE, and PE
+   ln_dyn_trd  = .false.    ! (T) 3D momentum trend output
+   ln_dyn_mxl  = .FALSE.   ! (T) 2D momentum trends averaged over the mixed layer (not coded yet)
+   ln_vor_trd  = .FALSE.   ! (T) 2D barotropic vorticity trends (not coded yet)
+   ln_KE_trd   = .false.   ! (T) 3D Kinetic   Energy     trends
+   ln_PE_trd   = .false.   ! (T) 3D Potential Energy     trends
+   ln_tra_trd  = .false.    ! (T) 3D tracer trend output
+   ln_tra_mxl  = .false.   ! (T) 2D tracer trends averaged over the mixed layer (not coded yet)
+   nn_trd      = 365       !  print frequency (ln_glo_trd=T) (unit=time step)
+/
+!!gm   nn_ctls     =   0       !  control surface type in mixed-layer trends (0,1 or n<jpk)
+!!gm   rn_ucf      =   1.      !  unit conversion factor (=1 -> /seconds ; =86400. -> /day)
+!!gm   cn_trdrst_in      = "restart_mld"   ! suffix of ocean restart name (input)
+!!gm   cn_trdrst_out     = "restart_mld"   ! suffix of ocean restart name (output)
+!!gm   ln_trdmld_restart = .false.         !  restart for ML diagnostics
+!!gm   ln_trdmld_instant = .false.         !  flag to diagnose trends of instantantaneous or mean ML T/S
+!!gm
+!-----------------------------------------------------------------------
+&namflo       !   float parameters                                      ("key_float")
+!-----------------------------------------------------------------------
+   jpnfl         = 1          !  total number of floats during the run
+   jpnnewflo     = 0          !  number of floats for the restart
+   ln_rstflo     = .false.    !  float restart (T) or not (F)
+   nn_writefl    =      75    !  frequency of writing in float output file
+   nn_stockfl    =    5475    !  frequency of creation of the float restart file
+   ln_argo       = .false.    !  Argo type floats (stay at the surface each 10 days)
+   ln_flork4     = .false.    !  trajectories computed with a 4th order Runge-Kutta (T)
+                              !  or computed with 'Blanke' scheme (F)
+   ln_ariane     = .true.     !  Input with Ariane tool convention(T)
+   ln_flo_ascii  = .true.     !  Output with Ariane tool netcdf convention(F) or ascii file (T)
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+   ln_diaptr  = .true.      !  Poleward heat and salt transport (T) or not (F)
+   ln_subbas  = .true.      !  Atlantic/Pacific/Indian basins computation (T) or not
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+   ln_diahsb  = .false.    !  check the heat and salt budgets (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&nam_diaharm   !   Harmonic analysis of tidal constituents ('key_diaharm')
+!-----------------------------------------------------------------------
+    nit000_han = 1         ! First time step used for harmonic analysis
+    nitend_han = 75        ! Last time step used for harmonic analysis
+    nstep_han  = 15        ! Time step frequency for harmonic analysis
+    tname(1)   = 'M2'      ! Name of tidal constituents
+    tname(2)   = 'K1'
+/
+!-----------------------------------------------------------------------
+&namdct        ! transports through sections
+!-----------------------------------------------------------------------
+    nn_dct      = 15       !  time step frequency for transports computing
+    nn_dctwri   = 15       !  time step frequency for transports writing
+    nn_secdebug = 112      !      0 : no section to debug
+                           !     -1 : debug all section
+                           !  0 < n : debug section number n
+/
+
+!!======================================================================
+!!            ***  Observation & Assimilation namelists ***
+!!======================================================================
+!!   namobs       observation and model comparison                      ('key_diaobs')
+!!   nam_asminc   assimilation increments                               ('key_asminc')
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namobs       !  observation usage switch                               ('key_diaobs')
+!-----------------------------------------------------------------------
+   ln_t3d     = .false.    ! Logical switch for T profile observations
+   ln_s3d     = .false.    ! Logical switch for S profile observations
+   ln_ena     = .false.    ! Logical switch for ENACT insitu data set
+   ln_cor     = .false.    ! Logical switch for Coriolis insitu data set
+   ln_profb   = .false.    ! Logical switch for feedback insitu data set
+   ln_sla     = .false.    ! Logical switch for SLA observations
+   ln_sladt   = .false.    ! Logical switch for AVISO SLA data
+   ln_slafb   = .false.    ! Logical switch for feedback SLA data
+   ln_ssh     = .false.    ! Logical switch for SSH observations
+   ln_sst     = .false.    ! Logical switch for SST observations
+   ln_reysst  = .false.    ! Logical switch for Reynolds observations
+   ln_ghrsst  = .false.    ! Logical switch for GHRSST observations
+   ln_sstfb   = .false.    ! Logical switch for feedback SST data
+   ln_sss     = .false.    ! Logical switch for SSS observations
+   ln_seaice  = .false.    ! Logical switch for Sea Ice observations
+   ln_vel3d   = .false.    ! Logical switch for velocity observations
+   ln_velavcur= .false     ! Logical switch for velocity daily av. cur.
+   ln_velhrcur= .false     ! Logical switch for velocity high freq. cur.
+   ln_velavadcp = .false.  ! Logical switch for velocity daily av. ADCP
+   ln_velhradcp = .false.  ! Logical switch for velocity high freq. ADCP
+   ln_velfb   = .false.    ! Logical switch for feedback velocity data
+   ln_grid_global = .false. ! Global distribtion of observations
+   ln_grid_search_lookup = .false. !  Logical switch for obs grid search w/lookup table
+   grid_search_file = 'grid_search'  !  Grid search lookup file header
+! All of the *files* variables below are arrays. Use namelist_cfg to add more files
+   enactfiles = 'enact.nc' !  ENACT input observation file names (specify full array in namelist_cfg)
+   coriofiles = 'corio.nc' !  Coriolis input observation file name
+   profbfiles = 'profiles_01.nc' ! Profile feedback input observation file name
+   ln_profb_enatim = .false !        Enact feedback input time setting switch
+   slafilesact = 'sla_act.nc' !  Active SLA input observation file names
+   slafilespas = 'sla_pass.nc' ! Passive SLA input observation file names
+   slafbfiles = 'sla_01.nc' ! slafbfiles: Feedback SLA input observation file names
+   sstfiles = 'ghrsst.nc'   ! GHRSST input observation file names
+   sstfbfiles = 'sst_01.nc' ! Feedback SST input observation file names
+   seaicefiles = 'seaice_01.nc' ! Sea Ice input observation file names
+   velavcurfiles = 'velavcurfile.nc'  ! Vel. cur. daily av. input file name
+   velhrcurfiles = 'velhrcurfile.nc'  ! Vel. cur. high freq. input file name
+   velavadcpfiles = 'velavadcpfile.nc' ! Vel. ADCP daily av. input file name
+   velhradcpfiles = 'velhradcpfile.nc' ! Vel. ADCP high freq. input file name
+   velfbfiles = 'velfbfile.nc' ! Vel. feedback input observation file name
+   dobsini = 20000101.000000  !  Initial date in window YYYYMMDD.HHMMSS
+   dobsend = 20010101.000000  !  Final date in window YYYYMMDD.HHMMSS
+   n1dint = 0  !               Type of vertical interpolation method
+   n2dint = 0  !               Type of horizontal interpolation method
+   ln_nea = .false.   !        Rejection of observations near land switch
+   nmsshc     = 0     !        MSSH correction scheme
+   mdtcorr = 1.61     !        MDT  correction
+   mdtcutoff = 65.0   !        MDT cutoff for computed correction
+   ln_altbias = .false.    ! Logical switch for alt bias
+   ln_ignmis  = .true.     ! Logical switch for ignoring missing files
+   endailyavtypes = 820    ! ENACT daily average types - array (use namelist_cfg to set more values)
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+    ln_bkgwri = .false.    !  Logical switch for writing out background state
+    ln_trainc = .false.    !  Logical switch for applying tracer increments
+    ln_dyninc = .false.    !  Logical switch for applying velocity increments
+    ln_sshinc = .false.    !  Logical switch for applying SSH increments
+    ln_asmdin = .false.    !  Logical switch for Direct Initialization (DI)
+    ln_asmiau = .false.    !  Logical switch for Incremental Analysis Updating (IAU)
+    nitbkg    = 0          !  Timestep of background in [0,nitend-nit000-1]
+    nitdin    = 0          !  Timestep of background for DI in [0,nitend-nit000-1]
+    nitiaustr = 1          !  Timestep of start of IAU interval in [0,nitend-nit000-1]
+    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1]
+    niaufn    = 0          !  Type of IAU weighting function
+    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin
+    salfixmin = -9999      !  Minimum salinity after applying the increments
+    nn_divdmp = 0          !  Number of iterations of divergence damping operator
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+!              !  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_cdg      =  'cdg_wave' ,        1          , 'drag_coeff' ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_usd      =  'sdw_wave' ,        1          , 'u_sd2d'     ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_vsd      =  'sdw_wave' ,        1          , 'v_sd2d'     ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_wn       =  'sdw_wave' ,        1          , 'wave_num'   ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+!
+   cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model
+   ln_neptsimp       = .false.  ! yes/no use simplified neptune
+
+   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep
+   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator
+   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole
+   ! Specify whether to ramp down the Neptune velocity in shallow
+   ! water, and if so the depth range controlling such ramping down
+   ln_neptramp       = .true.   ! ramp down Neptune velocity in shallow water
+   rn_htrmin         =  100.0   ! min. depth of transition range
+   rn_htrmax         =  200.0   ! max. depth of transition range
+/
+EOF

+ 104 - 0
runtime/classic/ctrl/namelist.nemo.top.cfg.sh

@@ -0,0 +1,104 @@
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/TOP1 :  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_top_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namtrc_run     !   run information
+!-----------------------------------------------------------------------
+   ln_top_euler   = .true.
+/
+!-----------------------------------------------------------------------
+&namtrc     !   tracers definition
+!-----------------------------------------------------------------------
+!                !    name   !           title of the field              ! initial data ! initial data ! save   !
+!                !           !                                           !  units       ! from file    ! or not ! 
+!                !           !                                           !              ! or not       !        !
+   sn_tracer(1)   = 'DIC     ' , 'Dissolved inorganic Concentration      ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(2)   = 'Alkalini' , 'Total Alkalinity Concentration         ',  'eq/L '   ,  .true.     ,  .true.
+   sn_tracer(3)   = 'O2      ' , 'Dissolved Oxygen Concentration         ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(4)   = 'CaCO3   ' , 'Calcite Concentration                  ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(5)   = 'PO4     ' , 'Phosphate Concentration                ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(6)   = 'POC     ' , 'Small organic carbon Concentration     ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(7)   = 'Si      ' , 'Silicate Concentration                 ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(8)   = 'PHY     ' , 'Nanophytoplankton Concentration        ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(9)   = 'ZOO     ' , 'Microzooplankton Concentration         ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(10)  = 'DOC     ' , 'Dissolved organic Concentration        ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(11)  = 'PHY2    ' , 'Diatoms Concentration                  ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(12)  = 'ZOO2    ' , 'Mesozooplankton Concentration          ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(13)  = 'DSi     ' , 'Diatoms Silicate Concentration         ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(14)  = 'Fer     ' , 'Dissolved Iron Concentration           ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(15)  = 'BFe     ' , 'Big iron particles Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(16)  = 'GOC     ' , 'Big organic carbon Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(17)  = 'SFe     ' , 'Small iron particles Concentration     ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(18)  = 'DFe     ' , 'Diatoms iron  Concentration            ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(19)  = 'GSi     ' , 'Sinking biogenic Silicate Concentration',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(20)  = 'NFe     ' , 'Nano iron Concentration                ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(21)  = 'NCHL    ' , 'Nano chlorophyl Concentration          ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(22)  = 'DCHL    ' , 'Diatoms chlorophyl Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(23)  = 'NO3     ' , 'Nitrates Concentration                 ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(24)  = 'NH4     ' , 'Ammonium Concentration                 ',  'mol-C/L' ,  .false.    ,  .true.
+/
+!-----------------------------------------------------------------------
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+!                !  file name                         ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!                !                                    !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_trcdta(1)  = 'DIC_GLODAP_annual_ORCA_R1.nc'     ,        -12        ,  'DIC'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(2)  = 'Alkalini_GLODAP_annual_ORCA_R1.nc',        -12        ,  'Alkalini',    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(3)  = 'O2_WOA2009_monthly_ORCA_R1.nc'    ,        -1         ,  'O2'      ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(5)  = 'PO4_WOA2009_monthly_ORCA_R1.nc'   ,        -1         ,  'PO4'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(7)  = 'Si_WOA2009_monthly_ORCA_R1.nc'    ,        -1         ,  'Si'      ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(10) = 'DOC_PISCES_monthly_ORCA_R1.nc'    ,        -1         ,  'DOC'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(14) = 'Fer_PISCES_monthly_ORCA_R1.nc'    ,        -1         ,  'Fer'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(23) = 'NO3_WOA2009_monthly_ORCA_R1.nc'   ,        -1         ,  'NO3'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   rn_trfac(1)   =   1.028e-06  !  multiplicative factor
+   rn_trfac(2)   =   1.028e-06  !  -      -      -     -
+   rn_trfac(3)   =  44.6e-06  !  -      -      -     -
+   rn_trfac(5)   = 122.0e-06  !  -      -      -     -
+   rn_trfac(7)   =   1.0e-06  !  -      -      -     -
+   rn_trfac(10)  =   1.0e-06  !  -      -      -     -
+   rn_trfac(14)  =   1.0e-06  !  -      -      -     -
+   rn_trfac(23)  =   7.6e-06  !  -      -      -     -
+/
+!-----------------------------------------------------------------------
+&namtrc_adv    !   advection scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcadv_tvd     =  .false.  !  TVD scheme
+   ln_trcadv_muscl   =  .true.   !  MUSCL scheme
+/
+!-----------------------------------------------------------------------
+&namtrc_ldf    !   lateral diffusion scheme for passive tracer 
+!-----------------------------------------------------------------------
+   rn_fact_lap      =     15.    !     enhanced zonal eddy diffusivity
+/
+!-----------------------------------------------------------------------
+&namtrc_zdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_rad        !  treatment of negative concentrations 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_dmp    !   passive tracer newtonian damping
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_ice       !    Representation of sea ice growth & melt effects
+!-----------------------------------------------------------------------
+   nn_ice_tr   =  1        !  prescribed tracer concentration in sea ice
+/
+!-----------------------------------------------------------------------
+&namtrc_trd       !   diagnostics on tracer trends        ('key_trdtrc')
+!                          or mixed-layer trends          ('key_trdmld_trc')
+!----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_dia       !   parameters for passive tracer additional diagnostics
+!----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------
+&namtrc_bc        !   data for boundary conditions
+!-----------------------------------------------------------------------
+/
+EOF

+ 135 - 0
runtime/classic/ctrl/namelist.nemo.top.ref.sh

@@ -0,0 +1,135 @@
+if $leg_is_restart
+then
+    trc_restart=".TRUE."
+    trc_rst_ctl=1
+elif has_config pisces:start_from_restart
+then
+    trc_restart=".TRUE."
+    trc_rst_ctl=0
+else
+    trc_restart=".FALSE."
+    trc_rst_ctl=0
+fi
+
+cat << EOF
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/TOP1 :   - tracer run information                (namtrc_run)
+!!               - tracer definition                     (namtrc    )
+!!               - tracer data initialisation            (namtrc_dta)
+!!               - tracer advection                      (namtrc_adv)
+!!               - tracer lateral diffusion              (namtrc_ldf)
+!!               - tracer vertical physics               (namtrc_zdf)
+!!               - tracer newtonian damping              (namtrc_dmp)
+!!               - dynamical tracer trends               (namtrc_trd)
+!!               - tracer output diagonstics             (namtrc_dia)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namtrc_run     !   run information
+!-----------------------------------------------------------------------
+   nn_dttrc      =  1        !  time step frequency for passive sn_tracers
+   nn_writetrc   =  5475     !  time step frequency for sn_tracer outputs
+   ln_top_euler  = .false.    !  use Euler time-stepping for TOP
+   ln_rsttr      = $trc_restart !  start from a restart file (T) or not (F)
+   nn_rsttr      = $trc_rst_ctl !  restart control = 0 initial time step is not compared to the restart file value
+                           !                  = 1 do not use the value in the restart file
+                           !                  = 2 calendar parameters read in the restart file
+   cn_trcrst_in  = "restart_trc"   !  suffix of pass. sn_tracer restart name (input)
+   cn_trcrst_indir = "."           !  directory from which to read input passive tracer restarts
+   cn_trcrst_out = "restart_trc"   !  suffix of pass. sn_tracer restart name (output)
+   cn_trcrst_outdir = "."          !  directory to which to write output passive tracer restarts
+/
+!-----------------------------------------------------------------------
+&namtrc     !   tracers definition
+!-----------------------------------------------------------------------
+   ln_trcdta     =   .true.  !  Initialisation from data input file (T) or not (F)
+   ln_trcdmp     =  .false.  !  add a damping termn (T) or not (F)
+   ln_trcdmp_clo =  .false.  !  damping term (T) or not (F) on closed seas
+/
+!-----------------------------------------------------------------------
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+!
+   cn_dir        =  './'      !  root directory for the location of the data files
+/
+!-----------------------------------------------------------------------
+&namtrc_adv    !   advection scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcadv_cen2    =  .false.  !  2nd order centered scheme   
+   ln_trcadv_tvd     =  .true.  !  TVD scheme
+   ln_trcadv_muscl   =  .false.   !  MUSCL scheme
+   ln_trcadv_muscl2  =  .false.  !  MUSCL2 scheme + cen2 at boundaries
+   ln_trcadv_ubs     =  .false.  !  UBS scheme
+   ln_trcadv_qck     =  .false.  !  QUICKEST scheme
+   ln_trcadv_msc_ups =  .false.  !  use upstream scheme within muscl
+/
+!-----------------------------------------------------------------------
+&namtrc_ldf    !   lateral diffusion scheme for passive tracer 
+!-----------------------------------------------------------------------
+!                               !  Type of the operator : 
+   ln_trcldf_lap    =  .true.   !     laplacian operator       
+   ln_trcldf_bilap  =  .false.  !     bilaplacian operator     
+                                !  Direction of action  :
+   ln_trcldf_level  =  .false.  !     iso-level                
+   ln_trcldf_hor    =  .false.  !     horizontal (geopotential)         (require "key_ldfslp" when ln_sco=T)
+   ln_trcldf_iso    =  .true.   !     iso-neutral                       (require "key_ldfslp")
+!                               !  Coefficient
+   rn_ahtrc_0       =  2000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_ahtrb_0       =     0.    !     background eddy diffusivity for ldf_iso [m2/s]
+   rn_fact_lap      =     1.    !     enhanced zonal eddy diffusivity
+/
+!-----------------------------------------------------------------------
+&namtrc_zdf        !   vertical physics
+!-----------------------------------------------------------------------
+   ln_trczdf_exp   =  .false.  !  split explicit (T) or implicit (F) time stepping
+   nn_trczdf_exp   =   3       !  number of sub-timestep for ln_trczdfexp=T
+/
+!-----------------------------------------------------------------------
+&namtrc_rad        !  treatment of negative concentrations 
+!-----------------------------------------------------------------------
+   ln_trcrad   =  .true.  !  artificially correct negative concentrations (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namtrc_dmp    !   passive tracer newtonian damping   
+!-----------------------------------------------------------------------
+   nn_zdmp_tr  =    1      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   cn_resto_tr  = 'resto_tr.nc'    !  create a damping.coeff NetCDF file (=1) or not (=0)
+/
+!-----------------------------------------------------------------------
+&namtrc_ice       !    Representation of sea ice growth & melt effects
+!-----------------------------------------------------------------------
+   nn_ice_tr   =  -1        !  tracer concentration in sea ice 
+                           !    =-1 (no vvl: identical cc in ice and ocean / vvl: cc_ice = 0)
+                           !    = 0 (no vvl: cc_ice = zero / vvl: cc_ice = )
+                           !    = 1 prescribed to a namelist value (implemented in pisces only)
+/
+!-----------------------------------------------------------------------
+&namtrc_trd       !   diagnostics on tracer trends        ('key_trdtrc')
+!                          or mixed-layer trends          ('key_trdmld_trc')
+!----------------------------------------------------------------------
+   nn_trd_trc  =  5475      !  time step frequency and tracers trends
+   nn_ctls_trc =   0        !  control surface type in mixed-layer trends (0,1 or n<jpk)
+   rn_ucf_trc  =   1        !  unit conversion factor (=1 -> /seconds ; =86400. -> /day)
+   ln_trdmld_trc_restart = .false.  !  restart for ML diagnostics
+   ln_trdmld_trc_instant = .true.  !  flag to diagnose trends of instantantaneous or mean ML T/S
+   ln_trdtrc(1)  =   .true.
+   ln_trdtrc(2)  =   .true.
+   ln_trdtrc(23) =   .true.
+/
+!-----------------------------------------------------------------------
+&namtrc_dia       !   parameters for passive tracer additional diagnostics
+!----------------------------------------------------------------------
+   ln_diatrc     =  .true.   !  save additional diag. (T) or not (F)
+   ln_diabio     =  .true.   !  output biological trends
+   nn_writedia   =  5475     !  time step frequency for diagnostics
+   nn_writebio   =    10     !: frequency of biological outputs
+/
+!----------------------------------------------------------------------
+! namtrc_bc       !   data for boundary conditions
+!-----------------------------------------------------------------------
+&namtrc_bc
+!
+   cn_dir        =  './'      !  root directory for the location of the data files
+/
+EOF

+ 219 - 0
runtime/classic/ctrl/namelist.osm.sh

@@ -0,0 +1,219 @@
+# namelist.osm.sh 
+
+## TO FIX
+
+
+
+#--------------------------------------
+# Setup defaults 
+# -------------------------------------
+
+LEVGEN=${LEVGEN:-true} 
+LESSRO=${LESSRO:-true}
+LESN09=${LESN09:-true}
+LRDALB=${LRDALB:-false}
+N_COMPUTE_EFF_VEG_FRACTION=${n_compute_eff_veg_fraction}
+LE4ALB=${LE4ALB:-true}
+LELAIV=${LELAIV:-true}
+LREADDAY=${LREADDAY:-true}
+
+NINDAT=$(date -u -d "${run_start_date}" +%Y%m%d) 
+IFYYYY=$(echo $leg_start_date_yyyymmdd | cut -c1-4)
+IFMM=$(echo $leg_start_date_yyyymmdd | cut -c5-6)
+IFDD=$(echo $leg_start_date_yyyymmdd| cut -c7-8)
+IFTIM=0000
+
+# Find out forcing frequency 
+t2=$( cdo -s -infov -selvar,LWdown -seltimestep,2 ${osm_forcing_dir}/${leg_start_date_yyyy}/LWdown.nc | tail -1 | awk '{print $3,$4}')
+t1=$( cdo -s -infov -selvar,LWdown -seltimestep,1 ${osm_forcing_dir}/${leg_start_date_yyyy}/LWdown.nc | tail -1 | awk '{print $3,$4}')
+ZDTFORC=$(( $( date -u -d "$t2" +%s) - $( date -u -d "$t1" +%s) ))
+
+[ $LREADDAY = true ] && NDFORC=$(( 86400/ZDTFORC +2 )) || NDFORC=1
+
+
+# set the reference levels for near-surface temp, humidity and wind
+#     ZPHISTA   REFERENCE LEVEL (FOR T, Q)
+#     ZUV       REFERENCE LEVEL FOR WIND
+# ZPHISTA is assumed to be always 2, except for erai and era5
+ZPHISTA=2.
+case "${osm_forcing_type}" in
+  ifs) ZPHISTA=2.  ;;
+  erai) ZPHISTA=10. ;;
+  era5) ZPHISTA=10. ;;
+  e20c) ZPHISTA=2. ;;
+  gswp3) ZPHISTA=2. ;;
+  *) info "unknown OSM forcing type osm_forcing_type, setting ZPHISTA=2."
+  ;;
+esac
+# ZUV is assumed to be always 10
+ZUV=10.
+
+LPROD=".TRUE."
+LPROD2=".FALSE."
+NDLEVEL=0
+NCDFTYPE=4
+
+case "${ifs_grid}" in
+  T159L*) NLON=35718  ;;
+  T255L*) NLON=88838  ;;
+  T511L*) NLON=348528 ;;
+  *)  error "Can't set time steps for unknown horizontal grid: ${ifs_grid}"
+  ;;
+esac
+
+# end of Defaults
+# ---------------------------------------
+
+#--------------------------------------
+# Start || Restart 
+#-------------------------------------
+NSTART=$(( leg_start_sec / ifs_time_step_sec ))
+NSTOP=$(( leg_end_sec / ifs_time_step_sec ))
+
+# TODO check this when multi-year files are generated!
+forcing_end=$(cdo -s -infov -selvar,LWdown -seltimestep,-1 ${osm_forcing_dir}/${leg_end_date_yyyy}/LWdown.nc | tail -1 | awk '{print $3,$4}')
+forcing_end=$(date -uR -d "${forcing_end}")
+forcing_end_sec=$(( $(date -u -d "${forcing_end}" +%s) - $(date -u -d "${run_start_date}" +%s) ))
+if [ ${forcing_end_sec} -lt ${leg_end_sec} ]
+then
+  if [ $(date -u -d "${leg_end_date}" +%s) -eq $(date -u -d "${run_end_date}" +%s) ] &&  [  $((forcing_end_sec+ZDTFORC)) = $leg_end_sec ]
+  then
+    NSTOP=$(( forcing_end_sec / ifs_time_step_sec ))
+  else 
+    info "$NSTOP,$forcing_end,$forcing_end_sec"
+    error "NSTOP > forcing availability" 
+  fi 
+fi  
+
+if [ $NSTART = 0 ]
+then
+  # Start 
+  LNF=true
+  ln -sf soilinit restartin.nc 
+else
+  # Restart
+  test -f restartin.nc || error "restartin.nc not present"
+  LNF=false
+fi
+
+## Find out domain size 
+NLAT=$( ncdump -h restartin.nc | grep "^.y = " |  head -1 | awk '{print $3}' )
+NLON=$( ncdump -h restartin.nc | grep "^.x = " |  head -1 | awk '{print $3}' )
+if [[ $NLON = "" ]]; then 
+  NLAT=$( ncdump -h restartin.nc | grep "^.lat = " |  head -1 | awk '{print $3}' )
+  NLON=$( ncdump -h restartin.nc | grep "^.lon = " |  head -1 | awk '{print $3}' )
+fi 
+NDIMCDF=2
+if [[ $NLAT = "" ]]; then 
+  NDIMCDF=1
+  NLAT=0
+fi
+
+# Switch on/off LPJ-GUESS feedback to IFS
+(( ${lpjg_on:-}   )) && LLPJGON=TRUE  || LLPJGON=FALSE
+(( ${lpjg_fdbck:-}  )) && LLPJGFBON=TRUE || LLPJGFBON=FALSE
+
+cat << EOF
+&NAMCT01S
+  NSTART=$NSTART           ! first timestep of model 0 
+  NSTOP=$NSTOP             ! last timestep of model 17520
+  NFRPOS=$ifs_output_freq  ! frequency of post-processing events (time-steps)
+  NFRRES=0                 ! frequency of writing intermediate restart files (time-steps)
+  LNF=$LNF                 ! .T. = start, .F. = restart
+  NCYCLE=1                 ! number of the experiment
+  CNMEXP="${exp_name}"     ! name of the experiment
+  /
+  &NAMDYN1S
+  TSTEP=$ifs_time_step_sec !  TSTEP   : length of the timestep in seconds
+  NACCTYPE=2               ! =0  Forcing fluxes assument centered on timestamp (linear interp.)
+                           ! =1  forward accumulation (starting at timestamp)
+                           ! =2  backward accumulation (ending at timestamp)
+  LSWINT=.TRUE.            ! SWdown solar angle interpolation if true 
+  LPREINT=.FALSE.          ! precipitation interpolation if true
+  LFLXINT=.FALSE.          ! SWdown/LWdown linear interpolation if true 
+  /
+  &NAMDIM
+  NLAT=$NLAT               ! number of latitudes
+  NLON=$NLON               ! number of longitudes
+  NDFORC=$NDFORC           ! namelist forcing dimension
+  NSLAB=0                  ! 2D, NSLAB = nr of latitude lines
+  NPROMA=240              ! working dimension for grid-point computations
+  /
+  &NAMRIP
+  NINDAT=${NINDAT}         ! run initial date in the form YYYYMMDD 
+  NSSSSS=0                 ! initial time in seconds (e.g. for 12h, 43200)
+  /
+  &NAM1S
+  CFFORC='netcdf'          ! CHARACTER: IDENTIFIES THE FORCING DATA SET
+  CFOUT='netcdf'           ! CHARACTER: IDENTIFIES THE OUTPUT DATA SET
+  CFSURF='netcdf'          ! CHARACTER: IDENTIFIES THE SURFACE CLIMATOLOGY DATA SET 
+  CFINIT='netcdf'          ! CHARACTER: IDENTIFIES THE INITIALIZATION DATA SET
+  CMODID='EC-EARTH'         ! CHARACTER: MODEL IDENTIFICATION
+  CVERID='EC-EARTH'            ! CHARACTER: VERSION IDENTIFICATION 
+  LACCUMW=.TRUE.           ! LOGICAL : WRITE OUT ACCUMULATED FLUXES (DEFAULT=TRUE)
+  LRESET=.TRUE.            ! LOGICAL : RESET ACCUMULATION EVERY WRITE OUT TIME STEP
+  NACCUR=1                 ! INTEGER : OUTPUT CDF ACCURACY: 1=SINGLE PREC, 2=DOUBLE PREC
+  NDIMCDF=${NDIMCDF}       ! INTEGER : NR OF GRID DIMENSIONS
+  NDLEVEL=${NDLEVEL}       ! INTEGER : Level of netcdf4 compression 0-9: 0== no compression -faster output
+  NCDFTYPE=${NCDFTYPE}     ! type of netcdf output
+  LNCSNC=.FALSE.           !  if true sync netcdf output every writting step (slows down run)
+  LWRGG=$LPROD             ! logical, wrtie o_gg  - instantaneus prognostics 
+  LWRCLM=$LPROD            ! logical, write o_fix - fix soil properties 
+  LWRGGD=.FALSE.            ! logical, write o_ggd - mean prognostic evolution
+  LWREFL=$LPROD            ! logical, write o_efl - surface energy balance 
+  LWRWAT=$LPROD            ! logical, write o_wat - water balance
+  LWRD2M=$LPROD            ! logical, write o_d2m - 2 meters diagnostics 
+! TODO only save daily 66,67,27,28,29,30 for icmcl
+  LWRSUS=$LPROD            ! logical, write o_sus - surface state variables (vegT,albedo, etc..)
+  LWREVA=$LPROD2            ! logical, write o_eva - evaporation components 
+  LWRCLD=$LPROD2            ! logical, write o_cld - cold processes variables 
+  LWRCO2=.FALSE.            ! logical, write o_co2 - cO2 fluxes 
+  LWRBIO=.FALSE.           ! logical, write o_bio - biomass 
+  LWRVEG=.FALSE.           ! logical, write o_veg - vegetation 2D high/low veg 
+  LWRVTY=.FALSE.            ! logical, write o_vty - vegetation 2D high/low veg biomass
+  LWRTIL=.FALSE.           ! logical, write o_til - tiles 2D (tile) state
+  LWRLKE=.FALSE.           ! logical, write o_lke - lake variables
+  LSEMISS=.FALSE.          ! LOGICAL : EMISSIVITY SET TO CONSTANT VALUE REMISS
+  LDBGS1=.FALSE.           ! LOGICAL : PRINT DEBUG INFO, EG FORCING DATA (DEFAULT=FALSE)
+  IDBGS1=2                 ! Debug level : output printing
+  LREADDAY=${LREADDAY}          ! Logical: read daily chuncks  
+  /
+  &NAMFORC
+  ZPHISTA=${ZPHISTA}       ! REFERENCE LEVEL (FOR T, Q) last model level ERAI
+  ZUV=${ZUV}               ! REFERENCE LEVEL FOR WIND   last model level ERAI
+  ZDTFORC=$ZDTFORC         ! FORCING TIME STEP     3h forcing from ERAI 
+  IFYYYY=$IFYYYY           ! REFERENCE YEAR
+  IFMM=$IFMM               ! REFERENCE MONTH
+  IFDD=$IFDD               ! REFERENCE DAY
+  IFTIM=$IFTIM             ! REFERENCE TIME (HHMM)
+  INSTFC=0                 ! NUMBER OF TIME STEPS TO BE READ (0 = ALL)
+  NDIMFORC=${NDIMCDF}      ! NUMBER OF GRID DIMENSIONS in FORCING
+  LOADIAB=.FALSE.          ! FLAG FOR APPLYING ADIABATIC HEIGHT CORRECTION
+  CFORCV="forcing"
+  CFORCU="Wind.nc"
+  CFORCT="Tair.nc"
+  CFORCQ="Qair.nc"
+  CFORCP="PSurf.nc"
+  CFORCRAIN="Rainf.nc"
+  CFORCSNOW="Snowf.nc"
+  CFORCSW="SWdown.nc"
+  CFORCLW="LWdown.nc"
+  /
+  &NAMPHY
+  LEVGEN=$LEVGEN               ! LOGICAL : TURN THE VAN GENUCHTEN HYDROLOGY ON
+  LESSRO=$LESSRO                ! LOGICAL : TURN THE SUB-GRID SURFACE RUNOFF ON
+  LEFLAKE=.FALSE.              ! LOGICAL : TURN THE FLAKE ON
+  LESN09=$LESN09               ! LOGICAL : TURN THE NEW SNOW PARAMETERIZATION ON 
+  LEINTWIND=.T.
+  LECLIM10D=.F.            ! LOGICAL : TURN usage of 10-day Climatology for Alb and LAI
+  LE4ALB=$LE4ALB
+  LELAIV=$LELAIV
+  /
+  &NAMPHYOFF
+  LRDALB=$LRDALB
+  N_COMPUTE_EFF_VEG_FRACTION=${N_COMPUTE_EFF_VEG_FRACTION}
+  LRDVEG=.TRUE.
+  LLPJG        = ${LLPJGON},
+  LLPJGFB      = ${LLPJGFBON},
+  /
+EOF

+ 9 - 0
runtime/classic/ctrl/namelist.runoffmapper.sh

@@ -0,0 +1,9 @@
+cat << EOF
+!-----------------------------------------------------------------------
+&NAMRNFMAP
+!-----------------------------------------------------------------------
+    RunLengthSec = ${leg_length_sec}
+    TimeStepSec  = ${cpl_freq_atm_oce_sec}
+!-----------------------------------------------------------------------
+/
+EOF

+ 285 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/cmip6-data-request-varlist-AerChemMIP-hist-1950HC-EC-EARTH-AerChem.json

@@ -0,0 +1,285 @@
+{
+    "ifs": {
+        "AERday": [
+            "zg1000",
+            "zg500"
+        ],
+        "AERmon": [
+            "cdnc",
+            "cltc",
+            "lwp",
+            "rlutaf",
+            "rlutcsaf",
+            "rsutaf",
+            "rsutcsaf",
+            "wa"
+        ],
+        "AERmonZ": [
+            "ta"
+        ],
+        "Amon": [
+            "tas",
+            "ts",
+            "tasmin",
+            "tasmax",
+            "psl",
+            "ps",
+            "uas",
+            "vas",
+            "sfcWind",
+            "hurs",
+            "huss",
+            "pr",
+            "prsn",
+            "prc",
+            "evspsbl",
+            "sbl",
+            "tauu",
+            "tauv",
+            "hfls",
+            "hfss",
+            "rlds",
+            "rlus",
+            "rsds",
+            "rsus",
+            "rsdscs",
+            "rsuscs",
+            "rldscs",
+            "rsdt",
+            "rsut",
+            "rlut",
+            "rlutcs",
+            "rsutcs",
+            "prw",
+            "clt",
+            "clwvi",
+            "clivi",
+            "rtmt",
+            "cl",
+            "clw",
+            "cli",
+            "ta",
+            "ua",
+            "va",
+            "hus",
+            "hur",
+            "wap",
+            "zg",
+            "pfull"
+        ],
+        "CFday": [
+            "ps",
+            "rsdscs"
+        ],
+        "CFmon": [
+            "ta",
+            "tntr",
+            "tntc",
+            "hur",
+            "hus",
+            "tnhus",
+            "tnhusc",
+            "tnhusmp",
+            "cltisccp",
+            "albisccp",
+            "pctisccp",
+            "cltcalipso",
+            "cllcalipso",
+            "clmcalipso",
+            "clhcalipso"
+        ],
+        "Emon": [
+            "mrsol"
+        ],
+        "Lmon": [
+            "mrsos",
+            "mrso",
+            "mrfso",
+            "mrros",
+            "mrro"
+        ],
+        "day": [
+            "tasmin",
+            "tasmax",
+            "tas",
+            "pr",
+            "uas",
+            "vas",
+            "rlds",
+            "rlus",
+            "rsds"
+        ],
+        "fx": [
+            "areacella",
+            "orog",
+            "sftlf"
+        ]
+    },
+    "lpjg": {},
+    "nemo": {
+        "Omon": [
+            "masso",
+            "pbo",
+            "pso",
+            "volo",
+            "zos",
+            "zostoga",
+            "masscello",
+            "thetao",
+            "thetaoga",
+            "bigthetao",
+            "bigthetaoga",
+            "tos",
+            "tob",
+            "tosga",
+            "so",
+            "soga",
+            "sos",
+            "sob",
+            "sosga",
+            "msftbarot",
+            "mlotst",
+            "mlotstmax",
+            "mlotstmin",
+            "obvfsq",
+            "uo",
+            "vo",
+            "wo",
+            "wmo",
+            "umo",
+            "vmo",
+            "msftyz",
+            "hfbasin",
+            "hfbasinpmadv",
+            "fsitherm",
+            "wfo",
+            "wfonocorr",
+            "sfdsi",
+            "hfds",
+            "tauuo",
+            "tauvo",
+            "zhalfo"
+        ],
+        "Oyr": [
+            "dissicnat",
+            "talknat"
+        ]
+    },
+    "tm5": {
+        "AERday": [
+            "maxpblz",
+            "minpblz",
+            "od550aer",
+            "sfo3max",
+            "toz"
+        ],
+        "AERmon": [
+            "abs550aer",
+            "airmass",
+            "bldep",
+            "c2h6",
+            "c3h6",
+            "c3h8",
+            "ch3coch3",
+            "ch4",
+            "cheaqpso4",
+            "chegpso4",
+            "chepsoa",
+            "co",
+            "dms",
+            "drybc",
+            "drydust",
+            "drynh3",
+            "drynh4",
+            "drynoy",
+            "dryo3",
+            "dryoa",
+            "dryso2",
+            "dryso4",
+            "dryss",
+            "emibc",
+            "emibvoc",
+            "emico",
+            "emidms",
+            "emidust",
+            "emiisop",
+            "emilnox",
+            "eminh3",
+            "eminox",
+            "emioa",
+            "emiso2",
+            "emiso4",
+            "emiss",
+            "emivoc",
+            "hcho",
+            "hno3",
+            "isop",
+            "jno2",
+            "lossch4",
+            "lossco",
+            "mmraerh2o",
+            "mmrbc",
+            "mmrdust",
+            "mmrnh4",
+            "mmrno3",
+            "mmroa",
+            "mmrpm1",
+            "mmrpm10",
+            "mmrpm2p5",
+            "mmrso4",
+            "mmrsoa",
+            "mmrss",
+            "no",
+            "no2",
+            "o3",
+            "o3loss",
+            "o3prod",
+            "o3ste",
+            "od440aer",
+            "od550aer",
+            "od550aerh2o",
+            "od550bc",
+            "od550dust",
+            "od550lt1aer",
+            "od550no3",
+            "od550oa",
+            "od550so4",
+            "od550soa",
+            "od550ss",
+            "od870aer",
+            "oh",
+            "pan",
+            "phalf",
+            "ptp",
+            "so2",
+            "tatp",
+            "toz",
+            "tropoz",
+            "wetbc",
+            "wetdust",
+            "wetnh3",
+            "wetnh4",
+            "wetnoy",
+            "wetoa",
+            "wetso2",
+            "wetso4",
+            "wetss",
+            "ztp",
+            "ps"
+        ],
+        "AERmonZ": [
+            "ch4",
+            "hno3",
+            "ho2",
+            "noy",
+            "o3",
+            "oh"
+        ],
+        "Amon": [
+            "co2",
+            "co2mass",
+            "ch4",
+            "ch4global"
+        ]
+    }
+}

+ 142 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/file_def_nemo-lim3.xml

@@ -0,0 +1,142 @@
+<file_definition min_digits="4" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" type="one_file">
+
+
+   <file_group id="id_file_group_lim">
+
+
+    <file id="file1" name_suffix="_lim_grid_V_2D" output_freq="1d">
+
+     <field enabled="False" field_ref="vice_mv" freq_op="1ts" grid_ref="grid_V_2D" id="id_1d_siv" name="siv" operation="average" unit="m s-1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file2" name_suffix="_lim_grid_T_2D" output_freq="1d">
+
+     <field enabled="True" field_ref="iceconc_pct" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_siconc" name="siconc" operation="average" unit="%">                                                                        </field>
+     <field enabled="False" field_ref="snothic" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_sisnthick" name="sisnthick" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="icevel_mv" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_sispeed" name="sispeed" operation="average" unit="m s-1">                                                                        </field>
+     <field enabled="False" field_ref="icestK" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_sitemptop" name="sitemptop" operation="average" unit="K">                                                                        </field>
+     <field enabled="False" field_ref="icethic" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_sithick" name="sithick" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="icepres" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_sitimefrac" name="sitimefrac" operation="average" unit="1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file3" name_suffix="_lim_grid_U_2D" output_freq="1d">
+
+     <field enabled="False" field_ref="uice_mv" freq_op="1ts" grid_ref="grid_U_2D" id="id_1d_siu" name="siu" operation="average" unit="m s-1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file4" name_suffix="_lim_grid_V_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="vice_mv" freq_op="1ts" grid_ref="grid_V_2D" id="id_1m_siv" name="siv" operation="average" unit="m s-1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file5" name_suffix="_lim_grid_T_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="saltflx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sfdsi" name="sfdsi" operation="average" unit="kg m-2 s-1">     this * $convSpsu                                                   </field>
+     <field enabled="False" field_ref="iceage" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siage" name="siage" operation="average" unit="s">                                                                        </field>
+     <field enabled="False" field_ref="icestr" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sicompstren" name="sicompstren" operation="average" unit="N m-1">                                                                        </field>
+     <field enabled="True" field_ref="iceconc_pct" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siconc" name="siconc" operation="average" unit="%">                                                                        </field>
+     <field enabled="False" field_ref="afxdyn" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidconcdyn" name="sidconcdyn" operation="average" unit="s-1">                                                                        </field>
+     <field enabled="False" field_ref="afxthd" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidconcth" name="sidconcth" operation="average" unit="s-1">                                                                        </field>
+     <field enabled="False" field_ref="idive" freq_op="1mo" grid_ref="grid_T_2D" id="id_1m_sidivvel" name="sidivvel" operation="instant" unit="s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmidyn" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmassdyn" name="sidmassdyn" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmisub" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmassevapsubl" name="sidmassevapsubl" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmibog" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmassgrowthbot" name="sidmassgrowthbot" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmiopw" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmassgrowthwat" name="sidmassgrowthwat" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmibom" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmassmeltbot" name="sidmassmeltbot" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmisum" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmassmelttop" name="sidmassmelttop" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmisni" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmasssi" name="sidmasssi" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmithd" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmassth" name="sidmassth" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="xmtrptot" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmasstranx" name="sidmasstranx" operation="average" unit="kg s-1">                                                                        </field>
+     <field enabled="False" field_ref="ymtrptot" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sidmasstrany" name="sidmasstrany" operation="average" unit="kg s-1">                                                                        </field>
+     <field enabled="False" field_ref="icefb" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sifb" name="sifb" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="hfxconbo" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siflcondbot" name="siflcondbot" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="hfxconsu" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siflcondtop" name="siflcondtop" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="wfxtot" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siflfwbot" name="siflfwbot" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="wfxsum" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siflfwdrain" name="siflfwdrain" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="hfxsenso" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siflsensupbot" name="siflsensupbot" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="qsr_ice" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siflswdtop" name="siflswdtop" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="corstrx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siforcecoriolx" name="siforcecoriolx" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="corstry" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siforcecorioly" name="siforcecorioly" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="intstrx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siforceintstrx" name="siforceintstrx" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="intstry" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siforceintstry" name="siforceintstry" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="dssh_dx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siforcetiltx" name="siforcetiltx" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="dssh_dy" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_siforcetilty" name="siforcetilty" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="icehcneg" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sihc" name="sihc" operation="average" unit="J m-2">                                                                        </field>
+     <field enabled="True" field_ref="icemass" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_simass" name="simass" operation="average" unit="kg m-2">                                                                        </field>
+     <field enabled="False" field_ref="icesal" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sisali" name="sisali" operation="average" unit="0.001">                                                                        </field>
+     <field enabled="False" field_ref="icesmass" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sisaltmass" name="sisaltmass" operation="average" unit="kg m-2">                                                                        </field>
+     <field enabled="False" field_ref="ishear" freq_op="1mo" grid_ref="grid_T_2D" id="id_1m_sishevel" name="sishevel" operation="instant" unit="s-1">                                                                        </field>
+     <field enabled="False" field_ref="isnhcneg" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sisnhc" name="sisnhc" operation="average" unit="J m-2">                                                                        </field>
+     <field enabled="True" field_ref="snomass" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sisnmass" name="sisnmass" operation="average" unit="kg m-2">                                                                        </field>
+     <field enabled="False" field_ref="snothic" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sisnthick" name="sisnthick" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="icevel_mv" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sispeed" name="sispeed" operation="average" unit="m s-1">                                                                        </field>
+     <field enabled="False" field_ref="sheastr" freq_op="1mo" grid_ref="grid_T_2D" id="id_1m_sistremax" name="sistremax" operation="instant" unit="N m-1">                                                                        </field>
+     <field enabled="False" field_ref="normstr" freq_op="1mo" grid_ref="grid_T_2D" id="id_1m_sistresave" name="sistresave" operation="instant" unit="N m-1">                                                                        </field>
+     <field enabled="False" field_ref="utau_ice" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sistrxdtop" name="sistrxdtop" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="utau_oi" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sistrxubot" name="sistrxubot" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="vtau_ice" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sistrydtop" name="sistrydtop" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="vtau_oi" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sistryubot" name="sistryubot" operation="average" unit="N m-2">                                                                        </field>
+     <field enabled="False" field_ref="icebotK" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sitempbot" name="sitempbot" operation="average" unit="K">                                                                        </field>
+     <field enabled="False" field_ref="icesntK" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sitempsnic" name="sitempsnic" operation="average" unit="K">                                                                        </field>
+     <field enabled="False" field_ref="icestK" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sitemptop" name="sitemptop" operation="average" unit="K">                                                                        </field>
+     <field enabled="False" field_ref="icethic" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sithick" name="sithick" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="icepres" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sitimefrac" name="sitimefrac" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="icevolu" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sivol" name="sivol" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="dmsdyn" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sndmassdyn" name="sndmassdyn" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmsmel" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sndmassmelt" name="sndmassmelt" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmsssi" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sndmasssi" name="sndmasssi" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmsspr" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sndmasssnf" name="sndmasssnf" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="dmssub" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sndmasssubl" name="sndmasssubl" operation="average" unit="kg m-2 s-1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file6" name_suffix="_lim_grid_U_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="uice_mv" freq_op="1ts" grid_ref="grid_U_2D" id="id_1m_siu" name="siu" operation="average" unit="m s-1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file7" name_suffix="_lim_grid_1point" output_freq="1mo">
+
+     <field enabled="False" field_ref="NH_sc_icearea" freq_op="1ts" grid_ref="grid_1point" id="id_1m_siarean" name="siarean" operation="average" unit="1e6 km2">                                                                        </field>
+     <field enabled="False" field_ref="SH_sc_icearea" freq_op="1ts" grid_ref="grid_1point" id="id_1m_siareas" name="siareas" operation="average" unit="1e6 km2">                                                                        </field>
+     <field enabled="False" field_ref="NH_sc_iceextt" freq_op="1ts" grid_ref="grid_1point" id="id_1m_siextentn" name="siextentn" operation="average" unit="1e6 km2">                                                                        </field>
+     <field enabled="False" field_ref="SH_sc_iceextt" freq_op="1ts" grid_ref="grid_1point" id="id_1m_siextents" name="siextents" operation="average" unit="1e6 km2">                                                                        </field>
+     <field enabled="False" field_ref="NH_sc_icevolu" freq_op="1ts" grid_ref="grid_1point" id="id_1m_sivoln" name="sivoln" operation="average" unit="1e3 km3">                                                                        </field>
+     <field enabled="False" field_ref="SH_sc_icevolu" freq_op="1ts" grid_ref="grid_1point" id="id_1m_sivols" name="sivols" operation="average" unit="1e3 km3">                                                                        </field>
+
+    </file>
+
+
+    <file id="file8" name_suffix="_lim_grid_T_3D_ncatice" output_freq="1mo">
+
+     <field enabled="False" field_ref="iceconc_cat_pct_mv" freq_op="1ts" grid_ref="grid_T_3D_ncatice" id="id_1m_siitdconc" name="siitdconc" operation="average" unit="%">                                                                        </field>
+     <field enabled="False" field_ref="snowthic_cat_mv" freq_op="1ts" grid_ref="grid_T_3D_ncatice" id="id_1m_siitdsnthick" name="siitdsnthick" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="icethic_cat_mv" freq_op="1ts" grid_ref="grid_T_3D_ncatice" id="id_1m_siitdthick" name="siitdthick" operation="average" unit="m">                                                                        </field>
+
+    </file>
+
+
+    <file id="file9" name_suffix="_lim_grid_transect_lim" output_freq="1mo">
+
+     <field enabled="False" field_ref="transport_siarea_transect" freq_op="1ts" grid_ref="grid_transect_lim" id="id_1m_siareaacrossline" name="siareaacrossline" operation="average" unit="m2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="transport_simasse_transect" freq_op="1ts" grid_ref="grid_transect_lim" id="id_1m_simassacrossline" name="simassacrossline" operation="average" unit="kg s-1">                                                                        </field>
+     <field enabled="False" field_ref="transport_snmasse_transect" freq_op="1ts" grid_ref="grid_transect_lim" id="id_1m_snmassacrossline" name="snmassacrossline" operation="average" unit="kg s-1">                                                                        </field>
+
+    </file>
+
+
+    </file_group>
+
+
+  </file_definition>

+ 273 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/file_def_nemo-opa.xml

@@ -0,0 +1,273 @@
+<file_definition min_digits="4" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" type="one_file">
+
+
+   <file_group id="id_file_group_opa">
+
+
+    <file id="file10" name_suffix="_opa_grid_T_3D" output_freq="1y">
+
+     <field enabled="False" field_ref="CFC11_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_cfc11" name="cfc11" operation="average" unit="mol m-3">    @CFC11_E3T / @e3t                                                   </field>
+     <field enabled="True" field_ref="CFC12_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_cfc12" name="cfc12" operation="average" unit="mol m-3">    @CFC12_E3T / @e3t                                                   </field>
+     <field enabled="False" field_ref="ttrd_zdfp_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_ocontempdiff" name="ocontempdiff" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="ttrd_eivad_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_ocontemppadvect" name="ocontemppadvect" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="ttrd_iso_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_ocontemppmdiff" name="ocontemppmdiff" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="ttrd_totad_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_ocontemprmadvect" name="ocontemprmadvect" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="ttrd_tot_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_ocontemptend" name="ocontemptend" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="strd_zdfp_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_osaltdiff" name="osaltdiff" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="strd_eivad_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_osaltpadvect" name="osaltpadvect" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="strd_iso_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_osaltpmdiff" name="osaltpmdiff" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="strd_totad_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_osaltrmadvect" name="osaltrmadvect" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="strd_tot_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_osalttend" name="osalttend" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="SF6_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_sf6" name="sf6" operation="average" unit="mol m-3">    @SF6_E3T / @e3t                                                     </field>
+     <field enabled="False" field_ref="masscello" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_masscello" name="masscello" operation="once" unit="kg m-2">                                                                        </field>
+     <field enabled="False" field_ref="e3t" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_thkcello" name="thkcello" operation="once" unit="m">                                                                        </field>
+
+    </file>
+
+
+    <file id="file11" name_suffix="_opa_grid_T_2D" output_freq="1y">
+
+     <field enabled="False" field_ref="somint" freq_op="1ts" grid_ref="grid_T_2D" id="id_1y_somint" name="somint" operation="average" unit="g m-2">     this * $convSpsu                                                   </field>
+     <field enabled="False" field_ref="tnpeo" freq_op="1ts" grid_ref="grid_T_2D" id="id_1y_tnpeo" name="tnpeo" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="True" field_ref="areacello" freq_op="1y" grid_ref="grid_T_2D" id="id_1y_areacello" name="areacello" operation="once" unit="m2">                                                                        </field>
+     <field enabled="True" field_ref="basins" freq_op="1y" grid_ref="grid_T_2D" id="id_1y_basin" name="basin" operation="once" unit="1">                                                                        </field>
+     <field enabled="True" field_ref="hfgeou" freq_op="1y" grid_ref="grid_T_2D" id="id_1y_hfgeou" name="hfgeou" operation="once" unit="W m-2">                                                                        </field>
+     <field enabled="True" field_ref="iceconc_pct" freq_op="1y" grid_ref="grid_T_2D" id="id_1y_sftof" name="sftof" operation="once" unit="%">     100 - this                                                         </field>
+
+    </file>
+
+
+    <file id="file12" name_suffix="_opa_grid_W_3D" output_freq="1y">
+
+     <field enabled="False" field_ref="avt_e3w" freq_op="1y" grid_ref="grid_W_3D" id="id_1y_difvho" name="difvho" operation="average" unit="m2 s-1">    @avt_e3w / @e3w                                                     </field>
+     <field enabled="False" field_ref="avs_e3w" freq_op="1y" grid_ref="grid_W_3D" id="id_1y_difvso" name="difvso" operation="average" unit="m2 s-1">    @avs_e3w / @e3w                                                     </field>
+
+    </file>
+
+
+    <file id="file13" name_suffix="_opa_grid_T_2D" output_freq="3h">
+
+     <field enabled="False" field_ref="sst_pot" freq_op="3h" grid_ref="grid_T_2D" id="id_3h_tos" name="tos" operation="instant" unit="degC">                                                                        </field>
+
+    </file>
+
+
+    <file id="file14" name_suffix="_opa_grid_T_2D" output_freq="1d">
+
+     <field enabled="False" field_ref="mldkz5" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_omldamax" name="omldamax" operation="maximum" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="sss" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_sos" name="sos" operation="average" unit="0.001">     this * $convSpsu                                                   </field>
+     <field enabled="False" field_ref="sss2" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_sossq" name="sossq" operation="average" unit="1e-06">     this * $convSpsu * $convSpsu                                       </field>
+     <field enabled="False" field_ref="sst_pot" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_tos" name="tos" operation="average" unit="degC">                                                                        </field>
+     <field enabled="False" field_ref="sst_pot2" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_tossq" name="tossq" operation="average" unit="degC2">                                                                        </field>
+     <field enabled="False" field_ref="mldr10_3" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_mlotst" name="mlotst" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="20d" freq_op="1ts" grid_ref="grid_T_2D" id="id_1d_t20d" name="t20d" operation="average" unit="m">                                                                        </field>
+
+    </file>
+
+
+    <file id="file15" name_suffix="_opa_grid_T_3D" output_freq="1mo">
+
+     <field enabled="True" field_ref="Age_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_agessc" name="agessc" operation="average" unit="yr">    @Age_E3T / @e3t                                                     </field>
+     <field enabled="True" field_ref="toce" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_bigthetao" name="bigthetao" operation="average" unit="degC">    @toce_e3t / @e3t                                                    </field>
+     <field enabled="False" field_ref="CFC11_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_cfc11" name="cfc11" operation="average" unit="mol m-3">    @CFC11_E3T / @e3t                                                   </field>
+     <field enabled="False" field_ref="CFC12_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_cfc12" name="cfc12" operation="average" unit="mol m-3">    @CFC12_E3T / @e3t                                                   </field>
+     <field enabled="True" field_ref="masscello" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_masscello" name="masscello" operation="average" unit="kg m-2">                                                                        </field>
+     <field enabled="True" field_ref="bn2_e3t" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_obvfsq" name="obvfsq" operation="average" unit="s-2">    @bn2_e3t / @e3t                                                     </field>
+     <field enabled="False" field_ref="qsr3d_e3t_SBC" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_rsdo" name="rsdo" operation="average" unit="W m-2">    @qsr3d_e3t_SBC / @e3t_SBC                                           </field>
+     <field enabled="False" field_ref="SF6_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_sf6" name="sf6" operation="average" unit="mol m-3">    @SF6_E3T / @e3t                                                     </field>
+     <field enabled="True" field_ref="soce_e3t" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_so" name="so" operation="average" unit="0.001">    @soce_e3t / @e3t * $convSpsu                                        </field>
+     <field enabled="True" field_ref="toce_pot" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_thetao" name="thetao" operation="average" unit="degC">    @toce_pot_e3t / @e3t                                                </field>
+     <field enabled="False" field_ref="e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_thkcello" name="thkcello" operation="average" unit="m">                                                                        </field>
+     <field enabled="True" field_ref="tpt_dep" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_zhalfo" name="zhalfo" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="ttrd_zdfp_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_ocontempdiff" name="ocontempdiff" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="ttrd_eivad_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_ocontemppadvect" name="ocontemppadvect" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="ttrd_iso_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_ocontemppmdiff" name="ocontemppmdiff" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="ttrd_totad_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_ocontemprmadvect" name="ocontemprmadvect" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="ttrd_tot_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_ocontemptend" name="ocontemptend" operation="average" unit="W m-2">     this * $cpocean * $rau0                                            </field>
+     <field enabled="False" field_ref="strd_zdfp_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_osaltdiff" name="osaltdiff" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="strd_eivad_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_osaltpadvect" name="osaltpadvect" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="strd_iso_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_osaltpmdiff" name="osaltpmdiff" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="strd_totad_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_osaltrmadvect" name="osaltrmadvect" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+     <field enabled="False" field_ref="strd_tot_e3t" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_osalttend" name="osalttend" operation="average" unit="kg m-2 s-1">     this * $rau0                                                       </field>
+
+    </file>
+
+
+    <file id="file16" name_suffix="_opa_zoom_700_sum" output_freq="1mo">
+
+     <field enabled="False" field_ref="toce_pot_vmean700" freq_op="1ts" grid_ref="zoom_700_sum" id="id_1m_thetaot700" name="thetaot700" operation="average" unit="degC">                                                                        </field>
+
+    </file>
+
+
+    <file id="file17" name_suffix="_opa_grid_V_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="vadv_heattr" freq_op="1ts" grid_ref="grid_V_2D" id="id_1m_hfy" name="hfy" operation="average" unit="W">     this + vdiff_heattr                                                </field>
+     <field enabled="True" field_ref="vtau" freq_op="1ts" grid_ref="grid_V_2D" id="id_1m_tauvo" name="tauvo" operation="average" unit="N m-2">                                                                        </field>
+
+    </file>
+
+
+    <file id="file18" name_suffix="_opa_grid_V_3D" output_freq="1mo">
+
+     <field enabled="True" field_ref="vocetr_eff" freq_op="1ts" grid_ref="grid_V_3D" id="id_1m_vmo" name="vmo" operation="average" unit="kg s-1">     this * $rau0                                                       </field>
+     <field enabled="True" field_ref="voce_e3v" freq_op="1mo" grid_ref="grid_V_3D" id="id_1m_vo" name="vo" operation="average" unit="m s-1">    @voce_e3v / @e3v                                                    </field>
+
+    </file>
+
+
+    <file id="file19" name_suffix="_opa_grid_T_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="evap_ao_cea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_evs" name="evs" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="qtr_CFC11" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fgcfc11" name="fgcfc11" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="qtr_CFC12" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fgcfc12" name="fgcfc12" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="qtr_SF6" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fgsf6" name="fgsf6" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="iceberg_cea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_ficeberg2d" name="ficeberg2d" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="runoffs" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_friver" name="friver" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="True" field_ref="fmmflx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fsitherm" name="fsitherm" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="True" field_ref="qrp" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfcorr" name="hfcorr" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="True" field_ref="qt" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfds" name="hfds" operation="average" unit="W m-2">     qt - qrp                                                           </field>
+     <field enabled="False" field_ref="hflx_evap_cea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfevapds" name="hfevapds" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="hfgeou" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfgeou" name="hfgeou" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="hflx_icb_cea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfibthermds2d" name="hfibthermds2d" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="qla_oce" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hflso" name="hflso" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="hflx_rain_cea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfrainds" name="hfrainds" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="hflx_rnf_cea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfrunoffds2d" name="hfrunoffds2d" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="hflx_snow_ao_cea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfsnthermds2d" name="hfsnthermds2d" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="qsb_oce" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_hfsso" name="hfsso" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="True" field_ref="mldr10_3" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_mlotst" name="mlotst" operation="average" unit="m">                                                                        </field>
+     <field enabled="True" field_ref="mldr10_3max" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_mlotstmax" name="mlotstmax" operation="maximum" unit="m">                                                                        </field>
+     <field enabled="True" field_ref="mldr10_3min" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_mlotstmin" name="mlotstmin" operation="minimum" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="mldr10_3" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_mlotstsq" name="mlotstsq" operation="average" unit="m2">     this * this                                                        </field>
+     <field enabled="True" field_ref="botpres" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_pbo" name="pbo" operation="average" unit="Pa">     this * 1e4                                                         </field>
+     <field enabled="True" field_ref="botpres" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_pso" name="pso" operation="average" unit="Pa">                                                                        </field>
+     <field enabled="False" field_ref="qlw_oce" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_rlntds" name="rlntds" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="qsr" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_rsntds" name="rsntds" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="True" field_ref="saltflx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sfdsi_2" name="sfdsi" operation="average" unit="kg m-2 s-1">     this * $convSpsu                                                   </field>
+     <field enabled="True" field_ref="sbs_e3tb" freq_op="1mo" grid_ref="grid_T_2D" id="id_1m_sob" name="sob" operation="average" unit="0.001">    @sbs_e3tb / @e3tb * $convSpsu                                       </field>
+     <field enabled="True" field_ref="sss" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sos" name="sos" operation="average" unit="0.001">     this * $convSpsu                                                   </field>
+     <field enabled="False" field_ref="sss2" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_sossq" name="sossq" operation="average" unit="1e-06">     this * $convSpsu * $convSpsu                                       </field>
+     <field enabled="True" field_ref="toce_potb_e3tb" freq_op="1mo" grid_ref="grid_T_2D" id="id_1m_tob" name="tob" operation="average" unit="degC">    @toce_potb_e3tb / @e3tb                                             </field>
+     <field enabled="True" field_ref="sst_pot" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_tos" name="tos" operation="average" unit="degC">                                                                        </field>
+     <field enabled="False" field_ref="sst_pot2" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_tossq" name="tossq" operation="average" unit="degC2">                                                                        </field>
+     <field enabled="True" field_ref="erp" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_wfcorr" name="wfcorr" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="True" field_ref="empmr" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_wfo" name="wfo" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="True" field_ref="empmr" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_wfonocorr" name="wfonocorr" operation="average" unit="kg m-2 s-1">     empmr - erp                                                        </field>
+     <field enabled="True" field_ref="sshdyn" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_zos" name="zos" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="sshdyn2" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_zossq" name="zossq" operation="average" unit="m2">                                                                        </field>
+     <field enabled="False" field_ref="iceshelf_cea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_flandice" name="flandice" operation="average" unit="kg m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="somint" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_somint" name="somint" operation="average" unit="g m-2">     this * $convSpsu                                                   </field>
+     <field enabled="False" field_ref="20d" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_t20d" name="t20d" operation="average" unit="m">                                                                        </field>
+     <field enabled="False" field_ref="dispkevfo" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_dispkevfo" name="dispkevfo" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="dispkexyfo" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_dispkexyfo2d" name="dispkexyfo2d" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="eketrd_eiv" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_tnkebto2d" name="tnkebto2d" operation="average" unit="W m-2">                                                                        </field>
+     <field enabled="False" field_ref="tnpeo" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_tnpeo" name="tnpeo" operation="average" unit="W m-2">                                                                        </field>
+
+    </file>
+
+
+    <file id="file20" name_suffix="_opa_grid_U_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="uadv_heattr" freq_op="1ts" grid_ref="grid_U_2D" id="id_1m_hfx" name="hfx" operation="average" unit="W">     this + udiff_heattr                                                </field>
+     <field enabled="True" field_ref="uoce_e3u_vsum_e2u_cumul" grid_ref="grid_U_2D" id="id_1m_msftbarot" name="msftbarot" operation="average" unit="kg s-1">     this * $rau0                                                       </field>
+     <field enabled="True" field_ref="utau" freq_op="1ts" grid_ref="grid_U_2D" id="id_1m_tauuo" name="tauuo" operation="average" unit="N m-2">                                                                        </field>
+
+    </file>
+
+
+    <file id="file21" name_suffix="_opa_zoom_300_sum" output_freq="1mo">
+
+     <field enabled="False" field_ref="toce_pot_vmean300" freq_op="1ts" grid_ref="zoom_300_sum" id="id_1m_thetaot300" name="thetaot300" operation="average" unit="degC">                                                                        </field>
+
+    </file>
+
+
+    <file id="file22" name_suffix="_opa_grid_transect" output_freq="1mo">
+
+     <field enabled="False" field_ref="transport_masse_transect" freq_op="1ts" grid_ref="grid_transect" id="id_1m_mfo" name="mfo" operation="average" unit="kg s-1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file23" name_suffix="_opa_grid_W_3D" output_freq="1mo">
+
+     <field enabled="True" field_ref="wocetr_eff" freq_op="1ts" grid_ref="grid_W_3D" id="id_1m_wmo" name="wmo" operation="average" unit="kg s-1">     this * $rau0                                                       </field>
+     <field enabled="True" field_ref="woce" freq_op="1mo" grid_ref="grid_W_3D" id="id_1m_wo" name="wo" operation="average" unit="m s-1">    @woce_e3w / @e3w                                                    </field>
+     <field enabled="False" field_ref="avt_e3w" freq_op="1mo" grid_ref="grid_W_3D" id="id_1m_difvho" name="difvho" operation="average" unit="m2 s-1">    @avt_e3w / @e3w                                                     </field>
+     <field enabled="False" field_ref="avm_e3w" freq_op="1mo" grid_ref="grid_W_3D" id="id_1m_difvmo" name="difvmo" operation="average" unit="m2 s-1">    @avm_e3w / @e3w                                                     </field>
+     <field enabled="False" field_ref="av_wave_e3w" freq_op="1mo" grid_ref="grid_W_3D" id="id_1m_difvmto" name="difvmto" operation="average" unit="m2 s-1">    @av_wave_e3w / @e3w                                                 </field>
+     <field enabled="False" field_ref="avs_e3w" freq_op="1mo" grid_ref="grid_W_3D" id="id_1m_difvso" name="difvso" operation="average" unit="m2 s-1">    @avs_e3w / @e3w                                                     </field>
+     <field enabled="False" field_ref="av_wave_e3w" freq_op="1mo" grid_ref="grid_W_3D" id="id_1m_difvtrto" name="difvtrto" operation="average" unit="m2 s-1">    @av_wave_e3w / @e3w                                                 </field>
+
+    </file>
+
+
+    <file id="file24" name_suffix="_opa_grid_W_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="aht2d_eiv" freq_op="1ts" grid_ref="grid_W_2D" id="id_1m_diftrblo2d" name="diftrblo2d" operation="average" unit="m2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="aht2d_eiv" freq_op="1ts" grid_ref="grid_W_2D" id="id_1m_diftrelo2d" name="diftrelo2d" operation="average" unit="m2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="aht2d" freq_op="1ts" grid_ref="grid_W_2D" id="id_1m_diftrxylo2d" name="diftrxylo2d" operation="average" unit="m2 s-1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file25" name_suffix="_opa_grid_U_3D" output_freq="1mo">
+
+     <field enabled="True" field_ref="uocetr_eff" freq_op="1ts" grid_ref="grid_U_3D" id="id_1m_umo" name="umo" operation="average" unit="kg s-1">     this * $rau0                                                       </field>
+     <field enabled="True" field_ref="uoce_e3u" freq_op="1mo" grid_ref="grid_U_3D" id="id_1m_uo" name="uo" operation="average" unit="m s-1">    @uoce_e3u / @e3u                                                    </field>
+
+    </file>
+
+
+    <file id="file26" name_suffix="_opa_vert_sum" output_freq="1mo">
+
+     <field enabled="False" field_ref="toce_pot_vmean" freq_op="1ts" grid_ref="vert_sum" id="id_1m_thetaot" name="thetaot" operation="average" unit="degC">                                                                        </field>
+
+    </file>
+
+
+    <file id="file27" name_suffix="_opa_grid_1point" output_freq="1mo">
+
+     <field enabled="True" field_ref="sctemtot" freq_op="1ts" grid_ref="grid_1point" id="id_1m_bigthetaoga" name="bigthetaoga" operation="average" unit="degC">                                                                        </field>
+     <field enabled="True" field_ref="scmastot" freq_op="1ts" grid_ref="grid_1point" id="id_1m_masso" name="masso" operation="average" unit="kg">                                                                        </field>
+     <field enabled="True" field_ref="scsaltot" freq_op="1ts" grid_ref="grid_1point" id="id_1m_soga" name="soga" operation="average" unit="0.001">     this * $convSpsu                                                   </field>
+     <field enabled="True" field_ref="scssstot" freq_op="1ts" grid_ref="grid_1point" id="id_1m_sosga" name="sosga" operation="average" unit="0.001">     this * $convSpsu                                                   </field>
+     <field enabled="True" field_ref="sctemtotpot" freq_op="1ts" grid_ref="grid_1point" id="id_1m_thetaoga" name="thetaoga" operation="average" unit="degC">                                                                        </field>
+     <field enabled="True" field_ref="scssttot" freq_op="1ts" grid_ref="grid_1point" id="id_1m_tosga" name="tosga" operation="average" unit="degC">                                                                        </field>
+     <field enabled="True" field_ref="scvoltot" freq_op="1ts" grid_ref="grid_1point" id="id_1m_volo" name="volo" operation="average" unit="m3">                                                                        </field>
+     <field enabled="True" field_ref="scsshtst" freq_op="1ts" grid_ref="grid_1point" id="id_1m_zostoga" name="zostoga" operation="average" unit="m">                                                                        </field>
+
+    </file>
+
+
+    <file id="file28" name_suffix="_opa_grid_ptr_T_3basin_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="sopst_vs_3bsn" freq_op="1ts" grid_ref="grid_ptr_T_3basin_2D" id="id_1m_sltbasin" name="sltbasin" operation="average" unit="kg s-1">     this * 1e6 * $convSpsu                                             </field>
+     <field enabled="True" field_ref="sopht_vt_3bsn" freq_op="1ts" grid_ref="grid_ptr_T_3basin_2D" id="id_1m_hfbasin" name="hfbasin" operation="average" unit="W">     this * 1e15                                                        </field>
+     <field enabled="True" field_ref="sophteiv_3bsn" freq_op="1ts" grid_ref="grid_ptr_T_3basin_2D" id="id_1m_hfbasinpmadv" name="hfbasinpmadv" operation="average" unit="W">     this * 1e15                                                        </field>
+     <field enabled="False" field_ref="sophtove_3bsn" freq_op="1ts" grid_ref="grid_ptr_T_3basin_2D" id="id_1m_htovgyre" name="htovgyre" operation="average" unit="W">     sopht_vt_3bsn * 1e15 - this * 1e15                                 </field>
+     <field enabled="False" field_ref="sophtove_3bsn" freq_op="1ts" grid_ref="grid_ptr_T_3basin_2D" id="id_1m_htovovrt" name="htovovrt" operation="average" unit="W">     this * 1e15                                                        </field>
+     <field enabled="False" field_ref="sopstove_3bsn" freq_op="1ts" grid_ref="grid_ptr_T_3basin_2D" id="id_1m_sltovgyre" name="sltovgyre" operation="average" unit="kg s-1">     sopst_vs_3bsn*1e6*$convSpsu   - this*1e6*$convSpsu                 </field>
+     <field enabled="False" field_ref="sopstove_3bsn" freq_op="1ts" grid_ref="grid_ptr_T_3basin_2D" id="id_1m_sltovovrt" name="sltovovrt" operation="average" unit="kg s-1">     this * 1e6 * $convSpsu                                             </field>
+
+    </file>
+
+
+    <file id="file29" name_suffix="_opa_zoom_2000_sum" output_freq="1mo">
+
+     <field enabled="False" field_ref="toce_pot_vmean2000" freq_op="1ts" grid_ref="zoom_2000_sum" id="id_1m_thetaot2000" name="thetaot2000" operation="average" unit="degC">                                                                        </field>
+
+    </file>
+
+
+    <file id="file30" name_suffix="_opa_grid_ptr_W_3basin_3D" output_freq="1mo">
+
+     <field enabled="True" field_ref="zomsf_3bsn" freq_op="1ts" grid_ref="grid_ptr_W_3basin_3D" id="id_1m_msftyz" name="msftyz" operation="average" unit="kg s-1">     this * 1e6 * $rau0                                                 </field>
+
+    </file>
+
+
+    </file_group>
+
+
+  </file_definition>

+ 202 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/file_def_nemo-pisces.xml

@@ -0,0 +1,202 @@
+<file_definition min_digits="4" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" type="one_file">
+
+
+   <file_group id="id_file_group_pisces">
+
+
+    <file id="file31" name_suffix="_pisces_grid_T_3D" output_freq="1y">
+
+     <field enabled="False" field_ref="BFe_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_bfe" name="bfe" operation="average" unit="mol m-3">    @BFe_E3T / @e3t * 1e-3 + @SFe_E3T / @e3t * 1e-3                     </field>
+     <field enabled="False" field_ref="GSi_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_bsi" name="bsi" operation="average" unit="mol m-3">    @GSi_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="CaCO3_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_calc" name="calc" operation="average" unit="mol m-3">    @CaCO3_E3T / @e3t * 1e-3                                            </field>
+     <field enabled="True" field_ref="NCHL_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_chl" name="chl" operation="average" unit="kg m-3">    @NCHL_E3T / @e3t * 1e-3 + @DCHL_E3T / @e3t * 1e-3                   </field>
+     <field enabled="False" field_ref="DCHL_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_chldiat" name="chldiat" operation="average" unit="kg m-3">    @DCHL_E3T / @e3t * 1e-3                                             </field>
+     <field enabled="False" field_ref="NCHL_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_chlmisc" name="chlmisc" operation="average" unit="kg m-3">    @NCHL_E3T / @e3t * 1e-3                                             </field>
+     <field enabled="False" field_ref="CO3" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_co3" name="co3" operation="average" unit="mol m-3">                                                                        </field>
+     <field enabled="False" field_ref="CO3sat" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_co3satcalc" name="co3satcalc" operation="average" unit="mol m-3">                                                                        </field>
+     <field enabled="False" field_ref="DCAL" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_dcalc" name="dcalc" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="False" field_ref="POC_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_detoc" name="detoc" operation="average" unit="mol m-3">    @POC_E3T / @e3t * 1e-3 + @GOC_E3T / @e3t * 1e-3                     </field>
+     <field enabled="True" field_ref="Fer_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_dfe" name="dfe" operation="average" unit="mol m-3">    @Fer_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="True" field_ref="DIC_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_dissic" name="dissic" operation="average" unit="mol m-3">    @DIC_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="True" field_ref="DIC_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_dissicnat" name="dissicnat" operation="average" unit="mol m-3">    @DIC_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="DOC_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_dissoc" name="dissoc" operation="average" unit="mol m-3">    @DOC_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="EXPC" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_expc" name="expc" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPCAL" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_expcalc" name="expcalc" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPFE" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_expfe" name="expfe" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPC" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_expn" name="expn" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPC" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_expp" name="expp" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPSI" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_expsi" name="expsi" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="GRAZ1" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_graz" name="graz" operation="average" unit="mol m-3 s-1">     this + GRAZ2                                                       </field>
+     <field enabled="False" field_ref="NH4_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_nh4" name="nh4" operation="average" unit="mol m-3">    @NH4_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="True" field_ref="NO3_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_no3" name="no3" operation="average" unit="mol m-3">    @NO3_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="True" field_ref="O2_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_o2" name="o2" operation="average" unit="mol m-3">    @O2_E3T / @e3t * 1e-3                                               </field>
+     <field enabled="False" field_ref="PFeN" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_pbfe" name="pbfe" operation="average" unit="mol m-3 s-1">     this + PFeD                                                        </field>
+     <field enabled="False" field_ref="PBSi" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_pbsi" name="pbsi" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="False" field_ref="PCAL" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_pcalc" name="pcalc" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="True" field_ref="PH" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_ph" name="ph" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="PHY_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_phyc" name="phyc" operation="average" unit="mol m-3">    @PHY_E3T / @e3t * 1e-3 + @PHY2_E3T / @e3t * 1e-3                    </field>
+     <field enabled="False" field_ref="PHY2_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_phydiat" name="phydiat" operation="average" unit="mol m-3">    @PHY2_E3T / @e3t * 1e-3                                             </field>
+     <field enabled="False" field_ref="NFe_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_phyfe" name="phyfe" operation="average" unit="mol m-3">    @NFe_E3T / @e3t * 1e-3 + @DFe_E3T / @e3t * 1e-3                     </field>
+     <field enabled="False" field_ref="PHY_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_phymisc" name="phymisc" operation="average" unit="mol m-3">    @PHY_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="DSi_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_physi" name="physi" operation="average" unit="mol m-3">    @DSi_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="TPNEW" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_pnitrate" name="pnitrate" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="True" field_ref="PO4_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_po4" name="po4" operation="average" unit="mol m-3">    @PO4_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="TPP" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_pp" name="pp" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="False" field_ref="PPPHY2" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_ppdiat" name="ppdiat" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="False" field_ref="PPPHY" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_ppmisc" name="ppmisc" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="False" field_ref="REMIN" freq_op="1ts" grid_ref="grid_T_3D" id="id_1y_remoc" name="remoc" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="True" field_ref="Si_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_si" name="si" operation="average" unit="mol m-3">    @Si_E3T / @e3t * 1e-3                                               </field>
+     <field enabled="True" field_ref="Alkalini_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_talk" name="talk" operation="average" unit="mol m-3">    @Alkalini_E3T / @e3t * 1e-3                                         </field>
+     <field enabled="True" field_ref="Alkalini_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_talknat" name="talknat" operation="average" unit="mol m-3">    @Alkalini_E3T / @e3t * 1e-3                                         </field>
+     <field enabled="False" field_ref="ZOO2_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_zmeso" name="zmeso" operation="average" unit="mol m-3">    @ZOO2_E3T / @e3t * 1e-3                                             </field>
+     <field enabled="False" field_ref="ZOO_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_zmicro" name="zmicro" operation="average" unit="mol m-3">    @ZOO_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="ZOO_E3T" freq_op="1y" grid_ref="grid_T_3D" id="id_1y_zooc" name="zooc" operation="average" unit="mol m-3">    @ZOO_E3T / @e3t * 1e-3 + @ZOO2_E3T / @e3t * 1e-3                    </field>
+
+    </file>
+
+
+    <file id="file32" name_suffix="_pisces_grid_T_2D" output_freq="1y">
+
+     <field enabled="True" field_ref="Cflx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1y_fgco2" name="fgco2" operation="average" unit="kg m-2 s-1">     this * 12 * 1e-3                                                   </field>
+
+    </file>
+
+
+    <file id="file33" name_suffix="_pisces_grid_T_SFC" output_freq="1d">
+
+     <field enabled="False" field_ref="NCHLSFC_E3T" freq_op="1d" grid_ref="grid_T_SFC" id="id_1d_chlos" name="chlos" operation="average" unit="kg m-3">    @NCHLSFC_E3T / @E3TSFC * 1e-3 + @DCHLSFC_E3T / @E3TSFC * 1e-3       </field>
+     <field enabled="False" field_ref="PHYSFC_E3T" freq_op="1d" grid_ref="grid_T_SFC" id="id_1d_phycos" name="phycos" operation="average" unit="mol m-3">    @PHYSFC_E3T / @E3TSFC * 1e-3 + @PHY2SFC_E3T / @E3TSFC * 1e-3        </field>
+
+    </file>
+
+
+    <file id="file34" name_suffix="_pisces_grid_T_3D" output_freq="1mo">
+
+     <field enabled="False" field_ref="BFe_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_bfe" name="bfe" operation="average" unit="mol m-3">    @BFe_E3T / @e3t * 1e-3 + @SFe_E3T / @e3t * 1e-3                     </field>
+     <field enabled="False" field_ref="GSi_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_bsi" name="bsi" operation="average" unit="mol m-3">    @GSi_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="CaCO3_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_calc" name="calc" operation="average" unit="mol m-3">    @CaCO3_E3T / @e3t * 1e-3                                            </field>
+     <field enabled="True" field_ref="NCHL_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_chl" name="chl" operation="average" unit="kg m-3">    @NCHL_E3T / @e3t * 1e-3 + @DCHL_E3T / @e3t * 1e-3                   </field>
+     <field enabled="False" field_ref="DCHL_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_chldiat" name="chldiat" operation="average" unit="kg m-3">    @DCHL_E3T / @e3t * 1e-3                                             </field>
+     <field enabled="False" field_ref="NCHL_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_chlmisc" name="chlmisc" operation="average" unit="kg m-3">    @NCHL_E3T / @e3t * 1e-3                                             </field>
+     <field enabled="False" field_ref="CO3" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_co3" name="co3" operation="average" unit="mol m-3">                                                                        </field>
+     <field enabled="False" field_ref="CO3sat" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_co3satcalc" name="co3satcalc" operation="average" unit="mol m-3">                                                                        </field>
+     <field enabled="False" field_ref="POC_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_detoc" name="detoc" operation="average" unit="mol m-3">    @POC_E3T / @e3t * 1e-3 + @GOC_E3T / @e3t * 1e-3                     </field>
+     <field enabled="False" field_ref="Fer_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_dfe" name="dfe" operation="average" unit="mol m-3">    @Fer_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="DIC_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_dissic" name="dissic" operation="average" unit="mol m-3">    @DIC_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="DIC_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_dissicnat" name="dissicnat" operation="average" unit="mol m-3">    @DIC_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="DOC_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_dissoc" name="dissoc" operation="average" unit="mol m-3">    @DOC_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="EXPC" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_expc" name="expc" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="GRAZ1" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_graz" name="graz" operation="average" unit="mol m-3 s-1">     this + GRAZ2                                                       </field>
+     <field enabled="False" field_ref="DOC_E3T" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_intdoc" name="intdoc" operation="average" unit="kg m-2">                                                                        </field>
+     <field enabled="False" field_ref="NH4_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_nh4" name="nh4" operation="average" unit="mol m-3">    @NH4_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="NO3_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_no3" name="no3" operation="average" unit="mol m-3">    @NO3_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="True" field_ref="O2_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_o2" name="o2" operation="average" unit="mol m-3">    @O2_E3T / @e3t * 1e-3                                               </field>
+     <field enabled="False" field_ref="PH" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_ph" name="ph" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="PHY_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_phyc" name="phyc" operation="average" unit="mol m-3">    @PHY_E3T / @e3t * 1e-3 + @PHY2_E3T / @e3t * 1e-3                    </field>
+     <field enabled="False" field_ref="PHY2_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_phydiat" name="phydiat" operation="average" unit="mol m-3">    @PHY2_E3T / @e3t * 1e-3                                             </field>
+     <field enabled="False" field_ref="NFe_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_phyfe" name="phyfe" operation="average" unit="mol m-3">    @NFe_E3T / @e3t * 1e-3 + @DFe_E3T / @e3t * 1e-3                     </field>
+     <field enabled="False" field_ref="PHY_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_phymisc" name="phymisc" operation="average" unit="mol m-3">    @PHY_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="DSi_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_physi" name="physi" operation="average" unit="mol m-3">    @DSi_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="PO4_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_po4" name="po4" operation="average" unit="mol m-3">    @PO4_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="TPP" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_pp" name="pp" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="False" field_ref="Si_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_si" name="si" operation="average" unit="mol m-3">    @Si_E3T / @e3t * 1e-3                                               </field>
+     <field enabled="True" field_ref="Alkalini_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_talk" name="talk" operation="average" unit="mol m-3">    @Alkalini_E3T / @e3t * 1e-3                                         </field>
+     <field enabled="False" field_ref="Alkalini_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_talknat" name="talknat" operation="average" unit="mol m-3">    @Alkalini_E3T / @e3t * 1e-3                                         </field>
+     <field enabled="False" field_ref="ZOO2_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_zmeso" name="zmeso" operation="average" unit="mol m-3">    @ZOO2_E3T / @e3t * 1e-3                                             </field>
+     <field enabled="False" field_ref="ZOO_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_zmicro" name="zmicro" operation="average" unit="mol m-3">    @ZOO_E3T / @e3t * 1e-3                                              </field>
+     <field enabled="False" field_ref="ZOO_E3T" freq_op="1mo" grid_ref="grid_T_3D" id="id_1m_zooc" name="zooc" operation="average" unit="mol m-3">    @ZOO_E3T / @e3t * 1e-3 + @ZOO2_E3T / @e3t * 1e-3                    </field>
+     <field enabled="False" field_ref="EXPCAL" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_expcalc" name="expcalc" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPFE" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_expfe" name="expfe" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPC" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_expn" name="expn" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPC" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_expp" name="expp" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EXPSI" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_expsi" name="expsi" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="PPPHY2" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_ppdiat" name="ppdiat" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="False" field_ref="PPPHY" freq_op="1ts" grid_ref="grid_T_3D" id="id_1m_ppmisc" name="ppmisc" operation="average" unit="mol m-3 s-1">                                                                        </field>
+
+    </file>
+
+
+    <file id="file35" name_suffix="_pisces_grid_T_2D" output_freq="1mo">
+
+     <field enabled="False" field_ref="Dpco2" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_dpco2" name="dpco2" operation="average" unit="Pa">     this * 0.101325                                                    </field>
+     <field enabled="False" field_ref="Dpo2" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_dpo2" name="dpo2" operation="average" unit="Pa">     this * 0.101325                                                    </field>
+     <field enabled="True" field_ref="EPC100" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_epc100" name="epc100" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="True" field_ref="EPCAL100" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_epcalc100" name="epcalc100" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EPFE100" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_epfe100" name="epfe100" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="EPSI100" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_epsi100" name="epsi100" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTdtAlk" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fbddtalk" name="fbddtalk" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTdtDIC" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fbddtdic" name="fbddtdic" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTdtFer" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fbddtdife" name="fbddtdife" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTdtDIN" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fbddtdin" name="fbddtdin" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTdtDIP" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fbddtdip" name="fbddtdip" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTdtSil" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fbddtdisi" name="fbddtdisi" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="True" field_ref="Cflx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fgco2" name="fgco2" operation="average" unit="kg m-2 s-1">     this * 12 * 1e-3                                                   </field>
+     <field enabled="True" field_ref="Oflx" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fgo2" name="fgo2" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="SedCal" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fric" name="fric" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="Sdenit" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_frn" name="frn" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="SedC" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_froc" name="froc" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="IronSupply" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fsfe" name="fsfe" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="NitrSupply" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_fsn" name="fsn" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTDIC" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intdic" name="intdic" operation="average" unit="kg m-2">                                                                        </field>
+     <field enabled="False" field_ref="INTPBFE" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intpbfe" name="intpbfe" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTPBSI" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intpbsi" name="intpbsi" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTPCAL" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intpcalcite" name="intpcalcite" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTNFIX" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intpn2" name="intpn2" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="True" field_ref="INTPP" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intpp" name="intpp" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTPCAL" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intppcalc" name="intppcalc" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTPPPHY2" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intppdiat" name="intppdiat" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTPPPHY" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intppmisc" name="intppmisc" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="INTPNEW" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_intppnitrate" name="intppnitrate" operation="average" unit="mol m-2 s-1">                                                                        </field>
+     <field enabled="False" field_ref="O2MIN" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_o2min" name="o2min" operation="average" unit="mol m-3">                                                                        </field>
+     <field enabled="True" field_ref="pCO2sea" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_spco2" name="spco2" operation="average" unit="Pa">      this * 0.101325                                                   </field>
+     <field enabled="False" field_ref="ZO2MIN" freq_op="1ts" grid_ref="grid_T_2D" id="id_1m_zo2min" name="zo2min" operation="average" unit="m">                                                                        </field>
+
+    </file>
+
+
+    <file id="file36" name_suffix="_pisces_grid_T_SFC" output_freq="1mo">
+
+     <field enabled="False" field_ref="BFeSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_bfeos" name="bfeos" operation="average" unit="mol m-3">    @BFeSFC_E3T / @E3TSFC * 1e-3 + @SFeSFC_E3T / @E3TSFC * 1e-3         </field>
+     <field enabled="False" field_ref="GSiSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_bsios" name="bsios" operation="average" unit="mol m-3">    @GSiSFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="False" field_ref="CaCO3SFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_calcos" name="calcos" operation="average" unit="mol m-3">    @CaCO3SFC_E3T / @E3TSFC * 1e-3                                      </field>
+     <field enabled="False" field_ref="DCHLSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_chldiatos" name="chldiatos" operation="average" unit="kg m-3">    @DCHLSFC_E3T / @E3TSFC * 1e-3                                       </field>
+     <field enabled="False" field_ref="NCHLSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_chlmiscos" name="chlmiscos" operation="average" unit="kg m-3">    @NCHLSFC_E3T / @E3TSFC * 1e-3                                       </field>
+     <field enabled="True" field_ref="NCHLSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_chlos" name="chlos" operation="average" unit="kg m-3">    @NCHLSFC_E3T / @E3TSFC * 1e-3 + @DCHLSFC_E3T / @E3TSFC * 1e-3       </field>
+     <field enabled="False" field_ref="CO3SFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_co3os" name="co3os" operation="average" unit="mol m-3">                                                                        </field>
+     <field enabled="False" field_ref="CO3satSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_co3satcalcos" name="co3satcalcos" operation="average" unit="mol m-3">                                                                        </field>
+     <field enabled="False" field_ref="POCSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_detocos" name="detocos" operation="average" unit="mol m-3">    @POCSFC_E3T / @E3TSFC * 1e-3 + @GOCSFC_E3T / @E3TSFC * 1e-3         </field>
+     <field enabled="True" field_ref="FerSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_dfeos" name="dfeos" operation="average" unit="mol m-3">    @FerSFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="True" field_ref="DICSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_dissicnatos" name="dissicnatos" operation="average" unit="mol m-3">    @DICSFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="True" field_ref="DICSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_dissicos" name="dissicos" operation="average" unit="mol m-3">    @DICSFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="False" field_ref="DOCSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_dissocos" name="dissocos" operation="average" unit="mol m-3">    @DOCSFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="False" field_ref="LDFeSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_limfediat" name="limfediat" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="LNFeSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_limfemisc" name="limfemisc" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="LDlightSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_limirrdiat" name="limirrdiat" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="LNlightSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_limirrmisc" name="limirrmisc" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="LDnutSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_limndiaz" name="limndiaz" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="LNnutSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_limnmisc" name="limnmisc" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="NH4SFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_nh4os" name="nh4os" operation="average" unit="mol m-3">    @NH4SFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="True" field_ref="NO3SFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_no3os" name="no3os" operation="average" unit="mol m-3">    @NO3SFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="True" field_ref="O2SFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_o2os" name="o2os" operation="average" unit="mol m-3">    @O2SFC_E3T / @E3TSFC * 1e-3                                         </field>
+     <field enabled="True" field_ref="PHSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_phos" name="phos" operation="average" unit="1">                                                                        </field>
+     <field enabled="False" field_ref="PHYSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_phycos" name="phycos" operation="average" unit="mol m-3">    @PHYSFC_E3T / @E3TSFC * 1e-3 + @PHY2SFC_E3T / @E3TSFC * 1e-3        </field>
+     <field enabled="False" field_ref="PHY2SFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_phydiatos" name="phydiatos" operation="average" unit="mol m-3">    @PHY2SFC_E3T / @E3TSFC * 1e-3                                       </field>
+     <field enabled="False" field_ref="NFeSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_phyfeos" name="phyfeos" operation="average" unit="mol m-3">    @NFeSFC_E3T / @E3TSFC * 1e-3 + @DFeSFC_E3T / @E3TSFC * 1e-3         </field>
+     <field enabled="False" field_ref="PHYSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_phymiscos" name="phymiscos" operation="average" unit="mol m-3">    @PHYSFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="False" field_ref="DSiSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_physios" name="physios" operation="average" unit="mol m-3">    @DSiSFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="True" field_ref="PO4SFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_po4os" name="po4os" operation="average" unit="mol m-3">    @PO4SFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="False" field_ref="TPPSFC" freq_op="1ts" grid_ref="grid_T_SFC" id="id_1m_ppos" name="ppos" operation="average" unit="mol m-3 s-1">                                                                        </field>
+     <field enabled="True" field_ref="SiSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_sios" name="sios" operation="average" unit="mol m-3">    @SiSFC_E3T / @E3TSFC * 1e-3                                         </field>
+     <field enabled="True" field_ref="AlkaliniSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_talknatos" name="talknatos" operation="average" unit="mol m-3">    @AlkaliniSFC_E3T / @E3TSFC * 1e-3                                   </field>
+     <field enabled="True" field_ref="AlkaliniSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_talkos" name="talkos" operation="average" unit="mol m-3">    @AlkaliniSFC_E3T / @E3TSFC * 1e-3                                   </field>
+     <field enabled="False" field_ref="ZOO2SFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_zmesoos" name="zmesoos" operation="average" unit="mol m-3">    @ZOO2SFC_E3T / @E3TSFC * 1e-3                                       </field>
+     <field enabled="False" field_ref="ZOOSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_zmicroos" name="zmicroos" operation="average" unit="mol m-3">    @ZOOSFC_E3T / @E3TSFC * 1e-3                                        </field>
+     <field enabled="False" field_ref="ZOOSFC_E3T" freq_op="1mo" grid_ref="grid_T_SFC" id="id_1m_zoocos" name="zoocos" operation="average" unit="mol m-3">    @ZOOSFC_E3T / @E3TSFC * 1e-3 + @ZOO2SFC_E3T / @E3TSFC * 1e-3        </field>
+
+    </file>
+
+
+   </file_group>
+
+
+  </file_definition>

+ 93 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/lpjg_cmip6_output.ins

@@ -0,0 +1,93 @@
+file_fco2antt_monthly "fco2antt_monthly.out"
+file_fco2nat_monthly "fco2nat_monthly.out"
+file_mrsol_monthly "mrsol_monthly.out"
+file_treeFracNdlDcd_monthly "treeFracNdlDcd_monthly.out"
+file_treeFracBdlEvg_monthly "treeFracBdlEvg_monthly.out"
+file_treeFracBdlDcd_monthly "treeFracBdlDcd_monthly.out"
+file_grassFracC3_monthly "grassFracC3_monthly.out"
+file_grassFracC4_monthly "grassFracC4_monthly.out"
+file_pastureFracC3_monthly "pastureFracC3_monthly.out"
+file_pastureFracC4_monthly "pastureFracC4_monthly.out"
+file_nwdFracLut_monthly "nwdFracLut_monthly.out"
+file_fracLut_monthly "fracLut_monthly.out"
+file_vegFrac_monthly "vegFrac_monthly.out"
+file_treeFracNdlEvg_monthly "treeFracNdlEvg_monthly.out"
+file_cropFracC3_monthly "cropFracC3_monthly.out"
+file_cropFracC4_monthly "cropFracC4_monthly.out"
+file_treeFrac_yearly "treeFrac_yearly.out"
+file_grassFrac_yearly "grassFrac_yearly.out"
+file_shrubFrac_yearly "shrubFrac_yearly.out"
+file_cropFrac_yearly "cropFrac_yearly.out"
+file_vegFrac_yearly "vegFrac_yearly.out"
+file_baresoilFrac_yearly "baresoilFrac_yearly.out"
+file_fracOutLut_yearly "fracOutLut_yearly.out"
+file_fracInLut_yearly "fracInLut_yearly.out"
+file_fracLut_yearly "fracLut_yearly.out"
+file_mrsos_monthly "mrsos_monthly.out"
+file_mrso_monthly "mrso_monthly.out"
+file_mrros_monthly "mrros_monthly.out"
+file_mrro_monthly "mrro_monthly.out"
+file_evspsblveg_monthly "evspsblveg_monthly.out"
+file_evspsblsoi_monthly "evspsblsoi_monthly.out"
+file_tran_monthly "tran_monthly.out"
+file_treeFrac_monthly "treeFrac_monthly.out"
+file_grassFrac_monthly "grassFrac_monthly.out"
+file_shrubFrac_monthly "shrubFrac_monthly.out"
+file_cropFrac_monthly "cropFrac_monthly.out"
+file_pastureFrac_monthly "pastureFrac_monthly.out"
+file_baresoilFrac_monthly "baresoilFrac_monthly.out"
+file_residualFrac_monthly "residualFrac_monthly.out"
+file_lai_monthly "lai_monthly.out"
+file_fFire_monthly "fFire_monthly.out"
+file_fGrazing_monthly "fGrazing_monthly.out"
+file_fHarvest_monthly "fHarvest_monthly.out"
+file_fVegLitter_monthly "fVegLitter_monthly.out"
+file_fLitterSoil_monthly "fLitterSoil_monthly.out"
+file_cOther_monthly "cOther_monthly.out"
+file_fBNF_monthly "fBNF_monthly.out"
+file_nStem_monthly "nStem_monthly.out"
+file_nLitterCwd_monthly "nLitterCwd_monthly.out"
+file_fNfert_monthly "fNfert_monthly.out"
+file_nLitterSurf_monthly "nLitterSurf_monthly.out"
+file_nRoot_monthly "nRoot_monthly.out"
+file_fLuc_monthly "fLuc_monthly.out"
+file_nLitterSubSurf_monthly "nLitterSubSurf_monthly.out"
+file_nLeaf_monthly "nLeaf_monthly.out"
+file_cLitterSubSurf_monthly "cLitterSubSurf_monthly.out"
+file_nep_monthly "nep_monthly.out"
+file_fNdep_monthly "fNdep_monthly.out"
+file_cSoil_monthly "cSoil_monthly.out"
+file_fNnetmin_monthly "fNnetmin_monthly.out"
+file_fCLandToOcean_monthly "fCLandToOcean_monthly.out"
+file_cLitterSurf_monthly "cLitterSurf_monthly.out"
+file_cStem_monthly "cStem_monthly.out"
+file_fFireNat_monthly "fFireNat_monthly.out"
+file_nMineral_monthly "nMineral_monthly.out"
+file_nLand_monthly "nLand_monthly.out"
+file_nVeg_monthly "nVeg_monthly.out"
+file_nSoil_monthly "nSoil_monthly.out"
+file_cLitterCwd_monthly "cLitterCwd_monthly.out"
+file_nProduct_monthly "nProduct_monthly.out"
+file_nLitter_monthly "nLitter_monthly.out"
+file_fNloss_monthly "fNloss_monthly.out"
+file_fNup_monthly "fNup_monthly.out"
+file_nOther_monthly "nOther_monthly.out"
+file_fNLandToOcean_monthly "fNLandToOcean_monthly.out"
+file_fProductDecomp_monthly "fProductDecomp_monthly.out"
+file_cLand_monthly "cLand_monthly.out"
+file_cProduct_yearly "cProduct_yearly.out"
+file_cVeg_yearly "cVeg_yearly.out"
+file_cLitter_yearly "cLitter_yearly.out"
+file_cSoil_yearly "cSoil_yearly.out"
+file_burntFractionAll_monthly "burntFractionAll_monthly.out"
+file_nbp_monthly "nbp_monthly.out"
+file_cProduct_monthly "cProduct_monthly.out"
+file_cLeaf_monthly "cLeaf_monthly.out"
+file_rh_monthly "rh_monthly.out"
+file_cVeg_monthly "cVeg_monthly.out"
+file_cRoot_monthly "cRoot_monthly.out"
+file_ra_monthly "ra_monthly.out"
+file_npp_monthly "npp_monthly.out"
+file_gpp_monthly "gpp_monthly.out"
+file_cLitter_monthly "cLitter_monthly.out"
+file_fVegOther_monthly "fVegOther_monthly.out"

+ 43 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/metadata-cmip6-AerChemMIP-hist-1950HC-EC-EARTH-AerChem-ifs-template.json

@@ -0,0 +1,43 @@
+{
+    "activity_id":                  "AerChemMIP",
+    "experiment_id":                "hist-1950HC",
+    "source_id":                    "EC-Earth3-AerChem",
+    "source":                       "EC-Earth3-AerChem (2019)",
+    "source_type":                  "AOGCM AER CHEM",
+    "grid":                         "T255L91",
+    "grid_label":                   "gr",
+    "nominal_resolution":           "100 km",
+
+    "sub_experiment":               "none",
+    "sub_experiment_id":            "none",
+
+    "realization_index":            "1",
+    "initialization_index":         "1",
+    "physics_index":                "1",
+    "forcing_index":                "1",
+    "#variant_info":                "uncomment and describe briefly what makes your ripf identifier unique (only needed if i/=1, p/=1 or f/=1)",
+
+    "parent_activity_id":           "CMIP",
+    "parent_experiment_id":         "historical",
+    "parent_source_id":             "EC-Earth3-AerChem",
+    "parent_variant_label":         "r1i1p1f1",
+    "parent_time_units":            "days since 1850-01-01",
+
+    "branch_method":                "standard",
+    "branch_time_in_child":         "0.0D",
+    "branch_time_in_parent":        "0.0D",
+
+    "comment":                      "",
+
+
+    "_control_vocabulary_file":     "CMIP6_CV.json",
+    "_cmip6_option":                "CMIP6",
+    "mip_era":                      "CMIP6",
+    "parent_mip_era":               "CMIP6",
+
+    "license":                      "CMIP6 model data produced by EC-Earth-Consortium is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (https://creativecommons.org/licenses). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at http://www.ec-earth.org. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law.",
+    "tracking_prefix":              "hdl:21.14100",
+
+    "institution_id":               "EC-Earth-Consortium",
+    "contact":                      "cmip6-data@ec-earth.org"
+}

+ 43 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/metadata-cmip6-AerChemMIP-hist-1950HC-EC-EARTH-AerChem-nemo-template.json

@@ -0,0 +1,43 @@
+{
+    "activity_id":                  "AerChemMIP",
+    "experiment_id":                "hist-1950HC",
+    "source_id":                    "EC-Earth3-AerChem",
+    "source":                       "EC-Earth3-AerChem (2019)",
+    "source_type":                  "AOGCM AER CHEM",
+    "grid":                         "ORCA1L75",
+    "grid_label":                   "gn",
+    "nominal_resolution":           "100 km",
+
+    "sub_experiment":               "none",
+    "sub_experiment_id":            "none",
+
+    "realization_index":            "1",
+    "initialization_index":         "1",
+    "physics_index":                "1",
+    "forcing_index":                "1",
+    "#variant_info":                "uncomment and describe briefly what makes your ripf identifier unique (only needed if i/=1, p/=1 or f/=1)",
+
+    "parent_activity_id":           "CMIP",
+    "parent_experiment_id":         "historical",
+    "parent_source_id":             "EC-Earth3-AerChem",
+    "parent_variant_label":         "r1i1p1f1",
+    "parent_time_units":            "days since 1850-01-01",
+
+    "branch_method":                "standard",
+    "branch_time_in_child":         "0.0D",
+    "branch_time_in_parent":        "0.0D",
+
+    "comment":                      "",
+
+
+    "_control_vocabulary_file":     "CMIP6_CV.json",
+    "_cmip6_option":                "CMIP6",
+    "mip_era":                      "CMIP6",
+    "parent_mip_era":               "CMIP6",
+
+    "license":                      "CMIP6 model data produced by EC-Earth-Consortium is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (https://creativecommons.org/licenses). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at http://www.ec-earth.org. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law.",
+    "tracking_prefix":              "hdl:21.14100",
+
+    "institution_id":               "EC-Earth-Consortium",
+    "contact":                      "cmip6-data@ec-earth.org"
+}

+ 43 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/metadata-cmip6-AerChemMIP-hist-1950HC-EC-EARTH-AerChem-tm5-template.json

@@ -0,0 +1,43 @@
+{
+    "activity_id":                  "AerChemMIP",
+    "experiment_id":                "hist-1950HC",
+    "source_id":                    "EC-Earth3-AerChem",
+    "source":                       "EC-Earth3-AerChem (2019)",
+    "source_type":                  "AOGCM AER CHEM",
+    "grid":                         "native regular 2x3 degree latxlon grid L34",
+    "grid_label":                   "gn",
+    "nominal_resolution":           "250 km",
+
+    "sub_experiment":               "none",
+    "sub_experiment_id":            "none",
+
+    "realization_index":            "1",
+    "initialization_index":         "1",
+    "physics_index":                "1",
+    "forcing_index":                "1",
+    "#variant_info":                "uncomment and describe briefly what makes your ripf identifier unique (only needed if i/=1, p/=1 or f/=1)",
+
+    "parent_activity_id":           "CMIP",
+    "parent_experiment_id":         "historical",
+    "parent_source_id":             "EC-Earth3-AerChem",
+    "parent_variant_label":         "r1i1p1f1",
+    "parent_time_units":            "days since 1850-01-01",
+
+    "branch_method":                "standard",
+    "branch_time_in_child":         "0.0D",
+    "branch_time_in_parent":        "0.0D",
+
+    "comment":                      "",
+
+
+    "_control_vocabulary_file":     "CMIP6_CV.json",
+    "_cmip6_option":                "CMIP6",
+    "mip_era":                      "CMIP6",
+    "parent_mip_era":               "CMIP6",
+
+    "license":                      "CMIP6 model data produced by EC-Earth-Consortium is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (https://creativecommons.org/licenses). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at http://www.ec-earth.org. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law.",
+    "tracking_prefix":              "hdl:21.14100",
+
+    "institution_id":               "EC-Earth-Consortium",
+    "contact":                      "cmip6-data@ec-earth.org"
+}

+ 23 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/ppt0000000000

@@ -0,0 +1,23 @@
+&NAMFPC
+    CFPFMT = 'MODEL',
+    MFP2DF = 129, 134, 152,
+    MFP3DFP = 129, 130, 131, 132, 133, 135, 157,
+    MFP3DFS = 54, 129, 130, 131, 132, 133, 135, 157, 246, 247, 248, 126020,
+              126022, 126094, 126095, 126099, 126106, 126110, 126129, 
+    MFPPHY = 8, 31, 39, 40, 41, 42, 43, 44, 78, 79, 129, 134, 137, 139,
+             141, 143, 144, 146, 147, 151, 164, 165, 166, 167, 168, 169,
+             170, 172, 175, 176, 177, 178, 179, 180, 181, 182, 183, 185,
+             201, 202, 205, 208, 209, 210, 211, 212, 228, 236, 126040, 126041,
+             126042, 126043, 126044, 126045, 126046, 126068, 126069, 126072,
+             126073, 
+    NFP2DF = 3,
+    NFP3DFP = 7,
+    NFP3DFS = 19,
+    NFPPHY = 59,
+    NRFP3S = -99,
+    RFP3P = 100000.0, 92500.0, 85000.0, 70000.0, 60000.0, 50000.0, 40000.0,
+            30000.0, 25000.0, 20000.0, 17000.0, 15000.0, 13000.0, 11500.0,
+            10000.0, 9000.0, 8000.0, 7000.0, 5000.0, 3000.0, 2000.0, 1500.0,
+            1000.0, 700.0, 500.0, 300.0, 200.0, 150.0, 100.0, 70.0, 50.0,
+            40.0, 30.0, 20.0, 15.0, 10.0, 7.0, 5.0, 3.0, 
+/

+ 11 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/pptdddddd0300

@@ -0,0 +1,11 @@
+&NAMFPC
+    CFPFMT = 'MODEL',
+    MFP2DF = 129, 134, 152,
+    MFPPHY = 8, 31, 39, 40, 41, 42, 44, 78, 79, 134, 137, 139, 141, 143,
+             144, 146, 147, 151, 164, 165, 166, 167, 168, 169, 170, 175,
+             176, 177, 178, 179, 180, 181, 182, 183, 185, 201, 202, 205,
+             208, 209, 210, 211, 212, 228, 236, 126040, 126041, 126042,
+             126043, 126044, 126045, 126046, 126068, 126069, 126072, 126073,
+    NFP2DF = 3,
+    NFPPHY = 56,
+/

+ 22 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/pptdddddd0600

@@ -0,0 +1,22 @@
+&NAMFPC
+    CFPFMT = 'MODEL',
+    MFP2DF = 134, 152,
+    MFP3DFP = 129, 130, 131, 132, 133, 135, 157,
+    MFP3DFS = 54, 129, 130, 131, 132, 133, 135, 157, 246, 247, 248, 126020,
+              126022, 126094, 126095, 126099, 126106, 126110, 126129, 
+    MFPPHY = 8, 31, 39, 40, 41, 42, 44, 78, 79, 134, 137, 139, 141, 143,
+             144, 146, 147, 151, 164, 165, 166, 167, 168, 169, 170, 175,
+             176, 177, 178, 179, 180, 181, 182, 183, 185, 201, 202, 205,
+             208, 209, 210, 211, 212, 228, 236, 126040, 126041, 126042,
+             126043, 126044, 126045, 126046, 126068, 126069, 126072, 126073,
+    NFP2DF = 2,
+    NFP3DFP = 7,
+    NFP3DFS = 19,
+    NFPPHY = 56,
+    NRFP3S = -99,
+    RFP3P = 100000.0, 92500.0, 85000.0, 70000.0, 60000.0, 50000.0, 40000.0,
+            30000.0, 25000.0, 20000.0, 17000.0, 15000.0, 13000.0, 11500.0,
+            10000.0, 9000.0, 8000.0, 7000.0, 5000.0, 3000.0, 2000.0, 1500.0,
+            1000.0, 700.0, 500.0, 300.0, 200.0, 150.0, 100.0, 70.0, 50.0,
+            40.0, 30.0, 20.0, 15.0, 10.0, 7.0, 5.0, 3.0, 
+/

+ 266 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-1950HC/request-overview-AerChemMIP-hist-1950HC-including-EC-EARTH-AerChem-preferences.txt

@@ -0,0 +1,266 @@
+table      variable             dimensions                                    long_name                                                                                                           unit                 comment 
+
+Amon       ch4                  longitude latitude plev19 time                Mole Fraction of CH4                                                                                                mol mol-1            tm5 code name = ch4 
+Amon       ch4global            time                                          Global Mean Mole Fraction of CH4                                                                                    1e-09                tm5 code name = ch4 
+Amon       cl                   longitude latitude alevel time                Percentage Cloud Cover                                                                                              %                    ifs code name = 248.128 
+Amon       cli                  longitude latitude alevel time                Mass Fraction of Cloud Ice                                                                                          kg kg-1              ifs code name = 247.128 
+Amon       clivi                longitude latitude time                       Ice Water Path                                                                                                      kg m-2               ifs code name = 79.128 
+Amon       clt                  longitude latitude time                       Total Cloud Cover Percentage                                                                                        %                    ifs code name = 164.128 
+Amon       clw                  longitude latitude alevel time                Mass Fraction of Cloud Liquid Water                                                                                 kg kg-1              ifs code name = 246.128 
+Amon       clwvi                longitude latitude time                       Condensed Water Path                                                                                                kg m-2               ifs code name = 116.129, expression = var78+var79 
+Amon       co2                  longitude latitude plev19 time                Mole Fraction of CO2                                                                                                mol mol-1            tm5 code name = co2 
+Amon       co2mass              time                                          Total Atmospheric Mass of CO2                                                                                       kg                   tm5 code name = co2mass 
+Amon       evspsbl              longitude latitude time                       Evaporation Including Sublimation and Transpiration                                                                 kg m-2 s-1           ifs code name = 182.128 
+Amon       hfls                 longitude latitude time                       Surface Upward Latent Heat Flux                                                                                     W m-2                ifs code name = 147.128 
+Amon       hfss                 longitude latitude time                       Surface Upward Sensible Heat Flux                                                                                   W m-2                ifs code name = 146.128 
+Amon       hur                  longitude latitude plev19 time                Relative Humidity                                                                                                   %                    ifs code name = 157.128 
+Amon       hurs                 longitude latitude time height2m              Near-Surface Relative Humidity                                                                                      %                    ifs code name = 80.129, expression = 100.*exp(17.62*((var168-273.15)/(var168-30.03)-(var167-273.15)/(var167-30.03))) 
+Amon       hus                  longitude latitude plev19 time                Specific Humidity                                                                                                   1                    ifs code name = 133.128 
+Amon       huss                 longitude latitude time height2m              Near-Surface Specific Humidity                                                                                      1                    ifs code name = 81.129, expression = 1./(1.+1.608*(var134*exp(-17.62*(var168-273.15)/(var168-30.03))/611.-1.)) 
+Amon       pfull                longitude latitude alevel time2               Pressure at Model Full-Levels                                                                                       Pa                   ifs code name = 54.128 
+Amon       pr                   longitude latitude time                       Precipitation                                                                                                       kg m-2 s-1           ifs code name = 228.128 
+Amon       prc                  longitude latitude time                       Convective Precipitation                                                                                            kg m-2 s-1           ifs code name = 143.128 
+Amon       prsn                 longitude latitude time                       Snowfall Flux                                                                                                       kg m-2 s-1           ifs code name = 144.128 
+Amon       prw                  longitude latitude time                       Water Vapor Path                                                                                                    kg m-2               ifs code name = 137.128 
+Amon       ps                   longitude latitude time                       Surface Air Pressure                                                                                                Pa                   tm5 code name = ps|ifs code name = 134.128 
+Amon       psl                  longitude latitude time                       Sea Level Pressure                                                                                                  Pa                   ifs code name = 151.128 
+Amon       rlds                 longitude latitude time                       Surface Downwelling Longwave Radiation                                                                              W m-2                ifs code name = 175.128 
+Amon       rldscs               longitude latitude time                       Surface Downwelling Clear-Sky Longwave Radiation                                                                    W m-2                ifs code name = 104.129, expression = var211-var177+var175 
+Amon       rlus                 longitude latitude time                       Surface Upwelling Longwave Radiation                                                                                W m-2                ifs code name = 96.129, expression = var177-var175 
+Amon       rlut                 longitude latitude time                       TOA Outgoing Longwave Radiation                                                                                     W m-2                ifs code name = 179.128 
+Amon       rlutcs               longitude latitude time                       TOA Outgoing Clear-Sky Longwave Radiation                                                                           W m-2                ifs code name = 209.128 
+Amon       rsds                 longitude latitude time                       Surface Downwelling Shortwave Radiation                                                                             W m-2                ifs code name = 169.128 
+Amon       rsdscs               longitude latitude time                       Surface Downwelling Clear-Sky Shortwave Radiation                                                                   W m-2                ifs code name = 132.129, expression = (var176<=1e-10)*var210+(var176>1e-10)*var210*var169/var176 
+Amon       rsdt                 longitude latitude time                       TOA Incident Shortwave Radiation                                                                                    W m-2                ifs code name = 212.128 
+Amon       rsus                 longitude latitude time                       Surface Upwelling Shortwave Radiation                                                                               W m-2                ifs code name = 95.129, expression = var176-var169 
+Amon       rsuscs               longitude latitude time                       Surface Upwelling Clear-Sky Shortwave Radiation                                                                     W m-2                ifs code name = 131.129, expression = (var176>1e-10)*var210*(1-var169/var176) 
+Amon       rsut                 longitude latitude time                       TOA Outgoing Shortwave Radiation                                                                                    W m-2                ifs code name = 97.129, expression = var178-var212 
+Amon       rsutcs               longitude latitude time                       TOA Outgoing Clear-Sky Shortwave Radiation                                                                          W m-2                ifs code name = 103.129, expression = var208-var212 
+Amon       rtmt                 longitude latitude time                       Net Downward Radiative Flux at Top of Model                                                                         W m-2                ifs code name = 98.129, expression = var178+var179 
+Amon       sbl                  longitude latitude time                       Surface Snow and Ice Sublimation Flux                                                                               kg m-2 s-1           ifs code name = 44.128 
+Amon       sfcWind              longitude latitude time height10m             Near-Surface Wind Speed                                                                                             m s-1                ifs code name = 214.129, expression = sqrt(sqr(var165)+sqr(var166)) 
+Amon       ta                   longitude latitude plev19 time                Air Temperature                                                                                                     K                    ifs code name = 130.128 
+Amon       tas                  longitude latitude time height2m              Near-Surface Air Temperature                                                                                        K                    ifs code name = 167.128 
+Amon       tasmax               longitude latitude time height2m              Daily Maximum Near-Surface Air Temperature                                                                          K                    ifs code name = 201.128 
+Amon       tasmin               longitude latitude time height2m              Daily Minimum Near-Surface Air Temperature                                                                          K                    ifs code name = 202.128 
+Amon       tauu                 longitude latitude time                       Surface Downward Eastward Wind Stress                                                                               Pa                   ifs code name = 180.128 
+Amon       tauv                 longitude latitude time                       Surface Downward Northward Wind Stress                                                                              Pa                   ifs code name = 181.128 
+Amon       ts                   longitude latitude time                       Surface Temperature                                                                                                 K                    ifs code name = 139.128 
+Amon       ua                   longitude latitude plev19 time                Eastward Wind                                                                                                       m s-1                ifs code name = 131.128 
+Amon       uas                  longitude latitude time height10m             Eastward Near-Surface Wind                                                                                          m s-1                ifs code name = 165.128 
+Amon       va                   longitude latitude plev19 time                Northward Wind                                                                                                      m s-1                ifs code name = 132.128 
+Amon       vas                  longitude latitude time height10m             Northward Near-Surface Wind                                                                                         m s-1                ifs code name = 166.128 
+Amon       wap                  longitude latitude plev19 time                Omega (=dp/dt)                                                                                                      Pa s-1               ifs code name = 135.128 
+Amon       zg                   longitude latitude plev19 time                Geopotential Height                                                                                                 m                    ifs code name = 129.128 
+
+CFmon      albisccp             longitude latitude time                       ISCCP Mean Cloud Albedo                                                                                             1                    ifs code name = 46.126 
+CFmon      clhcalipso           longitude latitude time p220                  CALIPSO High Level Cloud Area Percentage                                                                            %                    ifs code name = 42.126 
+CFmon      cllcalipso           longitude latitude time p840                  CALIPSO Low Level Cloud Cover Percentage                                                                            %                    ifs code name = 40.126 
+CFmon      clmcalipso           longitude latitude time p560                  CALIPSO Mid Level Cloud Cover Percentage                                                                            %                    ifs code name = 41.126 
+CFmon      cltcalipso           longitude latitude time                       CALIPSO Total Cloud Cover Percentage                                                                                %                    ifs code name = 43.126 
+CFmon      cltisccp             longitude latitude time                       ISCCP Total Cloud Cover Percentage                                                                                  %                    ifs code name = 44.126 
+CFmon      hur                  longitude latitude alevel time                Relative Humidity                                                                                                   %                    ifs code name = 157.128 
+CFmon      hus                  longitude latitude alevel time                Specific Humidity                                                                                                   1                    ifs code name = 133.128 
+CFmon      pctisccp             longitude latitude time                       ISCCP Mean Cloud Top Pressure                                                                                       Pa                   ifs code name = 45.126 
+CFmon      ta                   longitude latitude alevel time                Air Temperature                                                                                                     K                    ifs code name = 130.128 
+CFmon      tnhus                longitude latitude alevel time                Tendency of Specific Humidity                                                                                       s-1                  ifs code name = 124.129, expression = var126094+var126099+var126106+var126110 
+CFmon      tnhusc               longitude latitude alevel time                Tendency of Specific Humidity Due to Convection                                                                     s-1                  ifs code name = 106.126 
+CFmon      tnhusmp              longitude latitude alevel time                Tendency of Specific Humidity Due to Model Physics                                                                  s-1                  ifs code name = 125.129, expression = var126099+var126106+var126110 
+CFmon      tntc                 longitude latitude alevel time                Tendency of Air Temperature Due to Convection                                                                       K s-1                ifs code name = 129.126 
+CFmon      tntr                 longitude latitude alevel time                Tendency of Air Temperature Due to Radiative Heating                                                                K s-1                ifs code name = 95.126 
+
+Omon       bigthetao            longitude latitude olevel time                Sea Water Conservative Temperature                                                                                  degC                 nemo code name = bigthetao 
+Omon       bigthetaoga          time                                          Global Average Sea Water Conservative Temperature                                                                   degC                 nemo code name = bigthetaoga 
+Omon       fsitherm             longitude latitude time                       Water Flux into Sea Water Due to Sea Ice Thermodynamics                                                             kg m-2 s-1           nemo code name = fsitherm 
+Omon       hfbasin              latitude basin time                           Northward Ocean Heat Transport                                                                                      W                    nemo code name = hfbasin 
+Omon       hfbasinpmadv         latitude basin time                           Northward Ocean Heat Transport Due to Parameterized Mesoscale Advection                                             W                    nemo code name = hfbasinpmadv 
+Omon       hfds                 longitude latitude time                       Downward Heat Flux at Sea Water Surface                                                                             W m-2                nemo code name = hfds 
+Omon       masscello            longitude latitude olevel time                Ocean Grid-Cell Mass per Area                                                                                       kg m-2               nemo code name = masscello 
+Omon       masso                time                                          Sea Water Mass                                                                                                      kg                   nemo code name = masso 
+Omon       mlotst               longitude latitude time                       Ocean Mixed Layer Thickness Defined by Sigma T                                                                      m                    nemo code name = mlotst 
+Omon       mlotstmax            longitude latitude time                       Maximum Ocean Mixed Layer Thickness Defined by Sigma T                                                              m                    nemo code name = mlotstmax 
+Omon       mlotstmin            longitude latitude time                       Minimum Ocean Mixed Layer Thickness Defined by Sigma T                                                              m                    nemo code name = mlotstmin 
+Omon       msftbarot            longitude latitude time                       Ocean Barotropic Mass Streamfunction                                                                                kg s-1               nemo code name = msftbarot 
+Omon       msftyz               gridlatitude olevel basin time                Ocean Y Overturning Mass Streamfunction                                                                             kg s-1               nemo code name = msftyz 
+Omon       obvfsq               longitude latitude olevel time                Square of Brunt Vaisala Frequency in Sea Water                                                                      s-2                  nemo code name = obvfsq 
+Omon       pbo                  longitude latitude time                       Sea Water Pressure at Sea Floor                                                                                     Pa                   nemo code name = pbo 
+Omon       pso                  longitude latitude time                       Sea Water Pressure at Sea Water Surface                                                                             Pa                   nemo code name = pso 
+Omon       sfdsi                longitude latitude time                       Downward Sea Ice Basal Salt Flux                                                                                    kg m-2 s-1           nemo code name = sfdsi 
+Omon       so                   longitude latitude olevel time                Sea Water Salinity                                                                                                  0.001                nemo code name = so 
+Omon       sob                  longitude latitude time                       Sea Water Salinity at Sea Floor                                                                                     0.001                nemo code name = sob 
+Omon       soga                 time                                          Global Mean Sea Water Salinity                                                                                      0.001                nemo code name = soga 
+Omon       sos                  longitude latitude time                       Sea Surface Salinity                                                                                                0.001                nemo code name = sos 
+Omon       sosga                time                                          Global Average Sea Surface Salinity                                                                                 0.001                nemo code name = sosga 
+Omon       tauuo                longitude latitude time                       Sea Water Surface Downward X Stress                                                                                 N m-2                nemo code name = tauuo 
+Omon       tauvo                longitude latitude time                       Sea Water Surface Downward Y Stress                                                                                 N m-2                nemo code name = tauvo 
+Omon       thetao               longitude latitude olevel time                Sea Water Potential Temperature                                                                                     degC                 nemo code name = thetao 
+Omon       thetaoga             time                                          Global Average Sea Water Potential Temperature                                                                      degC                 nemo code name = thetaoga 
+Omon       tob                  longitude latitude time                       Sea Water Potential Temperature at Sea Floor                                                                        degC                 nemo code name = tob 
+Omon       tos                  longitude latitude time                       Sea Surface Temperature                                                                                             degC                 nemo code name = tos 
+Omon       tosga                time                                          Global Average Sea Surface Temperature                                                                              degC                 nemo code name = tosga 
+Omon       umo                  longitude latitude olevel time                Ocean Mass X Transport                                                                                              kg s-1               nemo code name = umo 
+Omon       uo                   longitude latitude olevel time                Sea Water X Velocity                                                                                                m s-1                nemo code name = uo 
+Omon       vmo                  longitude latitude olevel time                Ocean Mass Y Transport                                                                                              kg s-1               nemo code name = vmo 
+Omon       vo                   longitude latitude olevel time                Sea Water Y Velocity                                                                                                m s-1                nemo code name = vo 
+Omon       volo                 time                                          Sea Water Volume                                                                                                    m3                   nemo code name = volo 
+Omon       wfo                  longitude latitude time                       Water Flux into Sea Water                                                                                           kg m-2 s-1           nemo code name = wfo 
+Omon       wfonocorr            longitude latitude time                       Water Flux into Sea Water Without Flux Correction                                                                   kg m-2 s-1           nemo code name = wfonocorr 
+Omon       wmo                  longitude latitude olevel time                Upward Ocean Mass Transport                                                                                         kg s-1               nemo code name = wmo 
+Omon       wo                   longitude latitude olevel time                Sea Water Vertical Velocity                                                                                         m s-1                nemo code name = wo 
+Omon       zhalfo               longitude latitude olevhalf time              Depth Below Geoid of Interfaces Between Ocean Layers                                                                m                    nemo code name = zhalfo 
+Omon       zos                  longitude latitude time                       Sea Surface Height Above Geoid                                                                                      m                    nemo code name = zos 
+Omon       zostoga              time                                          Global Average Thermosteric Sea Level Change                                                                        m                    nemo code name = zostoga 
+
+fx         areacella            longitude latitude                            Grid-Cell Area for Atmospheric Grid Variables                                                                       m2                   ifs code name = 129.128 
+fx         orog                 longitude latitude                            Surface Altitude                                                                                                    m                    ifs code name = 129.128 
+fx         sftlf                longitude latitude                            Percentage of the Grid Cell Occupied by Land (Including Lakes)                                                      %                    ifs code name = 172.128 
+
+Oyr        dissicnat            longitude latitude olevel time                Natural Dissolved Inorganic Carbon Concentration                                                                    mol m-3              nemo code name = dissicnat 
+Oyr        talknat              longitude latitude olevel time                Natural Total Alkalinity                                                                                            mol m-3              nemo code name = talknat 
+
+AERmon     abs550aer            longitude latitude time lambda550nm           Ambient Aerosol Absorption Optical Thickness at 550nm                                                               1                    tm5 code name = abs550aer 
+AERmon     airmass              longitude latitude alevel time                Vertically Integrated Mass Content of Air in Layer                                                                  kg m-2               tm5 code name = airmass 
+AERmon     bldep                longitude latitude time                       Boundary Layer Depth                                                                                                m                    tm5 code name = bldep 
+AERmon     c2h6                 longitude latitude alevel time                C2H6 Volume Mixing Ratio                                                                                            mol mol-1            tm5 code name = c2h6 
+AERmon     c3h6                 longitude latitude alevel time                C3H6 Volume Mixing Ratio                                                                                            mol mol-1            tm5 code name = c3h6 
+AERmon     c3h8                 longitude latitude alevel time                C3H8 Volume Mixing Ratio                                                                                            mol mol-1            tm5 code name = c3h8 
+AERmon     cdnc                 longitude latitude alevel time                Cloud Liquid Droplet Number Concentration                                                                           m-3                  ifs code name = 23.129, expression =  (var126022 > 1e-6)? 1e+6*var126020/var126022 : 0 
+AERmon     ch3coch3             longitude latitude alevel time                CH3COCH3 Volume Mixing Ratio                                                                                        mol mol-1            tm5 code name = ch3coch3 
+AERmon     ch4                  longitude latitude alevel time                Mole Fraction of CH4                                                                                                mol mol-1            tm5 code name = ch4 
+AERmon     cheaqpso4            longitude latitude alevel time                Aqueous-Phase Production Rate of SO4                                                                                kg m-2 s-1           tm5 code name = cheaqpso4 
+AERmon     chegpso4             longitude latitude alevel time                Gas-Phase Production Rate of SO4                                                                                    kg m-2 s-1           tm5 code name = chegpso4 
+AERmon     chepsoa              longitude latitude time                       Chemical Production of Dry Aerosol Secondary Organic Matter                                                         kg m-2 s-1           tm5 code name = chepsoa 
+AERmon     cltc                 longitude latitude time                       Convective Cloud Cover Percentage                                                                                   %                    ifs code name = 185.128 
+AERmon     co                   longitude latitude alevel time                CO Volume Mixing Ratio                                                                                              mol mol-1            tm5 code name = co 
+AERmon     dms                  longitude latitude alevel time                Dimethyl Sulphide (DMS) Mole Fraction                                                                               mol mol-1            tm5 code name = dms 
+AERmon     drybc                longitude latitude time                       Dry Deposition Rate of Black Carbon Aerosol Mass                                                                    kg m-2 s-1           tm5 code name = drybc 
+AERmon     drydust              longitude latitude time                       Dry Deposition Rate of Dust                                                                                         kg m-2 s-1           tm5 code name = drydust 
+AERmon     drynh3               longitude latitude time                       Dry Deposition Rate of NH3                                                                                          kg m-2 s-1           tm5 code name = drynh3 
+AERmon     drynh4               longitude latitude time                       Dry Deposition Rate of NH4                                                                                          kg m-2 s-1           tm5 code name = drynh4 
+AERmon     drynoy               longitude latitude time                       Dry Deposition Rate of NOy                                                                                          kg m-2 s-1           tm5 code name = drynoy 
+AERmon     dryo3                longitude latitude time                       Dry Deposition Rate of O3                                                                                           kg m-2 s-1           tm5 code name = dryo3 
+AERmon     dryoa                longitude latitude time                       Dry Deposition Rate of Dry Aerosol Total Organic Matter                                                             kg m-2 s-1           tm5 code name = dryoa 
+AERmon     dryso2               longitude latitude time                       Dry Deposition Rate of SO2                                                                                          kg m-2 s-1           tm5 code name = dryso2 
+AERmon     dryso4               longitude latitude time                       Dry Deposition Rate of SO4                                                                                          kg m-2 s-1           tm5 code name = dryso4 
+AERmon     dryss                longitude latitude time                       Dry Deposition Rate of Sea-Salt Aerosol                                                                             kg m-2 s-1           tm5 code name = dryss 
+AERmon     emibc                longitude latitude time                       Total Emission Rate of Black Carbon Aerosol Mass                                                                    kg m-2 s-1           tm5 code name = emibc 
+AERmon     emibvoc              longitude latitude time                       Total Emission Rate of Biogenic NMVOC                                                                               kg m-2 s-1           tm5 code name = emibvoc 
+AERmon     emico                longitude latitude time                       Total Emission Rate of CO                                                                                           kg m-2 s-1           tm5 code name = emico 
+AERmon     emidms               longitude latitude time                       Total Emission Rate of DMS                                                                                          kg m-2 s-1           tm5 code name = emidms 
+AERmon     emidust              longitude latitude time                       Total Emission Rate of Dust                                                                                         kg m-2 s-1           tm5 code name = emidust 
+AERmon     emiisop              longitude latitude time                       Total Emission Rate of Isoprene                                                                                     kg m-2 s-1           tm5 code name = emiisop 
+AERmon     emilnox              longitude latitude alevel time                Layer-Integrated Lightning Production of NOx                                                                        mol s-1              tm5 code name = emilnox 
+AERmon     eminh3               longitude latitude time                       Total Emission Rate of NH3                                                                                          kg m-2 s-1           tm5 code name = eminh3 
+AERmon     eminox               longitude latitude time                       Total Emission Rate of NOx                                                                                          kg m-2 s-1           tm5 code name = eminox 
+AERmon     emioa                longitude latitude time                       Primary Emission and Chemical Production of Dry Aerosol Organic Matter                                              kg m-2 s-1           tm5 code name = emioa 
+AERmon     emiso2               longitude latitude time                       Total Emission Rate of SO2                                                                                          kg m-2 s-1           tm5 code name = emiso2 
+AERmon     emiso4               longitude latitude time                       Total Direct Emission Rate of SO4                                                                                   kg m-2 s-1           tm5 code name = emiso4 
+AERmon     emiss                longitude latitude time                       Total Emission Rate of Sea-Salt Aerosol                                                                             kg m-2 s-1           tm5 code name = emiss 
+AERmon     emivoc               longitude latitude time                       Total Emission Rate of NMVOC                                                                                        kg m-2 s-1           tm5 code name = emivoc 
+AERmon     hcho                 longitude latitude alevel time                Formaldehyde Volume Mixing Ratio                                                                                    mol mol-1            tm5 code name = hcho 
+AERmon     hno3                 longitude latitude alevel time                HNO3 Volume Mixing Ratio                                                                                            mol mol-1            tm5 code name = hno3 
+AERmon     isop                 longitude latitude alevel time                Isoprene Volume Mixing Ratio                                                                                        mol mol-1            tm5 code name = isop 
+AERmon     jno2                 longitude latitude alevel time                Photolysis Rate of NO2                                                                                              s-1                  tm5 code name = jno2 
+AERmon     lossch4              longitude latitude alevel time                Monthly Loss of Atmospheric Methane                                                                                 mol m-3 s-1          tm5 code name = lossch4 
+AERmon     lossco               longitude latitude alevel time                Monthly Loss of Atmospheric Carbon Monoxide                                                                         mol m-3 s-1          tm5 code name = lossco 
+AERmon     lwp                  longitude latitude time                       Liquid Water Path                                                                                                   kg m-2               ifs code name = 78.128 
+AERmon     mmraerh2o            longitude latitude alevel time                Aerosol Water Mass Mixing Ratio                                                                                     kg kg-1              tm5 code name = mmraerh2o 
+AERmon     mmrbc                longitude latitude alevel time                Elemental Carbon Mass Mixing Ratio                                                                                  kg kg-1              tm5 code name = mmrbc 
+AERmon     mmrdust              longitude latitude alevel time                Dust Aerosol Mass Mixing Ratio                                                                                      kg kg-1              tm5 code name = mmrdust 
+AERmon     mmrnh4               longitude latitude alevel time                NH4 Mass Mixing Ratio                                                                                               kg kg-1              tm5 code name = mmrnh4 
+AERmon     mmrno3               longitude latitude alevel time                NO3 Aerosol Mass Mixing Ratio                                                                                       kg kg-1              tm5 code name = mmrno3 
+AERmon     mmroa                longitude latitude alevel time                Total Organic Aerosol Mass Mixing Ratio                                                                             kg kg-1              tm5 code name = mmroa 
+AERmon     mmrpm1               longitude latitude alevel time                PM1.0 Mass Mixing Ratio                                                                                             kg kg-1              tm5 code name = mmrpm1 
+AERmon     mmrpm10              longitude latitude alevel time                PM10 Mass Mixing Ratio                                                                                              kg kg-1              tm5 code name = mmrpm10 
+AERmon     mmrpm2p5             longitude latitude alevel time                PM2.5 Mass Mixing Ratio                                                                                             kg kg-1              tm5 code name = mmrpm2p5 
+AERmon     mmrso4               longitude latitude alevel time                Aerosol Sulfate Mass Mixing Ratio                                                                                   kg kg-1              tm5 code name = mmrso4 
+AERmon     mmrsoa               longitude latitude alevel time                Secondary Organic Aerosol Mass Mixing Ratio                                                                         kg kg-1              tm5 code name = mmrsoa 
+AERmon     mmrss                longitude latitude alevel time                Sea-Salt Aerosol Mass Mixing Ratio                                                                                  kg kg-1              tm5 code name = mmrss 
+AERmon     no                   longitude latitude alevel time                NO Volume Mixing Ratio                                                                                              mol mol-1            tm5 code name = no 
+AERmon     no2                  longitude latitude alevel time                NO2 Volume Mixing Ratio                                                                                             mol mol-1            tm5 code name = no2 
+AERmon     o3                   longitude latitude alevel time                Mole Fraction of O3                                                                                                 mol mol-1            tm5 code name = o3 
+AERmon     o3loss               longitude latitude alevel time                O3 Destruction Rate                                                                                                 mol m-3 s-1          tm5 code name = o3loss 
+AERmon     o3prod               longitude latitude alevel time                O3 Production Rate                                                                                                  mol m-3 s-1          tm5 code name = o3prod 
+AERmon     o3ste                longitude latitude alevel time                Stratospheric Ozone Tracer Volume Mixing Ratio                                                                      mol mol-1            tm5 code name = o3ste 
+AERmon     od440aer             longitude latitude time                       Ambient Aerosol Optical Thickness at 440nm                                                                          1                    tm5 code name = od440aer 
+AERmon     od550aer             longitude latitude time lambda550nm           Ambient Aerosol Optical Thickness at 550nm                                                                          1                    tm5 code name = od550aer 
+AERmon     od550aerh2o          longitude latitude time lambda550nm           Aerosol Water Optical Thickness at 550nm                                                                            1                    tm5 code name = od550aerh2o 
+AERmon     od550bc              longitude latitude time lambda550nm           Black Carbon Optical Thickness at 550nm                                                                             1                    tm5 code name = od550bc 
+AERmon     od550dust            longitude latitude time lambda550nm           Dust Optical Thickness at 550nm                                                                                     1                    tm5 code name = od550dust 
+AERmon     od550lt1aer          longitude latitude time lambda550nm           Ambient Fine Aerosol Optical Depth at 550nm                                                                         1                    tm5 code name = od550lt1aer 
+AERmon     od550no3             longitude latitude time lambda550nm           Nitrate Aerosol Optical Depth at 550nm                                                                              1                    tm5 code name = od550no3 
+AERmon     od550oa              longitude latitude time lambda550nm           Total Organic Aerosol Optical Depth at 550nm                                                                        1                    tm5 code name = od550oa 
+AERmon     od550so4             longitude latitude time lambda550nm           Sulfate Aerosol Optical Depth at 550nm                                                                              1                    tm5 code name = od550so4 
+AERmon     od550soa             longitude latitude time lambda550nm           Particulate Organic Aerosol Optical Depth at 550nm                                                                  1                    tm5 code name = od550soa 
+AERmon     od550ss              longitude latitude time lambda550nm           Sea-Salt Aerosol Optical Depth at 550nm                                                                             1                    tm5 code name = od550ss 
+AERmon     od870aer             longitude latitude time                       Ambient Aerosol Optical Depth at 870nm                                                                              1                    tm5 code name = od870aer 
+AERmon     oh                   longitude latitude alevel time                OH Volume Mixing Ratio                                                                                              mol mol-1            tm5 code name = oh 
+AERmon     pan                  longitude latitude alevel time                PAN Volume Mixing Ratio                                                                                             mol mol-1            tm5 code name = pan 
+AERmon     phalf                longitude latitude alevhalf time              Pressure on Model Half-Levels                                                                                       Pa                   tm5 code name = phalf 
+AERmon     ps                   longitude latitude time                       Surface Air Pressure                                                                                                Pa                   tm5 code name = ps|ifs code name = 134.128 
+AERmon     ptp                  longitude latitude time                       Tropopause Air Pressure                                                                                             Pa                   tm5 code name = ptp 
+AERmon     rlutaf               longitude latitude time                       TOA Outgoing Aerosol-Free Longwave Radiation                                                                        W m-2                ifs code name = 73.126 
+AERmon     rlutcsaf             longitude latitude time                       TOA Outgoing Clear-Sky, Aerosol-Free Longwave Radiation                                                             W m-2                ifs code name = 72.126 
+AERmon     rsutaf               longitude latitude time                       TOA Outgoing Aerosol-Free Shortwave Radiation                                                                       W m-2                ifs code name = 74.129, expression = var126069-var128212 
+AERmon     rsutcsaf             longitude latitude time                       TOA Outgoing Clear-Sky, Aerosol-Free Shortwave Radiation                                                            W m-2                ifs code name = 75.129, expression = var126068-var128212 
+AERmon     so2                  longitude latitude alevel time                SO2 Volume Mixing Ratio                                                                                             mol mol-1            tm5 code name = so2 
+AERmon     tatp                 longitude latitude time                       Tropopause Air Temperature                                                                                          K                    tm5 code name = tatp 
+AERmon     toz                  longitude latitude time                       Total Column Ozone                                                                                                  m                    tm5 code name = toz 
+AERmon     tropoz               longitude latitude time                       Tropospheric Ozone Column                                                                                           m                    tm5 code name = tropoz 
+AERmon     wa                   longitude latitude alevel time                Upward Air Velocity                                                                                                 m s-1                ifs code name = 123.129, expression = -287.085*var130*var135/(9.81*var54) 
+AERmon     wetbc                longitude latitude time                       Wet Deposition Rate of Black Carbon Aerosol Mass                                                                    kg m-2 s-1           tm5 code name = wetbc 
+AERmon     wetdust              longitude latitude time                       Wet Deposition Rate of Dust                                                                                         kg m-2 s-1           tm5 code name = wetdust 
+AERmon     wetnh3               longitude latitude time                       Wet Deposition Rate of NH3                                                                                          kg m-2 s-1           tm5 code name = wetnh3 
+AERmon     wetnh4               longitude latitude time                       Wet Deposition Rate of NH4                                                                                          kg m-2 s-1           tm5 code name = wetnh4 
+AERmon     wetnoy               longitude latitude time                       Wet Deposition Rate of NOy Including Aerosol Nitrate                                                                kg m-2 s-1           tm5 code name = wetnoy 
+AERmon     wetoa                longitude latitude time                       Wet Deposition Rate of Dry Aerosol Total Organic Matter                                                             kg m-2 s-1           tm5 code name = wetoa 
+AERmon     wetso2               longitude latitude time                       Wet Deposition Rate of SO2                                                                                          kg m-2 s-1           tm5 code name = wetso2 
+AERmon     wetso4               longitude latitude time                       Wet Deposition Rate of SO4                                                                                          kg m-2 s-1           tm5 code name = wetso4 
+AERmon     wetss                longitude latitude time                       Wet Deposition Rate of Sea-Salt Aerosol                                                                             kg m-2 s-1           tm5 code name = wetss 
+AERmon     ztp                  longitude latitude time                       Tropopause Altitude Above Geoid                                                                                     m                    tm5 code name = ztp 
+
+Emon       mrsol                longitude latitude sdepth time                Total Water Content of Soil Layer                                                                                   kg m-2               lpjg code name = mrsol|ifs code name = 118.129, expression = merge(70*var39,210*var40,720*var41,1890*var42) 
+
+CFday      ps                   longitude latitude time                       Surface Air Pressure                                                                                                Pa                   tm5 code name = ps|ifs code name = 134.128 
+CFday      rsdscs               longitude latitude time                       Surface Downwelling Clear-Sky Shortwave Radiation                                                                   W m-2                ifs code name = 132.129, expression = (var176<=1e-10)*var210+(var176>1e-10)*var210*var169/var176 
+
+Lmon       mrfso                longitude latitude time                       Soil Frozen Water Content                                                                                           kg m-2               ifs code name = 85.129, expression = 1000*(0.07*var39*((var139<270.16)+0.5*(var139<274.16 && var139>270.16)*(1-sin(0.785*(var139-272.16)))) + 0.21*var40*((var170<270.16)+0.5*(var170<274.16 && var170>270.16)*(1-sin(0.785*(var170-272.16)))) + 0.72*var41*((var183<270.16)+0.5*(var183<274.16 && var183>270.16)*(1-sin(0.785*(var183-272.16)))) + 1.89*var42*((var236<270.16)+0.5*(var236<274.16 && var236>270.16)*(1-sin(0.785*(var236-272.16))))) 
+Lmon       mrro                 longitude latitude time                       Total Runoff                                                                                                        kg m-2 s-1           lpjg code name = mrro|ifs code name = 205.128 
+Lmon       mrros                longitude latitude time                       Surface Runoff                                                                                                      kg m-2 s-1           lpjg code name = mrros|ifs code name = 8.128 
+Lmon       mrso                 longitude latitude time                       Total Soil Moisture Content                                                                                         kg m-2               lpjg code name = mrso|ifs code name = 43.129, expression = 70*var39+210*var40+720*var41+1890*var42 
+Lmon       mrsos                longitude latitude time sdepth1               Moisture in Upper Portion of Soil Column                                                                            kg m-2               lpjg code name = mrsos|ifs code name = 99.129, expression = 70*var39+30*var40 
+
+AERday     maxpblz              longitude latitude time                       Maximum PBL Height                                                                                                  m                    tm5 code name = maxpblz 
+AERday     minpblz              longitude latitude time                       Minimum PBL Height                                                                                                  m                    tm5 code name = minpblz 
+AERday     od550aer             longitude latitude time lambda550nm           Ambient Aerosol Optical Thickness at 550nm                                                                          1                    tm5 code name = od550aer 
+AERday     sfo3max              longitude latitude time                       Daily Maximum O3 Volume Mixing Ratio in Lowest Model Layer                                                          mol mol-1            tm5 code name = sfo3max 
+AERday     toz                  longitude latitude time                       Total Column Ozone                                                                                                  m                    tm5 code name = toz 
+AERday     zg1000               longitude latitude time p1000                 Geopotential Height at 1000hPa                                                                                      m                    ifs code name = 129.128 
+AERday     zg500                longitude latitude time p500                  Geopotential Height at 500hPa                                                                                       m                    ifs code name = 129.128 
+
+day        pr                   longitude latitude time                       Precipitation                                                                                                       kg m-2 s-1           ifs code name = 228.128 
+day        rlds                 longitude latitude time                       Surface Downwelling Longwave Radiation                                                                              W m-2                ifs code name = 175.128 
+day        rlus                 longitude latitude time                       Surface Upwelling Longwave Radiation                                                                                W m-2                ifs code name = 96.129, expression = var177-var175 
+day        rsds                 longitude latitude time                       Surface Downwelling Shortwave Radiation                                                                             W m-2                ifs code name = 169.128 
+day        tas                  longitude latitude time height2m              Near-Surface Air Temperature                                                                                        K                    ifs code name = 167.128 
+day        tasmax               longitude latitude time height2m              Daily Maximum Near-Surface Air Temperature                                                                          K                    ifs code name = 201.128 
+day        tasmin               longitude latitude time height2m              Daily Minimum Near-Surface Air Temperature                                                                          K                    ifs code name = 202.128 
+day        uas                  longitude latitude time height10m             Eastward Near-Surface Wind                                                                                          m s-1                ifs code name = 165.128 
+day        vas                  longitude latitude time height10m             Northward Near-Surface Wind                                                                                         m s-1                ifs code name = 166.128 
+
+AERmonZ    ch4                  latitude plev39 time                          Mole Fraction of CH4                                                                                                mol mol-1            tm5 code name = ch4 
+AERmonZ    hno3                 latitude plev39 time                          HNO3 Volume Mixing Ratio                                                                                            mol mol-1            tm5 code name = hno3 
+AERmonZ    ho2                  latitude plev39 time                          HO2 Volume Mixing Ratio                                                                                             mol mol-1            tm5 code name = ho2 
+AERmonZ    noy                  latitude plev39 time                          Total Reactive Nitrogen Volume Mixing Ratio                                                                         mol mol-1            tm5 code name = noy 
+AERmonZ    o3                   latitude plev39 time                          Mole Fraction of O3                                                                                                 mol mol-1            tm5 code name = o3 
+AERmonZ    oh                   latitude plev39 time                          OH Volume Mixing Ratio                                                                                              mol mol-1            tm5 code name = oh 
+AERmonZ    ta                   latitude plev39 time                          Air Temperature                                                                                                     K                    ifs code name = 130.128 
+
+
+
+Heuristic volume estimate for the raw EC-Earth3 IFS  output on the T255L91     grid:  165.6 GB per year
+Heuristic volume estimate for the raw EC-Earth3 IFS  output on the T511L91     grid:  636.7 GB per year
+Heuristic volume estimate for the raw EC-Earth3 NEMO output on the ORCA1L75    grid:    5.8 GB per year
+Heuristic volume estimate for the raw EC-Earth3 NEMO output on the ORCA025L75  grid:   78.1 GB per year
+Heuristic volume estimate for the raw EC-Earth3 TM5  output on the TM5 3x2 deg grid:    0.8 GB per year
+Heuristic volume estimate for the raw EC-Earth3 LPJG output on the T255        grid:    0.1 GB per year

+ 285 - 0
runtime/classic/ctrl/output-control-files/cmip6-pextra/AerChemMIP/cmip6-experiment-AerChemMIP-hist-piAer/cmip6-data-request-varlist-AerChemMIP-hist-piAer-EC-EARTH-AerChem.json

@@ -0,0 +1,285 @@
+{
+    "ifs": {
+        "AERday": [
+            "zg1000",
+            "zg500"
+        ],
+        "AERmon": [
+            "cdnc",
+            "cltc",
+            "lwp",
+            "rlutaf",
+            "rlutcsaf",
+            "rsutaf",
+            "rsutcsaf",
+            "wa"
+        ],
+        "AERmonZ": [
+            "ta"
+        ],
+        "Amon": [
+            "tas",
+            "ts",
+            "tasmin",
+            "tasmax",
+            "psl",
+            "ps",
+            "uas",
+            "vas",
+            "sfcWind",
+            "hurs",
+            "huss",
+            "pr",
+            "prsn",
+            "prc",
+            "evspsbl",
+            "sbl",
+            "tauu",
+            "tauv",
+            "hfls",
+            "hfss",
+            "rlds",
+            "rlus",
+            "rsds",
+            "rsus",
+            "rsdscs",
+            "rsuscs",
+            "rldscs",
+            "rsdt",
+            "rsut",
+            "rlut",
+            "rlutcs",
+            "rsutcs",
+            "prw",
+            "clt",
+            "clwvi",
+            "clivi",
+            "rtmt",
+            "cl",
+            "clw",
+            "cli",
+            "ta",
+            "ua",
+            "va",
+            "hus",
+            "hur",
+            "wap",
+            "zg",
+            "pfull"
+        ],
+        "CFday": [
+            "ps",
+            "rsdscs"
+        ],
+        "CFmon": [
+            "ta",
+            "tntr",
+            "tntc",
+            "hur",
+            "hus",
+            "tnhus",
+            "tnhusc",
+            "tnhusmp",
+            "cltisccp",
+            "albisccp",
+            "pctisccp",
+            "cltcalipso",
+            "cllcalipso",
+            "clmcalipso",
+            "clhcalipso"
+        ],
+        "Emon": [
+            "mrsol"
+        ],
+        "Lmon": [
+            "mrsos",
+            "mrso",
+            "mrfso",
+            "mrros",
+            "mrro"
+        ],
+        "day": [
+            "tasmin",
+            "tasmax",
+            "tas",
+            "pr",
+            "uas",
+            "vas",
+            "rlds",
+            "rlus",
+            "rsds"
+        ],
+        "fx": [
+            "areacella",
+            "orog",
+            "sftlf"
+        ]
+    },
+    "lpjg": {},
+    "nemo": {
+        "Omon": [
+            "masso",
+            "pbo",
+            "pso",
+            "volo",
+            "zos",
+            "zostoga",
+            "masscello",
+            "thetao",
+            "thetaoga",
+            "bigthetao",
+            "bigthetaoga",
+            "tos",
+            "tob",
+            "tosga",
+            "so",
+            "soga",
+            "sos",
+            "sob",
+            "sosga",
+            "msftbarot",
+            "mlotst",
+            "mlotstmax",
+            "mlotstmin",
+            "obvfsq",
+            "uo",
+            "vo",
+            "wo",
+            "wmo",
+            "umo",
+            "vmo",
+            "msftyz",
+            "hfbasin",
+            "hfbasinpmadv",
+            "fsitherm",
+            "wfo",
+            "wfonocorr",
+            "sfdsi",
+            "hfds",
+            "tauuo",
+            "tauvo",
+            "zhalfo"
+        ],
+        "Oyr": [
+            "dissicnat",
+            "talknat"
+        ]
+    },
+    "tm5": {
+        "AERday": [
+            "maxpblz",
+            "minpblz",
+            "od550aer",
+            "sfo3max",
+            "toz"
+        ],
+        "AERmon": [
+            "abs550aer",
+            "airmass",
+            "bldep",
+            "c2h6",
+            "c3h6",
+            "c3h8",
+            "ch3coch3",
+            "ch4",
+            "cheaqpso4",
+            "chegpso4",
+            "chepsoa",
+            "co",
+            "dms",
+            "drybc",
+            "drydust",
+            "drynh3",
+            "drynh4",
+            "drynoy",
+            "dryo3",
+            "dryoa",
+            "dryso2",
+            "dryso4",
+            "dryss",
+            "emibc",
+            "emibvoc",
+            "emico",
+            "emidms",
+            "emidust",
+            "emiisop",
+            "emilnox",
+            "eminh3",
+            "eminox",
+            "emioa",
+            "emiso2",
+            "emiso4",
+            "emiss",
+            "emivoc",
+            "hcho",
+            "hno3",
+            "isop",
+            "jno2",
+            "lossch4",
+            "lossco",
+            "mmraerh2o",
+            "mmrbc",
+            "mmrdust",
+            "mmrnh4",
+            "mmrno3",
+            "mmroa",
+            "mmrpm1",
+            "mmrpm10",
+            "mmrpm2p5",
+            "mmrso4",
+            "mmrsoa",
+            "mmrss",
+            "no",
+            "no2",
+            "o3",
+            "o3loss",
+            "o3prod",
+            "o3ste",
+            "od440aer",
+            "od550aer",
+            "od550aerh2o",
+            "od550bc",
+            "od550dust",
+            "od550lt1aer",
+            "od550no3",
+            "od550oa",
+            "od550so4",
+            "od550soa",
+            "od550ss",
+            "od870aer",
+            "oh",
+            "pan",
+            "phalf",
+            "ptp",
+            "so2",
+            "tatp",
+            "toz",
+            "tropoz",
+            "wetbc",
+            "wetdust",
+            "wetnh3",
+            "wetnh4",
+            "wetnoy",
+            "wetoa",
+            "wetso2",
+            "wetso4",
+            "wetss",
+            "ztp",
+            "ps"
+        ],
+        "AERmonZ": [
+            "ch4",
+            "hno3",
+            "ho2",
+            "noy",
+            "o3",
+            "oh"
+        ],
+        "Amon": [
+            "co2",
+            "co2mass",
+            "ch4",
+            "ch4global"
+        ]
+    }
+}

Some files were not shown because too many files changed in this diff