Browse Source

Adding 3.3.1 config

Pierre-Yves Barriat 3 years ago
parent
commit
f094bd9e39

+ 274 - 0
3.3.1/runtime/classic/config-run.xml

@@ -0,0 +1,274 @@
+<?xml version="1.0"?>
+
+<Configuration xmlns:xi="http://www.w3.org/2001/XInclude">
+
+    <Translation name="RUN_ATM+OCE">
+        <Description>Run script file (coupled run: atm+oce)</Description>
+        <Template>ece-ifs+nemo.sh.tmpl</Template>
+        <Target>ece-ifs+nemo.sh</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <Translation name="RUN_ATM">
+        <Description>Run script file (atm only run)</Description>
+        <Template>ece-ifs.sh.tmpl</Template>
+        <Target>ece-ifs.sh</Target>
+        <Properties>executable</Properties>
+    </Translation>
+
+    <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/zenobe-intelmpi.xml" />
+    <xi:include href="platform/lemaitre3-intelmpi.xml" />
+    <xi:include href="platform/bsc-marenostrum4.xml" />
+    <xi:include href="platform/cesga-finisterrae2.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/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} + 4 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>true</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>2</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>
+
+    </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>320</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 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>
+
+    </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>86</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="ISTART">
+            <Description>TM5 initial tracer fields option (2,5,9,31,32, or 33)</Description>
+            <Type>INTEGER</Type>
+            <Value>33</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="CMIP5_RCP">
+            <Description>RCP selection (RCP26, RCP45, RCP60, RCP85 or hist [pre-2000])</Description>
+            <Type>STRING</Type>
+            <Value>hist</Value>
+        </Parameter>
+
+        <Parameter name="EMISS_FIXYEAR">
+            <Description>Fix EMISSIONS at the indicated year (or 0 to ignore)</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>-1</Value>
+        </Parameter>
+
+        <Parameter name="LPJG_FIXLUAFTER">
+            <Description>Fix Land-Use from (>=0: year, -1:off)</Description>
+            <Type>INTEGER</Type>
+            <Value>-1</Value>
+        </Parameter>
+    </Model>
+
+</Configuration>

+ 100 - 0
3.3.1/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
3.3.1/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>
+    
+
+
+

+ 971 - 0
3.3.1/runtime/classic/ece-ifs+nemo.sh.tmpl

