source: branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/context_input_orchidee.xml @ 7442

Last change on this file since 7442 was 7375, checked in by agnes.ducharne, 3 years ago

Corrects two bugs: default value for nscm after r7337 and r7338; xios_interpolation now working, compared to r7339 (cf ticket #416). Note that xios_interpolation gives different results than "normal interpolation", see ticket #812.

  • Property svn:keywords set to Date Revision HeadURL
File size: 21.5 KB
RevLine 
[1797]1<!-- =========================================================================================================== -->
[5565]2<!-- ORCHIDEE context for input files                                                                            -->
3<!-- context_input_orchidee.xml : Configuration file for ORCHIDEE for reading of input files using XIOS          -->
4<!-- This file must be included from iodef.xml                                                                   -->
5<!-- All specifications specific for the reading and interpolating of input files are regrouped in this file.    -->
6<!-- Find below sections for file_definition, field_definition, domain_definition, grid_definition and           -->
[6954]7<!-- variable_definition.                                                                                        -->   
8<!-- Recent change:  added block to read params_sp_mip.nc (Salma Tafasca and Agnes Ducharne, November 2020)      -->
9<!--                                                                                                             --> 
[7260]10<!-- $HeadURL$          -->
[5565]11<!-- $Date$                                                      -->
[4094]12<!-- $Revision$                                                                                           -->
[1797]13<!-- =========================================================================================================== -->
[2060]14<context id="orchidee">
[4577]15
[5565]16
17  <!-- ========================================================================================================= -->
18  <!-- Definition of input files                                                                                 -->
19  <!-- The input files are activated or desactivated from the source code depending on simulation set up.        -->
20  <!-- The variables are here on the input source grid.                                                          -->
21  <!-- Different treatment are done accordig to the file.                                                        -->
22  <!-- Values higher than 1e10 are for some files considered as missing values and the field is then set to 0.   -->
23  <!-- A normalization are sometimes done with the fraction of the grid cell.                                    -->
24  <!-- Sometimes, if only missing values are found for a grid cell, then a default value is set.                 -->
25  <!-- ========================================================================================================= -->
26 
[5364]27  <file_definition>
[4577]28
[5460]29    <file id="soils_param_file" mode="read" output_freq="1y" enabled="true">
[7260]30      <field id="soilcolor" name="soilcolor" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts"/>
31      <field id="soiltext" name="soiltext" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts"/>
[5364]32    </file>
[6954]33
34    <!-- Default file name: params_sp_mip.nc for both all soil hydraulic parameters. -->
[7375]35    <!--file id="soilparam_file" mode="read" output_freq="1y" enabled="true"-->
36      <!--field id="soilks" name="soilks" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field-->
37      <!--field id="soilnvan" name="soilnvan" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field-->
38      <!--field id="soilavan" name="soilavan" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field-->
39      <!--field id="soilmcr" name="soilmcr" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field-->
40      <!--field id="soilmcs" name="soilmcs" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field-->
41      <!--field id="soilmcfc" name="soilmcfc" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field-->
42      <!--field id="soilmcw" name="soilmcw" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field-->
43    <!--/file-->
44   
[5460]45    <file  id="PFTmap_file"  mode="read" output_freq="1y">
[7260]46      <field id="maxvegetfrac_read"  name="maxvegetfrac" domain_ref="dom_file_pft" axis_ref="nvm" operation="instant"  freq_offset="1ts"> this &lt; 1e10 ? this : 0 </field>
47      <field id="maxvegetfrac_mask"  name="maxvegetfrac" domain_ref="dom_file_pft" axis_ref="nvm" operation="instant"  freq_offset="1ts"> this &lt; 1e10 ? 1 : 0 </field>
[5364]48    </file>
49   
[5460]50    <file id="topography_file"  mode="read" output_freq="1y">
[7260]51      <!--      <field id="pente"  domain_ref="dom_file_topo"  operation="instant"  freq_offset="1ts" > (this &gt; 1e10) ? 1 : this </field>     ==> In reference, missing value are use for computing, this probably wrong -->
52      <field id="pente_read"       name="pente" domain_ref="dom_file_topo"  operation="instant"  freq_offset="1ts" > ((this/$slope_noreinf) &lt; 1)? this/$slope_noreinf : 1 </field>
53      <field id="mask_pente_read"  name="pente" domain_ref="dom_file_topo"  operation="instant"  freq_offset="1ts" > (this &lt; $min_sechiba)? 0 : 1                         </field>  <!-- create mask -->
[5364]54    </file>
55   
[5460]56    <file id="albedo_file" mode="read" output_freq="1y">
[7260]57      <field id="mask_alb_read"    name="mask"       domain_ref="dom_file_albedo"  operation="instant"  freq_offset="1ts" />
58      <field id="bg_alb_vis_read"  name="bg_alb_vis" domain_ref="dom_file_albedo"  operation="instant"  freq_offset="1ts" >  mask_alb_read &gt; 0.99 ? this : $missing_value  </field>
59      <field id="bg_alb_nir_read"  name="bg_alb_nir" domain_ref="dom_file_albedo"  operation="instant"  freq_offset="1ts" >  mask_alb_read &gt; 0.99 ? this : $missing_value  </field>
[5364]60    </file>
61   
[5460]62    <file id="lai_file" mode="read" output_freq="1y" time_counter_name="toto" cyclic="true">
[5364]63      <field id="lai_read"       name="LAI" grid_ref="lai" operation="instant"  freq_offset="1ts" > this &gt; 20 ? 0 : this </field>
64      <field id="mask_lai_read"  name="LAI" grid_ref="lai" operation="instant"  freq_offset="1ts" > this &gt; 20 ? 0 : 1    </field>  <!-- create mask -->
65    </file>
66
[5460]67    <file id="fertilizer_file" mode="read" output_freq="1y" cyclic="true">
[7260]68      <field id="N_qt_OTHER_year_read"  name="N_qt_OTHER_year" domain_ref="dom_file_fertilizer" operation="instant"  freq_offset="1ts"/>
69      <field id="N_qt_WRICE_year_read"  name="N_qt_WRICE_year" domain_ref="dom_file_fertilizer" operation="instant"  freq_offset="1ts"/>
[5364]70    </file>
71   
[5460]72    <file id="bbg_clim_file" mode="read" output_freq="1y" cyclic="true">
[7260]73      <field id="flx_co2_bbg_year_read"  name="flx_co2_bbg_year" domain_ref="dom_file_bbg_clim" operation="instant"  freq_offset="1ts"/>
[5364]74    </file>
[5565]75   
[5460]76    <file id="reftemp_file" mode="read" output_freq="1y" cyclic="true">
[7260]77      <field id="reftemp_read"  name="temperature" domain_ref="dom_file_reftemp" operation="instant"  freq_offset="1ts"/>
[5364]78    </file>
[5565]79   
[5460]80    <file id="woodharvest_file" mode="read" output_freq="1y" cyclic="true">
[7260]81      <field id="woodharvest_read"  name="woodharvest" domain_ref="dom_file_woodharvest" operation="instant"  freq_offset="1ts"/>
[5364]82    </file>
[5565]83   
[7260]84       
[5565]85    <file id="nudge_moistc" name="nudge_moistc" type="one_file" mode="read" output_freq="1d">
[7260]86      <field  id="moistc_in" name="moistc" operation="instant" grid_ref="grid_file_moistc" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
87      <field  id="mask_moistc_in" name="moistc" operation="instant" grid_ref="grid_file_moistc" freq_offset="1ts" > (this &gt; 1e10) ? 0 : 1 </field>
[5565]88    </file>
89   
90    <file id="nudge_snow" name="nudge_snow" type="one_file" mode="read" output_freq="1d">
[7260]91      <field  id="snowdz_in" name="snowdz" operation="instant" grid_ref="grid_file_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
92      <field  id="snowrho_in" name="snowrho" operation="instant" grid_ref="grid_file_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
93      <field  id="snowtemp_in" name="snowtemp" operation="instant" grid_ref="grid_file_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
94      <field  id="mask_snow_in" name="snowdz" operation="instant" grid_ref="grid_file_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : 1 </field>
[5565]95    </file>
96   
[5364]97  </file_definition>
98
99
[5565]100  <!-- ========================================================================================================= -->
101  <!-- Definition of all field coming from files but now interpolated to the model grid.                         -->
102  <!-- ========================================================================================================= -->
103
[5364]104  <field_definition>
105
106    <field_group enabled="false" read_access="true">
107
108      <field_group id="soil_color" enabled="false">
[7260]109        <field id="soilcolor0" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 0 </field>
110        <field id="soilcolor1" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 1 </field>
111        <field id="soilcolor2" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 2 </field>
112        <field id="soilcolor3" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 3 </field>
113        <field id="soilcolor4" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 4 </field>
114        <field id="soilcolor5" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 5 </field>
115        <field id="soilcolor6" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 6 </field>
116        <field id="soilcolor7" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 7 </field>
117        <field id="soilcolor8" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 8 </field>
118        <field id="soilcolor9" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 9 </field>
[5364]119      </field_group>
120
[7260]121      <field_group id="soil_text" field_ref="soiltext" domain_ref="dom_from_soil" enabled="true" read_access="true">
[5364]122        <field id="soiltext1"  > soiltext == 1 </field>
123        <field id="soiltext2"  > soiltext == 2 </field>
124        <field id="soiltext3"  > soiltext == 3 </field>
125        <field id="soiltext4"  > soiltext == 4 </field>
126        <field id="soiltext5"  > soiltext == 5 </field>
127        <field id="soiltext6"  > soiltext == 6 </field>
128        <field id="soiltext7"  > soiltext == 7 </field>
129        <field id="soiltext8"  > soiltext == 8 </field>
130        <field id="soiltext9"  > soiltext == 9 </field>
131        <field id="soiltext10" > soiltext == 10 </field>
132        <field id="soiltext11" > soiltext == 11 </field>
133        <field id="soiltext12" > soiltext == 12 </field>
[7260]134        <field id="soiltext13" > soiltext == 13 </field>
[5364]135      </field_group>
136     
[7260]137      <field id="frac_veget"      field_ref="maxvegetfrac_read" domain_ref="dom_from_pft" read_access="true" enabled="true" />
138      <field id="frac_veget_frac" field_ref="maxvegetfrac_mask" domain_ref="dom_from_pft" read_access="true" enabled="true" />
[5364]139
[7260]140      <field id="slope_tmp"           field_ref="pente_read"       domain_ref="dom_from_topo"                                  />
141      <field id="frac_slope_interp"   field_ref="mask_pente_read"  domain_ref="dom_from_topo" read_access="true" enabled="true"/>
142      <field id="reinf_slope_interp"                               domain_ref="dom_from_topo" read_access="true" enabled="true"> (frac_slope_interp &gt; $min_sechiba ) ? 1-slope_tmp/(frac_slope_interp+1e-100) : $slope_default </field>
[5364]143
[7260]144      <field id="bg_alb_vis_tmp"   field_ref="bg_alb_vis_read"  domain_ref="dom_from_albedo"  />
[5364]145      <field id="bg_alb_vis_interp" field_ref="bg_alb_vis_tmp"  read_access="true" enabled="true" > this == $missing_value ? $albbg_vis_default : this </field>
146
[7260]147      <field id="bg_alb_nir_tmp"    field_ref="bg_alb_nir_read"  domain_ref="dom_from_albedo"  />
[5364]148      <field id="bg_alb_nir_interp" field_ref="bg_alb_nir_tmp"  read_access="true"  enabled="true" >  this == $missing_value ? $albbg_nir_default : this </field>
149     
[7260]150      <field id="lai_tmp"          field_ref="lai_read"      grid_ref="grid_from_lai" />
151      <field id="frac_lai_interp"  field_ref="mask_lai_read" grid_ref="grid_from_lai" read_access="true" enabled="true" />
[5364]152      <field id="lai_interp"       field_ref="lai_tmp"                           read_access="true" enabled="true"  >  lai_tmp/(frac_lai_interp+1e-100) </field>  <!-- renormalize -->
153     
[7260]154      <field id="N_qt_WRICE_year_interp"  field_ref="N_qt_WRICE_year_read"  domain_ref="dom_from_fertilizer" read_access="true" enabled="true" />
155      <field id="N_qt_OTHER_year_interp"  field_ref="N_qt_OTHER_year_read"  domain_ref="dom_from_fertilizer" read_access="true" enabled="true" />
[5364]156     
[7260]157      <field id="flx_co2_bbg_year_interp"  field_ref="flx_co2_bbg_year_read"  domain_ref="dom_from_bbg_clim" read_access="true" enabled="true" />
[5364]158
[7260]159      <field id="reftemp_interp"  field_ref="reftemp_read"  domain_ref="dom_from_reftemp" read_access="true" enabled="true" />
[5364]160
[7260]161      <field id="woodharvest_interp"  field_ref="woodharvest_read"  domain_ref="dom_from_woodharvest" read_access="true" enabled="true" />
[5364]162     
163    </field_group>
164
[5565]165    <field_group id="orchidee_input_mc" grid_ref="grid_nslm_nstm">
166      <!-- Interpolate the mask. This gives now the fraction of the source area underlaying the model grid cell -->
167      <field id="mask_moistc_interp" field_ref="mask_moistc_in" read_access="true" />
168      <!-- Interpolate the variable. Note that where the source file had missing values, the variables was set to 0. Therefor normalization is needed.     -->
169      <!-- Normalize the interpolated values with the mask which corresponds to the fraction of underlaying valid source grid cells.                       -->
170      <!-- The default value 0.2 is used if the mask is 0. This is the case if no information at all was found on the source grid for the model grid cell. -->
171      <field id="moistc_tmp" field_ref="moistc_in"  />
172      <field id="moistc_interp" field_ref="moistc_tmp" read_access="true" > (mask_moistc_interp &lt; 1e-4) ? 0.2 : this/(mask_moistc_interp+1e-100) </field>
173    </field_group>
174
175    <field_group id="orchidee_input_snow" grid_ref="grid_nsnow2" >
176      <field id="mask_snow_interp" field_ref="mask_snow_in" read_access="true" />
177      <field id="snowdz_tmp" field_ref="snowdz_in" />
178      <!-- Set snowdz=0 where no information found on source grid, for all other points normlize with the fracion of underlaying source grid cells      -->
179      <field id="snowdz_interp" field_ref="snowdz_tmp" read_access="true" > (mask_snow_interp &lt; 1e-4) ? 0 : this/(mask_snow_interp+1e-100) </field>
180      <field id="snowrho_tmp" field_ref="snowrho_in" />
181      <!-- Set snowrho=50 where no information found on source grid, for all other points normlize with the fracion of underlaying source grid cells    -->
182      <field id="snowrho_interp" field_ref="snowrho_tmp" read_access="true" > (mask_snow_interp &lt; 1e-4) ? 50 : this/(mask_snow_interp+1e-100) </field>
183      <field id="snowtemp_tmp" field_ref="snowtemp_in" />
184      <!-- Set snowtemp=273 where no information found on source grid, for all other points normlize with the fracion of underlaying source grid cells  -->
185      <field id="snowtemp_interp" field_ref="snowtemp_tmp" read_access="true" > (mask_snow_interp &lt; 1e-4) ? 273 : this/(mask_snow_interp+1e-100) </field>
186    </field_group>
187 
[5364]188  </field_definition>
189
190
191
[4577]192  <!-- =========================================================================================================== -->
[5565]193  <!-- Definition of a horizontal domain for each input file                                                       -->
[7260]194  <!-- 2 different domains are specified for each input file X: dom_file_X and dom_from_X                          -->
195  <!--                                                                                                             -->
196  <!-- dom_file_X is the horizontal original grid in the input file. In this domain, specifications to help XIOS   -->
197  <!-- read the grid can be added such as generate_rectilinear_domain                                              -->
198  <!--                                                                                                             -->
199  <!-- dom_from_X describes how to make the interpolation from the file to the model grid. This domain contains    -->
200  <!-- the interpolation methode specific to the file.                                                             -->
201  <!--                                                                                                             -->
202  <!-- If the variable contains more dimensions than the horizontal domain and 1 axis, 2 grids must be specified:  -->
203  <!-- One for the orignial grid in the input file and one for the interpolation to model grid. These two grids    -->
204  <!-- uses 2 domains specified as above.                                                                          -->
205  <!-- We here suppose that the interpolation is only done on the horizontal domain                                -->
[1797]206  <!-- =========================================================================================================== -->
[5565]207
[2060]208  <domain_definition>
[5460]209
[7260]210    <domain id="dom_file_moistc" type="rectilinear">
[4565]211      <generate_rectilinear_domain />
212    </domain>
[5364]213   
[7260]214    <domain id="dom_file_snow" type="rectilinear">
[4565]215      <generate_rectilinear_domain />
216    </domain>
[5364]217   
[7260]218    <domain id="dom_from_soil" domain_ref="domain_landpoints">
[5565]219      <interpolate_domain order="1" renormalize="false"/>
220    </domain>
[7260]221
222    <domain id="dom_from_pft" domain_ref="domain_landpoints">
[5565]223      <interpolate_domain order="1" renormalize="false" />
224    </domain>
225   
[7260]226    <domain id="dom_from_topo" domain_ref="domain_landpoints">
[5565]227      <interpolate_domain order="1" renormalize="false" />
228    </domain>
229   
[7260]230    <domain id="dom_from_albedo" domain_ref="domain_landpoints">
[5565]231      <interpolate_domain order="1" renormalize="true" detect_missing_value="true"/>
232    </domain>
233   
[7260]234    <domain id="dom_from_lai" domain_ref="domain_landpoints">
[5565]235      <interpolate_domain order="1" renormalize="false" />
236    </domain>
237   
[7260]238    <domain id="dom_from_bbg_clim" domain_ref="domain_landpoints">
[5565]239      <interpolate_domain order="1" renormalize="false" />
240    </domain>
241   
[7260]242    <domain id="dom_from_fertilizer" domain_ref="domain_landpoints">
[5565]243      <interpolate_domain order="1" renormalize="false" />
244    </domain>
245   
[7260]246    <domain id="dom_from_reftemp" domain_ref="domain_landpoints">
[5565]247      <interpolate_domain order="1" renormalize="false" />
248    </domain>
249   
[7260]250    <domain id="dom_from_woodharvest" domain_ref="domain_landpoints">
[5565]251      <interpolate_domain order="1" renormalize="false" />
252    </domain>
253   
[7260]254    <domain id="dom_file_soil" type="rectilinear">
[5364]255      <!-- generate_rectilinear_domain bounds_lon_start="-180" bounds_lon_end="180" bounds_lat_start="-90" bounds_lat_end="90"/-->
256      <generate_rectilinear_domain bounds_lon_start="-180" bounds_lon_end="180" bounds_lat_start="90" bounds_lat_end="-90"/>
[5101]257    </domain>
[5565]258   
[7260]259    <domain id="dom_file_pft" type="rectilinear">
[5364]260      <generate_rectilinear_domain/>
261    </domain>
262   
[7260]263    <domain id="dom_file_topo" type="rectilinear">
[5364]264      <generate_rectilinear_domain/>
265    </domain>
266   
[7260]267    <domain id="dom_file_albedo" type="rectilinear">
[5364]268      <generate_rectilinear_domain />
269    </domain>
270   
[7260]271    <domain id="dom_file_lai" type="rectilinear">
[5364]272      <generate_rectilinear_domain/>
273    </domain>
274   
[7260]275    <domain id="dom_file_bbg_clim" type="rectilinear">
[5364]276      <generate_rectilinear_domain/>
277    </domain>
278   
[7260]279    <domain id="dom_file_fertilizer" type="rectilinear">
[5364]280      <generate_rectilinear_domain/>
281    </domain>
282
[7260]283    <domain id="dom_file_reftemp" type="rectilinear">
[5364]284      <generate_rectilinear_domain/>
285    </domain>
286
[7260]287    <domain id="dom_file_woodharvest" type="rectilinear">
[5364]288      <generate_rectilinear_domain/>
289    </domain>
290   
[2060]291  </domain_definition>
[5364]292
[5565]293
[2060]294  <!-- =========================================================================================================== -->
[7260]295  <!-- Definition of input grids and interpolated grids                                                            -->
[2060]296  <!-- =========================================================================================================== -->
[1788]297
[3839]298  <grid_definition>
[4579]299
[7260]300    <grid id="grid_file_moistc">
301      <domain domain_ref="dom_file_moistc"/>
[4579]302      <axis axis_ref="nslm" />
303      <axis axis_ref="nstm" />
304    </grid> 
305
[7260]306    <grid id="grid_file_snow">
307      <domain domain_ref="dom_file_snow"/>
[4579]308      <axis axis_ref="nsnow" />
309    </grid> 
[5364]310   
[7260]311    <grid id="grid_from_lai">
312      <domain domain_ref="dom_from_lai" />
[5364]313      <axis axis_ref="nvm" />
314      <axis axis_ref="lai_time" />
315    </grid>
316   
317    <grid id="lai">
[7260]318      <domain domain_ref="dom_file_lai" />
[5364]319      <axis axis_ref="nvm" />
320      <axis axis_ref="lai_time" />
321    </grid>
322   
[5565]323    <grid id="grid_nsnow2">
324      <domain domain_ref="domain_landpoints" >
325        <interpolate_domain order="1"/>
326      </domain>
327      <axis axis_ref="nsnow" />
328    </grid>
329
[3839]330  </grid_definition>
[4579]331 
[5364]332 
333  <!-- =========================================================================================================== -->
[5565]334  <!-- Variable denfinition needed for interpolation of input files                                                -->
335  <!-- The values for below variables are set from the fortran code.                                               -->
[5364]336  <!-- =========================================================================================================== -->
337
338  <variable_definition>
339   
340    <variable id="slope_default" type="double">xxx</variable>
341    <variable id="slope_noreinf" type="double">xxx</variable>
342    <variable id="min_sechiba" type="double">xxx</variable>
343    <variable id="albbg_vis_default" type="double">xxx</variable>
344    <variable id="albbg_nir_default" type="double">xxx</variable>
345   
346  </variable_definition>
347 
348
[2060]349</context>
Note: See TracBrowser for help on using the repository browser.