Index: /trunk/LMDZ.MARS/changelog.txt
===================================================================
--- /trunk/LMDZ.MARS/changelog.txt	(revision 2963)
+++ /trunk/LMDZ.MARS/changelog.txt	(revision 2964)
@@ -4031,3 +4031,8 @@
 + Correct inertiesoil writting in start2archive
 
-
+== 12/05/2023 == RV
+Create a new file "file_def_physics_mars.xml" in deftank. 
+This is the place to define the output (file name, variable, frequency, operation...) of the physic when using XIOS.
+
+
+
Index: /trunk/LMDZ.MARS/deftank/context_lmdz_physics.xml
===================================================================
--- /trunk/LMDZ.MARS/deftank/context_lmdz_physics.xml	(revision 2963)
+++ /trunk/LMDZ.MARS/deftank/context_lmdz_physics.xml	(revision 2964)
@@ -31,4 +31,8 @@
               standard_name="Controle"
               n_glo="100">
+        </axis>
+        <axis id="subslope" 
+              standard_name="subslope"
+              unit="">
         </axis>
     </axis_definition>
@@ -84,164 +88,7 @@
     <!-- Definition of model variables -->
     <field_definition src="./field_def_physics_mars.xml" />
-    
-    <!-- Definition of output files -->
-    <file_definition>
-        <!-- Instantaneous outputs; Here output_freq in physics time steps -->
-        <file id="histins"
-              name="Xhistins"
-              output_freq="12ts" 
-              time_units="days"
-              type="one_file"
-              enabled=".true.">
-                    
-            <!-- VARS 0D -->
-            <field_group operation="instant"
-                         freq_op="1ts">
-                <field field_ref="Ls" />
-            </field_group>
 
