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

Last change on this file since 7200 was 6954, checked in by agnes.ducharne, 4 years ago

Introducing the changes of branch SP-MIP r6950.
These developments were made by Salma Tafasca durinh her PhD and allow ORCHIDEE to:
(1) read soil hydraulic parameters instead of soil texture maps (with dimension changes) or impose a uniform soil texture all over land, using keywords SPMIPEXP and EXP4;
(2) cancel the effect of roots on Ks with new keyword KFACT_ROOT_TYPE;
(3) introduce a 13th soil texture class for clay oxisols in addition to the 12 USDA classes (with thermal parameters equal to the ones of clay).
These changes to branch 2.2 have been tested in Salma's PhD simulations, and are fully compatible with former ways to control soil texture and hydraulic parameters.

  • Property svn:keywords set to Date Revision HeadURL
File size: 20.9 KB
Line 
1<!-- =========================================================================================================== -->
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           -->
7<!-- variable_definition.                                                                                        -->   
8<!-- Recent change:  added block to read params_sp_mip.nc (Salma Tafasca and Agnes Ducharne, November 2020)      -->
9<!--                                                                                                             --> 
10<!-- $HeadURL$                -->
11<!-- $Date$                                                      -->
12<!-- $Revision$                                                                                           -->
13<!-- =========================================================================================================== -->
14<context id="orchidee">
15
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 
27  <file_definition>
28
29    <file id="soils_param_file" mode="read" output_freq="1y" enabled="true">
30      <field id="soilcolor" name="soilcolor" domain_ref="soil" operation="instant" freq_offset="1ts"/>
31      <field id="soiltext" name="soiltext" domain_ref="soil" operation="instant" freq_offset="1ts"/>
32    </file>
33
34    <!-- Default file name: params_sp_mip.nc for both all soil hydraulic parameters. -->
35    <file id="soilparam_file" mode="read" output_freq="1y" enabled="true">
36      <field id="soilks" name="soilks" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
37      <field id="soilnvan" name="soilnvan" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
38      <field id="soilavan" name="soilavan" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
39      <field id="soilmcr" name="soilmcr" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
40      <field id="soilmcs" name="soilmcs" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
41      <field id="soilmcfc" name="soilmcfc" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
42      <field id="soilmcw" name="soilmcw" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
43    </file>
44
45   
46    <file  id="PFTmap_file"  mode="read" output_freq="1y">
47      <field id="maxvegetfrac_read"  name="maxvegetfrac" domain_ref="pft" axis_ref="nvm" operation="instant"  freq_offset="1ts"> this &lt; 1e10 ? this : 0 </field>
48      <field id="maxvegetfrac_mask"  name="maxvegetfrac" domain_ref="pft" axis_ref="nvm" operation="instant"  freq_offset="1ts"> this &lt; 1e10 ? 1 : 0 </field>
49    </file>
50   
51    <file id="topography_file"  mode="read" output_freq="1y">
52      <!--      <field id="pente"  domain_ref="topo"  operation="instant"  freq_offset="1ts" > (this &gt; 1e10) ? 1 : this </field>     ==> In reference, missing value are use for computing, this probably wrong -->
53      <field id="pente_read"       name="pente" domain_ref="topo"  operation="instant"  freq_offset="1ts" > ((this/$slope_noreinf) &lt; 1)? this/$slope_noreinf : 1 </field>
54      <field id="mask_pente_read"  name="pente" domain_ref="topo"  operation="instant"  freq_offset="1ts" > (this &lt; $min_sechiba)? 0 : 1                         </field>  <!-- create mask -->
55    </file>
56   
57    <file id="albedo_file" mode="read" output_freq="1y">
58      <field id="mask_alb_read"    name="mask"       domain_ref="albedo"  operation="instant"  freq_offset="1ts" />
59      <field id="bg_alb_vis_read"  name="bg_alb_vis" domain_ref="albedo"  operation="instant"  freq_offset="1ts" >  mask_alb_read &gt; 0.99 ? this : $missing_value  </field>
60      <field id="bg_alb_nir_read"  name="bg_alb_nir" domain_ref="albedo"  operation="instant"  freq_offset="1ts" >  mask_alb_read &gt; 0.99 ? this : $missing_value  </field>
61    </file>
62   
63    <file id="lai_file" mode="read" output_freq="1y" time_counter_name="toto" cyclic="true">
64      <field id="lai_read"       name="LAI" grid_ref="lai" operation="instant"  freq_offset="1ts" > this &gt; 20 ? 0 : this </field>
65      <field id="mask_lai_read"  name="LAI" grid_ref="lai" operation="instant"  freq_offset="1ts" > this &gt; 20 ? 0 : 1    </field>  <!-- create mask -->
66    </file>
67
68    <file id="fertilizer_file" mode="read" output_freq="1y" cyclic="true">
69      <field id="N_qt_OTHER_year_read"  name="N_qt_OTHER_year" domain_ref="fertilizer" operation="instant"  freq_offset="1ts"/>
70      <field id="N_qt_WRICE_year_read"  name="N_qt_WRICE_year" domain_ref="fertilizer" operation="instant"  freq_offset="1ts"/>
71    </file>
72   
73    <file id="bbg_clim_file" mode="read" output_freq="1y" cyclic="true">
74      <field id="flx_co2_bbg_year_read"  name="flx_co2_bbg_year" domain_ref="bbg_clim" operation="instant"  freq_offset="1ts"/>
75    </file>
76   
77    <file id="reftemp_file" mode="read" output_freq="1y" cyclic="true">
78      <field id="reftemp_read"  name="temperature" domain_ref="reftemp" operation="instant"  freq_offset="1ts"/>
79    </file>
80   
81    <file id="woodharvest_file" mode="read" output_freq="1y" cyclic="true">
82      <field id="woodharvest_read"  name="woodharvest" domain_ref="woodharvest" operation="instant"  freq_offset="1ts"/>
83    </file>
84   
85   
86   
87    <file id="interp_diag" output_freq="1ts" sync_freq="1ts" enabled=".FALSE.">
88      <field_group domain_ref="domain_landpoints" operation="once" default_value="9.96921e+36">
89        <field id="interp_diag_aveget" name="aveget" />
90        <field id="interp_diag_vegetrefrac" name="vegetrefrac" axis_ref="nvm"/>
91        <field id="interp_diag_atext" name="atext" />
92        <field id="interp_diag_soilclass" name="soilclass"     axis_ref="ncsm"/>
93        <field id="interp_diag_clayfraction" name="clayfraction"  />
94        <field id="interp_diag_aslope" name="aslope"    />
95        <field id="interp_diag_reinf_slope" name="reinf_slope"  />
96       
97        <field id="interp_diag_alb_vis" name="alb_vis"  />
98        <field id="interp_diag_alb_nir" name="alb_nir"  />
99       
100        <field id="interp_diag_N_qt_WRICE_year" name="wrice"  />
101        <field id="interp_diag_N_qt_OTHER_year" name="other"  />
102        <field id="interp_diag_flx_co2_bbg_year" name="co2_bbg"  />
103       
104      </field_group>
105      <field id="interp_diag_lai" grid_ref="from_lai" name="lai"  operation="once" default_value="9.96921e+36" enabled="false"/>
106      <field field_ref="mask_alb_read" operation="once" default_value="9.96921e+36"  freq_offset="0ts" enabled="false"/>
107    </file>
108
109
110    <file id="nudge_moistc" name="nudge_moistc" type="one_file" mode="read" output_freq="1d">
111      <field  id="moistc_in" name="moistc" operation="instant" grid_ref="grid_inputfile_moistc" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
112      <field  id="mask_moistc_in" name="moistc" operation="instant" grid_ref="grid_inputfile_moistc" freq_offset="1ts" > (this &gt; 1e10) ? 0 : 1 </field>
113    </file>
114   
115    <file id="nudge_snow" name="nudge_snow" type="one_file" mode="read" output_freq="1d">
116      <field  id="snowdz_in" name="snowdz" operation="instant" grid_ref="grid_inputfile_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
117      <field  id="snowrho_in" name="snowrho" operation="instant" grid_ref="grid_inputfile_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
118      <field  id="snowtemp_in" name="snowtemp" operation="instant" grid_ref="grid_inputfile_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
119      <field  id="mask_snow_in" name="snowdz" operation="instant" grid_ref="grid_inputfile_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : 1 </field>
120    </file>
121   
122  </file_definition>
123
124
125  <!-- ========================================================================================================= -->
126  <!-- Definition of all field coming from files but now interpolated to the model grid.                         -->
127  <!-- ========================================================================================================= -->
128
129  <field_definition>
130
131    <field_group enabled="false" read_access="true">
132
133      <field_group id="soil_color" enabled="false">
134        <field id="soilcolor0" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 0 </field>
135        <field id="soilcolor1" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 1 </field>
136        <field id="soilcolor2" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 2 </field>
137        <field id="soilcolor3" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 3 </field>
138        <field id="soilcolor4" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 4 </field>
139        <field id="soilcolor5" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 5 </field>
140        <field id="soilcolor6" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 6 </field>
141        <field id="soilcolor7" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 7 </field>
142        <field id="soilcolor8" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 8 </field>
143        <field id="soilcolor9" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 9 </field>
144      </field_group>
145
146      <field_group id="soil_text" field_ref="soiltext" domain_ref="from_soil" enabled="true" read_access="true">
147        <field id="soiltext1"  > soiltext == 1 </field>
148        <field id="soiltext2"  > soiltext == 2 </field>
149        <field id="soiltext3"  > soiltext == 3 </field>
150        <field id="soiltext4"  > soiltext == 4 </field>
151        <field id="soiltext5"  > soiltext == 5 </field>
152        <field id="soiltext6"  > soiltext == 6 </field>
153        <field id="soiltext7"  > soiltext == 7 </field>
154        <field id="soiltext8"  > soiltext == 8 </field>
155        <field id="soiltext9"  > soiltext == 9 </field>
156        <field id="soiltext10" > soiltext == 10 </field>
157        <field id="soiltext11" > soiltext == 11 </field>
158        <field id="soiltext12" > soiltext == 12 </field>
159      </field_group>
160     
161
162      <field id="frac_veget"      field_ref="maxvegetfrac_read" domain_ref="from_pft" read_access="true" enabled="true" />
163      <field id="frac_veget_frac" field_ref="maxvegetfrac_mask" domain_ref="from_pft" read_access="true" enabled="true" />
164
165      <field id="slope_tmp"           field_ref="pente_read"       domain_ref="from_topo"                                  />
166      <field id="frac_slope_interp"   field_ref="mask_pente_read"  domain_ref="from_topo" read_access="true" enabled="true"/>
167      <field id="reinf_slope_interp"                               domain_ref="from_topo" read_access="true" enabled="true"> (frac_slope_interp &gt; $min_sechiba ) ? 1-slope_tmp/(frac_slope_interp+1e-100) : $slope_default </field>
168
169      <field id="bg_alb_vis_tmp"   field_ref="bg_alb_vis_read"  domain_ref="from_albedo"  />
170      <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>
171
172      <field id="bg_alb_nir_tmp"    field_ref="bg_alb_nir_read"  domain_ref="from_albedo"  />
173      <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>
174     
175      <field id="lai_tmp"          field_ref="lai_read"      grid_ref="from_lai" />
176      <field id="frac_lai_interp"  field_ref="mask_lai_read" grid_ref="from_lai" read_access="true" enabled="true" />
177      <field id="lai_interp"       field_ref="lai_tmp"                           read_access="true" enabled="true"  >  lai_tmp/(frac_lai_interp+1e-100) </field>  <!-- renormalize -->
178     
179      <field id="N_qt_WRICE_year_interp"  field_ref="N_qt_WRICE_year_read"  domain_ref="from_fertilizer" read_access="true" enabled="true" />
180      <field id="N_qt_OTHER_year_interp"  field_ref="N_qt_OTHER_year_read"  domain_ref="from_fertilizer" read_access="true" enabled="true" />
181     
182      <field id="flx_co2_bbg_year_interp"  field_ref="flx_co2_bbg_year_read"  domain_ref="from_bbg_clim" read_access="true" enabled="true" />
183
184      <field id="reftemp_interp"  field_ref="reftemp_read"  domain_ref="from_reftemp" read_access="true" enabled="true" />
185
186      <field id="woodharvest_interp"  field_ref="woodharvest_read"  domain_ref="from_woodharvest" read_access="true" enabled="true" />
187     
188    </field_group>
189
190    <field_group id="orchidee_input_mc" grid_ref="grid_nslm_nstm">
191      <!-- Interpolate the mask. This gives now the fraction of the source area underlaying the model grid cell -->
192      <field id="mask_moistc_interp" field_ref="mask_moistc_in" read_access="true" />
193      <!-- Interpolate the variable. Note that where the source file had missing values, the variables was set to 0. Therefor normalization is needed.     -->
194      <!-- Normalize the interpolated values with the mask which corresponds to the fraction of underlaying valid source grid cells.                       -->
195      <!-- 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. -->
196      <field id="moistc_tmp" field_ref="moistc_in"  />
197      <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>
198    </field_group>
199
200    <field_group id="orchidee_input_snow" grid_ref="grid_nsnow2" >
201      <field id="mask_snow_interp" field_ref="mask_snow_in" read_access="true" />
202      <field id="snowdz_tmp" field_ref="snowdz_in" />
203      <!-- Set snowdz=0 where no information found on source grid, for all other points normlize with the fracion of underlaying source grid cells      -->
204      <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>
205      <field id="snowrho_tmp" field_ref="snowrho_in" />
206      <!-- Set snowrho=50 where no information found on source grid, for all other points normlize with the fracion of underlaying source grid cells    -->
207      <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>
208      <field id="snowtemp_tmp" field_ref="snowtemp_in" />
209      <!-- Set snowtemp=273 where no information found on source grid, for all other points normlize with the fracion of underlaying source grid cells  -->
210      <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>
211    </field_group>
212 
213  </field_definition>
214
215
216
217  <!-- =========================================================================================================== -->
218  <!-- Definition of a horizontal domain for each input file                                                       -->
219  <!-- =========================================================================================================== -->
220
221  <domain_definition>
222
223    <domain id="domain_inputfile_moistc" type="rectilinear">
224      <generate_rectilinear_domain />
225    </domain>
226   
227    <domain id="domain_inputfile_snow" type="rectilinear">
228      <generate_rectilinear_domain />
229    </domain>
230   
231    <domain id="from_soil" domain_ref="domain_landpoints">
232      <interpolate_domain order="1" renormalize="false"/>
233    </domain>
234   
235    <domain id="from_pft" domain_ref="domain_landpoints">
236      <interpolate_domain order="1" renormalize="false" />
237    </domain>
238   
239    <domain id="from_topo" domain_ref="domain_landpoints">
240      <interpolate_domain order="1" renormalize="false" />
241    </domain>
242   
243    <domain id="from_albedo" domain_ref="domain_landpoints">
244      <interpolate_domain order="1" renormalize="true" detect_missing_value="true"/>
245    </domain>
246   
247    <domain id="from_lai" domain_ref="domain_landpoints">
248      <interpolate_domain order="1" renormalize="false" />
249    </domain>
250   
251    <domain id="from_bbg_clim" domain_ref="domain_landpoints">
252      <interpolate_domain order="1" renormalize="false" />
253    </domain>
254   
255    <domain id="from_fertilizer" domain_ref="domain_landpoints">
256      <interpolate_domain order="1" renormalize="false" />
257    </domain>
258   
259    <domain id="from_reftemp" domain_ref="domain_landpoints">
260      <interpolate_domain order="1" renormalize="false" />
261    </domain>
262   
263    <domain id="from_woodharvest" domain_ref="domain_landpoints">
264      <interpolate_domain order="1" renormalize="false" />
265    </domain>
266   
267    <domain id="soil" type="rectilinear">
268      <!-- generate_rectilinear_domain bounds_lon_start="-180" bounds_lon_end="180" bounds_lat_start="-90" bounds_lat_end="90"/-->
269      <generate_rectilinear_domain bounds_lon_start="-180" bounds_lon_end="180" bounds_lat_start="90" bounds_lat_end="-90"/>
270    </domain>
271   
272    <domain id="pft" type="rectilinear">
273      <generate_rectilinear_domain/>
274    </domain>
275   
276    <domain id="topo" type="rectilinear">
277      <generate_rectilinear_domain/>
278    </domain>
279   
280    <domain id="albedo" type="rectilinear">
281      <generate_rectilinear_domain />
282    </domain>
283   
284    <domain id="lai" type="rectilinear">
285      <generate_rectilinear_domain/>
286    </domain>
287   
288    <domain id="bbg_clim" type="rectilinear">
289      <generate_rectilinear_domain/>
290    </domain>
291   
292    <domain id="fertilizer" type="rectilinear">
293      <generate_rectilinear_domain/>
294    </domain>
295
296    <domain id="reftemp" type="rectilinear">
297      <generate_rectilinear_domain/>
298    </domain>
299
300    <domain id="woodharvest" type="rectilinear">
301      <generate_rectilinear_domain/>
302    </domain>
303   
304  </domain_definition>
305
306
307  <!-- =========================================================================================================== -->
308  <!-- Definition of input grids                                                                        -->
309  <!-- =========================================================================================================== -->
310
311  <grid_definition>
312
313    <grid id="grid_inputfile_moistc">
314      <domain domain_ref="domain_inputfile_moistc"/>
315      <axis axis_ref="nslm" />
316      <axis axis_ref="nstm" />
317    </grid> 
318
319    <grid id="grid_inputfile_snow">
320      <domain domain_ref="domain_inputfile_snow"/>
321      <axis axis_ref="nsnow" />
322    </grid> 
323   
324    <grid id="from_lai">
325      <domain domain_ref="from_lai" />
326      <axis axis_ref="nvm" />
327      <axis axis_ref="lai_time" />
328    </grid>
329   
330    <grid id="lai">
331      <domain domain_ref="lai" />
332      <axis axis_ref="nvm" />
333      <axis axis_ref="lai_time" />
334    </grid>
335   
336    <grid id="grid_nsnow2">
337      <domain domain_ref="domain_landpoints" >
338        <interpolate_domain order="1"/>
339      </domain>
340      <axis axis_ref="nsnow" />
341    </grid>
342
343  </grid_definition>
344 
345 
346  <!-- =========================================================================================================== -->
347  <!-- Variable denfinition needed for interpolation of input files                                                -->
348  <!-- The values for below variables are set from the fortran code.                                               -->
349  <!-- =========================================================================================================== -->
350
351  <variable_definition>
352   
353    <variable id="slope_default" type="double">xxx</variable>
354    <variable id="slope_noreinf" type="double">xxx</variable>
355    <variable id="min_sechiba" type="double">xxx</variable>
356    <variable id="albbg_vis_default" type="double">xxx</variable>
357    <variable id="albbg_nir_default" type="double">xxx</variable>
358   
359  </variable_definition>
360 
361
362</context>
Note: See TracBrowser for help on using the repository browser.