Mercurial > repos > mnhn65mo > netcdf_handler
diff netcdf_metadata_info.xml @ 0:8da8ec7da45f draft default tip
Uploaded
author | mnhn65mo |
---|---|
date | Thu, 02 Aug 2018 09:24:38 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netcdf_metadata_info.xml Thu Aug 02 09:24:38 2018 -0400 @@ -0,0 +1,77 @@ +<tool id="netcdf-metadata_info" name="Netcdf Metadata Info" version="0.1.0"> + <description>summarize content of a nc file</description> + <requirements> + <requirement type="package" version="1.1.6">netcdf-metadata-info</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + netcdf-metadata-info '$input' + && + while read -r l;do + a=\$(echo \$l | cut -d' ' -f1);echo \$l>dimensions_\$a + ;done <variables.tabular + && + rm dimensions_VariableName + && + for f in dimensions_*; do cat \$f | sed 's/ /\t\n/g' | sed '\$s/$/ /' >\$f.tabular ; done + && + for f in dimensions_*.tabular;do + awk 'NR % 2 != 0' \$f > \$f.2 + && + sed 1d \$f.2 > \$f + && + rm \$f.2 + ;done + && + ncdump -h '$input' > '$info' + ]]></command> + <inputs> + <param type="data" name="input" label="Netcdf file" format="netcdf,h5" help="Netcdf file you need information about."/> + </inputs> + <outputs> +<!-- + <data name="var_tabs" format="tabular"> + <discover_datasets pattern="__designation_and_ext__" visible="true"/> + <discover_datasets pattern="conda_activate.log" visible="false"/> + </data> +--> + <data name="output" format="tabular" label="Metadata infos from ${input.name}.Variables.tab" from_work_dir="variables.tabular"/> + <data name="info" label="info file" format="txt"/> + </outputs> + + <help><![CDATA[ +**What it does** + +First the tool will give general information about the input in a 'info file' output. (command $ncdump -h inputfile) + +Then, a general tabular 'variables' summarize dimensions details inside each available variable. + + +The summary tabular file has the general structure : + + + Variable1 Var1_Number_of_Dim Dim1 Dim1_size ... DimN DimN_size + + VariableX VarX_Number_of_Dim DimX1 DimX1_size ... DimXN DimXN_size + + ... + + +**Input** + +A netcdf file (xxx.nc). + +**Outputs** + +An Information file. + +A summary tabular file. + + +-------------------------------- + +The Netcdf Info tool use the netcdf functions : https://www.unidata.ucar.edu/software/netcdf/docs/index.html + +Run this tool before considering using Netcdf Read. + ]]></help> + +</tool>