-            <!-- VARS 2D -->
-            <field_group operation="instant"
-                         freq_op="1ts">
-                <field field_ref="area" operation="once" />
-                <field field_ref="ps" />
-                <field field_ref="tsurf" />
-                <field field_ref="co2ice" />
-                <field field_ref="fluxsurf_dn_sw" name="ISR" />
-                <field field_ref="fluxtop_lw" name="OLR" />
-            </field_group>
-
-            <!-- VARS 3D -->
-            <field_group operation="instant"
-                         freq_op="1ts">
-                <field field_ref="temp" />
-                <field field_ref="u" />
-                <field field_ref="v" />
-            </field_group>
-
-            <!-- VARS soil -->
-            <field_group operation="instant"
-                         freq_op="1ts">
-                <field field_ref="soiltemp" name="tsoil" />
-                <field field_ref="inertiedat" />
-            </field_group>
-        </file>
-
-        <!-- diurnal averages outputs; output_freq is every day -->
-        <file id="diurnalave_"
-              name="Xdiurnalave_"
-              output_freq="1d" 
-              time_units="days"
-              type="one_file"
-              enabled=".false.">
-                    
-            <!-- VARS 0D -->
-            <field_group operation="average"
-                         freq_op="1ts">
-                <field field_ref="Ls" />
-            </field_group>
-
-            <!-- VARS 2D -->
-            <field_group operation="average"
-                         freq_op="1ts">
-                <field field_ref="area" operation="once" />
-                <field field_ref="ps" />
-            </field_group>
-
-            <!-- VARS 3D -->
-            <field_group operation="average"
-                         freq_op="1ts">
-                <field field_ref="temp" />
-                <field field_ref="u" />
-                <field field_ref="v" />
-            </field_group>
-        </file>
-
-        <file id="diurnalave"
-              name="Xdiurnalave"
-              output_freq="1d"
-              type="one_file"
-              time_units="days"
-              enabled=".false.">
-                    
-            <!-- VARS 0D -->
-            <field_group operation="average"
-                         freq_op="1ts">
-                <field field_ref="Ls" />
-            </field_group>
-
-            <field_group operation="average"
-                         freq_op="1ts">
-                <field field_ref="area" operation="once" />
-                <field field_ref="ps" />
-                <field field_ref="tsurf" />
-                <field field_ref="tsurf_slope01" />
-                <field field_ref="tsurf_slope02" />
-                <field field_ref="tsurf_slope03" />
-                <field field_ref="tsurf_slope04" />
-                <field field_ref="tsurf_slope05" />
-                <field field_ref="tsurf_slope06" />
-                <field field_ref="tsurf_slope07" />
-                <field field_ref="Waterdensity_surface01" />
-                <field field_ref="Waterdensity_surface02" />
-                <field field_ref="Waterdensity_surface03" />
-                <field field_ref="Waterdensity_surface04" />
-                <field field_ref="Waterdensity_surface05" />
-                <field field_ref="Waterdensity_surface06" />
-                <field field_ref="Waterdensity_surface07" />
-                <field field_ref="h2o_layer1" />
-                <field field_ref="co2_layer1" />
-            </field_group>
-
-            <field_group operation="minimum"
-                         freq_op="1ts">
-                <field field_ref="co2ice" />
-                <field field_ref="co2ice_slope01" />
-                <field field_ref="co2ice_slope02" />
-                <field field_ref="co2ice_slope03" />
-                <field field_ref="co2ice_slope04" />
-                <field field_ref="co2ice_slope05" />
-                <field field_ref="co2ice_slope06" />
-                <field field_ref="co2ice_slope07" />
-                <field field_ref="h2o_ice_s" />
-                <field field_ref="h2o_ice_s_slope01" />
-                <field field_ref="h2o_ice_s_slope02" />
-                <field field_ref="h2o_ice_s_slope03" />
-                <field field_ref="h2o_ice_s_slope04" />
-                <field field_ref="h2o_ice_s_slope05" />
-                <field field_ref="h2o_ice_s_slope06" />
-                <field field_ref="h2o_ice_s_slope07" />
-                <field field_ref="watercap_slope01" />
-                <field field_ref="watercap_slope02" />
-                <field field_ref="watercap_slope03" />
-                <field field_ref="watercap_slope04" />
-                <field field_ref="watercap_slope05" />
-                <field field_ref="watercap_slope06" />
-                <field field_ref="watercap_slope07" />
-            </field_group>
-
-            <!-- VARS soil -->
-            <field_group operation="average"
-                         freq_op="1ts">
-                <field field_ref="soiltemp" />
-                <field field_ref="soiltemp_slope01" />
-                <field field_ref="soiltemp_slope02" />
-                <field field_ref="soiltemp_slope03" />
-                <field field_ref="soiltemp_slope04" />
-                <field field_ref="soiltemp_slope05" />
-                <field field_ref="soiltemp_slope06" />
-                <field field_ref="soiltemp_slope07" />
-                <field field_ref="Waterdensity_soil_slope01" />
-                <field field_ref="Waterdensity_soil_slope02" />
-                <field field_ref="Waterdensity_soil_slope03" />
-                <field field_ref="Waterdensity_soil_slope04" />
-                <field field_ref="Waterdensity_soil_slope05" />
-                <field field_ref="Waterdensity_soil_slope06" />
-                <field field_ref="Waterdensity_soil_slope07" />
-            </field_group>
-        </file>
-
-
-    </file_definition>
+    <!-- Definition of model output -->
+    <file_definition src="./file_def_physics_mars.xml" />  
 
 </context>
Index: /trunk/LMDZ.MARS/deftank/field_def_physics_mars.xml
===================================================================
--- /trunk/LMDZ.MARS/deftank/field_def_physics_mars.xml	(revision 2963)
+++ /trunk/LMDZ.MARS/deftank/field_def_physics_mars.xml	(revision 2964)
@@ -715,23 +715,23 @@
                    long_name="Soil thermal inertia for slope 07"
                    unit="J/kg/K" />
-            <field id="Waterdensity_soil_slope01 for slope 01"
+            <field id="Waterdensity_soil_slope01"
                    long_name="rhowater_soil"
                    unit="J/kg/K" />
