annotate validate_temperature_data.xml @ 0:26415eac98c3 draft default tip

Uploaded
author greg
date Tue, 27 Nov 2018 11:08:20 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
26415eac98c3 Uploaded
greg
parents:
diff changeset
1 <tool id="validate_temperature_data" name="Validate temperature data" version="1.0.0">
26415eac98c3 Uploaded
greg
parents:
diff changeset
2 <description>for insect phenology model</description>
26415eac98c3 Uploaded
greg
parents:
diff changeset
3 <command detect_errors="exit_code"><![CDATA[
26415eac98c3 Uploaded
greg
parents:
diff changeset
4 #set temperature_data_type = $temperature_data_type_cond.temperature_data_type
26415eac98c3 Uploaded
greg
parents:
diff changeset
5 python '$__tool_directory__/validate_temperature_data.py'
26415eac98c3 Uploaded
greg
parents:
diff changeset
6 --data_type $temperature_data_type
26415eac98c3 Uploaded
greg
parents:
diff changeset
7 #if str($temperature_data_type) == "normals":
26415eac98c3 Uploaded
greg
parents:
diff changeset
8 --input_normals '$temperature_data_type_cond.input_normals'
26415eac98c3 Uploaded
greg
parents:
diff changeset
9 #else:
26415eac98c3 Uploaded
greg
parents:
diff changeset
10 --input_actuals '$temperature_data_type_cond.input_actuals'
26415eac98c3 Uploaded
greg
parents:
diff changeset
11 #end if
26415eac98c3 Uploaded
greg
parents:
diff changeset
12 --output '$output']]></command>
26415eac98c3 Uploaded
greg
parents:
diff changeset
13 <inputs>
26415eac98c3 Uploaded
greg
parents:
diff changeset
14 <conditional name="temperature_data_type_cond">
26415eac98c3 Uploaded
greg
parents:
diff changeset
15 <param name="temperature_data_type" type="select" label="Validate 30 year normals or daily actuals temperature data?">
26415eac98c3 Uploaded
greg
parents:
diff changeset
16 <option value="normals" selected="true">30 year normals</option>
26415eac98c3 Uploaded
greg
parents:
diff changeset
17 <option value="actuals">daily actuals</option>
26415eac98c3 Uploaded
greg
parents:
diff changeset
18 </param>
26415eac98c3 Uploaded
greg
parents:
diff changeset
19 <when value="normals">
26415eac98c3 Uploaded
greg
parents:
diff changeset
20 <param name="input_normals" type="data" format="csv" label="30 year normals CSV file">
26415eac98c3 Uploaded
greg
parents:
diff changeset
21 <validator type="expression" message="30 year normals temperature data must have 10 columns and 366 rows">value is not None and value.metadata.columns==10 and value.metadata.data_lines==366</validator>
26415eac98c3 Uploaded
greg
parents:
diff changeset
22 </param>
26415eac98c3 Uploaded
greg
parents:
diff changeset
23 </when>
26415eac98c3 Uploaded
greg
parents:
diff changeset
24 <when value="actuals">
26415eac98c3 Uploaded
greg
parents:
diff changeset
25 <param name="input_actuals" type="data" format="csv" label="Daily actuals CSV file">
26415eac98c3 Uploaded
greg
parents:
diff changeset
26 <validator type="expression" message="Daily actuals temperature data must have 6 columns">value is not None and value.metadata.columns==6</validator>
26415eac98c3 Uploaded
greg
parents:
diff changeset
27 </param>
26415eac98c3 Uploaded
greg
parents:
diff changeset
28 </when>
26415eac98c3 Uploaded
greg
parents:
diff changeset
29 </conditional>
26415eac98c3 Uploaded
greg
parents:
diff changeset
30 </inputs>
26415eac98c3 Uploaded
greg
parents:
diff changeset
31 <outputs>
26415eac98c3 Uploaded
greg
parents:
diff changeset
32 <data name="output" format="csv"/>
26415eac98c3 Uploaded
greg
parents:
diff changeset
33 </outputs>
26415eac98c3 Uploaded
greg
parents:
diff changeset
34 <tests>
26415eac98c3 Uploaded
greg
parents:
diff changeset
35 <test>
26415eac98c3 Uploaded
greg
parents:
diff changeset
36 <param name="input_normals" value="30_year_normals.csv" ftype="csv"/>
26415eac98c3 Uploaded
greg
parents:
diff changeset
37 <output name="output" file="30_year_normals.csv" ftype="csv"/>
26415eac98c3 Uploaded
greg
parents:
diff changeset
38 </test>
26415eac98c3 Uploaded
greg
parents:
diff changeset
39 <test>
26415eac98c3 Uploaded
greg
parents:
diff changeset
40 <param name="temperature_data_type" value="actuals"/>
26415eac98c3 Uploaded
greg
parents:
diff changeset
41 <param name="input_actuals" value="daily_actuals.csv" ftype="csv"/>
26415eac98c3 Uploaded
greg
parents:
diff changeset
42 <output name="output" file="daily_actuals.csv" ftype="csv"/>
26415eac98c3 Uploaded
greg
parents:
diff changeset
43 </test>
26415eac98c3 Uploaded
greg
parents:
diff changeset
44 </tests>
26415eac98c3 Uploaded
greg
parents:
diff changeset
45 <help>
26415eac98c3 Uploaded
greg
parents:
diff changeset
46 **What it does**
26415eac98c3 Uploaded
greg
parents:
diff changeset
47
26415eac98c3 Uploaded
greg
parents:
diff changeset
48 Validates either a 30 year normals temeprature dataset or a daily actuals temperature dataset which are used
26415eac98c3 Uploaded
greg
parents:
diff changeset
49 as input to the insect phenology model tool. The tool will output the input file if it is valid.
26415eac98c3 Uploaded
greg
parents:
diff changeset
50
26415eac98c3 Uploaded
greg
parents:
diff changeset
51 -----
26415eac98c3 Uploaded
greg
parents:
diff changeset
52
26415eac98c3 Uploaded
greg
parents:
diff changeset
53 **30 year normals columns**
26415eac98c3 Uploaded
greg
parents:
diff changeset
54
26415eac98c3 Uploaded
greg
parents:
diff changeset
55 * stationid
26415eac98c3 Uploaded
greg
parents:
diff changeset
56 * latitude
26415eac98c3 Uploaded
greg
parents:
diff changeset
57 * longitude
26415eac98c3 Uploaded
greg
parents:
diff changeset
58 * elev_m
26415eac98c3 Uploaded
greg
parents:
diff changeset
59 * name
26415eac98c3 Uploaded
greg
parents:
diff changeset
60 * st
26415eac98c3 Uploaded
greg
parents:
diff changeset
61 * mmdd
26415eac98c3 Uploaded
greg
parents:
diff changeset
62 * doy
26415eac98c3 Uploaded
greg
parents:
diff changeset
63 * tmin
26415eac98c3 Uploaded
greg
parents:
diff changeset
64 * tmax
26415eac98c3 Uploaded
greg
parents:
diff changeset
65
26415eac98c3 Uploaded
greg
parents:
diff changeset
66 **Daily actuals columns**
26415eac98c3 Uploaded
greg
parents:
diff changeset
67
26415eac98c3 Uploaded
greg
parents:
diff changeset
68 * LATITUDE
26415eac98c3 Uploaded
greg
parents:
diff changeset
69 * LONGITUDE
26415eac98c3 Uploaded
greg
parents:
diff changeset
70 * DATE
26415eac98c3 Uploaded
greg
parents:
diff changeset
71 * DOY
26415eac98c3 Uploaded
greg
parents:
diff changeset
72 * TMIN
26415eac98c3 Uploaded
greg
parents:
diff changeset
73 * TMAX
26415eac98c3 Uploaded
greg
parents:
diff changeset
74 </help>
26415eac98c3 Uploaded
greg
parents:
diff changeset
75 <citations>
26415eac98c3 Uploaded
greg
parents:
diff changeset
76 </citations>
26415eac98c3 Uploaded
greg
parents:
diff changeset
77 </tool>