Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/field_def.xml
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/field_def.xml	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/field_def.xml	(revision 4231)
@@ -0,0 +1,122 @@
+<field_definition level="1" enabled=".TRUE." operation="instant">
+  
+  <field_group id="standard_output"> 
+    
+    <field id="timestep" grid_ref="scalar" unit="s"/>
+    <field id="preff" grid_ref="scalar"    unit="Pa"/>
+    <field id="ap" axis_ref="levp1"   long_name="hybrid A coefficient at layer interface" />
+    <field id="bp" axis_ref="levp1"  long_name="hybrid B coefficient at layer interface" />
+    <field id="mid_ap" axis_ref="lev"   long_name="hybrid A coefficient at midpoints" />
+    <field id="mid_bp" axis_ref="lev"  long_name="hybrid B coefficient at midpoints" />
+    
+    <field_group domain_ref="i">
+      <field id="ps" />
+      <field id="dps"  />
+      <field id="Ai" />
+      <field id="phis" />
+      <field id="phi" />
+      <field id="precl" />
+      <field id="Q1_col_int" />     
+      <field id="Q2_col_int" />     
+      <field id="ps_init" />
+      
+      <field_group axis_ref="lev"> 
+        <field id="mass" />
+        <field id="p" />
+        <field id="dmass"/>
+        <field id="theta" />
+        <field id="dyn_q" />
+        <field id="pk"/>
+        <field id="ulon"/>
+        <field id="ulat"/>
+        <field id="uz"/>
+        <field id="omega"/>
+        <field id="temp"/>
+        
+        <field id="kinetic_trisk" />
+        <field id="kinetic" />
+
+        <field id="mass_init" />
+        <field id="p_init" />
+        <field id="theta_init" />
+        <field id="dyn_q_init" />
+        <field id="ulon_init"/>
+        <field id="ulat_init"/>
+        <field id="uz_init"/>
+        <field id="temp_init"/>
+        
+        <field id="kinetic_trisk_init" />
+        <field id="kinetic_init" />
+
+        <field id="mass_t"           long_name="Time-averaged air mass"   unit="kg/m2"/>
+        <field id="massflux_lon"     long_name="Time-averaged air mass flux, zonal"   unit="kg/m/s"/>
+        <field id="massflux_lat"     long_name="Time-averaged air mass flux, meridional"   unit="kg/m/s"/>
+
+        <field id="ulon_t"           long_name="Time-averaged zonal momentum"   unit="kg/m/s"/>
+        <field id="ulonflux_lon"     long_name="Time-averaged zonal momentum flux, zonal"   unit="kg/s2"/>
+        <field id="ulonflux_lat"     long_name="Time-averaged zonal momentum flux, meridional"   unit="kg/s2"/>
+
+        <field id="theta_t"          long_name="Time-averaged potential temperature"   unit="K.kg/m2"/>
+        <field id="thetaflux_lon"    long_name="Time-averaged potential temperature flux, zonal"   unit="K.kg/m/s"/>
+        <field id="thetaflux_lat"    long_name="Time-averaged potential temperature flux, meridional"   unit="K/kg/m/s"/>
+
+        <field id="epot_t"           long_name="Time-averaged potential energy"   unit="J/m2"/>
+        <field id="epotflux_lon"     long_name="Time-averaged potential energy flux, zonal"   unit="J/m/s"/>
+        <field id="epotflux_lat"     long_name="Time-averaged potential energy flux, meridional"   unit="J/m/s"/>
+
+        <field id="ekin_t"           long_name="Time-averaged kinetic energy"   unit="J/m2"/>
+        <field id="ekinflux_lon"     long_name="Time-averaged kinetic energy flux, zonal"   unit="J/m/s"/>
+        <field id="ekinflux_lat"     long_name="Time-averaged kinetic energy flux, meridional"   unit="J/m/s"/>
+        
+        <field id="enthalpy_t"       long_name="Time-averaged enthalpy"   unit="J/m2"/>
+        <field id="enthalpyflux_lon" long_name="Time-averaged enthalpy flux, zonal"   unit="J/m/s"/>
+        <field id="enthalpyflux_lat" long_name="Time-averaged enthalpy flux, meridional"   unit="J/m/s"/>
+
+        <field id="dulon_diss1"/>
+        <field id="dulon_diss2"/>
+        <field id="dulat_diss1"/>
+        <field id="dulat_diss2"/>
+
+        <field id="dulon_phys"       long_name="Physics tendency for zonal velocity"   unit="m/s^2"/>
+        <field id="dulat_phys"       long_name="Physics tendency for meridional velocity"   unit="m/s^2"/>
+
+      </field_group>
+
+      <field id="u850" />
+      <field id="v850" />
+      <field id="w850" />
+      <field id="t850" />
+      <field id="omega850"/>                  
+      <field id="u500" />
+      <field id="v500" />
+      <field id="w500" />
+      <field id="t500" />
+      <field id="omega500"/>                  
+      <field id="SST"/>
+      
+      <field id="ulon_850_500" field_ref="p" axis_ref="lev_pressure" />
+      
+      <field_group axis_ref="levp1"> 
+        <field id="geopot"/>
+        <field id="geopot_init"/>
+      </field_group>
+    </field_group> 
+
+    <field_group grid_ref="grid_q">
+      <field id="q_init" />
+      <field id="q" />
+      <field id="qmass_t" />
+      <field id="qflux_lon" />
+      <field id="qflux_lat" />
+    </field_group> 
+
+    <field_group domain_ref="v" axis_ref="lev">
+      <field id="vort" />
+      <field id="pv" />
+    </field_group>
+    
+  </field_group>
+  
+  
+</field_definition>
+
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/filedef_dcmip2016.xml
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/filedef_dcmip2016.xml	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/filedef_dcmip2016.xml	(revision 4231)
@@ -0,0 +1,109 @@
+<file_definition > 
+
+  <file id="output_dcmip2016_native" convention="CF" enabled="false" output_freq="24h" sync_freq="24h" output_level="10" timeseries="none" description="DCMIP41" > 
+
+    <field_group id="dcmip2016_output_field_once" operation="once" freq_offset="0ts" ts_enabled="true">
+      <field field_ref="timestep" name="mdt" />
+      <field field_ref="preff" name="P0" long_name="reference pressure" />
+      <field field_ref="ap" name="hyai"   />
+      <field field_ref="bp" name="hybi"   />
+      <field field_ref="mid_ap" name="hyam"   />
+      <field field_ref="mid_bp" name="hybm"   />
+    </field_group>
+    
+    <field_group id="init_fields" operation="once" freq_offset="0ts" ts_enabled="true">
+      <field field_ref="theta_init"   />
+      <field field_ref="temp_init"   />
+      <field field_ref="uz_init"     />
+      <field field_ref="ulon_init"   />
+      <field field_ref="ulat_init"   />
+      <field field_ref="p_init"      />
+      <field field_ref="ps_init"     />
+      <field field_ref="mass_init"   />
+      <field field_ref="geopot_init" />
+    </field_group>
+    
+    <field_group id="dcmip2016_output_field" ts_enabled="true">
+      <field field_ref="ps" name="PS"       standard_name="surface_pressure" long_name="Surface pressure"         unit="Pa" />
+      <field field_ref="phis" operation="once" freq_offset="0ts" name="PHIS"   standard_name="surface_geopotential" long_name="Surface geopotential" unit="m2/m2"/>
+      <field field_ref="geopot"  name="PHI"   standard_name="geopotential" long_name="geopotential" unit="m2/s2"/>
+      <field field_ref="ulon" name="U"      standard_name="eastward_wind" long_name="Zonal wind"                  unit="m/s"/>
+      <field field_ref="ulat" name="V"      standard_name="northward_wind" long_name="Meridional wind"            unit="m/s"/>
+      <field field_ref="uz" name="W"        standard_name="upward_air_velocity" long_name="Vertical velocity"     unit="m/s"/>
+      <field field_ref="omega" name="OMEGA"        standard_name="lagrangian_tendency_of_air_pressure" long_name="Vertical pressure velocity"     unit="Pa/s"/>
+      <field field_ref="p"  name="P"        standard_name="air_pressure" long_name="Pressure"     unit="Pa"/>
+      <field field_ref="temp"  name="T"        standard_name="air_temperature" long_name="Temperature"     unit="K"/>
+      <field field_ref="kinetic_trisk" />
+      <field field_ref="kinetic" />
+      <field field_ref="vort" />
+
+      <field field_ref="precl"  name="PRECT"     standard_name="rainfall_rate"  long_name="Large Scale precipitation rate"  unit="m/s"/>
+      <field field_ref="Q1_col_int"  name="Q1_col_int"      long_name="Single chlorine column integrated mixing ratio"  unit="kg/m2"/> 
+      <field field_ref="Q2_col_int"  name="Q2_col_int"      long_name="Chlorine gas column integrated mixing ratio"  unit="kg/m2"/> 
+      <field field_ref="u850" name="U850"       long_name="Zonal wind at 850 hPa"      unit="m/s"/>
+      <field field_ref="v850" name="V850"       long_name="Meridional wind at 850 hPa"   unit="m/s"/>
+      <field field_ref="w850" name="W850"       long_name="Vertical velocity at 850 hPa"     unit="m/s"/>
+      <field field_ref="t850" name="T850"       long_name="Temperature at 850 hPa"   unit="K"/>
+      <field field_ref="omega850" name="OMEGA850"   long_name="Vertical pressure velocity at 850 hPa"     unit="Pa/s"/>
+      <field field_ref="u500" name="U500"       long_name="Zonal wind at 500 hPa"      unit="m/s"/>
+      <field field_ref="v500" name="V500"       long_name="Meridional wind at 850 hPa"   unit="m/s"/>
+      <field field_ref="w850" name="W500"       long_name="Vertical velocity at 500 hPa"     unit="m/s"/>
+      <field field_ref="t500" name="T500"       long_name="Temperature at 850 hPa"   unit="K"/>
+      <field field_ref="omega500" name="OMEGA500"   long_name="Vertical pressure velocity at 500 hPa"     unit="Pa/s"/>
+      <field field_ref="SST" name="SST"       long_name="Sea surface temperature"   unit="K"/>
+      
+      <field field_ref="mass_t" name="mass_t"                   long_name="Time-averaged air mass"   unit="kg/m2"/>
+      <field field_ref="massflux_lon" name="massflux_lon"       long_name="Time-averaged air mass flux, zonal"   unit="kg/m/s"/>
+      <field field_ref="massflux_lat" name="massflux_lat"       long_name="Time-averaged air mass flux, meridional"   unit="kg/m/s"/>
+
+      <field field_ref="epot_t" name="epot_t"                   long_name="Time-averaged potential energ"   unit="J/m2"/>
+      <field field_ref="epotflux_lon" name="epotflux_lon"       long_name="Time-averaged potential energy flux, zonal"   unit="J/m/s"/>
+      <field field_ref="epotflux_lat" name="epotflux_lat"       long_name="Time-averaged potential energy flux, meridional"   unit="J/m/s"/>
+
+      <field field_ref="ekin_t" name="ekin_t"                   long_name="Time-averaged kinetic energ"   unit="J/m2"/>
+      <field field_ref="ekinflux_lon" name="ekinflux_lon"       long_name="Time-averaged kinetic energy flux, zonal"   unit="J/m/s"/>
+      <field field_ref="ekinflux_lat" name="ekinflux_lat"       long_name="Time-averaged kinetic energy flux, meridional"   unit="J/m/s"/>
+
+      <field field_ref="enthalpy_t" name="enthalpy_t"                   long_name="Time-averaged enthalpy"   unit="J/m2"/>
+      <field field_ref="enthalpyflux_lon" name="enthalpyflux_lon"       long_name="Time-averaged enthalpy flux, zonal"   unit="J/m/s"/>
+      <field field_ref="enthalpyflux_lat" name="enthalpyflux_lat"       long_name="Time-averaged enthalpy flux, meridional"   unit="J/m/s"/>
+
+    </field_group>
+
+    <variable name="model" type="string" > dynamico </variable>
+    <variable name="test_case" type="string" > DCMIP41 </variable>
+    <variable name="horizontal_resolution" type="string" > native (grid points : 80x80x10) </variable>
+    <variable name="levels" type="string" > L10 </variable>
+    <variable name="grid" type="string" > hex </variable>
+    <variable name="equation" type="string" > hydro </variable>
+    <variable name="time_frequency" type="string" > 24h </variable>    
+
+  </file>
+
+
+  <file id="output_dcmip2016_regular" enabled="true" output_freq="6h" sync_freq="6h" output_level="10" description="DCMIP41" timeseries="none" > 
+    
+    <field_group group_ref="dcmip2016_output_field_once"/>
+    <field_group group_ref="init_fields" domain_ref="regular_two_degree" />
+    
+    <field_group group_ref="dcmip2016_output_field" domain_ref="regular_two_degree" />
+
+    <field_group id="transport" ts_enabled="true" grid_ref="grid_q_regular" >
+          <field field_ref="q" name="q"  />
+          <field field_ref="qmass_t" name="qmass_t"  long_name="Time-averaged tracer mass"   unit="kg/m2"/>
+          <field field_ref="qflux_lon" name="qflux_lon"  long_name="Time-averaged tracer mass flux, zonal"   unit="kg/m/s"/>
+          <field field_ref="qflux_lat" name="qflux_lat"  long_name="Time-averaged tracer mass flux, meridional"   unit="kg/m/s"/>
+    </field_group>
+
+    <variable name="model" type="string" > dynamico </variable>
+    <variable name="test_case" type="string" > DCMIP41 </variable>
+    <variable name="horizontal_resolution" type="string" > two_degree interpolated (grid points : 80 x 80 x 10) </variable>
+    <variable name="levels" type="string" > L30 </variable>
+    <variable name="grid" type="string" > hex </variable>
+    <variable name="equation" type="string" > hydro </variable>
+    <variable name="time_frequency" type="string" > 24h </variable>    
+
+  </file>
+
+
+</file_definition>
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/gcm.exe
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/gcm.exe	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/gcm.exe	(revision 4231)
@@ -0,0 +1,1 @@
+link ../modeles/DYNAMICO_phyparam/bin/dynamico_phyparam.exe
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/icosa.xml
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/icosa.xml	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/icosa.xml	(revision 4231)
@@ -0,0 +1,123 @@
+<context id="icosagcm" >
+  <calendar type="d360" start_date="2000-01-01 00:00:00" time_origin="2000-01-01 00:00:00"/>
+  
+  <field_definition src="./field_def.xml" />
+
+  <file_definition src="./filedef_dcmip2016.xml" /> 
+
+  <file_definition type="one_file" par_access="collective">
+
+    <file id="output" name="output" enabled=".FALSE."  output_freq="2h" sync_freq="2h" output_level="10" >
+      <field_group group_ref="standard_output"/>
+    </file>
+
+    <file id="restart" name="restart" enabled="true">
+       <field_group id="group_restart" operation="once"> 
+          <field id="it_restart" name="iteration"  grid_ref="scalar" />
+          <field id="q_restart" name="q"  grid_ref="grid_q" />
+          <field_group domain_ref="i"> 
+             <field id="ps_restart" name="ps" />
+             <field id="phis_restart" name="phis" />
+             <field_group axis_ref="lev" >
+                <field id="theta_rhodz_restart" name="theta_rhodz" />
+                <field id="u_restart" name="u" domain_ref="u"/>
+                <field id="ulon_restart" name="ulon" />
+                <field id="ulat_restart" name="ulat" />
+             </field_group>
+             <field_group axis_ref="levp1" >
+                <field id="W_restart" name="W" />
+                <field id="geopot_restart" name="geopot" />
+             </field_group>
+          </field_group>
+       </field_group>
+    </file>
+
+    <file id="start" name="start" enabled="false" mode="read">
+       <field_group id="group_start" operation="once"> 
+          <field id="it_start" name="iteration"  grid_ref="scalar" enabled="true"/>
+          <field id="q_start" name="q"  grid_ref="grid_q_read" />
+          <field_group domain_ref="i"> 
+             <field id="ps_start" name="ps" />
+             <field id="phis_start" name="phis" />
+             <field_group axis_ref="lev_read" >
+                <field id="theta_rhodz_start" name="theta_rhodz" />
+                <field id="u_start" name="u" domain_ref="u"/>
+                <field id="ulon_start" name="ulon" />
+                <field id="ulat_start" name="ulat" />
+             </field_group>
+             <field_group axis_ref="levp1" >
+                <field id="W_start" name="W" />
+                <field id="geopot_start" name="geopot" />
+             </field_group>
+          </field_group>
+       </field_group>
+    </file>
+
+    
+  </file_definition>
+    
+  <axis_definition>
+    <axis id="lev" name="lev" positive="down" standard_name="atmopshere_hybrid_sigma_pressure_coordinate" long_name="hybrid level at midpoints" />
+    <axis id="lev_read" />
+    <axis id="levp1" name="ilev"  unit="level" positive="down" standard_name="atmopshere_hybride_sigma_pressure_coordinate" long_name="hybrid level at interface" />
+    <axis id="lev_pressure" positive="down"  n_glo="2" unit="Pa" value="(0,1)[85000 50000]" >
+      <interpolate_axis order="1" coordinate="p" />
+    </axis>    
+    <axis id="nq" name="nq" n_glo="5" value="(0,4)[1 2 3 4 5]"/>
+    <axis id="presnivs_mb" >  
+      <interpolate_axis order="1" />  
+    </axis> 
+  </axis_definition>    
+  
+  <domain_definition>
+    
+     <domain_group id="i"> 
+       <domain id="i" name="mesh"/>     
+     </domain_group> 
+     
+     
+     <domain id="v" /> 
+     <domain id="u" />
+     
+     <domain id="regular_half_degree" type="rectilinear" ni_glo="720" nj_glo="360" >
+       <generate_rectilinear_domain />
+       <interpolate_domain order="1"/>
+     </domain> 
+     
+     <domain id="regular_one_degree" type="rectilinear" ni_glo="360" nj_glo="180" >
+       <generate_rectilinear_domain />
+       <interpolate_domain order="1"/>
+     </domain> 
+     
+     <domain id="regular_two_degree" type="rectilinear" ni_glo="180" nj_glo="90" >
+       <generate_rectilinear_domain />
+       <interpolate_domain order="1"/>
+     </domain> 
+     
+  </domain_definition>    
+  
+  <grid_definition>    
+    <grid id="scalar">
+      <scalar />
+    </grid>
+    
+    <grid id="grid_q">
+      <domain domain_ref="i" />
+      <axis axis_ref="lev" />
+      <axis axis_ref="nq" />
+    </grid >
+
+    <grid id="grid_q_read">
+      <domain domain_ref="i" />
+      <axis axis_ref="lev_read" />
+      <axis axis_ref="nq" />
+    </grid >
+ 
+    <grid id="grid_q_regular">
+      <domain domain_ref="regular_two_degree" />
+      <axis axis_ref="lev" />
+      <axis axis_ref="nq" />
+    </grid >
+  </grid_definition>   
+  
+</context>
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/iodef.xml
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/iodef.xml	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/iodef.xml	(revision 4231)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<simulation> 
+	<context  id="xios">
+		<variable_definition>
+                <variable id="print_file" type="bool"> true </variable> 
+       		<variable_group id="buffer">
+         	</variable_group>
+
+        	<variable_group id="parameters" >
+        		<variable id="using_server" type="bool">false</variable>
+        		<variable id="info_level" type="int">1</variable>
+        	</variable_group>
+		</variable_definition>
+	</context>
+        <context id="icosagcm" src="./icosa.xml" /> 
+</simulation>
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/job.sh
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/job.sh	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/job.sh	(revision 4231)
@@ -0,0 +1,50 @@
+#!/bin/bash
+## Request name
+#MSUB -r DYNAMICO_phyparam_mpi
+## Number of tasks (=MPI processes) to use
+#MSUB -n 40
+## Number of OpenMP threads
+#MSUB -c 1
+## Elapsed time limit in seconds
+#MSUB -T 300
+# account, partition (Xeon/KNL)
+#MSUB -A gen0239
+#MSUB -q skylake
+# Mount  on compute node
+#MSUB -m work
+## Quality of Service required (long [3 days], normal [1 day], test [30 min])
+#MSUB -Q test
+
+export OMP_NUM_THREADS=1
+export OMP_STACKSIZE=128M
+
+cd ${BRIDGE_MSUB_PWD} 
+
+# module c++/gnu is needed to link with XIOS
+# module feature/openmpi/mpi_compiler/intel is made necessary by c++/gnu
+
+module purge
+module load feature/openmpi/mpi_compiler/intel
+module load c++/gnu/7.3.0
+module load intel/17.0.6.256
+module load mpi/openmpi/2.0.4
+module load flavor/hdf5/parallel
+module load netcdf-fortran/4.4.4
+module load mkl/17.0.6.256
+module load hdf5/1.8.20
+module load parmetis/4.0.3
+
+rm -rf gcm.log logs *.nc netcdf
+
+date > gcm.log
+ulimit -s unlimited
+ccc_mprun ./gcm.exe >> gcm.log
+date >> gcm.log
+
+mkdir -p netcdf
+cp gcm.log *.def netcdf
+mv *.nc netcdf
+
+mkdir -p logs
+cp *.xml logs
+mv xios_client_*.err xios_client_*.out gcm.log logs
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/run.def
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/run.def	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/TEST_IRENE/run.def	(revision 4231)
@@ -0,0 +1,48 @@
+#------------- Planet ---------------
+radius=6.37122e6
+omega=7.292e-5
+g=9.80616
+cpp=1004.5
+kappa=0.2857143
+preff=1e5
+
+#------------- Dynamics  ------------
+
+#-------------- Mesh ----------------
+nbp=21
+optim_it=500
+nsplit_i=2
+nsplit_j=2
+llm=30
+omp_level_size=1
+disvert=ncarl30
+
+#------------ Numerics --------------
+dt=480
+nqtot=2
+itau_adv=3
+
+#----------- Dissipation ------------
+nitergdiv=2
+tau_graddiv=10000
+nitergrot=2
+tau_gradrot=10000
+niterdivgrad=2
+tau_divgrad=10000
+
+#-------------- Physics -------------
+itau_physics=1
+physics=plugin
+
+#---------------- Run ---------------
+run_length=2592000
+write_period=21600
+
+#run_length=4800
+#write_period=480
+
+etat0=dcmip4
+dcmip4_testcase=1
+
+#------------ Diagnostics -----------
+diagflux=.TRUE.
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/build_DYNAMICO.sh
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/build_DYNAMICO.sh	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/build_DYNAMICO.sh	(revision 4231)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+echo "Usage : $0 arch"
+echo " where arch is the architecture name passed to the build scripts"
+
+ARCH=$1
+
+cd modeles/XIOS
+./make_xios --arch $ARCH --job 8
+
+cd ../DYNAMICO
+./make_icosa -arch $ARCH -parallel mpi -with_xios -job 8
+
+cd ../DYNAMICO_phyparam
+./make_dynamico_phyparam
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/install_DYNAMICO.sh
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/install_DYNAMICO.sh	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/install_DYNAMICO.sh	(revision 4231)
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+echo "Usage : $0 username"
+echo " where username will be used to download XIOS and DYNAMICO from forge.ipsl.fr via svn+ssh"
+
+USER=$1
+echo "Fetching DYNAMICO and XIOS from forge.ipsl.fr as $USER"
+
+rm -rf modeles/*
+cd modeles
+svn co "svn+ssh://${USER}@forge.ipsl.jussieu.fr/ipsl/forge/projets/ioserver/svn/XIOS/trunk" -r 1659 XIOS
+svn co "svn+ssh://${USER}@forge.ipsl.jussieu.fr/ipsl/forge/projets/dynamico/svn/codes/icosagcm/devel" DYNAMICO
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/bld.cfg
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/bld.cfg	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/bld.cfg	(revision 4231)
@@ -0,0 +1,43 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc arch.fcm
+inc config.fcm
+
+%FFLAGS           %BASE_FFLAGS %COMPIL_FFLAGS
+
+dir::root            $PWD
+
+src::src		src
+src::driver		src/driver
+src::physics		src/physics
+search_src		false
+
+bld::target dynamico_phyparam.exe
+
+bld::tool::fc        %COMPILER
+bld::tool::ld        %LINK
+bld::tool::ldflags   %LD_FLAGS %LIB 
+bld::tool::fflags    %FFLAGS 
+bld::tool::fppkeys   %CPP_KEY %FPP_DEF
+bld::tool::fpp       %FPP
+bld::tool::fppflags  %FPP_FLAGS
+
+# Pre-process code before analysing dependencies
+bld::pp              false
+
+bld::excl_dep        use::icosa_init_mod
+bld::excl_dep        use::icosa
+bld::excl_dep        use::getin_mod
+bld::excl_dep        use::time_mod
+bld::excl_dep        use::mpipara
+bld::excl_dep        use::physics_mod
+bld::excl_dep        use::physics_interface_mod
+
+bld::tool::SHELL   /bin/bash
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/make_dynamico_phyparam
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/make_dynamico_phyparam	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/make_dynamico_phyparam	(revision 4231)
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# resolve symlinks and '..' in $PWD to avoid useless re-compilation
+cd -P .
+
+rm -f .void_file
+echo > .void_file
+rm -rf .void_dir
+mkdir .void_dir
+
+DYNAMICO=$(cd -P ../DYNAMICO ; pwd)
+source $DYNAMICO/arch.env
+source $DYNAMICO/arch.path
+ln -sf $DYNAMICO/arch.fcm .
+
+LD_FLAGS="%BASE_LD -L $DYNAMICO/lib"
+COMPIL_FFLAGS="-I $DYNAMICO/inc"
+ICOSA_LIB="-licosa"
+
+# NETCDF
+LD_FLAGS="$LD_FLAGS $NETCDF_LIBDIR"
+ICOSA_LIB="$ICOSA_LIB $NETCDF_LIB"
+
+# XIOS
+LD_FLAGS="$LD_FLAGS $XIOS_LIBDIR"
+ICOSA_LIB="$ICOSA_LIB $XIOS_LIB"
+
+# compile in production mode
+COMPIL_FFLAGS="%PROD_FFLAGS $COMPIL_FFLAGS"
+
+rm -f config.fcm
+
+echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm
+echo "%LD_FLAGS $LD_FLAGS" >> config.fcm
+echo "%CPP_KEY $CPP_KEY" >> config.fcm
+echo "%LIB $ICOSA_LIB">> config.fcm
+echo "%IOIPSL_PATH $ioipsl_path">> config.fcm
+echo "%USE_IOIPSL $use_ioipsl">> config.fcm
+
+export PATH=${DYNAMICO}/tools/FCM/bin/:${PATH}
+fcm build
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/src/driver
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/src/driver	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/src/driver	(revision 4231)
@@ -0,0 +1,1 @@
+link ../../../../../phyparam/DYNAMICO
Index: /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/src/physics
===================================================================
--- /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/src/physics	(revision 4231)
+++ /dynamico_lmdz/simple_physics/config/DYNAMICO/modeles/DYNAMICO_phyparam/src/physics	(revision 4231)
@@ -0,0 +1,1 @@
+link ../../../../../phyparam/physics
Index: /dynamico_lmdz/simple_physics/phyparam/DYNAMICO/dynamico_phyparam.F90
===================================================================
--- /dynamico_lmdz/simple_physics/phyparam/DYNAMICO/dynamico_phyparam.F90	(revision 4231)
+++ /dynamico_lmdz/simple_physics/phyparam/DYNAMICO/dynamico_phyparam.F90	(revision 4231)
@@ -0,0 +1,17 @@
+PROGRAM icosa_gcm
+  USE icosa_init_mod, ONLY : icosa_init
+  USE icosa_phyparam_mod, ONLY : init_physics, physics
+  USE physics_mod, ONLY : init_physics_plugin, physics_plugin
+  
+  init_physics_plugin => init_physics
+  physics_plugin => physics
+  
+  CALL icosa_init
+
+END PROGRAM icosa_gcm
+
+SUBROUTINE initialize_external_physics
+END SUBROUTINE initialize_external_physics
+
+SUBROUTINE external_physics
+END SUBROUTINE external_physics
Index: /dynamico_lmdz/simple_physics/phyparam/DYNAMICO/icosa_phyparam_mod.F90
===================================================================
--- /dynamico_lmdz/simple_physics/phyparam/DYNAMICO/icosa_phyparam_mod.F90	(revision 4231)
+++ /dynamico_lmdz/simple_physics/phyparam/DYNAMICO/icosa_phyparam_mod.F90	(revision 4231)
@@ -0,0 +1,40 @@
+MODULE icosa_phyparam_mod
+  IMPLICIT NONE
+  SAVE
+
+  CONTAINS
+
+    SUBROUTINE init_physics
+      ! DYNAMICO
+      USE mpipara,   ONLY : is_mpi_master
+      USE icosa,     ONLY : llm, g, radius, cpp, kappa 
+      USE time_mod,  ONLY : dt, itau_physics
+      USE getin_mod, ONLY : getin
+      USE physics_interface_mod
+      ! phyparam
+      USE comgeomfi
+      USE iniphyparam_mod
+      INTEGER, PARAMETER :: dayref=0
+      INTEGER :: ngrid
+      REAL    :: unjours ! solar day in seconds
+
+      IF(is_mpi_master) WRITE(*,*) 'phyparam/init_physics called'
+      
+      ngrid = physics_inout%ngrid
+      unjours = 86400.
+      CALL getin('unjours', unjours)
+
+      CALL init_comgeomfi(ngrid, llm, &
+           &              physics_inout%lon, physics_inout%lat)
+      CALL iniphyparam(ngrid, llm,                &
+           &           unjours, dayref, dt*itau_physics, & 
+           &           radius, g, cpp*kappa, cpp)
+
+    END SUBROUTINE init_physics
+
+    SUBROUTINE physics
+      USE mpipara, ONLY : is_mpi_master
+      IF(is_mpi_master) PRINT *, 'phyparam/physics called'
+    END SUBROUTINE physics
+
+END MODULE icosa_phyparam_mod