-            <field id="Waterdensity_soil_slope02 for slope 02"
+            <field id="Waterdensity_soil_slope02"
                    long_name="rhowater_soil"
                    unit="J/kg/K" />
-            <field id="Waterdensity_soil_slope03 for slope 03"
+            <field id="Waterdensity_soil_slope03"
                    long_name="rhowater_soil"
                    unit="J/kg/K" />
-            <field id="Waterdensity_soil_slope04 for slope 04"
+            <field id="Waterdensity_soil_slope04"
                    long_name="rhowater_soil"
                    unit="J/kg/K" />
-            <field id="Waterdensity_soil_slope05 for slope 05"
+            <field id="Waterdensity_soil_slope05"
                    long_name="rhowater_soil"
                    unit="J/kg/K" />
-            <field id="Waterdensity_soil_slope06 for slope 06"
+            <field id="Waterdensity_soil_slope06"
                    long_name="rhowater_soil"
                    unit="J/kg/K" />
-            <field id="Waterdensity_soil_slope07 for slope 07"
+            <field id="Waterdensity_soil_slope07"
                    long_name="rhowater_soil"
                    unit="J/kg/K" />
Index: /trunk/LMDZ.MARS/deftank/file_def_physics_mars.xml
===================================================================
--- /trunk/LMDZ.MARS/deftank/file_def_physics_mars.xml	(revision 2964)
+++ /trunk/LMDZ.MARS/deftank/file_def_physics_mars.xml	(revision 2964)
@@ -0,0 +1,165 @@
+<!-- =========================================================================================================== -->
+<!-- file_def_physics_mars.xml                                                                                  -->
+<!-- Definition of output files from Martian physics                                -->
+<!-- =========================================================================================================== -->
+
+    <!-- Definition of output files -->
+    <file_definition>
+        <!-- FILE 1 : Instantaneous outputs; Here output_freq in physics time steps -->
+        <file id="histins"
+              name="Xhistins"
+              output_freq="12ts" 
+              time_units="days"
+              type="one_file"
+              enabled=".true.">
+                    
+            <!-- VARS 0D -->
+            <field_group operation="instant"
+                         freq_op="1ts">
+                <field field_ref="Ls" />
+            </field_group>
+
+            <!-- VARS 2D -->
+            <field_group operation="instant"
+                         freq_op="1ts">
+                <field field_ref="area" operation="once" />
+                <field field_ref="ps" />
+                <field field_ref="tsurf" />
+                <field field_ref="co2ice" />
+                <field field_ref="fluxsurf_dn_sw" name="ISR" />
+                <field field_ref="fluxtop_lw" name="OLR" />
+            </field_group>
+
+            <!-- VARS 3D -->
+            <field_group operation="instant"
+                         freq_op="1ts">
+                <field field_ref="temp" />
+                <field field_ref="u" />
+                <field field_ref="v" />
+            </field_group>
+
+            <!-- VARS soil -->
+            <field_group operation="instant"
+                         freq_op="1ts">
+                <field field_ref="soiltemp" name="tsoil" />
+                <field field_ref="inertiedat" />
+            </field_group>
+        </file>
+
+        <!-- FILE 2 :diurnal averages outputs; output_freq is every day -->
+        <file id="diurnalave_"
+              name="Xdiurnalave_"
+              output_freq="1d" 
+              time_units="days"
+              type="one_file"
+              enabled=".false.">
+                    
+            <!-- VARS 0D -->
+            <field_group operation="average"
+                         freq_op="1ts">
+                <field field_ref="Ls" />
+            </field_group>
+
+            <!-- VARS 2D -->
+            <field_group operation="average"
+                         freq_op="1ts">
+                <field field_ref="area" operation="once" />
+                <field field_ref="ps" />
+            </field_group>
+
+            <!-- VARS 3D -->
+            <field_group operation="average"
+                         freq_op="1ts">
+                <field field_ref="temp" />
+                <field field_ref="u" />
+                <field field_ref="v" />
+            </field_group>
+        </file>
+
+        <!-- FILE 3 :diurnal averages outputs for PEM; output_freq is every day -->
+        <file id="diurnalave"
+              name="Xdiurnalave"
+              output_freq="1d"
+              type="one_file"
+              time_units="days"
+              enabled=".false.">
+                    
+            <!-- VARS 0D -->
+            <field_group operation="average"
+                         freq_op="1ts">
+                <field field_ref="Ls" />
+            </field_group>
+
+            <field_group operation="average"
+                         freq_op="1ts">
+                <field field_ref="area" operation="once" />
+                <field field_ref="ps" />
+                <field field_ref="tsurf" />
+                <field field_ref="tsurf_slope01" />
+                <field field_ref="tsurf_slope02" />
+                <field field_ref="tsurf_slope03" />
+                <field field_ref="tsurf_slope04" />
+                <field field_ref="tsurf_slope05" />
+                <field field_ref="tsurf_slope06" />
+                <field field_ref="tsurf_slope07" />
+                <field field_ref="Waterdensity_surface01" />
+                <field field_ref="Waterdensity_surface02" />
+                <field field_ref="Waterdensity_surface03" />
+                <field field_ref="Waterdensity_surface04" />
+                <field field_ref="Waterdensity_surface05" />
+                <field field_ref="Waterdensity_surface06" />
+                <field field_ref="Waterdensity_surface07" />
+                <field field_ref="h2o_layer1" />
+                <field field_ref="co2_layer1" />
+            </field_group>
+
+            <field_group operation="minimum"
+                         freq_op="1ts">
+                <field field_ref="co2ice" />
+                <field field_ref="co2ice_slope01" />
+                <field field_ref="co2ice_slope02" />
+                <field field_ref="co2ice_slope03" />
+                <field field_ref="co2ice_slope04" />
+                <field field_ref="co2ice_slope05" />
+                <field field_ref="co2ice_slope06" />
+                <field field_ref="co2ice_slope07" />
+                <field field_ref="h2o_ice_s" />
+                <field field_ref="h2o_ice_s_slope01" />
+                <field field_ref="h2o_ice_s_slope02" />
+                <field field_ref="h2o_ice_s_slope03" />
+                <field field_ref="h2o_ice_s_slope04" />
+                <field field_ref="h2o_ice_s_slope05" />
+                <field field_ref="h2o_ice_s_slope06" />
+                <field field_ref="h2o_ice_s_slope07" />
+                <field field_ref="watercap_slope01" />
+                <field field_ref="watercap_slope02" />
+                <field field_ref="watercap_slope03" />
+                <field field_ref="watercap_slope04" />
+                <field field_ref="watercap_slope05" />
+                <field field_ref="watercap_slope06" />
+                <field field_ref="watercap_slope07" />
+            </field_group>
+
+            <!-- VARS soil -->
+            <field_group operation="average"
+                         freq_op="1ts">
+                <field field_ref="soiltemp" />
+                <field field_ref="soiltemp_slope01" />
+                <field field_ref="soiltemp_slope02" />
+                <field field_ref="soiltemp_slope03" />
+                <field field_ref="soiltemp_slope04" />
+                <field field_ref="soiltemp_slope05" />
+                <field field_ref="soiltemp_slope06" />
+                <field field_ref="soiltemp_slope07" />
+                <field field_ref="Waterdensity_soil_slope01" />
+                <field field_ref="Waterdensity_soil_slope02" />
+                <field field_ref="Waterdensity_soil_slope03" />
+                <field field_ref="Waterdensity_soil_slope04" />
+                <field field_ref="Waterdensity_soil_slope05" />
+                <field field_ref="Waterdensity_soil_slope06" />
+                <field field_ref="Waterdensity_soil_slope07" />
+            </field_group>
+        </file>
+
+    </file_definition>
+
