annotate netcdf_metadata_info.xml @ 0:8da8ec7da45f draft default tip

Uploaded
author mnhn65mo
date Thu, 02 Aug 2018 09:24:38 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
1 <tool id="netcdf-metadata_info" name="Netcdf Metadata Info" version="0.1.0">
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
2 <description>summarize content of a nc file</description>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
3 <requirements>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
4 <requirement type="package" version="1.1.6">netcdf-metadata-info</requirement>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
5 </requirements>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
6 <command detect_errors="exit_code"><![CDATA[
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
7 netcdf-metadata-info '$input'
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
8 &&
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
9 while read -r l;do
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
10 a=\$(echo \$l | cut -d' ' -f1);echo \$l>dimensions_\$a
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
11 ;done <variables.tabular
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
12 &&
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
13 rm dimensions_VariableName
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
14 &&
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
15 for f in dimensions_*; do cat \$f | sed 's/ /\t\n/g' | sed '\$s/$/ /' >\$f.tabular ; done
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
16 &&
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
17 for f in dimensions_*.tabular;do
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
18 awk 'NR % 2 != 0' \$f > \$f.2
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
19 &&
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
20 sed 1d \$f.2 > \$f
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
21 &&
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
22 rm \$f.2
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
23 ;done
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
24 &&
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
25 ncdump -h '$input' > '$info'
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
26 ]]></command>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
27 <inputs>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
28 <param type="data" name="input" label="Netcdf file" format="netcdf,h5" help="Netcdf file you need information about."/>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
29 </inputs>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
30 <outputs>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
31 <!--
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
32 <data name="var_tabs" format="tabular">
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
33 <discover_datasets pattern="__designation_and_ext__" visible="true"/>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
34 <discover_datasets pattern="conda_activate.log" visible="false"/>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
35 </data>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
36 -->
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
37 <data name="output" format="tabular" label="Metadata infos from ${input.name}.Variables.tab" from_work_dir="variables.tabular"/>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
38 <data name="info" label="info file" format="txt"/>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
39 </outputs>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
40
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
41 <help><![CDATA[
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
42 **What it does**
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
43
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
44 First the tool will give general information about the input in a 'info file' output. (command $ncdump -h inputfile)
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
45
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
46 Then, a general tabular 'variables' summarize dimensions details inside each available variable.
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
47
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
48
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
49 The summary tabular file has the general structure :
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
50
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
51
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
52 Variable1 Var1_Number_of_Dim Dim1 Dim1_size ... DimN DimN_size
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
53
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
54 VariableX VarX_Number_of_Dim DimX1 DimX1_size ... DimXN DimXN_size
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
55
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
56 ...
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
57
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
58
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
59 **Input**
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
60
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
61 A netcdf file (xxx.nc).
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
62
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
63 **Outputs**
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
64
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
65 An Information file.
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
66
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
67 A summary tabular file.
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
68
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
69
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
70 --------------------------------
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
71
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
72 The Netcdf Info tool use the netcdf functions : https://www.unidata.ucar.edu/software/netcdf/docs/index.html
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
73
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
74 Run this tool before considering using Netcdf Read.
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
75 ]]></help>
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
76
8da8ec7da45f Uploaded
mnhn65mo
parents:
diff changeset
77 </tool>