<?xml version="1.0"?>
<simulation> 
    <context id="LMDZ">
        
        <!-- <calendar type="D360" start_date="1980-01-01 00:00:00" /> -->
        
        <!-- Definition of model variables -->
        <field_definition prec="4" 
                          freq_op="1ts"
                          enabled=".TRUE.">
            
            <!-- 2D variables -->
            <field_group id="fields_2D" domain_ref="dom_glo">
                <field id="ps"
                       long_name="Surface Pressure" 
                       unit="m/s" />
            </field_group>

            <!-- 3D variables -->
            <field_group id="fields_3D"
                         domain_ref="dom_glo" axis_ref="presnivs">
                <field id="temperature"
                       long_name="Atmospheric temperature"
                       unit="K" />
                <field id="temp_newton"
                       long_name="Relaxation temperature"
                       unit="K" />
                <field id="u"
                       long_name="Eastward Zonal Wind"
                       unit="m/s" />
                <field id="v" 
                       long_name="Northward Meridional Wind" 
                       unit="m/s" />
            </field_group>
        </field_definition>

        <!-- Définition of output files -->

        <file_definition>
            <!-- <file_group id="defile"> -->
                <file id="histins"
                      name="Xhistins"
                      output_freq="12ts" 
                      type="one_file"
                      enabled=".TRUE."> <!-- NB: output_freq in physics ts-->
                    
                    <!-- VARS 2D -->
                    <field_group operation="instant"
                                 freq_op="1ts">
                        <field field_ref="ps" />
                    </field_group>

                    <!-- VARS 3D -->
                    <field_group operation="instant"
                                 freq_op="1ts"
                                 axis_ref="presnivs">
                        <field field_ref="temperature" />
                        <field field_ref="temp_newton" operation="once" />
                        <field field_ref="u" />
                        <field field_ref="v" />
                    </field_group>
                </file>

                <file id="diurnalave"
                      name="Xdiurnalave"
                      output_freq="1d"
                      type="one_file"
                      enabled=".true.">
                    <!-- VARS 2D -->
                    <field_group operation="average"
                                 freq_op="1ts">
                        <field field_ref="ps" />
                    </field_group>
                    <!-- VARS 3D -->
                    <field_group operation="average"
                                 freq_op="1ts"
                                 axis_ref="presnivs">
                        <field field_ref="temperature" />
                        <field field_ref="u" />
                        <field field_ref="v" />
                    </field_group>                     
                </file>
            <!-- </file_group> -->
        </file_definition>


        <!-- Definition of domains and groups of domains -->
        <domain_definition>
            <domain id="dom_glo" data_dim="2" />
        </domain_definition>
        
        <!-- Definition of vertical axes 
             NB: these must be defined and set in code via
             wxios_add_vaxis -->
        <axis_definition>
            <axis id="presnivs" 
                        standard_name="Pseudo-pressure of model vertical levels" 
                        unit="Pa">
            </axis>
        </axis_definition>
    </context>
    
    <context  id="xios">
        <variable_definition>
               <variable_group id="buffer">
                buffer_size = 85000000
                buffer_server_factor_size = 2 
             </variable_group>

            <variable_group id="parameters" >
                <variable id="using_server" type="bool">false</variable>
                <variable id="info_level" type="int">10</variable>
            </variable_group>
        </variable_definition>
    </context>
</simulation>