@@ -0,0 +1,971 @@
+
+# librunscript defines some helper functions
+. ${start_dir}/librunscript.sh
+echo "start dir : ${start_dir}"
+
+# =============================================================================
+# *** BEGIN User configuration
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# *** General configuration
+# -----------------------------------------------------------------------------
+
+# Component configuration
+# (for syntax of the $config variable, see librunscript.sh)
+config="ifs nemo lim3 rnfmapper xios:detached oasis"
+
+# Experiment name (exactly 4 letters!)
+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]]]"
+run_end_date="[[[MOD:GENERAL:RUN_END_DATE]]]"
+
+# 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!
+force_run_from_scratch=[[[MOD:GENERAL:FORCE_RUN_FROM_SCRATCH]]]
+special_restart=false
+special_restart_from=ECE3
+special_restart_date="1995-01-01"
+
+# Resolution
+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]]]
+
+# 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]]]
+
+# This file is used to store information about restarts
+ece_info_file="ece.info"
+
+# -----------------------------------------------------------------------------
+# *** Read platform dependent configuration
+# -----------------------------------------------------------------------------
+. ${start_dir}/ecconf.cfg
+
+configure
+
+echo "run dir : ${run_dir}"
+
+# -----------------------------------------------------------------------------
+# *** Time step settings
+# -----------------------------------------------------------------------------
+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
+
+# -----------------------------------------------------------------------------
+# *** IFS configuration
+# -----------------------------------------------------------------------------
+
+ifs_version=36r4
+
+ifs_di_freq=$(( 24 * 3600 / ifs_time_step_sec ))
+ifs_ddh_freq=$(( 120 * 3600 / ifs_time_step_sec ))
+
+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:')
+
+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]]]
+ifs_cmip_fixyear=[[[MOD:IFS:CMIP_FIXYEAR]]]
+
+ifs_cmip6=[[[MOD:IFS:CMIP6]]]
+ifs_mac2sp=[[[MOD:IFS:CMIP6]]]
+ifs_cmip6piaer=[[[MOD:IFS:CMIP6]]]
+ifs_cmip6_scenario=[[[MOD:IFS:CMIP6_SCENARIO]]]
+
+lcmip6_strataer_simp=FALSE
+lcmip6_strataer_full=[[[MOD:IFS:CMIP6]]]
+lcmip6_strataer_bckgd=FALSE
+
+ifs_A4xCO2=[[[MOD:IFS:CMIP6_A4xCO2]]]
+ifs_1PCTCO2=[[[MOD:IFS:CMIP6_1PCTCO2]]]
+
+# 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
+ifs_orb_switch=FALSE
+ifs_orb_mode="variable_year"
+ifs_orb_iyear=$(date -u -d "${run_start_date}" +%Y)
+
+# *** IFS tuning (the commented values are EC-Earth 3.2beta and IFS cy36r4)
+# 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
+
+# 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)
+#
+ifs_veg_source="era20c"
+
+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
+    ;;
+* )
+    error "Vegetation from ${ifs_veg_source} not implemented"
+    ;;
+esac
+
+# use DMI land ice physics and varying snow albedo
+ifs_landice=false
+
+# -----------------------------------------------------------------------------
+# *** NEMO/LIM configuration
+# -----------------------------------------------------------------------------
+
+# This is only needed if the experiment is started from an existing set of NEMO
+# restart files
+nem_restart_file_path=${start_dir}/nemo-rst
+
+nem_restart_offset=0
+
+nem_res_hor=$(echo ${nem_grid} | sed 's:ORCA\([0-9]\+\)L[0-9]\+:\1:')
+
+nem_exe_file=${ecearth_src_dir}/nemo-3.6/CONFIG/${nem_grid}_LIM3/BLD/bin/nemo.exe
+
+nem_numproc=[[[MOD:NEM:NUMPROC]]]
+
+# -----------------------------------------------------------------------------
+# *** Runoff mapper configuration
+# -----------------------------------------------------------------------------
+
+rnf_exe_file=${ecearth_src_dir}/runoff-mapper/bin/runoff-mapper.exe
+rnf_numproc=1
+
+# -----------------------------------------------------------------------------
+# *** 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_files="rstas.nc rstos.nc"
+
+# 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
+oas_mb_fluxcorr=1.07945
+
+# -----------------------------------------------------------------------------
+# *** 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}
+    if $special_restart
+    then
+        force_run_from_scratch=false
+        rsync -av --delete ${run_dir}/../${special_restart_from}/ --exclude log --exclude output --exclude restart --exclude="${special_restart_from}_*" --exclude="srf*" --exclude="restart_*" --exclude="debug.*" --exclude="output.*" ${run_dir}
+        cp -f ${nem_exe_file} ${run_dir}
+        cp -f ${ifs_exe_file} ${run_dir}
+        cp -f ${rnf_exe_file} ${run_dir}
+        cp -f ${xio_exe_file} ${run_dir}
+        special_year=${special_restart_date:0:4}
+        sed -i "/$special_year/q" ${run_dir}/ece.info
+        . ${run_dir}/ece.info
+        special_restart_leg=$(printf %03d $((leg_number+1)))
+        special_restart_leg_oasis=$(printf %03d $((leg_number+2)))
+        # PUT HERE THE INSTRUCTIONS TO COPY THE restart files
+        rsync -av ${run_dir}/../../archive/${special_restart_from}/restart/ifs/${special_restart_leg}/ ${run_dir}
+        rsync -av ${run_dir}/../../archive/${special_restart_from}/restart/oasis/${special_restart_leg_oasis}/ ${run_dir}
+        cd ${run_dir}/../../archive/${special_restart_from}/restart/nemo/${special_restart_leg}
+        for f in *.nc; do
+            nf=${exp_name}${f:4}
+            cp $f ${run_dir}/$nf
+        done
+        cd -
+        cd ${run_dir}
+        for f in ${exp_name}_????????_restart_???_????.nc; do
+            nf=${f:14}
+            ln -s $f $nf
+        done
+        cd -
+        rm -f ${run_dir}/ICMCL${special_restart_from}INIT
+        mv ${run_dir}/ICMGG${special_restart_from}INIUA ${run_dir}/ICMGG${exp_name}INIUA
+        mv ${run_dir}/ICMGG${special_restart_from}INIT ${run_dir}/ICMGG${exp_name}INIT
+        mv ${run_dir}/ICMSH${special_restart_from}INIT ${run_dir}/ICMSH${exp_name}INIT
+    fi
+else
+    force_run_from_scratch=false
+    special_restart=false
+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
+
+# 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
+
+    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)
+
+    # 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
+    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()
+    ${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
+
+        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
+
+        # ---------------------------------------------------------------------
+        # *** 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/* .
+
+        # 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 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
+
+        # 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 -fs ${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 the Runoff mapper (linked)
+        # ---------------------------------------------------------------------
+
+        ln -s ${ini_data_dir}/runoff-mapper/runoff_maps.nc
+
+        # ---------------------------------------------------------------------
+        # *** Files needed for OASIS (linked)
+        # ---------------------------------------------------------------------
+
+        oas_grid_dir=${ini_data_dir}/oasis/T${ifs_res_hor}-ORCA${nem_res_hor}
+
+        # Name table file
+        ln -s ${ini_data_dir}/oasis/cf_name_table.txt
+
+        # Grid definition files
+        ln -s ${oas_grid_dir}/areas.nc
+        ln -s ${oas_grid_dir}/grids.nc
+        ln -s ${oas_grid_dir}/masks.nc
+
+        # 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
+
+        case ${nem_res_hor} in
+              1)  oas_ogrd=O1t0
+                  ;;
+            025)  oas_ogrd=Ot25
+                  ;;
+              *)  error "Unsupported horizontal resolution (NEMO): ${nem_res_hor}"
+                  ;;
+        esac
+
+        if ${oas_link_weights}
+        then
+            for f in ${oas_grid_dir}/rmp_????_to_????_GAUSWGT.nc
+            do
+                ln -s $f
+            done
+        fi
+
+        for f in ${oas_rst_files}
+        do
+            cp ${oas_grid_dir}/rst/$f .
+        done
+
+    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}.nc
+
+    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
+    # -------------------------------------------------------------------------
+
+    # 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 namelist and OASIS namcouple files
+    . ${ctrl_file_dir}/namelist.ifs.sh                          > fort.4
+    . ${ctrl_file_dir}/namelist.nemo.ref.sh                     > namelist_ref
+    . ${ctrl_file_dir}/namelist.nemo-${nem_grid}-coupled.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
+
+    . ${ctrl_file_dir}/namelist.runoffmapper.sh                 > namelist.runoffmapper
+
+    . ${ctrl_file_dir}/namcouple.sh                             > namcouple
+
+
+    # -------------------------------------------------------------------------
+    # *** Create ICMCL file with vegetation fields
+    # -------------------------------------------------------------------------
+    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" )
+        # Vegetation from an off-line LPJG run forced with ERA20C (v16)
+
+        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
+            if [ $ifs_cmip_fixyear -le 0 ]
+            then
+                cat ${ini_data_dir}/ifs/${ifs_grid}/icmcl_v16/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_v16/icmcl_${ifs_cmip_fixyear}.grb ${tempfile}
+                cat ${tempfile} >> ICMCL${exp_name}INIT
+            fi
+        done
+        ;;
+    * )
+        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 && ! $special_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
+        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
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Remove some OASIS files of the previous leg
+    # -------------------------------------------------------------------------
+    if $leg_is_restart
+    then
+        rm -f anaisout_*
+    fi
+
+    # -------------------------------------------------------------------------
+    # *** Start the run
+    # -------------------------------------------------------------------------
+    export DR_HOOK_IGNORE_SIGNALS='-1'
+
+    export CPLNG='active'
+
+    # Use the launch function from the platform configuration file
+    t1=$(date +%s)
+    launch \
+        ${xio_numproc} ${xio_exe_file} -- \
+        ${nem_numproc} ${nem_exe_file} -- \
+        ${rnf_numproc} ${rnf_exe_file} -- \
+        ${ifs_numproc} ${ifs_exe_file} -v ecmwf -e ${exp_name}
+    t2=$(date +%s)
+
+    tr=$(date -u -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.
+    # -------------------------------------------------------------------------
+
+    # 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 [ -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
+
+    # -------------------------------------------------------------------------
+    # *** Post-process initial conditions saved during the run if requested
+    # -------------------------------------------------------------------------
+    ${do_save_ic} && save_ic_postproc
+
+    # -------------------------------------------------------------------------
+    # *** Move IFS output files to archive directory
+    # -------------------------------------------------------------------------
+    outdir="${archive_dir}/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
+    # -------------------------------------------------------------------------
+    outdir="${archive_dir}/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 \
+             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_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 IFS restart files to archive directory
+    # -------------------------------------------------------------------------
+    if $leg_is_restart
+    then
+        outdir="${archive_dir}/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 NEMO restart files to archive directory
+    # -------------------------------------------------------------------------
+    if $leg_is_restart
+    then
+        outdir="${archive_dir}/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
+    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="${archive_dir}/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="${archive_dir}/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="${archive_dir}/log/$(printf %03d $((leg_number)))"
+    mkdir -p ${outdir}
+
+    for f in \
+        ifs.log ifs.stat fort.4 ocean.output \
+        time.step solver.stat \
+        nout.000000 debug.??.?????? A*_??.nc O*_??.nc
+    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)) $(($ifs_numproc + $nem_numproc + $rnf_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
+    special_restart=false
+
+done # loop over legs
+
+# -----------------------------------------------------------------------------
+# *** Platform dependent finalising of the run
+# -----------------------------------------------------------------------------
+finalise
+
+exit 0

+ 24 - 0
3.3.1/runtime/classic/lemaitre3.sh.tmpl

@@ -0,0 +1,24 @@
+#!/bin/bash
+# Submission script for Lemaitre3
+#SBATCH --job-name=ece3
+#SBATCH --time=23:50:00
+#
+#SBATCH --ntasks=144
+#SBATCH --mem-per-cpu=3072
+#
+##SBATCH --mail-user=noname@uclouvain.be
+#SBATCH --mail-type=ALL
+#SBATCH --open-mode=append
+#SBATCH --switches=1@47:50:00
+set -ueo pipefail
+
+exec > ${SLURM_SUBMIT_DIR-$PWD}/${SLURM_JOB_NAME-"local"}_${SLURM_JOB_ID-"id"}.log
+echo "------------------ Job Info --------------------"
+echo "jobid : ${SLURM_JOB_ID-"local"}"
+echo "jobname : ${SLURM_JOB_NAME-"local"}"
+echo "submit dir : ${SLURM_SUBMIT_DIR-"local"}"
+
+set -ue 
+
+# Directories
+start_dir=${SLURM_SUBMIT_DIR-$PWD}

+ 101 - 0
3.3.1/runtime/classic/platform/lemaitre3-intelmpi.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+    <Platform name="lemaitre3">
+        <Description>
+            HOST:        lemaitre3.cism.ucl.ac.be
+            ARCH:        linux_x86_64
+            CPU MODEL:   SkyLake
+            MAINTAINER:  Pierre-Yves Barriat [pierre-yves.barriat@uclouvain.be]
+        </Description>
+
+        <Translation name="LEMAITRE3_CFG">
+            <Description>Platform dependent configuration (lemaitre3)</Description>
+            <Template>platform/lemaitre3.cfg.tmpl</Template>
+            <Target>ecconf.cfg</Target>
+            <Properties></Properties>
+        </Translation>
+
+        <Parameter name="BUILD_ARCH">
+            <Description>Architecture used when building EC-Earth</Description>
+            <Type>STRING</Type>
+            <Value>ecconf</Value>
+        </Parameter>
+
+        <Parameter name="ECEARTH_SRC_DIR">
+            <Description>Base directory for EC-Earth sources</Description>
+            <Type>PATH</Type>
+            <Value>${HOME}/modeles/ecearth/ecearth_3.3.0/sources</Value>
+        </Parameter>
+
+        <Parameter name="RUN_DIR">
+            <Description>EC-Earth run directory</Description>
+            <Type>PATH</Type>
+            <Value>/CECI/trsf/${USER}/run/ecearth/${exp_name}</Value>
+        </Parameter>
+
+        <Parameter name="INI_DATA_DIR">
+            <Description>Initial data directory used by EC-Earth</Description>
+            <Type>PATH</Type>
+            <Value>/scratch/ucl/elic/pbarriat/DATA/EC-EARTH</Value>
+        </Parameter>
+
+        <Parameter name="PROC_PER_NODE">
+            <Description>Number of processors per node</Description>
+            <Type>INTEGER</Type>
+            <Value>24</Value>
+        </Parameter>
+
+        <Parameter name="RESUBMIT_JOB">
+            <Description>Automatically resubmit the job? [true|false]</Description>
+            <Type>BOOLEAN</Type>
+            <Value>true</Value>
+        </Parameter>
+
+        <Parameter name="RESUBMIT_OPT">
+            <Description>Additional options for the submit command</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_BASE_DIR">
+            <Description>GRIB API base directory</Description>
+            <Type>PATH</Type>
+            <Value>${EBROOTGRIB_API}</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_BIN_SUBDIR">
+            <Description>GRIB API bin directory relative to the base directory</Description>
+            <Type>PATH</Type>
+            <Value>bin</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_DEFINITION_SUBDIR">
+            <Description>GRIB API definition directory relative to the base directory</Description>
+            <Type>PATH</Type>
+            <Value>share/grib_api/definitions</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_SAMPLES_SUBDIR">
+            <Description>GRIB API samples directory relative to the base directory</Description>
+            <Type>PATH</Type>
+            <Value>share/grib_api/ifs_samples/grib1</Value>
+        </Parameter>
+
+        <Parameter name="ADD_TO_LD_LIBRARY_PATH">
+            <Description>Additional shared library paths needed at runtime</Description>
+            <Type>STRING</Type>
+            <Value></Value>
+        </Parameter>
+
+        <Parameter name="PRE_LOAD_MODULES_CMD">
+            <Description>Command run before any modules are loaded</Description>
+            <Type>STRING</Type>
+            <Value>module purge</Value>
+        </Parameter>
+
+        <Parameter name="MODULE_LIST">
+            <Description>List of modules to load</Description>
+            <Type>STRING</Type>
+            <Value>2016a netCDF-Fortran/4.4.4-intel-2016a grib_api/1.16.0-intel-2016a openjpeg/1.5.2-intel-2016a</Value>
+        </Parameter>
+
+    </Platform>

+ 146 - 0
3.3.1/runtime/classic/platform/lemaitre3.cfg.tmpl

@@ -0,0 +1,146 @@
+# Platform dependent configuration functions for the 'lemaitre3' machine
+#(lemaitre3.cism.ucl.ac.be)
+
+function configure()
+{
+    # This function should configure all settings/modules needed to
+    # later prepare the EC-Earth run directory and set variables used
+    # in the run script
+
+
+    # Configure paths for building/running EC-Earth
+    ecearth_src_dir=[[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]
+    run_dir=[[[PLT:ACTIVE:RUN_DIR]]]
+    ini_data_dir=[[[PLT:ACTIVE:INI_DATA_DIR]]]
+    archive_dir=/scratch/ucl/elic/${USER}/ecearth/archive/${exp_name}
+
+    # File for standard output.
+    # NOTE: This will be modified for restart jobs!
+    stdout_file=${SLURM_SUBMIT_DIR-$PWD}/${SLURM_JOB_NAME-"local"}_${SLURM_JOB_ID-"id"}.log
+
+    # Resubmit this job for automatic restarts? [true/false]
+    # Also, add options for the resubmit command here.
+    resubmit_job=[[[PLT:ACTIVE:RESUBMIT_JOB]]]
+    resubmit_opt="[[[PLT:ACTIVE:RESUBMIT_OPT]]]"
+
+    # Configure number of processors per node
+    proc_per_node=[[[PLT:ACTIVE:PROC_PER_NODE]]]
+
+    # Configure and load modules
+    pre_load_modules_cmd="[[[PLT:ACTIVE:PRE_LOAD_MODULES_CMD]]]"
+    module_list="[[[PLT:ACTIVE:MODULE_LIST]]]"
+
+    if [ -n "${pre_load_modules_cmd}" ]
+    then
+        ${pre_load_modules_cmd}
+    fi
+    if [ -n "${module_list}" ]
+    then
+        module load ${module_list}
+    fi
+
+    # Configure grib api paths
+    export GRIB_DEFINITION_PATH=[[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]/util/grib_table_126:[[[PLT:ACTIVE:GRIBAPI_BASE_DIR]]]/[[[PLT:ACTIVE:GRIBAPI_DEFINITION_SUBDIR]]]
+    export GRIB_SAMPLES_PATH=[[[PLT:ACTIVE:GRIBAPI_BASE_DIR]]]/[[[PLT:ACTIVE:GRIBAPI_SAMPLES_SUBDIR]]]
+    export GRIB_BIN_PATH=[[[PLT:ACTIVE:GRIBAPI_BASE_DIR]]]/[[[PLT:ACTIVE:GRIBAPI_BIN_SUBDIR]]]
+
+    # Add directories to the shared library search path
+    if [ -n "[[[PLT:ACTIVE:ADD_TO_LD_LIBRARY_PATH]]]" ]
+    then
+        export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"[[[PLT:ACTIVE:ADD_TO_LD_LIBRARY_PATH]]]"
+    fi
+}
+
+function launch()
+{
+    # Compute and check the node distribution
+    info "======================="
+    info "Node/proc distribution:"
+    info "-----------------------"
+    info "IFS:   ${ifs_numproc}"
+    info "NEMO:  ${nem_numproc}"
+    info "XIOS:  ${xio_numproc}"
+    info "======================="
+
+    cmd="mpirun"
+
+    while (( "$#" ))
+    do
+        nranks=$1
+        executable=./$(basename $2)
+        shift
+        shift
+
+        cmd+=" -n $nranks $executable"
+
+        while (( "$#" )) && [ "$1" != "--" ]
+        do
+            cmd+=" $1"
+            shift
+        done
+        shift || true
+
+        (( "$#" )) && cmd+=" :"
+    done
+
+    #export OMP_NUM_THREADS=1
+    pwd
+    echo $cmd
+    #exit
+    $cmd
+}
+
+function finalise2()
+{
+    # This function should execute of any post run functionality, e.g.
+    # platform dependent cleaning or a resubmit
+
+    if ${resubmit_job} && [ $(date -d "${leg_end_date}" +%s) -lt $(date -d "${run_end_date}" +%s) ]
+    then
+        info "Resubmitting job for leg $((leg_number+1))"
+        # Need to go to start_dir to find the run script
+        cd ${SLURM_SUBMIT_DIR}  # same as $start_dir
+
+        cp ./${SLURM_JOB_NAME} ./$(basename ${SLURM_JOB_NAME}).$$
+     
+        sed "s:force_run_from_scratch=true:force_run_from_scratch=false:" \
+            <./$(basename ${SLURM_JOB_NAME}).$$ \
+            >./$(basename ${SLURM_JOB_NAME})
+
+        cp -f ./${SLURM_JOB_NAME} ./$(basename ${SLURM_JOB_NAME}).$$
+
+        sed "s:special_restart=true:special_restart=false:" \
+            <./$(basename ${SLURM_JOB_NAME}).$$ \
+            >./$(basename ${SLURM_JOB_NAME})
+
+        \rm -f ./${PBS_JOBNAME}.$$
+
+        # Submit command
+        set -x
+        qsub ./$(basename ${SLURM_JOB_NAME})
+        set +x
+    else
+        info "Not resubmitting."
+    fi
+}
+
+function finalise()
+{
+    # This function should execute of any post run functionality, e.g.
+    # platform dependent cleaning or a resubmit
+
+    if ${resubmit_job} && [ $(date -d "${leg_end_date}" +%s) -lt $(date -d "${run_end_date}" +%s) ]
+    then
+        info "Resubmitting job for leg $((leg_number+1))"
+        # Need to go to start_dir to find the run script
+        cd ${start_dir}
+        # Submit command
+        # Note: This does not work if you specify a job name with sbatch -J jobname!
+        sbatch -N ${SLURM_JOB_NUM_NODES}                                                 \
+               -o ${run_dir}/$(basename ${stdout_file}).$(printf %03d $((leg_number+1))) \
+               -e ${run_dir}/$(basename ${stdout_file}).$(printf %03d $((leg_number+1))) \
+               -d ${SLURM_JOB_ID}                                                        \
+               ${resubmit_opt}                                                           \
+               ./${SLURM_JOB_NAME}
+    fi
+}

+ 101 - 0
3.3.1/runtime/classic/platform/zenobe-intelmpi.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+    <Platform name="zenobe">
+        <Description>
+            HOST:        zenobe.hpc.cenaero.be
+            ARCH:        linux_x86_64
+            CPU MODEL:   Ivy Bridge
+            MAINTAINER:  Pierre-Yves Barriat [pierre-yves.barriat@uclouvain.be]
+        </Description>
+
+        <Translation name="ZENOBE_CFG">
+            <Description>Platform dependent configuration (zenobe)</Description>
+            <Template>platform/zenobe.cfg.tmpl</Template>
+            <Target>ecconf.cfg</Target>
+            <Properties></Properties>
+        </Translation>
+
+        <Parameter name="BUILD_ARCH">
+            <Description>Architecture used when building EC-Earth</Description>
+            <Type>STRING</Type>
+            <Value>ecconf</Value>
+        </Parameter>
+
+        <Parameter name="ECEARTH_SRC_DIR">
+            <Description>Base directory for EC-Earth sources</Description>
+            <Type>PATH</Type>
+            <Value>${HOME}/modeles/ecearth/ecearth_3.3.0/sources</Value>
+        </Parameter>
+
+        <Parameter name="RUN_DIR">
+            <Description>EC-Earth run directory</Description>
+            <Type>PATH</Type>
+            <Value>/SCRATCH/acad/ecearth/${USER}/run/${exp_name}</Value>
+        </Parameter>
+
+        <Parameter name="INI_DATA_DIR">
+            <Description>Initial data directory used by EC-Earth</Description>
+            <Type>PATH</Type>
+            <Value>/SCRATCH/acad/ecearth/DATA/v3.3.0/inidata</Value>
+        </Parameter>
+
+        <Parameter name="PROC_PER_NODE">
+            <Description>Number of processors per node</Description>
+            <Type>INTEGER</Type>
+            <Value>24</Value>
+        </Parameter>
+
+        <Parameter name="RESUBMIT_JOB">
+            <Description>Automatically resubmit the job? [true|false]</Description>
+            <Type>BOOLEAN</Type>
+            <Value>true</Value>
+        </Parameter>
+
+        <Parameter name="RESUBMIT_OPT">
+            <Description>Additional options for the submit command</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_BASE_DIR">
+            <Description>GRIB API base directory</Description>
+            <Type>PATH</Type>
+            <Value>/projects/acad/ecearth/opt/grib_api</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_BIN_SUBDIR">
+            <Description>GRIB API bin directory relative to the base directory</Description>
+            <Type>PATH</Type>
+            <Value>bin</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_DEFINITION_SUBDIR">
+            <Description>GRIB API definition directory relative to the base directory</Description>
+            <Type>PATH</Type>
+            <Value>share/definitions</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_SAMPLES_SUBDIR">
+            <Description>GRIB API samples directory relative to the base directory</Description>
+            <Type>PATH</Type>
+            <Value>share/ifs_samples/grib1</Value>
+        </Parameter>
+
+        <Parameter name="ADD_TO_LD_LIBRARY_PATH">
+            <Description>Additional shared library paths needed at runtime</Description>
+            <Type>STRING</Type>
+            <Value>/projects/acad/ecearth/opt/grib_api/lib:/projects/acad/ecearth/opt/openjpeg/lib:/projects/acad/ecearth/opt/netcdf/4.4.1.1_ivy_2016.2.181/lib</Value>
+        </Parameter>
+
+        <Parameter name="PRE_LOAD_MODULES_CMD">
+            <Description>Command run before any modules are loaded</Description>
+            <Type>STRING</Type>
+            <Value>module purge</Value>
+        </Parameter>
+
+        <Parameter name="MODULE_LIST">
+            <Description>List of modules to load</Description>
+            <Type>STRING</Type>
+            <Value>compiler/intel/comp_and_lib/2016.2.181 intelmpi/5.1.3.181/64 hdf5/1.8.18-el6/intel_2016.2.181/intelmpi_5.1.3.181</Value>
+        </Parameter>
+
+    </Platform>

+ 132 - 0
3.3.1/runtime/classic/platform/zenobe.cfg.tmpl

@@ -0,0 +1,132 @@
+# Platform dependent configuration functions for the 'zenobe' machine
+#(zenobe.hpc.cenaero.be)
+
+function configure()
+{
+    # This function should configure all settings/modules needed to
+    # later prepare the EC-Earth run directory and set variables used
+    # in the run script
+
+
+    # Configure paths for building/running EC-Earth
+    ecearth_src_dir=[[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]
+    run_dir=[[[PLT:ACTIVE:RUN_DIR]]]
+    ini_data_dir=[[[PLT:ACTIVE:INI_DATA_DIR]]]
+    archive_dir=/SCRATCH/acad/ecearth/${USER}/archive/${exp_name}
+
+    # File for standard output.
+    # NOTE: This will be modified for restart jobs!
+    stdout_file=${PBS_O_WORKDIR-$PWD}/${PBS_JOBNAME-"local"}_${PBS_JOBID-"id"}.log
+
+    # Resubmit this job for automatic restarts? [true/false]
+    # Also, add options for the resubmit command here.
+    resubmit_job=[[[PLT:ACTIVE:RESUBMIT_JOB]]]
+    resubmit_opt="[[[PLT:ACTIVE:RESUBMIT_OPT]]]"
+
+    # Configure grib api paths
+    export GRIB_DEFINITION_PATH=[[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]/util/grib_table_126:[[[PLT:ACTIVE:GRIBAPI_BASE_DIR]]]/[[[PLT:ACTIVE:GRIBAPI_DEFINITION_SUBDIR]]]
+    export GRIB_SAMPLES_PATH=[[[PLT:ACTIVE:GRIBAPI_BASE_DIR]]]/[[[PLT:ACTIVE:GRIBAPI_SAMPLES_SUBDIR]]]
+    export GRIB_BIN_PATH=[[[PLT:ACTIVE:GRIBAPI_BASE_DIR]]]/[[[PLT:ACTIVE:GRIBAPI_BIN_SUBDIR]]]
+
+    # Configure number of processors per node
+    proc_per_node=[[[PLT:ACTIVE:PROC_PER_NODE]]]
+
+    # Configure and load modules
+    pre_load_modules_cmd="[[[PLT:ACTIVE:PRE_LOAD_MODULES_CMD]]]"
+    module_list="[[[PLT:ACTIVE:MODULE_LIST]]]"
+
+    if [ -n "${pre_load_modules_cmd}" ]
+    then
+        ${pre_load_modules_cmd}
+    fi
+    if [ -n "${module_list}" ]
+    then
+        module load ${module_list}
+    fi
+
+    # Add directories to the shared library search path
+    if [ -n "[[[PLT:ACTIVE:ADD_TO_LD_LIBRARY_PATH]]]" ]
+    then
+        export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"[[[PLT:ACTIVE:ADD_TO_LD_LIBRARY_PATH]]]"
+    fi
+}
+
+function launch()
+{
+    # Compute and check the node distribution
+    info "======================="
+    info "Node/proc distribution:"
+    info "-----------------------"
+    info "IFS:   ${ifs_numproc}"
+    info "NEMO:  ${nem_numproc}"
+    info "XIOS:  ${xio_numproc}"
+    info "======================="
+
+    cmd="mpirun"
+
+    while (( "$#" ))
+    do
+        nranks=$1
+        executable=./$(basename $2)
+        shift
+        shift
+
+        cmd+=" -n $nranks $executable"
+
+        while (( "$#" )) && [ "$1" != "--" ]
+        do
+            cmd+=" $1"
+            shift
+        done
+        shift || true
+
+        (( "$#" )) && cmd+=" :"
+    done
+
+    #export OMP_NUM_THREADS=1
+    #export OMP_NUM_THREADS=1
+    #export I_MPI_ADJUST_BCAST=3
+    #export PSM2_MTU=8196
+    #export PSM2_MEMORY=large
+    #export PSM2_MQ_RNDV_HFI_THRESH=1
+    #export I_MPI_DEBUG=5
+    #export I_MPI_FABRIC=tmi
+    pwd
+    echo $cmd
+    #exit
+    $cmd
+}
+
+function finalise()
+{
+    # This function should execute of any post run functionality, e.g.
+    # platform dependent cleaning or a resubmit
+
+    if ${resubmit_job} && [ $(date -d "${leg_end_date}" +%s) -lt $(date -d "${run_end_date}" +%s) ]
+    then
+        info "Resubmitting job for leg $((leg_number+1))"
+        # Need to go to start_dir to find the run script
+        cd ${PBS_O_WORKDIR}  # same as $start_dir
+
+        cp ./${PBS_JOBNAME} ./${PBS_JOBNAME}.$$
+     
+        sed "s:force_run_from_scratch=true:force_run_from_scratch=false:" \
+            <./${PBS_JOBNAME}.$$ \
+            >./${PBS_JOBNAME}
+
+        cp -f ./${PBS_JOBNAME} ./${PBS_JOBNAME}.$$
+
+        sed "s:special_restart=true:special_restart=false:" \
+            <./${PBS_JOBNAME}.$$ \
+            >./${PBS_JOBNAME}
+
+        \rm -f ./${PBS_JOBNAME}.$$
+
+        # Submit command
+        set -x
+        qsub ./${PBS_JOBNAME}
+        set +x
+    else
+        info "Not resubmitting."
+    fi
+}

+ 24 - 0
3.3.1/runtime/classic/zenobe.sh.tmpl

@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+#PBS -q large
+#PBS -r y
+#PBS -W group_list=ecearth
+#PBS -l walltime=23:50:00
+#PBS -l select=17:ncpus=24:mem=63000mb:mpiprocs=24:ompthreads=1
+##PBS -M noname@uclouvain.be
+##PBS -m abe
+
+exec > ${PBS_O_WORKDIR-$PWD}/${PBS_JOBNAME-"local"}_${PBS_JOBID-"id"}.log
+echo "------------------ Job Info --------------------"
+echo "jobid : $PBS_JOBID"
+echo "jobname : $PBS_JOBNAME"
+echo "job type : $PBS_ENVIRONMENT"
+echo "submit dir : $PBS_O_WORKDIR"
+echo "queue : $PBS_O_QUEUE"
+echo "user : $PBS_O_LOGNAME"
+echo "threads : $OMP_NUM_THREADS"
+
+set -ue
+
+# Directories
+start_dir=${PBS_O_WORKDIR-$PWD}

+ 4 - 0
3.3.1/sources/config-build.xml

@@ -0,0 +1,4 @@
+    <xi:include href="platform/zenobe-intelmpi.xml" />
+    <xi:include href="platform/lemaitre3-intelmpi.xml" />
+
+</Configuration>

+ 415 - 0
3.3.1/sources/lemaitre3-intelmpi.xml

@@ -0,0 +1,415 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <Platform name="lemaitre3-intelmpi">
+        <Description>
+            HOST:        lemaitre3.cism.ucl.ac.be
+            ARCH:        linux_x86_64
+            CPU MODEL:   Intel Skylake
+            MAINTAINER:  PY Barriat [pierre-yves.barriat@uclouvain.be]
+            COMPILER:    i-compilers (icc+ifort, 18.0.1.163)
+            MPI:         Intel MPI
+            BLAS/LAPACK: Intel MKL
+        </Description>
+
+        <Parameter name="ECEARTH_SRC_DIR">
+            <Description>Base directory for EC-Earth sources</Description>
+            <Type>PATH</Type>
+            <Value>${HOME}/modeles/ecearth/ecearth_3.3.0/sources</Value>
+        </Parameter>
+
+        <Parameter name="MPI_BASE_DIR">
+            <Description>MPI base directory</Description>
+            <Type>PATH</Type>
+            <Value>$(EBROOTIMPI)/intel64</Value>
+        </Parameter>
+
+        <Parameter name="MPI_INC_SUBDIR">
+            <Description>MPI include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="MPI_LIB_SUBDIR">
+            <Description>MPI lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="MPI_LIBS_WITHOUT_L">
+            <Description>MPI libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>mpi mpiif mpigf</Value>
+        </Parameter>
+
+        <Parameter name="LAPACK_BASE_DIR">
+            <Description>LAPACK base directory</Description>
+            <Type>PATH</Type>
+            <Value>$(EBROOTIMKL)/mkl</Value>
+        </Parameter>
+
+        <Parameter name="LAPACK_LIB_SUBDIR">
+            <Description>LAPACK lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib/intel64</Value>
+        </Parameter>
+
+        <Parameter name="LAPACK_LIBS_WITHOUT_L">
+            <Description>LAPACK libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>mkl_intel_lp64 mkl_core mkl_sequential</Value>
+        </Parameter>
+
+        <Parameter name="NETCDF_BASE_DIR">
+            <Description>NetCDF base directory</Description>
+            <Type>PATH</Type>
+            <Value>$(EBROOTNETCDF)</Value>
+        </Parameter>
+
+        <Parameter name="NETCDF_INC_SUBDIR">
+            <Description>NetCDF include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include $(EBROOTNETCDFMINFORTRAN)/include</Value>
+        </Parameter>
+
+        <Parameter name="NETCDF_LIB_SUBDIR">
+            <Description>NetCDF lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib64 $(EBROOTNETCDFMINFORTRAN)/lib</Value>
+        </Parameter>
+
+        <Parameter name="NETCDF_LIBS_WITHOUT_L">
+            <Description>NetCDF libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>netcdff netcdf</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_BASE_DIR">
+            <Description>GRIB API base directory</Description>
+            <Type>PATH</Type>
+            <Value>$(EBROOTGRIB_API)</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_INC_SUBDIR">
+            <Description>GRIB API include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_LIB_SUBDIR">
+            <Description>GRIB API lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_LIBS_WITHOUT_L">
+            <Description>GRIB_API libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>grib_api_f90 grib_api</Value>
+        </Parameter>
+
+        <Parameter name="GRIBEX_BASE_DIR">
+            <Description>GRIBEX base directory</Description>
+            <Type>PATH</Type>
+            <Value>/scratch/ucl/elic/pbarriat/DATA/OPT/gribex</Value>
+        </Parameter>
+
+        <Parameter name="GRIBEX_LIB_SUBDIR">
+            <Description>GRIBEX lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="GRIBEX_LIBS_WITHOUT_L">
+            <Description>GRIBEX libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>gribexR64</Value>
+        </Parameter>
+
+        <Parameter name="JPEG_BASE_DIR">
+            <Description>JPEG base directory</Description>
+            <Type>PATH</Type>
+            <Value>$(EBROOTOPENJPEG)</Value>
+        </Parameter>
+
+        <Parameter name="JPEG_INC_SUBDIR">
+            <Description>JPEG include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="JPEG_LIB_SUBDIR">
+            <Description>JPEG lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="JPEG_LIBS_WITHOUT_L">
+            <Description>JPEG libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>openjpeg</Value>
+        </Parameter>
+
+        <Parameter name="SZIP_BASE_DIR">
+            <Description>SZIP base directory</Description>
+            <Type>PATH</Type>
+            <Value>$(EBROOTSZIP)</Value>
+        </Parameter>
+
+        <Parameter name="SZIP_INC_SUBDIR">
+            <Description>SZIP include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="SZIP_LIB_SUBDIR">
+            <Description>SZIP lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="SZIP_LIBS_WITHOUT_L">
+            <Description>SZIP libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>sz</Value>
+        </Parameter>
+
+        <Parameter name="HDF4_BASE_DIR">
+            <Description>HDF4 base directory</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF4_INC_SUBDIR">
+            <Description>HDF4 include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF4_LIB_SUBDIR">
+            <Description>HDF4 lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF4_LIBS_WITHOUT_L">
+            <Description>HDF4 libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF5_BASE_DIR">
+            <Description>HDF5 base directory</Description>
+            <Type>PATH</Type>
+            <Value>$(EBROOTHDF5)</Value>
+        </Parameter>
+
+        <Parameter name="HDF5_INC_SUBDIR">
+            <Description>HDF5 include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="HDF5_LIB_SUBDIR">
+            <Description>HDF5 lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="HDF5_LIBS_WITHOUT_L">
+            <Description>HDF5 libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>hdf5_hl hdf5</Value>
+        </Parameter>
+
+        <Parameter name="MAKE">
+            <Description>Make command (GNU make min 3.81 needed!)</Description>
+            <Type>STRING</Type>
+            <Value>make</Value>
+        </Parameter>
+
+        <Parameter name="FC">
+            <Description>F90 Compiler</Description>
+            <Type>STRING</Type>
+            <Value>ifort</Value>
+        </Parameter>
+
+        <Parameter name="FFLAGS">
+            <Description>General F90 flags for compiling</Description>
+            <Type>STRING</Type>
+            <Value>-O2 -fp-model precise -xHost -r8</Value>
+        </Parameter>
+
+        <Parameter name="FFLAGS_FREEFORM">
+            <Description>Allow for free format Fortran</Description>
+            <Type>STRING</Type>
+            <Value>-free</Value>
+        </Parameter>
+
+        <Parameter name="FFLAGS_FIXEDFORM">
+            <Description>Expect fixed Fortran format</Description>
+            <Type>STRING</Type>
+            <Value>-fixed</Value>
+        </Parameter>
+
+        <Parameter name="FFLAGS_FPP_PREFIX">
+            <Description>Fortran preprocessor flag prefix</Description>
+            <Type>STRING</Type>
+            <Value>-D</Value>
+        </Parameter>
+
+        <Parameter name="CC">
+            <Description>C Compiler</Description>
+            <Type>STRING</Type>
+            <Value>icc</Value>
+        </Parameter>
+
+        <Parameter name="CXX">
+            <Description>C++ Compiler</Description>
+            <Type>STRING</Type>
+            <Value>icc</Value>
+        </Parameter>
+
+        <Parameter name="CFLAGS">
+            <Description>General C flags for compiling</Description>
+            <Type>STRING</Type>
+            <Value>-O2 -fp-model precise -xHost</Value>
+        </Parameter>
+
+        <Parameter name="CFLAGS_CPP_PREFIX">
+            <Description>C preprocessor flag prefix</Description>
+            <Type>STRING</Type>
+            <Value>-D</Value>
+        </Parameter>
+
+        <Parameter name="LD">
+            <Description>Linker</Description>
+            <Type>STRING</Type>
+            <Value>ifort</Value>
+        </Parameter>
+
+        <Parameter name="LDFLAGS">
+            <Description>General flags for linking</Description>
+            <Type>STRING</Type>
+            <Value>-O2 -fp-model precise -xHost</Value>
+        </Parameter>
+
+        <Parameter name="AR">
+            <Description>Command for building libraries from object files (usually ar)</Description>
+            <Type>STRING</Type>
+            <Value>ar</Value>
+        </Parameter>
+
+        <Parameter name="ARFLAGS">
+            <Description>Flags for library building command (When using ar: include u)</Description>
+            <Type>STRING</Type>
+            <Value>curv</Value>
+        </Parameter>
+
+        <Parameter name="ARFLAGS_EXTRACT">
+            <Description>Flags for library building command (When using ar: include u)</Description>
+            <Type>STRING</Type>
+            <Value>p</Value>
+        </Parameter>
+
+        <Parameter name="CPP">
+            <Description>C preprocessor command</Description>
+            <Type>STRING</Type>
+            <Value>cpp</Value>
+        </Parameter>
+
+        <Parameter name="FPP">
+            <Description>C preprocessor command</Description>
+            <Type>STRING</Type>
+            <Value>fpp</Value>
+        </Parameter>
+
+        <Parameter name="CPPFLAGS">
+            <Description>C preprocessor flags</Description>
+            <Type>STRING</Type>
+            <Value>-P -C</Value>
+        </Parameter>
+
+        <Parameter name="XIOS_CFLAGS">
+            <Description>CFLAGS flags for XIOS</Description>
+            <Type>STRING</Type>
+            <Value>-ansi -w</Value>
+        </Parameter>
+
+        <Parameter name="XIOS_ADD_LDFLAGS">
+            <Description>More LD flags for XIOS</Description>
+            <Type>STRING</Type>
+            <Value>-lstdc++</Value>
+        </Parameter>
+
+        <Parameter name="OASIS_ADD_FFLAGS">
+            <Description>More F90 flags for Oasis</Description>
+            <Type>STRING</Type>
+            <Value>-132 -check pointers -check uninit</Value>
+        </Parameter>
+
+        <Parameter name="OASIS_ADD_PPDEFS">
+            <Description>More CPP/FPP macros for Oasis</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="OASIS_ADD_LDFLAGS">
+            <Description>More LD flags for Oasis</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="NEMO_ADD_FFLAGS">
+            <Description>More F90 flags for Nemo</Description>
+            <Type>STRING</Type>
+            <Value>-check pointers -check uninit</Value>
+        </Parameter>
+
+        <Parameter name="NEMO_ADD_LDFLAGS">
+            <Description>More LD flags for Nemo</Description>
+            <Type>STRING</Type>
+            <Value>-lstdc++</Value>
+        </Parameter>
+
+        <Parameter name="IFS_PPDEFS">
+            <Description>Preprocessor defs for IFS sources</Description>
+            <Type>STRING</Type>
+            <Value>linux LINUX LITTLE LITTLE_ENDIAN POINTER_64 BLAS</Value>
+        </Parameter>
+
+        <Parameter name="IFSAUX_ADD_FFLAGS">
+            <Description>More F90 flags for ifs/ifsaux</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="TM5_DEFAULT_FFLAGS">
+            <Description>Default F90 flags for TM5 (ie without optimization)</Description>
+            <Type>STRING</Type>
+            <Value>-warn declarations -traceback -r8</Value>
+        </Parameter>
+
+        <Parameter name="TM5_OPTIM_FFLAGS">
+            <Description>F90 optimization flags for TM5</Description>
+            <Type>STRING</Type>
+            <Value>-O3 -fp-model strict -g</Value>
+        </Parameter>
+
+        <Parameter name="TM5_MDEFS_FFLAGS">
+            <Description>Model preprocessor defs. Set to with_ecearth_optics if aerosols feedback will be switch on.</Description>
+            <Type>STRING</Type>
+            <Value>with_ecearth_optics</Value>
+        </Parameter>
+
+        <Parameter name="TM5_CO2_ONLY">
+            <Description>Light version of TM5 (True or False)</Description>
+            <Type>STRING</Type>
+            <Value>False</Value>
+        </Parameter>
+
+        <Parameter name="MAKEDEPF90">
+            <Description>F90 dependency generator</Description>
+            <Type>STRING</Type>
+            <Value>$(ECEARTH_SRC_DIR)/util/makedepf90/bin/makedepf90</Value>
+        </Parameter>
+
+    </Platform>

+ 68 - 0
3.3.1/sources/nemo_lemaitre3_arch-ecconf.fcm.tmpl

@@ -0,0 +1,68 @@
+# EC-EARTH3 ec-conf-based configuration
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+
+%HDF5_HOME           [[[PLT:ACTIVE:HDF5_BASE_DIR]]]
+%HDF5_LIB            $(addprefix -L,$(addsuffix /,[[[PLT:ACTIVE:HDF5_BASE_DIR]]])[[[PLT:ACTIVE:HDF5_LIB_SUBDIR]]]) \
+                     $(addprefix -l,[[[PLT:ACTIVE:HDF5_LIBS_WITHOUT_L]]])
+
+%NCDF_INC            $(addprefix -I,$(addsuffix /,[[[PLT:ACTIVE:NETCDF_BASE_DIR]]])[[[PLT:ACTIVE:NETCDF_INC_SUBDIR]]])
+%NCDF_LIB            $(addprefix -L,$(addsuffix /,[[[PLT:ACTIVE:NETCDF_BASE_DIR]]])[[[PLT:ACTIVE:NETCDF_LIB_SUBDIR]]]) \
+                     $(addprefix -l,[[[PLT:ACTIVE:NETCDF_LIBS_WITHOUT_L]]])
+
+%MPI_INC             $(addprefix -I,[[[PLT:ACTIVE:MPI_BASE_DIR]]]/[[[PLT:ACTIVE:MPI_INC_SUBDIR]]])
+%MPI_LIB             $(addprefix -L,$(addsuffix /,[[[PLT:ACTIVE:MPI_BASE_DIR]]])[[[PLT:ACTIVE:MPI_LIB_SUBDIR]]]) \
+                     $(addprefix -l,[[[PLT:ACTIVE:MPI_LIBS_WITHOUT_L]]])
+
+%XIOS_HOME           [[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]/xios-2
+%XIOS_INC            -I%XIOS_HOME/inc
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+
+%OASIS_HOME          [[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]/oasis3-mct/ecconf
+%OASIS_INC           -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP                 [[[PLT:ACTIVE:FPP]]]
+
+%FC                  [[[PLT:ACTIVE:FC]]]
+%FCFLAGS             [[[PLT:ACTIVE:FFLAGS]]] [[[PLT:ACTIVE:NEMO_ADD_FFLAGS]]]
+%FFLAGS              %FCFLAGS
+
+%FPPFLAGS            [[[PLT:ACTIVE:CPPFLAGS]]]
+
+%LD                  [[[PLT:ACTIVE:LD]]]
+%LDFLAGS             [[[PLT:ACTIVE:LDFLAGS]]] [[[PLT:ACTIVE:NEMO_ADD_LDFLAGS]]]
+
+%AR                  [[[PLT:ACTIVE:AR]]]
+%ARFLAGS             [[[PLT:ACTIVE:ARFLAGS]]]
+
+%MK                  [[[PLT:ACTIVE:MAKE]]]
+
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC %MPI_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB %MPI_LIB

+ 42 - 0
3.3.1/sources/runoff-mapper_lemaitre3_Makefile.tmpl

@@ -0,0 +1,42 @@
+executable = ../bin/runoff-mapper.exe
+
+FC      = [[[PLT:ACTIVE:FC]]]
+FFLAGS  = [[[PLT:ACTIVE:FFLAGS]]]
+
+LD      = [[[PLT:ACTIVE:LD]]]
+LDFLAGS = [[[PLT:ACTIVE:LDFLAGS]]]
+
+OASIS_BASE_DIR = [[[PLT:ACTIVE:ECEARTH_SRC_DIR]]]/oasis3-mct/ecconf
+OASIS_MOD_DIR  = $(OASIS_BASE_DIR)/build/lib/psmile.MPI1
+OASIS_INC_DIR  = $(OASIS_BASE_DIR)/lib/psmile/include
+OASIS_LIB_DIR  = $(OASIS_BASE_DIR)/lib
+OASIS_LIBS     = -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+MPI_LIB_DIR    = $(addsuffix /,[[[PLT:ACTIVE:MPI_BASE_DIR]]])[[[PLT:ACTIVE:MPI_LIB_SUBDIR]]]
+MPI_LIBS       = $(addprefix -l,[[[PLT:ACTIVE:MPI_LIBS_WITHOUT_L]]])
+
+NETCDF_INC_DIR = $(addprefix -I,$(addsuffix /,[[[PLT:ACTIVE:NETCDF_BASE_DIR]]])[[[PLT:ACTIVE:NETCDF_INC_SUBDIR]]])
+NETCDF_LIB_DIR = $(addprefix -L,$(addsuffix /,[[[PLT:ACTIVE:NETCDF_BASE_DIR]]])[[[PLT:ACTIVE:NETCDF_LIB_SUBDIR]]])
+NETCDF_LIBS    = $(addprefix -l,[[[PLT:ACTIVE:NETCDF_LIBS_WITHOUT_L]]])
+
+VPATH = cplng
+
+cplng_srcs = \
+    cplng_data_mod.F90 \
+    cplng_init_mod.F90 \
+    cplng_config_mod.F90 \
+    cplng_exchange_mod.F90 \
+    cplng_finalize_mod.F90 \
+    cplng_mod.F90
+
+rnfmap_srcs = runoff_mapper_mod.F90 runoff_mapper.F90
+
+$(executable): config_mod.o $(cplng_srcs:.F90=.o) $(rnfmap_srcs:.F90=.o)
+	$(LD) $(LDFLAGS) -o $@ $^ -L$(OASIS_LIB_DIR) $(OASIS_LIBS) $(NETCDF_LIB_DIR) $(NETCDF_LIBS) -L$(MPI_LIB_DIR) $(MPI_LIBS)
+
+%.o: %.F90
+	$(FC) $(FFLAGS) -c -I$(OASIS_MOD_DIR) -I$(NETCDF_INC_DIR) $<
+
+.PHONY: clean
+clean:
+	@rm -f *.o *.mod

+ 66 - 0
3.3.1/sources/xios-2_lemaitre3_bld.cfg

@@ -0,0 +1,66 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc arch.fcm
+inc config.fcm
+
+%CFLAGS           %BASE_CFLAGS %COMPIL_CFLAGS
+%FFLAGS           %BASE_FFLAGS %COMPIL_FFLAGS
+%LD_FLAGS         %ARCH_LD %BASE_LD
+
+
+dest::root   $PWD
+
+bld::infile_ext::cpp   C::SOURCE
+bld::infile_ext::conf  CPP::INCLUDE
+bld::infile_ext::hpp   CPP::INCLUDE
+
+
+search_src           true
+src::zzz .
+src::date $PWD/extern/boost/src/date_time
+src::blitz $PWD/extern/blitz/src
+#src::netcdf $PWD/extern/netcdf4
+src::remap $PWD/extern/remap/src
+bld::lib xios
+bld::target libxios.a
+#bld::target generate_fortran_interface.exe 
+bld::target xios_server.exe 
+#bld::target test_remap.exe
+#bld::target test_regular.exe
+#bld::target test_new_features.exe test_unstruct_complete.exe 
+#bld::target test_client.exe test_complete.exe
+bld::exe_dep
+
+bld::tool::cc        %CCOMPILER
+bld::tool::fc        %FCOMPILER
+bld::tool::fpp       %FPP
+bld::tool::cpp       %CPP
+#bld::tool::cppflags  %CBASE_INC -I${PWD}/extern/src_netcdf -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include 
+bld::tool::cppflags  %CBASE_INC -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include
+bld::tool::fppflags  %BASE_INC -I${PWD}/extern/rapidxml/include 
+bld::tool::ld        %LINKER
+bld::tool::ldflags   %LD_FLAGS 
+#bld::tool::cflags    %CFLAGS %CBASE_INC -I${PWD}/extern/src_netcdf -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include 
+bld::tool::cflags    %CFLAGS %CBASE_INC -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include
+bld::tool::fflags    %FFLAGS %FBASE_INC 
+bld::tool::cppkeys   %CPP_KEY
+bld::tool::fppkeys   %CPP_KEY
+bld::tool::make      %MAKE
+
+# Pre-process code before analysing dependencies
+bld::pp    false          
+bld::pp::interface/fortran              true
+bld::pp::interface/fortran_attr         true
+bld::excl_dep        use::mod_prism_get_comm
+bld::excl_dep        use::mod_prism_get_localcomm_proto
+bld::excl_dep        use::mod_prism_proto
+bld::excl_dep        use::mod_prism
+bld::excl_dep        use::netcdf
+bld::excl_dep        inc::mpif.h

+ 415 - 0
3.3.1/sources/zenobe-intelmpi.xml

@@ -0,0 +1,415 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <Platform name="zenobe-intelmpi">
+        <Description>
+            HOST:        zenobe.hpc.cenaero.be
+            ARCH:        linux_x86_64
+            CPU MODEL:   Intel IvyBridge
+            MAINTAINER:  PY Barriat [pierre-yves.barriat@uclouvain.be]
+            COMPILER:    i-compilers (icc+ifort, 15.0.5.223)
+            MPI:         Intel MPI
+            BLAS/LAPACK: Intel MKL
+        </Description>
+
+        <Parameter name="ECEARTH_SRC_DIR">
+            <Description>Base directory for EC-Earth sources</Description>
+            <Type>PATH</Type>
+            <Value>${HOME}/modeles/ecearth/ecearth_3.3.1/sources</Value>
+        </Parameter>
+
+        <Parameter name="MPI_BASE_DIR">
+            <Description>MPI base directory</Description>
+            <Type>PATH</Type>
+            <Value>/softs/intel/impi/5.1.3.181/intel64</Value>
+        </Parameter>
+
+        <Parameter name="MPI_INC_SUBDIR">
+            <Description>MPI include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="MPI_LIB_SUBDIR">
+            <Description>MPI lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="MPI_LIBS_WITHOUT_L">
+            <Description>MPI libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>mpi mpiif mpigf</Value>
+        </Parameter>
+
+        <Parameter name="LAPACK_BASE_DIR">
+            <Description>LAPACK base directory</Description>
+            <Type>PATH</Type>
+            <Value>/softs/intel/compilers_and_libraries_2016.2.181/linux/mkl</Value>
+        </Parameter>
+
+        <Parameter name="LAPACK_LIB_SUBDIR">
+            <Description>LAPACK lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib/intel64</Value>
+        </Parameter>
+
+        <Parameter name="LAPACK_LIBS_WITHOUT_L">
+            <Description>LAPACK libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>mkl_intel_lp64 mkl_core mkl_sequential</Value>
+        </Parameter>
+
+        <Parameter name="NETCDF_BASE_DIR">
+            <Description>NetCDF base directory</Description>
+            <Type>PATH</Type>
+            <Value>/projects/acad/ecearth/opt/netcdf/4.4.1.1_ivy_2016.2.181</Value>
+        </Parameter>
+
+        <Parameter name="NETCDF_INC_SUBDIR">
+            <Description>NetCDF include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="NETCDF_LIB_SUBDIR">
+            <Description>NetCDF lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="NETCDF_LIBS_WITHOUT_L">
+            <Description>NetCDF libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>netcdff netcdf</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_BASE_DIR">
+            <Description>GRIB API base directory</Description>
+            <Type>PATH</Type>
+            <Value>/projects/acad/ecearth/opt/grib_api</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_INC_SUBDIR">
+            <Description>GRIB API include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_LIB_SUBDIR">
+            <Description>GRIB API lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="GRIBAPI_LIBS_WITHOUT_L">
+            <Description>GRIB_API libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>grib_api_f90 grib_api</Value>
+        </Parameter>
+
+        <Parameter name="GRIBEX_BASE_DIR">
+            <Description>GRIBEX base directory</Description>
+            <Type>PATH</Type>
+            <Value>/projects/acad/ecearth/opt/gribex</Value>
+        </Parameter>
+
+        <Parameter name="GRIBEX_LIB_SUBDIR">
+            <Description>GRIBEX lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="GRIBEX_LIBS_WITHOUT_L">
+            <Description>GRIBEX libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>gribexR64</Value>
+        </Parameter>
+
+        <Parameter name="JPEG_BASE_DIR">
+            <Description>JPEG base directory</Description>
+            <Type>PATH</Type>
+            <Value>/projects/acad/ecearth/opt/openjpeg</Value>
+        </Parameter>
+
+        <Parameter name="JPEG_INC_SUBDIR">
+            <Description>JPEG include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>/projects/acad/ecearth/opt/openjpeg/include</Value>
+        </Parameter>
+
+        <Parameter name="JPEG_LIB_SUBDIR">
+            <Description>JPEG lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>/projects/acad/ecearth/opt/openjpeg/lib</Value>
+        </Parameter>
+
+        <Parameter name="JPEG_LIBS_WITHOUT_L">
+            <Description>JPEG libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>openjpeg</Value>
+        </Parameter>
+
+        <Parameter name="SZIP_BASE_DIR">
+            <Description>SZIP base directory</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="SZIP_INC_SUBDIR">
+            <Description>SZIP include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="SZIP_LIB_SUBDIR">
+            <Description>SZIP lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="SZIP_LIBS_WITHOUT_L">
+            <Description>SZIP libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF4_BASE_DIR">
+            <Description>HDF4 base directory</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF4_INC_SUBDIR">
+            <Description>HDF4 include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF4_LIB_SUBDIR">
+            <Description>HDF4 lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF4_LIBS_WITHOUT_L">
+            <Description>HDF4 libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="HDF5_BASE_DIR">
+            <Description>HDF5 base directory</Description>
+            <Type>PATH</Type>
+            <Value>/softs/hdf5/1.8.18-el6/intel/2016.2.181/intelmpi/5.1.3.181</Value>
+        </Parameter>
+
+        <Parameter name="HDF5_INC_SUBDIR">
+            <Description>HDF5 include directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>include</Value>
+        </Parameter>
+
+        <Parameter name="HDF5_LIB_SUBDIR">
+            <Description>HDF5 lib directory relative to base dir</Description>
+            <Type>PATH</Type>
+            <Value>lib</Value>
+        </Parameter>
+
+        <Parameter name="HDF5_LIBS_WITHOUT_L">
+            <Description>HDF5 libraries (without -l prefix)</Description>
+            <Type>STRING</Type>
+            <Value>hdf5_hl hdf5</Value>
+        </Parameter>
+
+        <Parameter name="MAKE">
+            <Description>Make command (GNU make >3.81 needed!)</Description>
+            <Type>STRING</Type>
+            <Value>make</Value>
+        </Parameter>
+
+        <Parameter name="FC">
+            <Description>F90 Compiler</Description>
+            <Type>STRING</Type>
+            <Value>mpiifort</Value>
+        </Parameter>
+
+        <Parameter name="FFLAGS">
+            <Description>General F90 flags for compiling</Description>
+            <Type>STRING</Type>
+            <Value>-O2 -fp-model precise -xHost -r8</Value>
+        </Parameter>
+
+        <Parameter name="FFLAGS_FREEFORM">
+            <Description>Allow for free format Fortran</Description>
+            <Type>STRING</Type>
+            <Value>-free</Value>
+        </Parameter>
+
+        <Parameter name="FFLAGS_FIXEDFORM">
+            <Description>Expect fixed Fortran format</Description>
+            <Type>STRING</Type>
+            <Value>-fixed</Value>
+        </Parameter>
+
+        <Parameter name="FFLAGS_FPP_PREFIX">
+            <Description>Fortran preprocessor flag prefix</Description>
+            <Type>STRING</Type>
+            <Value>-D</Value>
+        </Parameter>
+
+        <Parameter name="CC">
+            <Description>C Compiler</Description>
+            <Type>STRING</Type>
+            <Value>mpiicc</Value>
+        </Parameter>
+
+        <Parameter name="CXX">
+            <Description>C++ Compiler</Description>
+            <Type>STRING</Type>
+            <Value>mpiicc</Value>
+        </Parameter>
+
+        <Parameter name="CFLAGS">
+            <Description>General C flags for compiling</Description>
+            <Type>STRING</Type>
+            <Value>-O2 -fp-model precise -xHost</Value>
+        </Parameter>
+
+        <Parameter name="CFLAGS_CPP_PREFIX">
+            <Description>C preprocessor flag prefix</Description>
+            <Type>STRING</Type>
+            <Value>-D</Value>
+        </Parameter>
+
+        <Parameter name="LD">
+            <Description>Linker</Description>
+            <Type>STRING</Type>
+            <Value>mpiifort</Value>
+        </Parameter>
+
+        <Parameter name="LDFLAGS">
+            <Description>General flags for linking</Description>
+            <Type>STRING</Type>
+            <Value>-O2 -fp-model precise -xHost</Value>
+        </Parameter>
+
+        <Parameter name="AR">
+            <Description>Command for building libraries from object files (usually ar)</Description>
+            <Type>STRING</Type>
+            <Value>ar</Value>
+        </Parameter>
+
+        <Parameter name="ARFLAGS">
+            <Description>Flags for library building command (When using ar: include u)</Description>
+            <Type>STRING</Type>
+            <Value>curv</Value>
+        </Parameter>
+
+        <Parameter name="ARFLAGS_EXTRACT">
+            <Description>Flags for library building command (When using ar: include u)</Description>
+            <Type>STRING</Type>
+            <Value>p</Value>
+        </Parameter>
+
+        <Parameter name="CPP">
+            <Description>C preprocessor command</Description>
+            <Type>STRING</Type>
+            <Value>fpp</Value>
+        </Parameter>
+
+        <Parameter name="FPP">
+            <Description>C preprocessor command</Description>
+            <Type>STRING</Type>
+            <Value>fpp</Value>
+        </Parameter>
+
+        <Parameter name="CPPFLAGS">
+            <Description>C preprocessor flags</Description>
+            <Type>STRING</Type>
+            <Value>-P</Value>
+        </Parameter>
+
+        <Parameter name="XIOS_CFLAGS">
+            <Description>CFLAGS flags for XIOS</Description>
+            <Type>STRING</Type>
+            <Value>-ansi -w</Value>
+        </Parameter>
+
+        <Parameter name="XIOS_ADD_LDFLAGS">
+            <Description>More LD flags for XIOS</Description>
+            <Type>STRING</Type>
+            <Value>-lstdc++</Value>
+        </Parameter>
+
+        <Parameter name="OASIS_ADD_FFLAGS">
+            <Description>More F90 flags for Oasis</Description>
+            <Type>STRING</Type>
+            <Value>-132</Value>
+        </Parameter>
+
+        <Parameter name="OASIS_ADD_PPDEFS">
+            <Description>More CPP/FPP macros for Oasis</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="OASIS_ADD_LDFLAGS">
+            <Description>More LD flags for Oasis</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="NEMO_ADD_FFLAGS">
+            <Description>More F90 flags for Nemo</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="NEMO_ADD_LDFLAGS">
+            <Description>More LD flags for Nemo</Description>
+            <Type>STRING</Type>
+            <Value>-lstdc++</Value>
+        </Parameter>
+
+        <Parameter name="IFS_PPDEFS">
+            <Description>Preprocessor defs for IFS sources</Description>
+            <Type>STRING</Type>
+            <Value>linux LINUX LITTLE LITTLE_ENDIAN POINTER_64 BLAS</Value>
+        </Parameter>
+
+        <Parameter name="IFSAUX_ADD_FFLAGS">
+            <Description>More F90 flags for ifs/ifsaux</Description>
+            <Type>STRING</Type>
+            <Value/>
+        </Parameter>
+
+        <Parameter name="TM5_DEFAULT_FFLAGS">
+            <Description>Default F90 flags for TM5 (ie without optimization)</Description>
+            <Type>STRING</Type>
+            <Value>-warn declarations -traceback -r8</Value>
+        </Parameter>
+
+        <Parameter name="TM5_OPTIM_FFLAGS">
+            <Description>F90 optimization flags for TM5</Description>
+            <Type>STRING</Type>
+            <Value>-O3 -fp-model strict -g</Value>
+        </Parameter>
+
+        <Parameter name="TM5_MDEFS_FFLAGS">
+            <Description>Model preprocessor defs. Set to with_ecearth_optics if aerosols feedback will be switch on.</Description>
+            <Type>STRING</Type>
+            <Value>with_ecearth_optics</Value>
+        </Parameter>
+
+        <Parameter name="TM5_CO2_ONLY">
+            <Description>Light version of TM5 (True or False)</Description>
+            <Type>STRING</Type>
+            <Value>False</Value>
+        </Parameter>
+
+        <Parameter name="MAKEDEPF90">
+            <Description>F90 dependency generator</Description>
+            <Type>STRING</Type>
+            <Value>${ECEARTH_SRC_DIR}/util/makedepf90/bin/makedepf90</Value>
+        </Parameter>
+
+    </Platform>

+ 32 - 42
bashrc

@@ -7,21 +7,34 @@ fi
 
 configure_ecearth()
 {
-  if [ `hostname` != "frontal1" ]; then
-    echo "First, we move to frontal1..."
-    touch .configure_ecearth
-    ssh frontal1
-  fi
-  export EC_DEP=/projects/acad/ecearth/opt
-  if [ -f $EC_DEP/modules.load ]; then
-    source $EC_DEP/modules.load
-  fi
+    # Configure GRIBEX paths
+    export LOCAL_DEFINITION_TEMPLATES=/projects/acad/ecearth/opt/gribex/lib/gribtemplates
+    export ECMWF_LOCAL_TABLE_PATH=/projects/acad/ecearth/opt/gribex/lib/gribtables
+
+    # Configure grib api paths
+    export GRIB_DEFINITION_PATH=/projects/acad/ecearth/opt/grib_api/share/definitions
+    export GRIB_SAMPLES_PATH=/projects/acad/ecearth/opt/grib_api/share/ifs_samples/grib1
+    export GRIB_BIN_PATH=/projects/acad/ecearth/opt/grib_api/bin
+
+    # Configure and load modules
+    pre_load_modules_cmd="module purge"
+    module_list="compiler/intel/comp_and_lib/2016.2.181 intelmpi/5.1.3.181/64 hdf5/1.8.18-el6/intel_2016.2.181/intelmpi_5.1.3.181"
+
+    if [ -n "${pre_load_modules_cmd}" ]
+    then
+        ${pre_load_modules_cmd}
+    fi  
+    module load ${module_list}
+
+    # Add directories to the shared library search path
+    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"/projects/acad/ecearth/opt/grib_api/lib:/projects/acad/ecearth/opt/openjpeg/lib:/projects/acad/ecearth/opt/netcdf/frontal1/2016.2.181/lib"
+    export CPATH=${CPATH:+${CPATH}:}"/projects/acad/ecearth/opt/netcdf/frontal1/2016.2.181/include"
 }
 
 # User specific aliases and functions
 if [ `hostname` = "frontal1" ]; then
-  [[ -f .configure_ecearth ]] && configure_ecearth
-  [[ -f .configure_ecearth ]] && rm .configure_ecearth
+  [[ -f ~/.configure_ecearth ]] && configure_ecearth
+  [[ -f ~/.configure_ecearth ]] && rm ~/.configure_ecearth
 fi
 
 # Path/variables
@@ -36,39 +49,16 @@ export PS1="\[\033[1;39m\]\u@\h\[\033[0;0m\] \t \[\033[0;34m\]\w \[\033[2;31m\]\
 
 # alias
 # -----
-if [ `uname` = "Linux" ] ; then
- alias df='df -hT'
- alias ls='ls --color -F'
- alias lo='ls -oh -F'
- alias cpa="cp -a"
- alias ps="ps --forest"
-else
- alias df='df -k'
- alias ls='ls -F'
- alias lo='ls -o -F'
- alias cpa="cp -rf"
-fi
-
+alias vi='vim'
+alias l='ls --color -lh -o'
+alias ll='ls --color -AlF --time-style=long-iso -hs'
+alias lt='ls --color -lh -o -s -rt'
+alias la='ls --color -ah -o -F'
+alias ps="ps --forest"
 alias rm="rm -i"
-alias mv="mv -i"
-alias cp="cp -i"
-
 alias cd..="cd .."
 alias dc="cd"
-
-alias la='ls -a -o -F -l'
 alias sl='ls'
-alias l='ls -lh'
-alias ll='ls -o -F'
-alias lt='ls -l -s -t |more'
-alias m="less"
-alias h="history"
+alias h='history'
+alias df='df -hT -x tmpfs -x devtmpfs -x squashfs'
 
-# Personal modules variables
-# --------------------------
-if [ `hostname` = "frontal3" ]; then
-  PATH="/projects/acad/ecearth/opt/apps/lua/lua/bin:$PATH"
-  . /projects/acad/ecearth/opt/lmod/lmod/init/profile
-  ulimit -u 8192
-  export OMP_NUM_THREADS=2
-fi

+ 16 - 5
install.sh

@@ -5,7 +5,7 @@ echo "Release you want :"
 echo "##################"
 repertoirdebase=`pwd`
 PS3='> '   # le prompt
-COMPIL=("dev" "trunk" "primavera" "3.2.2" "3.2.3" "3.3.0", "3.3.3.2")
+COMPIL=("dev" "trunk" "primavera" "3.2.2" "3.2.3" "3.3.0" "3.3.1" "3.3.3.2")
 select CHOIX in "${COMPIL[@]}" ; do
   case $REPLY in
       1)  
@@ -28,8 +28,8 @@ done
 
 TARGET="$HOME/modeles/ecearth/$TAG"
 case "$CHOIX" in
-    *3.3.0*)
-      echo "New 3.3.0 release"
+    *3.3.0)
+      echo "3.3.0 release"
       sed -i '$ d' $TARGET/sources/config-build.xml      
       cat $CHOIX/sources/config-build.xml >> $TARGET/sources/config-build.xml
       cp $CHOIX/sources/zenobe-intelmpi.xml $TARGET/sources/platform
@@ -39,6 +39,17 @@ case "$CHOIX" in
       cp $CHOIX/runtime/classic/platform/zenobe-intelmpi.xml $TARGET/runtime/classic/platform
       cp $CHOIX/runtime/classic/platform/lemaitre3-intelmpi.xml $TARGET/runtime/classic/platform
       ;;
+    *3.3.1)
+      echo "3.3.1 release"
+      sed -i '$ d' $TARGET/sources/config-build.xml      
+      cat $CHOIX/sources/config-build.xml >> $TARGET/sources/config-build.xml
+      cp $CHOIX/sources/zenobe-intelmpi.xml $TARGET/sources/platform
+      cp $CHOIX/sources/lemaitre3-intelmpi.xml $TARGET/sources/platform
+      #   
+      cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
+      cp $CHOIX/runtime/classic/platform/zenobe-intelmpi.xml $TARGET/runtime/classic/platform
+      cp $CHOIX/runtime/classic/platform/lemaitre3-intelmpi.xml $TARGET/runtime/classic/platform
+      ;; 
     *3.3.3.2*)
       echo "New 3.3.3.2 release"
       sed -i '$ d' $TARGET/sources/config-build.xml    
@@ -98,11 +109,11 @@ case "$machine" in
       cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl
       cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
       cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
-      cp util/arch-frontal3.fcm $TARGET/sources/nemo-3.6/ARCH/
+      #cp util/arch-frontal3.fcm $TARGET/sources/nemo-3.6/ARCH/
       ;;
     *)
       echo "Unknown machine"
       ;;
 esac
 
-echo "Patch applied to ${TARGET}."
+echo "Patch applied to ${TARGET}"