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