comparison ctsm-fates.xml.TRIC @ 0:8c7414c07367 draft

"planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/fates-emerald commit f282701cadbb0c90c2c77a52579f18b44a357e24"
author climate
date Wed, 21 Oct 2020 20:30:35 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:8c7414c07367
1 <tool id="ctsm-fates" name="CTSM/FATES-EMERALD" version="2.0.1">
2 <description>Functionally Assembled Terrestrial Ecosystem Simulator</description>
3 <requirements>
4 <requirement type="package" version="2.0.1">fates-emerald</requirement>
5 <requirement type="package" version="1.32">tar</requirement>
6 <requirement type="package" version="3">python</requirement>
7 <requirement type="package" version="2.0132">perl-xml-libxml</requirement>
8 </requirements>
9 <command detect_errors="exit_code"><![CDATA[
10 ( export HOME=`pwd` &&
11 export USER='jovyan' &&
12 export AR=/usr/local/bin/x86_64-conda_cos6-linux-gnu-ar &&
13 mkdir bin &&
14 cd bin && ln -s /usr/local/bin/x86_64-conda_cos6-linux-gnu-ar ar &&
15 cd .. &&
16 export PATH=\$HOME/bin:\$PATH &&
17 mkdir -p .cime &&
18 cp '$__tool_directory__/config' .cime/config &&
19 cp '$__tool_directory__/config_compilers.xml' '.cime/config_compilers.xml' &&
20 cp '$__tool_directory__/config_machines.xml' '.cime/config_machines.xml' &&
21 mkdir inputdata &&
22 tar -xf '$inputdata' -C 'inputdata/' &&
23 mkdir output_dir &&
24 mkdir usermods_dirs &&
25 #if str($adv.condi_user_mods).strip() == 'yes'
26 # should create a new type user_mods.tar
27 cd usermods_dirs &&
28 tar xf '$user_mods' &&
29 cd .. &&
30 #end if
31 create_newcase --case '$casename' --compset 2000_DATM%1PTGSWP3_CLM50%FATES_SICE_SOCN_MOSART_SGLC_SWAV --machine espresso --run-unsupported
32 #if str($adv.condi_user_mods).strip() == 'yes'
33 --user-mods-dir usermods_dirs
34 #end if
35 --res '$resolution' &&
36 cd '$casename' &&
37 ./case.setup > $case_info 2>&1 &&
38 #if (str($adv_period.condi_type_run.run_type) == 'hybrid' or str($adv_period.condi_type_run.run_type) == 'branch')
39 ./xmlchange RUN_TYPE=$adv_period.condi_type_run.run_type &&
40 ./xmlchange RUN_REFDATE=$adv_period.condi_type_run.run_refdate &&
41 ./xmlchange RUN_REFCASE=$adv_period.condi_type_run.run_refcase &&
42 #end if
43 #if ((str($adv_period.condi_type_run.run_type) == 'hybrid' or str($adv_period.condi_type_run.run_type) == 'startup') and ($adv_period.condi_type_run.run_startdate != ''))
44 ./xmlchange RUN_STARTDATE=$adv_period.condi_type_run.run_startdate &&
45 #end if
46 ./xmlchange STOP_N=$adv_period.stopn &&
47 ./xmlchange STOP_OPTION=$adv_period.stop_option &&
48 ./xmlchange CCSM_CO2_PPMV=$adv.co2 &&
49 ./xmlchange DOUT_S=FALSE &&
50 cp '$user_nl_clm_customization' user_nl_clm &&
51 ./case.build >> $case_info 2>&1 &&
52 #if (str($adv_period.condi_type_run.run_type) == 'hybrid' or str($adv_period.condi_type_run.run_type) == 'branch')
53 tar -xf '$adv_period.condi_type_run.restart' -C '../work/$casename/run/' &&
54
55 #end if
56 ./case.submit >> $case_info 2>&1 &&
57 mkdir -p restart &&
58 (cat '../work/$casename/run/rpointer'.* > $rinfo || printf "No restarts\n") &&
59 (cp '../work/$casename/run/$casename'.*.r*.*.nc restart/ || printf "No netCDF restarts\n") &&
60 (cp '../work/$casename/run/$casename'.*.r*.*.bin restart/ || printf "No bin restarts\n") &&
61 (cp '../work/$casename/run/rpointer'.* restart/ || printf "no rpointer\n") &&
62 cd restart &&
63 tar cvf $restart . &&
64 cd .. &&
65 (cp '../work/$casename/run/$casename'.*.h*.*.nc ../output_dir/ || printf "no netCDF outputs\n") &&
66 (gunzip '../work/$casename/run/'*.log.* || printf "no compressed logs") &&
67 cat '../work/$casename/run/'atm.log.* >> $atm_log &&
68 cat '../work/$casename/run/'cesm.log.* >> $cesm_log &&
69 cat '../work/$casename/run/'cpl.log.* >> $cpl_log &&
70 cat '../work/$casename/run/'lnd.log.* >> $lnd_log &&
71 cat '../work/$casename/run/'rof.log.* >> $rof_log ) ||
72 (printf "Case failed" && tar cf $work \${HOME}/work)
73 ]]></command>
74 <configfiles>
75 <configfile name="user_nl_clm_customization"><![CDATA[
76 &clm_inparm
77 hist_mfilt = 120,
78 use_fates = .true.,
79 fates_spitfire_mode = $adv_clm.fates_spitfire_mode,
80 use_fates_planthydro = $adv_clm.use_fates_planthydro,
81 use_fates_cohort_age_tracking = $adv_clm.use_fates_cohort_age_tracking,
82 use_fates_ed_st3 = $adv_clm.use_fates_ed_st3,
83 use_fates_ed_prescribed_phys = $adv_clm.use_fates_ed_prescribed_phys,
84 use_fates_logging = $adv_clm.use_fates_logging,
85 use_fates_fixed_biogeog = $adv_clm.use_fates_fixed_biogeog,
86 #if (str($adv_clm.fates_parteh_mode).strip() != '')
87 fates_parteh_mode = $adv_clm.fates_parteh_mode
88 #end if
89 /
90 ]]>
91 </configfile>
92 </configfiles>
93 <inputs>
94 <param name="inputdata" type="data" format='tar' label="inputdata for running FATES EMERALD"></param>
95 <param name="casename" type="text" value="usecase" label="Name of your case">
96 <validator type="regex" message="start with a letter and no blanks">^[A-Za-z][A-Za-z0-9]*</validator>
97 </param>
98 <param name="resolution" type="select" label="Model resolution">
99 <option value="1x1_ALP1">ALP1</option>
100 <option value="1x1_ALP2">ALP2</option>
101 <option value="1x1_ALP3">ALP3</option>
102 <option value="1x1_ALP4">ALP4</option>
103 <option value="1x1_SUB1">SUB1</option>
104 <option value="1x1_SUB2">SUB2</option>
105 <option value="1x1_SUB3">SUB3</option>
106 <option value="1x1_SUB4">SUB4</option>
107 <option value="1x1_BOR1">BOR1</option>
108 <option value="1x1_BOR2">BOR2</option>
109 <option value="1x1_BOR3">BOR3</option>
110 <option value="1x1_BOR4">BOR4</option>
111 <option value="1x1_LYG">LYG</option>
112 <option value="1x1_BUO">BUO</option>
113 <option value="1x1_HAV">HAV</option>
114 <option value="1x1_SKO">SKO</option>
115 <option value="1x1_VIKE">VIKE</option>
116 <option value="1x1_LIAH">LIAH</option>
117 <option value="1x1_FINN">FINN</option>
118 </param>
119 <section name="adv_period" title="Customize the model run period" expanded="false">
120
121 <conditional name="condi_type_run">
122 <param name="run_type" type="select" label="Determines the model run initialization type.">
123 <option value="startup" selected="true">startup</option>
124 <option value="hybrid">hybrid</option>
125 <option value="branch">branch</option>
126 </param>
127 <when value="startup">
128 <param name="run_startdate" type="text" value="" label="Run start date (yyyy-mm-dd). Only used for startup or hybrid runs.">
129 <validator type="regex" message="YYYY-MM-DD">(^$|(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])))</validator>
130 </param>
131 </when>
132 <when value="branch">
133 <param name="run_refcase" type="text" value="" label="Reference case for hybrid or branch runs"></param>
134 <param name="run_refdate" type="text" value="" label="Reference date for hybrid or branch runs (yyyy-mm-dd)">
135 <validator type="regex" message="YYYY-MM-DD">(^$|(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])))</validator>
136 </param>
137 <param name="restart" type="data" format='tar' label="restart for running FATES EMERALD"></param>
138 </when>
139 <when value="hybrid">
140 <param name="run_refcase" type="text" value="" label="Reference case for hybrid or branch runs"></param>
141 <param name="run_refdate" type="text" value="" label="Reference date for hybrid or branch runs (yyyy-mm-dd)">
142 <validator type="regex" message="YYYY-MM-DD">(^$|(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])))</validator>
143 </param>
144 <param name="run_startdate" type="text" value="" label="Run start date (yyyy-mm-dd). Only used for startup or hybrid runs.">
145 <validator type="regex" message="YYYY-MM-DD">(^$|(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])))</validator>
146 </param>
147 <param name="restart" type="data" format='tar' label="restart for running FATES EMERALD"></param>
148 </when>
149 </conditional>
150 <param name="stopn" type="integer" value="5" label="Provides a numerical count for STOP_OPTION."></param>
151 <param name="stop_option" type="select" label=" Sets the run length along with STOP_N and STOP_DATE">
152 <option value="ndays" selected="true">ndays</option>
153 <option value="none">none</option>
154 <option value="never">never</option>
155 <option value="nsteps">nsteps</option>
156 <option value="nseconds">nseconds</option>
157 <option value="nminutes">nminutes</option>
158 <option value="nhours">nhours</option>
159 <option value="nday">ndays</option>
160 <option value="nmonths">nmonths</option>
161 <option value="nyears">nyears</option>
162 <option value="date">date</option>
163 <option value="ifdays0">ifday0</option>
164 <option value="end">end</option>
165 </param>
166 </section>
167 <section name="adv_clm" title="CLM namelist customization" expanded="false">
168 <param name="use_fates_planthydro" type="boolean" label="Toggle to turn on plant hydraulics" truevalue=".true." falsevalue=".false." checked="false"/>
169 <param name="use_fates_cohort_age_tracking" type="boolean" label="Toggle to turn on cohort age tracking" truevalue=".true." falsevalue=".false." checked="false"/>
170 <param name="use_fates_ed_st3" type="boolean" label="Toggle to turn on Static Stand Structure Mode" truevalue=".true." falsevalue=".false." checked="false"/>
171 <param name="use_fates_ed_prescribed_phys" type="boolean" label="Toggle to turn on prescribed physiology" truevalue=".true." falsevalue=".false." checked="false"/>
172 <param name="use_fates_logging" type="boolean" label="Toggle to turn on the logging module" truevalue=".true." falsevalue=".false." checked="false"/>
173 <param name="use_fates_fixed_biogeog" type="boolean" label="Toggle to turn on fixed biogeography mode" truevalue=".true." falsevalue=".false." checked="false"/>
174 <param name="fates_spitfire_mode" type="select" label="Spitfire module to simulate fire">
175 <option value="0" selected="true">None</option>
176 <option value="1">Use a global constant lightning rate found in fates_params</option>
177 <option value="2">Use an external lightning dataset</option>
178 <option value="3">Use an external confirmed ignitions dataset</option>
179 <option value="4">Use external lightning and population datasets to simulate both natural and anthropogenic ignitions</option>
180 </param>
181 <param name="fates_parteh_mode" type="select" label="Switch deciding which nutrient model to use in FATES">
182 <option value="" selected="true">None</option>
183 <option value="1">1</option>
184 <option value="2">2</option>
185 </param>
186 </section>
187 <section name="adv" title="Advanced customization" expanded="false">
188 <param name="co2" type="float" value="367.0" label="Atmospheric CO2 molar ratio (by volume) only used when co2_type==constant (umol/mol)"></param>
189 <conditional name="condi_user_mods">
190 <param name="add_changes" type="select" label="user-modified source code">
191 <option value="no" selected="true">no</option>
192 <option value="yes">yes</option>
193 </param>
194 <when value="yes">
195 <param name="usermods" type="data" format="tar" label="SourceMods"></param>
196 </when>
197 <when value="no"/>
198 </conditional>
199 </section>
200 </inputs>
201 <outputs>
202 <data name="history_files" format="netcdf" label="${tool.name} on ${inputdata.name} (history file)">
203 <discover_datasets pattern="__designation_and_ext__" directory="output_dir" visible="true" />
204 </data>
205 <data name="atm_log" format="txt" label="${tool.name} on ${inputdata.name} (atm.log)"/>
206 <data name="cesm_log" format="txt" label="${tool.name} on ${inputdata.name} (cesm.log)"/>
207 <data name="cpl_log" format="txt" label="${tool.name} on ${inputdata.name} (cpl.log)"/>
208 <data name="lnd_log" format="txt" label="${tool.name} on ${inputdata.name} (lnd.log)"/>
209 <data name="rof_log" format="txt" label="${tool.name} on ${inputdata.name} (rof.log)"/>
210 <data name="restart" format="tar" label="${tool.name} on ${inputdata.name} (restart)"></data>
211 <data name="case_info" format="txt" label="${tool.name} on ${inputdata.name} (case info)"></data>
212 <data name="rinfo" format="txt" label="${tool.name} on ${inputdata.name} (restart info)"></data>
213 <data name="work" format="tar" label="${tool.name} on ${inputdata.name} (workdir)">
214 </data>
215 </outputs>
216 <tests>
217 <test>
218 <param name="inputdata" value="inputdata_test.tar" />
219 <param name="casename" value="test" />
220 <param name="resolution" value="1x1_ALP1" />
221 <param name="run_startdate" value="2000-01-01" />
222 <param name="stop_option" value="nsteps" />
223 <param name="stopn" value="1" />
224 <output name="atm_log" ftype="txt" file="atm.log">
225 <assert_contents>
226 <has_text text="(datm_comp_final) atm: end of main integration loop" />
227 </assert_contents>
228 </output>
229 <output name="cesm_log" ftype="txt" file="cesm.log">
230 <assert_contents>
231 <has_text text="pes participating in computation for CLM" />
232 </assert_contents>
233 </output>
234 <output name="cpl_log" ftype="txt" file="cpl.log">
235 <assert_contents>
236 <has_text text="SUCCESSFUL TERMINATION" />
237 </assert_contents>
238 </output>
239 <output name="lnd_log" ftype="txt" file="lnd.log">
240 <assert_contents>
241 <has_text text="Successfully" />
242 </assert_contents>
243 </output>
244 <output name="rof_log" ftype="txt" file="rof.log">
245 <assert_contents>
246 <has_text text="MOSART model initialization" />
247 </assert_contents>
248 </output>
249 <output name="case_info" ftype="txt" file="case_info.txt">
250 <assert_contents>
251 <has_text text="MODEL BUILD HAS FINISHED SUCCESSFULLY" />
252 <has_line_matching expression="Submitted job" />
253 </assert_contents>
254 </output>
255 <output name="work" ftype="tar" file="workdir.tar">
256 <assert_contents>
257 <has_size value="0"/>
258 </assert_contents>
259 </output>
260 <output name="restart" ftype="tar" file="restart.tar" compare="sim_size" delta="100" />
261 <output name="rinfo" ftype="txt" file="restart_info.txt">
262 <assert_contents>
263 <has_line_matching expression="*datm.r.2000-01-01-01800.nc*" />
264 <has_line_matching expression="*datm.rs1.2000-01-01-01800.bin*" />
265 <has_line_matching expression="*cpl.r.2000-01-01-01800.nc*" />
266 <has_line_matching expression="*clm2.r.2000-01-01-01800.nc*" />
267 </assert_contents>
268 </output>
269 <output name="history_files" ftype="netcdf" file="history_file.netcdf">
270 <assert_contents>
271 <has_size value="0"/>
272 </assert_contents>
273 </output>
274 </test>
275 </tests>
276 <help><![CDATA[
277
278 **The Functionally Assembled Terrestrial Ecosystem Simulator (FATES)**
279 ==========================================================================
280
281 This tool create and run CTSM-FATES EMERALD experiments from fates-emerald release.
282
283 This version of FATES is maintained by the University of Oslo.
284
285 Currently available resolution are as following:
286
287 SeedClim Sites:
288 ~~~~~~~~~~~~~~~
289
290 - ALP1,61.0243N,8.12343E
291 - ALP2,60.8231N,7.27596E
292 - ALP3,60.8328N,7.17561E
293 - ALP4,60.9335N,6.41504E
294 - SUB1,60.8203N,8.70466E
295 - SUB2,60.8760N,7.17666E
296 - SUB3,61.0866N,6.63028E
297 - SUB4,60.5445N,6.51468E
298 - BOR1,61.0355N,9.07876E
299 - BOR2,60.8803N,7.16982E
300 - BOR3,60.6652N,6.33738E
301 - BOR4,60.6901N,5.96487E
302
303 LandPress Sites:
304 ~~~~~~~~~~~~~~~~
305
306 - LYG,60.70084N,5.092566E
307 - BUO,65.83677N,12.224506E
308 - HAV,64.779N,11.2193E
309 - SKO,65.79602N,12.219299E
310
311 Three-D Sites:
312 ~~~~~~~~~~~~~~
313
314 - VIKE,60.88019N,7.16990E
315 - JOAS,60.86183N,7.16800E
316 - LIAH,60.85994N,7.19504E
317
318
319 Finnmark Site:
320 ~~~~~~~~~~~~~~
321
322 - FINN,69.341088N,25.293524E
323
324 ]]></help>
325 <citations>
326
327 </citations>
328 <edam_topics>
329 <edam_topic>topic_3855</edam_topic>
330 <edam_topic>topic_3318</edam_topic>
331 <edam_topic>topic_3050</edam_topic>
332 <edam_topic>topic_0610</edam_topic>
333 </edam_topics>
334 <edam_operations>
335 <edam_operation>operation_3946</edam_operation>
336 <edam_operation>operation_2426</edam_operation>
337 </edam_operations>
338 </tool>