comparison validate_temperature_data.xml @ 0:4290854f3af5 draft

Uploaded
author greg
date Tue, 27 Nov 2018 09:47:31 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4290854f3af5
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" 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="input" value="daily_actuals.csv" ftype="csv"/>
41 <output name="output" file="daily_actuals.csv" ftype="csv"/>
42 </test>
43 </tests>
44 <help>
45 **What it does**
46
47 Validates either a 30 year normals temeprature dataset or a daily actuals temperature dataset which are used
48 as input to the insect phenology model tool. The tool will output the input file if it is valid.
49
50 -----
51
52 **30 year normals columns**
53
54 * stationid
55 * latitude
56 * longitude
57 * elev_m
58 * name
59 * st
60 * mmdd
61 * doy
62 * tmin
63 * tmax
64
65 **Daily actuals columns**
66
67 * LATITUDE
68 * LONGITUDE
69 * DATE
70 * DOY
71 * TMIN
72 * TMAX
73 </help>
74 <citations>
75 </citations>
76 </tool>