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