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