changeset 0:d5355f6fa02b draft default tip

"planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/cdo commit da614bb8e3e9b19a5167ff19b625a71d9976108a"
author climate
date Sat, 15 Jan 2022 23:21:03 +0000
parents
children
files cdo_operations.xml macros.xml macros_info.xml macros_operations.xml test-data/WMI_Lear.nc test-data/WMI_Lear_addc.nc test-data/WMI_Lear_copy.nc test-data/WMI_Lear_expr.nc test-data/WMI_Lear_griddes.txt test-data/WMI_Lear_invertlat.nc test-data/WMI_Lear_names.txt test-data/WMI_Lear_sellonlatbox.nc test-data/WMI_Lear_sellonlatbox_units.nc test-data/WMI_Lear_showdate.txt test-data/WMI_Lear_timesteps.nc test-data/attributes.txt test-data/drops1.nc test-data/drops2.nc test-data/drops_cat.nc test-data/lat_long.nc test-data/lat_long_modified.nc test-data/latitude.nc test-data/latitude3.nc test-data/latitude_diff.txt test-data/latitude_modified.nc test-data/longitude.nc test-data/longitude.txt test-data/outfile_latitude.nc test-data/split_latitude.nc test-data/timeseries.nc test-data/timeseries_sub.nc test-data/timeseries_timavg.nc
diffstat 32 files changed, 1121 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cdo_operations.xml	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,293 @@
+<tool id="cdo_operations" name="CDO Operations" profile="20.05" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
+    <description>Climate Data Manipulation Operators operations for standard processing of climate and NWP model output.</description>
+    <macros>
+        <import>macros.xml</import>
+        <import>macros_operations.xml</import>
+    </macros>
+    <expand macro="edam_ontology"/>
+    <expand macro="cdo_requirements"/>
+    <expand macro="cdo_stdio"/>
+    <command detect_errors="exit_code"><![CDATA[
+        mkdir output_dir &&
+        cdo 
+        #for $i, $cdo_option in enumerate( $section_option )
+            #if $cdo_option.option_type.add_opt == '-f'
+                $cdo_option.option_type.add_opt $cdo_option.option_type.output_format
+            #elif $cdo_option.option_type.add_opt == '-g'
+                $cdo_option.option_type.add_opt $cdo_option.option_type.grid
+            #elif $cdo_option.option_type.add_opt == '-gf'
+                $cdo_option.option_type.add_opt $cdo_option.option_type.gridfile
+            #elif $cdo_option.option_type.add_opt == '-m'
+                $cdo_option.option_type.add_opt $cdo_option.option_type.missval
+            #elif $cdo_option.option_type.add_opt == '--percentile'
+                $cdo_option.option_type.add_opt $cdo_option.option_type.percentile
+            #elif $cdo_option.option_type.add_opt == '--seed'
+                $cdo_option.option_type.add_opt $cdo_option.option_type.seed
+            #else
+                $cdo_option.option_type.add_opt
+            #end if
+        #end for
+        #for $i, $cdo_oper in enumerate( $section_operators )
+            #if $cdo_oper.operator.opt == 'duplicate'
+                -'$cdo_oper.operator.opt',$cdo_oper.operator.ndup
+            #elif $cdo_oper.operator.opt == 'addc' or $cdo_oper.operator.opt == 'subc' or $cdo_oper.operator.opt == 'mulc' or $cdo_oper.operator.opt == 'divc'
+                -'$cdo_oper.operator.opt',$cdo_oper.operator.const_value
+	    #elif $cdo_oper.operator.opt == 'ens' or $cdo_oper.operator.opt == 'zon' or  $cdo_oper.operator.opt == 'tim' or  $cdo_oper.operator.opt == 'vert' or  $cdo_oper.operator.opt == 'day' or  $cdo_oper.operator.opt == 'year' or  $cdo_oper.operator.opt == 'mon' or  $cdo_oper.operator.opt == 'seas' or $cdo_oper.operator.opt == 'fld'
+                -'${cdo_oper.operator.opt}${cdo_oper.operator.stat}'
+	    #elif $cdo_oper.operator.opt == 'sp2gp' or $cdo_oper.operator.opt == 'gp2sp'
+                #if $cdo_oper.operator.trunc > 0
+                    -'$cdo_oper.operator.opt',$cdo_oper.operator.trunc
+                #else
+                    -'$cdo_oper.operator.opt'
+                #end if
+            #elif $cdo_oper.operator.opt == 'collgrid'
+                #if str($cdo_oper.operator.nx)
+                    #if str($cdo_oper.operator.names)
+                        -'$cdo_oper.operator.opt',$cdo_oper.operator.nx,'$cdo_oper.operator.names'
+                    #else
+                        -'$cdo_oper.operator.opt',$cdo_oper.operator.nx
+                    #end if
+                #else
+                    -'$cdo_oper.operator.opt'
+                #end if
+            #elif $cdo_oper.operator.opt == 'distgrid'
+                -'$cdo_oper.operator.opt',$cdo_oper.operator.nx,$cdo_oper.operator.ny
+            #elif $cdo_oper.operator.opt == 'splitsel'
+                    #if str($cdo_oper.operator.noffset)
+                        #if str($cdo_oper.operator.nskip)
+                            -'$cdo_oper.operator.opt',$cdo_oper.operator.nsets,$cdo_oper.operator.noffset,$cdo_oper.operator.nskip
+                        #else
+                            -'$cdo_oper.operator.opt',$cdo_oper.operator.nsets,$cdo_oper.operator.noffset
+                        #end if
+                    #else
+                        -'$cdo_oper.operator.opt',$cdo_oper.operator.nsets
+                    #end if
+            #elif $cdo_oper.operator.opt == 'select' or $cdo_oper.operator.opt == 'delete' or $cdo_oper.operator.opt == 'selname' or $cdo_oper.operator.opt == 'delname' or  $cdo_oper.operator.opt == 'seltimestep' or $cdo_oper.operator.opt == 'sellonlatbox' or $cdo_oper.operator.opt == 'expr' or $cdo_oper.operator.opt == 'ml2pl' or $cdo_oper.operator.opt == 'ml2hl' or $cdo_oper.operator.opt == 'intlevel'
+                -'$cdo_oper.operator.opt','$cdo_oper.operator.params'
+            #elif $cdo_oper.operator.opt == 'setattribute'
+                -'$cdo_oper.operator.opt',FILE='$cdo_oper.operator.attr_file'
+            #else
+                -'$cdo_oper.operator.opt'
+            #end if
+            #if $cdo_oper.operator.opt == 'copy' or $cdo_oper.operator.opt == 'cat' or $cdo_oper.operator.opt == 'merge' or $cdo_oper.operator.opt == 'mergetime' or $cdo_oper.operator.opt == 'collgrid' or $cdo_oper.operator.opt == 'select' or $cdo_oper.operator.opt == 'delete' or $cdo_oper.operator.opt == 'replace'
+                #for $ifile in $cdo_oper.operator.add_file
+                    '${ifile}'
+                #end for
+            #elif $cdo_oper.operator.add_file and '$cdo_oper.operator.add_file' != '' and '$cdo_oper.operator.add_file' != 'None' and $cdo_oper.operator.add_file is not None
+                '$cdo_oper.operator.add_file'
+            #end if
+            #if $i == 0
+                #if $cdo_oper.operator.opt == 'splitcode' or $cdo_oper.operator.opt == 'splitparam' or $cdo_oper.operator.opt == 'splitname' or $cdo_oper.operator.opt == 'splitlevel' or $cdo_oper.operator.opt == 'splitgrid' or  $cdo_oper.operator.opt == 'splitzaxis' or $cdo_oper.operator.opt == 'splittabnum' or $cdo_oper.operator.opt == 'splithour' or $cdo_oper.operator.opt == 'splitday' or $cdo_oper.operator.opt == 'splitseas' or $cdo_oper.operator.opt == 'splityear' or $cdo_oper.operator.opt == 'splityearmon' or $cdo_oper.operator.opt == 'splitmon' 
+                    #set output = 'output_dir/outfile_'
+                #else
+                    #set output = 'output_dir/outfile.netcdf'
+                #end if
+            #end if
+        #end for
+        '${output}'
+    ]]>    </command>
+    <inputs>
+        <repeat name="section_operators" title="CDO Operators" min="1" max="10">
+            <expand macro="cdo_operator"/>
+        </repeat>
+        <repeat name="section_option" title="CDO Options" min="0" max="5">
+            <expand macro="cdo_option"/>
+        </repeat>
+    </inputs>
+    <outputs>
+        <collection name="output_files" type="list" label="${tool.name} outfiles">
+            <discover_datasets pattern="__name__" directory="output_dir" visible="true" format="netcdf"/>
+        </collection>
+    </outputs>
+    <tests>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="select" />
+                <param name="params" value="name=Drops" />
+                <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="drops1.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="copy" />
+                <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="WMI_Lear_copy.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="cat" />
+                <param name="add_file" value="drops1.nc,drops2.nc" ftype="netcdf" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="drops_cat.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="splitname" />
+                <param name="add_file" value="lat_long.nc" ftype="netcdf" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="2"/>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="replace" />
+                <param name="add_file" value="lat_long.nc,latitude_modified.nc" ftype="netcdf" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="lat_long_modified.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="duplicate" />
+                <param name="ndup" value="3" ftype="integer" />
+                <param name="add_file" value="latitude.nc" ftype="netcdf" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="latitude3.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="selname" />
+                <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+                <param name="params" value="Drops" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="drops1.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="seltimestep" />
+                <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+                <param name="params" value="1,13,25" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="WMI_Lear_timesteps.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="sellonlatbox" />
+                <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+                <param name="params" value="-10,10,60,70" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="WMI_Lear_sellonlatbox.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="invertlat" />
+                <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="WMI_Lear_invertlat.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <repeat name="section_operators">
+                <conditional name="operator">
+                    <param name="opt" value="selname" />
+                    <param name="params" value="Drops" />
+                </conditional>
+            </repeat>
+            <repeat name="section_operators">
+                <conditional name="operator">
+                    <param name="opt" value="addc" />
+                    <param name="const_value" value="10.5" />
+                    <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+                </conditional>
+            </repeat>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="WMI_Lear_addc.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <conditional name="operator">
+                <param name="opt" value="expr" />
+                <param name="params" value="Drops2=1000*exp(1+Drops)" />
+                <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+            </conditional>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="WMI_Lear_expr.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <repeat name="section_operators">
+                <conditional name="operator">
+                    <param name="opt" value="selname" />
+                    <param name="params" value="CLEAR_SKY_BHI" />
+                </conditional>
+            </repeat>
+            <repeat name="section_operators">
+                <conditional name="operator">
+                    <param name="opt" value="tim" />
+                    <param name="stat" value="avg" />
+                    <param name="add_file" value="timeseries.nc" ftype="netcdf" />
+                </conditional>
+            </repeat>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="timeseries_timavg.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <repeat name="section_operators">
+                <conditional name="operator">
+                    <param name="opt" value="sub" />
+                    <param name="add_file" value="timeseries.nc" ftype="netcdf" />
+                </conditional>
+            </repeat>
+            <repeat name="section_operators">
+                <conditional name="operator">
+                    <param name="opt" value="addc" />
+                    <param name="const_value" value="10.5" />
+                    <param name="add_file" value="timeseries.nc" ftype="netcdf" />
+                </conditional>
+            </repeat>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="timeseries_sub.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+        <test>
+            <repeat name="section_operators">
+                <conditional name="operator">
+                    <param name="opt" value="sellonlatbox" />
+                    <param name="params" value="-10,10,60,70" />
+                </conditional>
+            </repeat>
+            <repeat name="section_operators">
+                <conditional name="operator">
+                    <param name="opt" value="setattribute" />
+                    <param name="attr_file" value="attributes.txt" />
+                    <param name="add_file" value="WMI_Lear.nc" ftype="netcdf" />
+                </conditional>
+            </repeat>
+            <output_collection name="output_files" type="list" count="1">
+                <element name="outfile.netcdf" ftype="netcdf" file="WMI_Lear_sellonlatbox_units.nc" compare="sim_size" delta="50"/>
+            </output_collection>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+**Climate Data Operators (CDO)**
+=======================================================================================================
+
+This tool is a wrapper to the Climate Data Operators (CDO) for all operators manipulating input files and creating a new output file.
+
+- CDO is a collection of command line Operators to manipulate and analyse Climate and NWP model Data.
+- There are more than 600 operators available.
+
+- `CDO online documentation <https://code.mpimet.mpg.de/projects/cdo/>`_.
+
+    ]]>    </help>
+    <expand macro="citations"/>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,33 @@
+<macros>
+    <token name="@TOOL_VERSION@">2.0.0</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <xml name="cdo_requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">cdo</requirement>
+        </requirements>
+    </xml>
+    <xml name="edam_ontology">
+        <edam_topics>
+            <edam_topic>topic_3318</edam_topic>
+        </edam_topics>
+        <edam_operations>
+            <edam_operation>operation_3438</edam_operation>
+        </edam_operations>
+    </xml>
+    <xml name="cdo_stdio">
+        <stdio>
+            <!-- Anything other than zero or one is an error -->
+            <exit_code range="2:" />
+            <exit_code range=":-1"/>
+            <!-- In case the return code has not been set propery check stderr too -->
+            <regex match="Error" />
+            <regex match="Exception" />
+            <regex match="Abort" />
+        </stdio>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.5281/zenodo.3539275</citation>
+        </citations>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros_info.xml	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,81 @@
+<macros>
+    <xml name="operator_information">
+        <param name="main_infile" type="data" label="Input file" format="netcdf"/>
+        <conditional name="information">
+            <param name="opt" type="select" label="Select cdo operator" multiple="false">
+                <option value="info">info (Dataset information listed by parameter identifier)</option>
+                <option value="infon">infon (Dataset information listed by parameter name)</option>
+                <option value="map">map (Dataset information and simple map)</option>
+                <option value="sinfo">sinfo (Short information listed by parameter identifier)</option>
+                <option value="sinfon">sinfon (Short information listed by parameter name)</option>
+                <option value="diff">diff (Compare two datasets listed by parameter identifier)</option>
+                <option value="diffn">diffn (Compare two datasets listed by parameter name)</option>
+                <option value="npar">npar (Number of parameters)</option>
+                <option value="nlevel">nlevel (Number of levels)</option>
+                <option value="nyear">nyear (Number of years)</option>
+                <option value="nmon">nmon (Number of months)</option>
+                <option value="ndate">ndate (Number of dates)</option>
+                <option value="ntime">ntime (Number of timesteps)</option>
+                <option value="ngridpoints">ngridpoints (Number of gridpoints)</option>
+                <option value="ngrids">ngrids (Number of horizontal grids)</option>
+                <option value="showformat">showformat (Show file format)</option>
+                <option value="showcode">showcode (Show code numbers)</option>
+                <option value="showname">showname (Show variable names)</option>
+                <option value="showstdname">showstdname (Show standard names)</option>
+                <option value="showlevel">showlevel (Show levels)</option>
+                <option value="showltype">showltype (Show GRIB level types)</option>
+                <option value="showyear">showyear (Show years)</option>
+                <option value="showmon">showmon (Show months)</option>
+                <option value="showdate">showdate (Show date information)</option>
+                <option value="showtime">showtime (Show time information)</option>
+                <option value="showtimestamp">showtimestamp (Show timestamp)</option>
+                <option value="showattribute">showattribute (Show a global attribute or a variable attribute)</option>
+                <option value="partab">partab (Parameter table)</option>
+                <option value="codetab">codetab (Parameter code table)</option>
+                <option value="griddes">griddes (Grid description)</option>
+                <option value="zaxisdes">zaxisdes (Z-axis description)</option>
+                <option value="vct">vct (Vertical coordinate table)</option>
+            </param>
+            <when value="info"/>
+            <when value="infon"/>
+            <when value="map"/>
+            <when value="sinfo"/>
+            <when value="sinfon"/>
+            <when value="diff">
+                <param name="secondary_infile" type="data" label="Input file" format="netcdf"/>
+            </when>
+            <when value="diffn">
+                <param name="secondary_infile" type="data" label="Input file" format="netcdf"/>
+            </when>
+            <when value="npar"/>
+            <when value="nlevel"/>
+            <when value="nyear"/>
+            <when value="nmon"/>
+            <when value="ndate"/>
+            <when value="ntime"/>
+            <when value="ngridpoints"/>
+            <when value="ngrids"/>
+            <when value="showformat"/>
+            <when value="showcode"/>
+            <when value="showname"/>
+            <when value="showstdname"/>
+            <when value="showlevel"/>
+            <when value="showltype"/>
+            <when value="showyear"/>
+            <when value="showmon"/>
+            <when value="showdate"/>
+            <when value="showtime"/>
+            <when value="showtimestamp"/>
+            <when value="showattribute">
+                <repeat name="attributes" title="List of attributes">
+                    <param name="attribute" type="text" label="Global or variable attribute name"/>
+                </repeat>
+            </when>
+            <when value="partab"/>
+            <when value="codetab"/>
+            <when value="griddes"/>
+            <when value="zaxisdes"/>
+            <when value="vct"/>
+        </conditional>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros_operations.xml	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,336 @@
+<macros>
+    <xml name="stat_selection">
+        <param name="stat" type="select" label="Select statistical function" multiple="false">
+            <option value="min">minimum</option>
+            <option value="max">maximum</option>
+            <option value="sum">sum</option>
+            <option value="mean">mean</option>
+            <option value="avg">average</option>
+            <option value="var">variance</option>
+            <option value="std">standard deviation</option>
+        </param>
+    </xml>
+    <xml name="add_cdo_input">
+        <param name="add_file" type="data" optional="true" label="Additional input file" format="netcdf"/>
+    </xml>
+    <xml name="cdo_option">
+        <conditional name="option_type">
+            <param name="add_opt" type="select" label="Provide cdo options" multiple="false">
+                <option value="-a">Generate an absolute time axis (-a)</option>
+                <option value="--cmor">CMOR conform NetCDF output (--cmor)</option>
+                <option value="-f">-Output format (-f format)</option>
+                <option value="-g">-g grid</option>
+                <option value="-gf">-g grid filename</option>
+                <option value="-M">-Indicate that the I/O streams have missing values (-M)</option>
+                <option value="-m">Set the default missing value. Default is-9e+33 (-m missval)</option>
+                <option value="--percentile">Percentile method (--percentile method)</option>
+                <option value="--reduce_dim">Reduce NetCDF dimensions (--reduce_dim)</option>
+                <option value="-R">Convert GRIB1 data from reduced to regular grid (-R)</option>
+                <option value="--seed">Seed for a new sequence of pseudo-random numbers (--seed seed)</option>
+                <option value="--sortname">Alphanumeric sorting of NetCDF parameter names (--sortname)</option>
+                <option value="-r">Generate a relative time axis (-r)</option>
+            </param>
+            <when value="-a"/>
+            <when value="--cmor"/>
+            <when value="-f">
+                <param name="output_format" type="select" label="Select output format" multiple="false">
+                    <option value="nc4">NetCDF-4 (HDF5)</option>
+                    <option value="nc4c">NetCDF-4 classic</option>
+                    <option value="nc5">NetCDF version 5</option>
+                </param>
+            </when>
+            <when value="-g">
+                <param name="grid" type="text" label="Grid" help="(option -g grid)"/>
+            </when>
+            <when value="-gf">
+                <param name="gridfile" type="data" label="Grid file" help="(option -g gridfile)" format="txt"/>
+            </when>
+            <when value="-M"/>
+            <when value="-m">
+                <param name="missval" type="float" value="-9e+33" label="Set the default missing value"/>
+            </when>
+            <when value="--percentile">
+                <param name="percentile" type="select" label="Percentile method">
+                    <option value="nrank">nrank</option>
+                    <option value="nist">nist</option>
+                    <option value="rtype8">rtype8</option>
+                    <option value="numpy">numpy</option>
+                    <option value="numpy_lower">numpy_lower</option>
+                    <option value="numpy_higher">numpy_higher</option>
+                    <option value="numpy_nearest">numpy_nearest</option>
+                </param>
+            </when>
+            <when value="--reduce_dim"/>
+            <when value="-R"/>
+            <when value="--seed">
+                <param name="seed" type="float" value="0.0" label="Seed for a new sequence of pseudo-random numbers"/>
+            </when>
+            <when value="--sortname"/>
+            <when value="-r"/>
+        </conditional>
+    </xml>
+    <xml name="cdo_operator">
+        <conditional name="operator">
+            <param name="opt" type="select" label="Select cdo operator" multiple="false">
+                <option value="copy">copy (Copy datasets)</option>
+                <option value="cat">cat (Concatenate datasets)</option>
+                <option value="replace">replace (Replace variables)</option>
+                <option value="duplicate">duplicate (Duplicates a dataset)</option>
+                <option value="mergegrid">mergegrid (Merge grid)</option>
+                <option value="merge">merge (Merge datasets with different fields)</option>
+                <option value="mergetime">mergetime (Merge datasets sorted by date and time)</option>
+                <option value="splitcode">splitcode (Split code numbers)</option>
+                <option value="splitparam">splitparam (Split parameter identifiers)</option>
+                <option value="splitname">splitname (Split variable names)</option>
+                <option value="splitlevel">splitlevel (Split levels)</option>
+                <option value="splitgrid">splitgrid (Split grids)</option>
+                <option value="splitzaxis">splitzaxis (Split z-axes)</option>
+                <option value="splittabnum">splittabnum (Split parameter table numbers)</option>
+                <option value="splithour">splithour (Split hours)</option>
+                <option value="splitday">splitday (Split days)</option>
+                <option value="splitseas">splitseas (Split seasons)</option>
+                <option value="splityear">splityear (Split years)</option>
+                <option value="splityearmon">splityearmon (Split in years and months)</option>
+                <option value="splitmon">splitmon (Split months)</option>
+                <option value="splitsel">splitsel (Split time selection)</option>
+                <option value="distgrid">distgrid (Distribute horizontal grid)</option>
+                <option value="collgrid">collgrid (Collect horizontal grid)</option>
+                <option value="select">select (Select all fields with parameters in a user given list.)</option>
+                <option value="delete">delete (Delete all fields with parameters in a user given list.)</option>
+                <option value="selname">selname (Select parameters by name)</option>
+                <option value="delname">delname (Delete parameters by name)</option>
+                <option value="seltimestep">seltimestep (Select timesteps)</option>
+                <option value="sellonlatbox">sellonlatbox (Select a latitude/longitude box)</option>
+                <option value="invertlat">invertlat (Invert latitudes)</option>
+                <option value="addc">addc (Add a constant)</option>
+                <option value="subc">subc (Substract a constant)</option>
+                <option value="mulc">mulc (Multiply with a constant)</option>
+                <option value="divc">divc (Divide with a constant)</option>
+                <option value="expr">expr (Evaluate expressions)</option>
+                <option value="ml2pl">ml2pl (Model to pressure level interpolation)</option>
+                <option value="ml2hl">ml2hl (Model to height level interpolation)</option>
+                <option value="intlevel">intlevel (Linear level interpolation)</option>
+                <option value="sp2gp">sp2gp (Spectral to gridpoint)</option>
+                <option value="gp2sp">gp2sp (Gridpoint to spectral)</option>
+                <option value="ens">Ensemble statistics</option>
+                <option value="zon">Zonal statistics</option>
+                <option value="tim">Time statistics</option>
+                <option value="vert">Vertical statistics</option>
+                <option value="day">Daily statistics</option>
+                <option value="year">Yearly statistics</option>
+                <option value="mon">Monthly statistics</option>
+                <option value="seas">Seasonal statistics</option>
+                <option value="fld">Statistical values over a field</option>
+                <option value="add">Add two fields </option>
+                <option value="sub">Subtract two fields </option>
+                <option value="mul">Multiply two fields </option>
+                <option value="div">Divide two fields </option>
+                <option value="min">Minimum of two fields </option>
+                <option value="max">Maximum of two fields </option>
+                <option value="setattribute">Set/modify attributes</option>
+            </param>
+            <when value="copy">
+                <param name="add_file" type="data" multiple="true" min="0" label="Additional input file" format="netcdf"/>
+            </when>
+            <when value="cat">
+                <param name="add_file" type="data" multiple="true" min="0" label="Additional input file" format="netcdf"/>
+            </when>
+            <when value="replace">
+                <param name="add_file" type="data" multiple="true" min="0" max="2" label="Additional input file" format="netcdf"/>
+            </when>
+            <when value="duplicate">
+                <param name="ndup" type="integer" label="Number of duplicates" value="2"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="mergegrid">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="merge">
+                <param name="add_file" type="data" multiple="true" min="0" label="Additional input file" format="netcdf"/>
+            </when>
+            <when value="mergetime">
+                <param name="add_file" type="data" multiple="true" min="0" label="Additional input file" format="netcdf"/>
+            </when>
+            <when value="splitcode">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitparam">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitname">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitlevel">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitgrid">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitzaxis">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splittabnum">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splithour">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitday">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitseas">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splityear">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splityearmon">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitmon">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="splitsel">
+                <param name="nset" type="integer" value="0" label="Number of input timesteps for each output file"/>
+                <param name="noffset" type="integer" optional="true" label="Number of input timesteps skipped before the first timestep range (optional)"/>
+                <param name="nskip" type="integer" optional="true" label="Number of input timesteps skipped between timestep ranges (optional)"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="distgrid">
+                <param name="nx" type="integer" value="1" label="Number of regions in x direction, or number of pieces for unstructured grids"/>
+                <param name="ny" type="integer" label="Number of regions in y direction" value="1"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="collgrid">
+                <param name="nx" type="integer" label="Number of regions in x direction" optional="true"/>
+                <param name="names" type="text" label="Comma-separated list of variable names" optional="true"/>
+                <param name="add_file" type="data" multiple="true" min="0" label="Additional input file" format="netcdf"/>
+            </when>
+            <when value="select">
+                <param name="params" type="text" value="" label="Parameters for selection"/>
+                <param name="add_file" type="data" multiple="true" min="0" label="Additional input file" format="netcdf"/>
+            </when>
+            <when value="delete">
+                <param name="params" type="text" label="Parameters for deletion"/>
+                <param name="add_file" type="data" multiple="true" min="0" label="Additional input file" format="netcdf"/>
+            </when>
+            <when value="selname">
+                <param name="params" type="text" value="" label="Parameters for selection"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="delname">
+                <param name="params" type="text" value="" label="Parameters for selection"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="seltimestep">
+                <param name="params" type="text" value="" label="Timesteps for selection"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="sellonlatbox">
+                <param name="params" type="text" value="" label="Parameters for latitude/longitude box in the form of lon1,lon2,lat1,lat2)"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="invertlat">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="addc">
+                <param name="const_value" type="float" label="Constant value to add to the fields" value="1"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="subc">
+                <param name="const_value" type="float" label="Constant value to substract to the fields" value="1"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="mulc">
+                <param name="const_value" type="float" label="Constant value to scale the fields" value="1"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="divc">
+                <param name="const_value" type="float" label="Constant value to scale the fields" value="1"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="expr">
+                <param name="params" type="text" value="" label="Expression for evaluation"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="ml2pl">
+                <param name="params" type="text" value="" label="Pressure levels (comma separated)"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="ml2hl">
+                <param name="params" type="text" value="" label="Height levels (comma separated)"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="intlevel">
+                <param name="params" type="text" value="" label="Levels (comma separated)"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="sp2gp">
+                <param name="trunc" type="integer" optional="true" value="" label="New spectral resolution"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="gp2sp">
+                <param name="trunc" type="integer" optional="true" label="New spectral resolution"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="ens">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="zon">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="tim">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="vert">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="day">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="year">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="mon">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="seas">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="fld">
+                <expand macro="stat_selection" />
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="add">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="sub">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="mul">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="div">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="min">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="max">
+                <expand macro="add_cdo_input"/>
+            </when>
+            <when value="setattribute">
+                <param name="attr_file" type="data" format="txt" label="Text file containing the list of attributes (one per line)"/>
+                <expand macro="add_cdo_input"/>
+            </when>
+        </conditional>
+    </xml>
+</macros>
Binary file test-data/WMI_Lear.nc has changed
Binary file test-data/WMI_Lear_addc.nc has changed
Binary file test-data/WMI_Lear_copy.nc has changed
Binary file test-data/WMI_Lear_expr.nc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/WMI_Lear_griddes.txt	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,6 @@
+#
+# gridID 1
+#
+gridtype  = generic
+gridsize  = 1
+cdo    griddes: Processed 10 variables [0.00s 22MB].
Binary file test-data/WMI_Lear_invertlat.nc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/WMI_Lear_names.txt	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,2 @@
+ altitude latitude longitude pressure tdry dp mr wspd wdir Drops
+cdo    showname: Processed 10 variables [0.00s 22MB].
Binary file test-data/WMI_Lear_sellonlatbox.nc has changed
Binary file test-data/WMI_Lear_sellonlatbox_units.nc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/WMI_Lear_showdate.txt	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,2 @@
+  2003-07-06
+cdo    showdate: Processed 10 variables over 180 timesteps [0.00s 22MB].
Binary file test-data/WMI_Lear_timesteps.nc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/attributes.txt	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,2 @@
+Drops@units="number of elements"
+Drops@long_name = "Accumulated # of sonde drops"
Binary file test-data/drops1.nc has changed
Binary file test-data/drops2.nc has changed
Binary file test-data/drops_cat.nc has changed
Binary file test-data/lat_long.nc has changed
Binary file test-data/lat_long_modified.nc has changed
Binary file test-data/latitude.nc has changed
Binary file test-data/latitude3.nc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/latitude_diff.txt	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,183 @@
+    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter ID
+     1 : 2003-07-06 06:30:13       0        1       0 :                  43.585             : -1            
+     2 : 2003-07-06 06:30:19       0        1       0 :                  43.585             : -1            
+     3 : 2003-07-06 06:30:29       0        1       0 :                  43.585             : -1            
+     4 : 2003-07-06 06:30:39       0        1       0 :                  43.585             : -1            
+     5 : 2003-07-06 06:30:49       0        1       0 :                  43.585             : -1            
+     6 : 2003-07-06 06:30:59       0        1       0 :                  43.584             : -1            
+     7 : 2003-07-06 06:31:09       0        1       0 :                  43.584             : -1            
+     8 : 2003-07-06 06:31:19       0        1       0 :                  43.584             : -1            
+     9 : 2003-07-06 06:31:29       0        1       0 :                  43.584             : -1            
+    10 : 2003-07-06 06:31:39       0        1       0 :                  43.584             : -1            
+    11 : 2003-07-06 06:31:49       0        1       0 :                  43.583             : -1            
+    12 : 2003-07-06 06:31:59       0        1       0 :                  43.583             : -1            
+    13 : 2003-07-06 06:32:09       0        1       0 :                  43.583             : -1            
+    14 : 2003-07-06 06:32:19       0        1       0 :                  43.583             : -1            
+    15 : 2003-07-06 06:32:29       0        1       0 :                  43.583             : -1            
+    16 : 2003-07-06 06:32:39       0        1       0 :                  43.584             : -1            
+    17 : 2003-07-06 06:32:49       0        1       0 :                  43.584             : -1            
+    18 : 2003-07-06 06:32:59       0        1       0 :                  43.585             : -1            
+    19 : 2003-07-06 06:33:09       0        1       0 :                  43.585             : -1            
+    20 : 2003-07-06 06:33:19       0        1       0 :                  43.586             : -1            
+    21 : 2003-07-06 06:33:29       0        1       0 :                  43.587             : -1            
+    22 : 2003-07-06 06:33:39       0        1       0 :                  43.587             : -1            
+    23 : 2003-07-06 06:33:49       0        1       0 :                  43.588             : -1            
+    24 : 2003-07-06 06:33:59       0        1       0 :                  43.589             : -1            
+    25 : 2003-07-06 06:34:09       0        1       0 :                  43.589             : -1            
+    26 : 2003-07-06 06:34:19       0        1       0 :                  43.590             : -1            
+    27 : 2003-07-06 06:34:29       0        1       0 :                  43.591             : -1            
+    28 : 2003-07-06 06:34:39       0        1       0 :                  43.591             : -1            
+    29 : 2003-07-06 06:34:49       0        1       0 :                  43.592             : -1            
+    30 : 2003-07-06 06:34:59       0        1       0 :                  43.592             : -1            
+    31 : 2003-07-06 06:35:09       0        1       0 :                  43.593             : -1            
+    32 : 2003-07-06 06:35:19       0        1       0 :                  43.593             : -1            
+    33 : 2003-07-06 06:35:29       0        1       0 :                  43.593             : -1            
+    34 : 2003-07-06 06:35:39       0        1       0 :                  43.593             : -1            
+    35 : 2003-07-06 06:35:49       0        1       0 :                  43.593             : -1            
+    36 : 2003-07-06 06:35:59       0        1       0 :                  43.593             : -1            
+    37 : 2003-07-06 06:36:09       0        1       0 :                  43.593             : -1            
+    38 : 2003-07-06 06:36:19       0        1       0 :                  43.593             : -1            
+    39 : 2003-07-06 06:36:29       0        1       0 :                  43.593             : -1            
+    40 : 2003-07-06 06:36:39       0        1       0 :                  43.593             : -1            
+    41 : 2003-07-06 06:36:49       0        1       0 :                  43.593             : -1            
+    42 : 2003-07-06 06:36:59       0        1       0 :                  43.593             : -1            
+    43 : 2003-07-06 06:37:09       0        1       0 :                  43.593             : -1            
+    44 : 2003-07-06 06:37:19       0        1       0 :                  43.593             : -1            
+    45 : 2003-07-06 06:37:29       0        1       0 :                  43.593             : -1            
+    46 : 2003-07-06 06:37:39       0        1       0 :                  43.593             : -1            
+    47 : 2003-07-06 06:37:49       0        1       0 :                  43.593             : -1            
+    48 : 2003-07-06 06:37:59       0        1       0 :                  43.592             : -1            
+    49 : 2003-07-06 06:38:09       0        1       0 :                  43.588             : -1            
+    50 : 2003-07-06 06:38:19       0        1       0 :                  43.585             : -1            
+    51 : 2003-07-06 06:38:29       0        1       0 :                  43.577             : -1            
+    52 : 2003-07-06 06:38:39       0        1       0 :                  43.570             : -1            
+    53 : 2003-07-06 06:38:49       0        1       0 :                  43.562             : -1            
+    54 : 2003-07-06 06:38:59       0        1       0 :                  43.554             : -1            
+    55 : 2003-07-06 06:39:09       0        1       0 :                  43.544             : -1            
+    56 : 2003-07-06 06:39:19       0        1       0 :                  43.535             : -1            
+    57 : 2003-07-06 06:39:29       0        1       0 :                  43.527             : -1            
+    58 : 2003-07-06 06:39:39       0        1       0 :                  43.521             : -1            
+    59 : 2003-07-06 06:39:49       0        1       0 :                  43.513             : -1            
+    60 : 2003-07-06 06:39:59       0        1       0 :                  43.507             : -1            
+    61 : 2003-07-06 06:40:09       0        1       0 :                  43.500             : -1            
+    62 : 2003-07-06 06:40:19       0        1       0 :                  43.495             : -1            
+    63 : 2003-07-06 06:40:29       0        1       0 :                  43.486             : -1            
+    64 : 2003-07-06 06:40:39       0        1       0 :                  43.480             : -1            
+    65 : 2003-07-06 06:40:49       0        1       0 :                  43.471             : -1            
+    66 : 2003-07-06 06:40:59       0        1       0 :                  43.463             : -1            
+    67 : 2003-07-06 06:41:09       0        1       0 :                  43.454             : -1            
+    68 : 2003-07-06 06:41:19       0        1       0 :                  43.444             : -1            
+    69 : 2003-07-06 06:41:29       0        1       0 :                  43.437             : -1            
+    70 : 2003-07-06 06:41:39       0        1       0 :                  43.424             : -1            
+    71 : 2003-07-06 06:41:49       0        1       0 :                  43.412             : -1            
+    72 : 2003-07-06 06:41:59       0        1       0 :                  43.402             : -1            
+    73 : 2003-07-06 06:42:09       0        1       0 :                  43.395             : -1            
+    74 : 2003-07-06 06:42:19       0        1       0 :                  43.381             : -1            
+    75 : 2003-07-06 06:42:29       0        1       0 :                  43.370             : -1            
+    76 : 2003-07-06 06:42:39       0        1       0 :                  43.357             : -1            
+    77 : 2003-07-06 06:42:49       0        1       0 :                  43.349             : -1            
+    78 : 2003-07-06 06:42:59       0        1       0 :                  43.335             : -1            
+    79 : 2003-07-06 06:43:09       0        1       0 :                  43.324             : -1            
+    80 : 2003-07-06 06:43:19       0        1       0 :                  43.315             : -1            
+    81 : 2003-07-06 06:43:29       0        1       0 :                  43.300             : -1            
+    82 : 2003-07-06 06:43:39       0        1       0 :                  43.287             : -1            
+    83 : 2003-07-06 06:43:49       0        1       0 :                  43.277             : -1            
+    84 : 2003-07-06 06:43:59       0        1       0 :                  43.269             : -1            
+    85 : 2003-07-06 06:44:09       0        1       0 :                  43.254             : -1            
+    86 : 2003-07-06 06:44:19       0        1       0 :                  43.243             : -1            
+    87 : 2003-07-06 06:44:29       0        1       0 :                  43.232             : -1            
+    88 : 2003-07-06 06:44:39       0        1       0 :                  43.221             : -1            
+    89 : 2003-07-06 06:44:49       0        1       0 :                  43.211             : -1            
+    90 : 2003-07-06 06:44:59       0        1       0 :                  43.202             : -1            
+    91 : 2003-07-06 06:45:09       0        1       0 :                  43.189             : -1            
+    92 : 2003-07-06 06:45:19       0        1       0 :                  43.181             : -1            
+    93 : 2003-07-06 06:45:29       0        1       0 :                  43.168             : -1            
+    94 : 2003-07-06 06:45:39       0        1       0 :                  43.158             : -1            
+    95 : 2003-07-06 06:45:49       0        1       0 :                  43.147             : -1            
+    96 : 2003-07-06 06:45:59       0        1       0 :                  43.139             : -1            
+    97 : 2003-07-06 06:46:09       0        1       0 :                  43.126             : -1            
+    98 : 2003-07-06 06:46:19       0        1       0 :                  43.114             : -1            
+    99 : 2003-07-06 06:46:29       0        1       0 :                  43.104             : -1            
+   100 : 2003-07-06 06:46:39       0        1       0 :                  43.097             : -1            
+   101 : 2003-07-06 06:46:49       0        1       0 :                  43.084             : -1            
+   102 : 2003-07-06 06:46:59       0        1       0 :                  43.072             : -1            
+   103 : 2003-07-06 06:47:09       0        1       0 :                  43.062             : -1            
+   104 : 2003-07-06 06:47:19       0        1       0 :                  43.052             : -1            
+   105 : 2003-07-06 06:47:29       0        1       0 :                  43.039             : -1            
+   106 : 2003-07-06 06:47:39       0        1       0 :                  43.028             : -1            
+   107 : 2003-07-06 06:47:49       0        1       0 :                  43.018             : -1            
+   108 : 2003-07-06 06:47:59       0        1       0 :                  43.005             : -1            
+   109 : 2003-07-06 06:48:09       0        1       0 :                  42.994             : -1            
+   110 : 2003-07-06 06:48:19       0        1       0 :                  42.980             : -1            
+   111 : 2003-07-06 06:48:29       0        1       0 :                  42.972             : -1            
+   112 : 2003-07-06 06:48:39       0        1       0 :                  42.955             : -1            
+   113 : 2003-07-06 06:48:49       0        1       0 :                  42.944             : -1            
+   114 : 2003-07-06 06:48:59       0        1       0 :                  42.930             : -1            
+   115 : 2003-07-06 06:49:09       0        1       0 :                  42.921             : -1            
+   116 : 2003-07-06 06:49:19       0        1       0 :                  42.905             : -1            
+   117 : 2003-07-06 06:49:29       0        1       0 :                  42.891             : -1            
+   118 : 2003-07-06 06:49:39       0        1       0 :                  42.876             : -1            
+   119 : 2003-07-06 06:49:49       0        1       0 :                  42.864             : -1            
+   120 : 2003-07-06 06:49:59       0        1       0 :                  42.849             : -1            
+   121 : 2003-07-06 06:50:09       0        1       0 :                  42.836             : -1            
+   122 : 2003-07-06 06:50:19       0        1       0 :                  42.828             : -1            
+   123 : 2003-07-06 06:50:29       0        1       0 :                  42.816             : -1            
+   124 : 2003-07-06 06:50:39       0        1       0 :                  42.808             : -1            
+   125 : 2003-07-06 06:50:49       0        1       0 :                  42.799             : -1            
+   126 : 2003-07-06 06:50:59       0        1       0 :                  42.794             : -1            
+   127 : 2003-07-06 06:51:09       0        1       0 :                  42.785             : -1            
+   128 : 2003-07-06 06:51:19       0        1       0 :                  42.778             : -1            
+   129 : 2003-07-06 06:51:29       0        1       0 :                  42.770             : -1            
+   130 : 2003-07-06 06:51:39       0        1       0 :                  42.762             : -1            
+   131 : 2003-07-06 06:51:49       0        1       0 :                  42.756             : -1            
+   132 : 2003-07-06 06:51:59       0        1       0 :                  42.749             : -1            
+   133 : 2003-07-06 06:52:09       0        1       0 :                  42.742             : -1            
+   134 : 2003-07-06 06:52:19       0        1       0 :                  42.735             : -1            
+   135 : 2003-07-06 06:52:29       0        1       0 :                  42.725             : -1            
+   136 : 2003-07-06 06:52:39       0        1       0 :                  42.717             : -1            
+   137 : 2003-07-06 06:52:49       0        1       0 :                  42.709             : -1            
+   138 : 2003-07-06 06:52:59       0        1       0 :                  42.702             : -1            
+   139 : 2003-07-06 06:53:09       0        1       0 :                  42.692             : -1            
+   140 : 2003-07-06 06:53:19       0        1       0 :                  42.683             : -1            
+   141 : 2003-07-06 06:53:29       0        1       0 :                  42.675             : -1            
+   142 : 2003-07-06 06:53:39       0        1       0 :                  42.668             : -1            
+   143 : 2003-07-06 06:53:49       0        1       0 :                  42.657             : -1            
+   144 : 2003-07-06 06:53:59       0        1       0 :                  42.649             : -1            
+   145 : 2003-07-06 06:54:09       0        1       0 :                  42.637             : -1            
+   146 : 2003-07-06 06:54:19       0        1       0 :                  42.628             : -1            
+   147 : 2003-07-06 06:54:29       0        1       0 :                  42.618             : -1            
+   148 : 2003-07-06 06:54:39       0        1       0 :                  42.608             : -1            
+   149 : 2003-07-06 06:54:49       0        1       0 :                  42.601             : -1            
+   150 : 2003-07-06 06:54:59       0        1       0 :                  42.589             : -1            
+   151 : 2003-07-06 06:55:09       0        1       0 :                  42.577             : -1            
+   152 : 2003-07-06 06:55:19       0        1       0 :                  42.568             : -1            
+   153 : 2003-07-06 06:55:29       0        1       0 :                  42.561             : -1            
+   154 : 2003-07-06 06:55:39       0        1       0 :                  42.549             : -1            
+   155 : 2003-07-06 06:55:49       0        1       0 :                  42.536             : -1            
+   156 : 2003-07-06 06:55:59       0        1       0 :                  42.527             : -1            
+   157 : 2003-07-06 06:56:09       0        1       0 :                  42.518             : -1            
+   158 : 2003-07-06 06:56:19       0        1       0 :                  42.507             : -1            
+   159 : 2003-07-06 06:56:29       0        1       0 :                  42.496             : -1            
+   160 : 2003-07-06 06:56:39       0        1       0 :                  42.485             : -1            
+   161 : 2003-07-06 06:56:49       0        1       0 :                  42.477             : -1            
+   162 : 2003-07-06 06:56:59       0        1       0 :                  42.467             : -1            
+   163 : 2003-07-06 06:57:09       0        1       0 :                  42.458             : -1            
+   164 : 2003-07-06 06:57:19       0        1       0 :                  42.452             : -1            
+   165 : 2003-07-06 06:57:29       0        1       0 :                  42.442             : -1            
+   166 : 2003-07-06 06:57:39       0        1       0 :                  42.434             : -1            
+   167 : 2003-07-06 06:57:49       0        1       0 :                  42.425             : -1            
+   168 : 2003-07-06 06:57:59       0        1       0 :                  42.416             : -1            
+   169 : 2003-07-06 06:58:09       0        1       0 :                  42.409             : -1            
+   170 : 2003-07-06 06:58:19       0        1       0 :                  42.400             : -1            
+   171 : 2003-07-06 06:58:29       0        1       0 :                  42.392             : -1            
+   172 : 2003-07-06 06:58:39       0        1       0 :                  42.384             : -1            
+   173 : 2003-07-06 06:58:49       0        1       0 :                  42.374             : -1            
+   174 : 2003-07-06 06:58:59       0        1       0 :                  42.363             : -1            
+   175 : 2003-07-06 06:59:09       0        1       0 :                  42.355             : -1            
+   176 : 2003-07-06 06:59:19       0        1       0 :                  42.348             : -1            
+   177 : 2003-07-06 06:59:29       0        1       0 :                  42.340             : -1            
+   178 : 2003-07-06 06:59:39       0        1       0 :                  42.333             : -1            
+   179 : 2003-07-06 06:59:49       0        1       0 :                  42.326             : -1            
+   180 : 2003-07-06 06:59:59       0        1       0 :                  42.321             : -1            
+       :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter ID
+cdo    info: Processed 180 values from 1 variable over 180 timesteps [0.00s 22MB].
Binary file test-data/latitude_modified.nc has changed
Binary file test-data/longitude.nc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/longitude.txt	Sat Jan 15 23:21:03 2022 +0000
@@ -0,0 +1,183 @@
+    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter ID
+     1 : 2003-07-06 06:30:13       0        1       0 :                 -96.733             : -1            
+     2 : 2003-07-06 06:30:19       0        1       0 :                 -96.733             : -1            
+     3 : 2003-07-06 06:30:29       0        1       0 :                 -96.733             : -1            
+     4 : 2003-07-06 06:30:39       0        1       0 :                 -96.733             : -1            
+     5 : 2003-07-06 06:30:49       0        1       0 :                 -96.733             : -1            
+     6 : 2003-07-06 06:30:59       0        1       0 :                 -96.734             : -1            
+     7 : 2003-07-06 06:31:09       0        1       0 :                 -96.734             : -1            
+     8 : 2003-07-06 06:31:19       0        1       0 :                 -96.735             : -1            
+     9 : 2003-07-06 06:31:29       0        1       0 :                 -96.735             : -1            
+    10 : 2003-07-06 06:31:39       0        1       0 :                 -96.735             : -1            
+    11 : 2003-07-06 06:31:49       0        1       0 :                 -96.736             : -1            
+    12 : 2003-07-06 06:31:59       0        1       0 :                 -96.737             : -1            
+    13 : 2003-07-06 06:32:09       0        1       0 :                 -96.737             : -1            
+    14 : 2003-07-06 06:32:19       0        1       0 :                 -96.737             : -1            
+    15 : 2003-07-06 06:32:29       0        1       0 :                 -96.738             : -1            
+    16 : 2003-07-06 06:32:39       0        1       0 :                 -96.738             : -1            
+    17 : 2003-07-06 06:32:49       0        1       0 :                 -96.738             : -1            
+    18 : 2003-07-06 06:32:59       0        1       0 :                 -96.739             : -1            
+    19 : 2003-07-06 06:33:09       0        1       0 :                 -96.739             : -1            
+    20 : 2003-07-06 06:33:19       0        1       0 :                 -96.740             : -1            
+    21 : 2003-07-06 06:33:29       0        1       0 :                 -96.740             : -1            
+    22 : 2003-07-06 06:33:39       0        1       0 :                 -96.740             : -1            
+    23 : 2003-07-06 06:33:49       0        1       0 :                 -96.741             : -1            
+    24 : 2003-07-06 06:33:59       0        1       0 :                 -96.741             : -1            
+    25 : 2003-07-06 06:34:09       0        1       0 :                 -96.742             : -1            
+    26 : 2003-07-06 06:34:19       0        1       0 :                 -96.742             : -1            
+    27 : 2003-07-06 06:34:29       0        1       0 :                 -96.743             : -1            
+    28 : 2003-07-06 06:34:39       0        1       0 :                 -96.743             : -1            
+    29 : 2003-07-06 06:34:49       0        1       0 :                 -96.743             : -1            
+    30 : 2003-07-06 06:34:59       0        1       0 :                 -96.744             : -1            
+    31 : 2003-07-06 06:35:09       0        1       0 :                 -96.744             : -1            
+    32 : 2003-07-06 06:35:19       0        1       0 :                 -96.744             : -1            
+    33 : 2003-07-06 06:35:29       0        1       0 :                 -96.745             : -1            
+    34 : 2003-07-06 06:35:39       0        1       0 :                 -96.745             : -1            
+    35 : 2003-07-06 06:35:49       0        1       0 :                 -96.745             : -1            
+    36 : 2003-07-06 06:35:59       0        1       0 :                 -96.745             : -1            
+    37 : 2003-07-06 06:36:09       0        1       0 :                 -96.745             : -1            
+    38 : 2003-07-06 06:36:19       0        1       0 :                 -96.745             : -1            
+    39 : 2003-07-06 06:36:29       0        1       0 :                 -96.745             : -1            
+    40 : 2003-07-06 06:36:39       0        1       0 :                 -96.745             : -1            
+    41 : 2003-07-06 06:36:49       0        1       0 :                 -96.745             : -1            
+    42 : 2003-07-06 06:36:59       0        1       0 :                 -96.745             : -1            
+    43 : 2003-07-06 06:37:09       0        1       0 :                 -96.745             : -1            
+    44 : 2003-07-06 06:37:19       0        1       0 :                 -96.746             : -1            
+    45 : 2003-07-06 06:37:29       0        1       0 :                 -96.746             : -1            
+    46 : 2003-07-06 06:37:39       0        1       0 :                 -96.746             : -1            
+    47 : 2003-07-06 06:37:49       0        1       0 :                 -96.745             : -1            
+    48 : 2003-07-06 06:37:59       0        1       0 :                 -96.745             : -1            
+    49 : 2003-07-06 06:38:09       0        1       0 :                 -96.743             : -1            
+    50 : 2003-07-06 06:38:19       0        1       0 :                 -96.741             : -1            
+    51 : 2003-07-06 06:38:29       0        1       0 :                 -96.736             : -1            
+    52 : 2003-07-06 06:38:39       0        1       0 :                 -96.732             : -1            
+    53 : 2003-07-06 06:38:49       0        1       0 :                 -96.729             : -1            
+    54 : 2003-07-06 06:38:59       0        1       0 :                 -96.729             : -1            
+    55 : 2003-07-06 06:39:09       0        1       0 :                 -96.733             : -1            
+    56 : 2003-07-06 06:39:19       0        1       0 :                 -96.741             : -1            
+    57 : 2003-07-06 06:39:29       0        1       0 :                 -96.752             : -1            
+    58 : 2003-07-06 06:39:39       0        1       0 :                 -96.762             : -1            
+    59 : 2003-07-06 06:39:49       0        1       0 :                 -96.778             : -1            
+    60 : 2003-07-06 06:39:59       0        1       0 :                 -96.791             : -1            
+    61 : 2003-07-06 06:40:09       0        1       0 :                 -96.806             : -1            
+    62 : 2003-07-06 06:40:19       0        1       0 :                 -96.814             : -1            
+    63 : 2003-07-06 06:40:29       0        1       0 :                 -96.829             : -1            
+    64 : 2003-07-06 06:40:39       0        1       0 :                 -96.840             : -1            
+    65 : 2003-07-06 06:40:49       0        1       0 :                 -96.855             : -1            
+    66 : 2003-07-06 06:40:59       0        1       0 :                 -96.866             : -1            
+    67 : 2003-07-06 06:41:09       0        1       0 :                 -96.877             : -1            
+    68 : 2003-07-06 06:41:19       0        1       0 :                 -96.886             : -1            
+    69 : 2003-07-06 06:41:29       0        1       0 :                 -96.893             : -1            
+    70 : 2003-07-06 06:41:39       0        1       0 :                 -96.905             : -1            
+    71 : 2003-07-06 06:41:49       0        1       0 :                 -96.914             : -1            
+    72 : 2003-07-06 06:41:59       0        1       0 :                 -96.922             : -1            
+    73 : 2003-07-06 06:42:09       0        1       0 :                 -96.928             : -1            
+    74 : 2003-07-06 06:42:19       0        1       0 :                 -96.940             : -1            
+    75 : 2003-07-06 06:42:29       0        1       0 :                 -96.949             : -1            
+    76 : 2003-07-06 06:42:39       0        1       0 :                 -96.959             : -1            
+    77 : 2003-07-06 06:42:49       0        1       0 :                 -96.965             : -1            
+    78 : 2003-07-06 06:42:59       0        1       0 :                 -96.977             : -1            
+    79 : 2003-07-06 06:43:09       0        1       0 :                 -96.986             : -1            
+    80 : 2003-07-06 06:43:19       0        1       0 :                 -96.992             : -1            
+    81 : 2003-07-06 06:43:29       0        1       0 :                 -97.004             : -1            
+    82 : 2003-07-06 06:43:39       0        1       0 :                 -97.014             : -1            
+    83 : 2003-07-06 06:43:49       0        1       0 :                 -97.022             : -1            
+    84 : 2003-07-06 06:43:59       0        1       0 :                 -97.029             : -1            
+    85 : 2003-07-06 06:44:09       0        1       0 :                 -97.041             : -1            
+    86 : 2003-07-06 06:44:19       0        1       0 :                 -97.051             : -1            
+    87 : 2003-07-06 06:44:29       0        1       0 :                 -97.062             : -1            
+    88 : 2003-07-06 06:44:39       0        1       0 :                 -97.073             : -1            
+    89 : 2003-07-06 06:44:49       0        1       0 :                 -97.084             : -1            
+    90 : 2003-07-06 06:44:59       0        1       0 :                 -97.094             : -1            
+    91 : 2003-07-06 06:45:09       0        1       0 :                 -97.108             : -1            
+    92 : 2003-07-06 06:45:19       0        1       0 :                 -97.118             : -1            
+    93 : 2003-07-06 06:45:29       0        1       0 :                 -97.132             : -1            
+    94 : 2003-07-06 06:45:39       0        1       0 :                 -97.143             : -1            
+    95 : 2003-07-06 06:45:49       0        1       0 :                 -97.154             : -1            
+    96 : 2003-07-06 06:45:59       0        1       0 :                 -97.163             : -1            
+    97 : 2003-07-06 06:46:09       0        1       0 :                 -97.177             : -1            
+    98 : 2003-07-06 06:46:19       0        1       0 :                 -97.189             : -1            
+    99 : 2003-07-06 06:46:29       0        1       0 :                 -97.201             : -1            
+   100 : 2003-07-06 06:46:39       0        1       0 :                 -97.210             : -1            
+   101 : 2003-07-06 06:46:49       0        1       0 :                 -97.225             : -1            
+   102 : 2003-07-06 06:46:59       0        1       0 :                 -97.239             : -1            
+   103 : 2003-07-06 06:47:09       0        1       0 :                 -97.249             : -1            
+   104 : 2003-07-06 06:47:19       0        1       0 :                 -97.260             : -1            
+   105 : 2003-07-06 06:47:29       0        1       0 :                 -97.274             : -1            
+   106 : 2003-07-06 06:47:39       0        1       0 :                 -97.285             : -1            
+   107 : 2003-07-06 06:47:49       0        1       0 :                 -97.296             : -1            
+   108 : 2003-07-06 06:47:59       0        1       0 :                 -97.310             : -1            
+   109 : 2003-07-06 06:48:09       0        1       0 :                 -97.320             : -1            
+   110 : 2003-07-06 06:48:19       0        1       0 :                 -97.332             : -1            
+   111 : 2003-07-06 06:48:29       0        1       0 :                 -97.339             : -1            
+   112 : 2003-07-06 06:48:39       0        1       0 :                 -97.351             : -1            
+   113 : 2003-07-06 06:48:49       0        1       0 :                 -97.359             : -1            
+   114 : 2003-07-06 06:48:59       0        1       0 :                 -97.368             : -1            
+   115 : 2003-07-06 06:49:09       0        1       0 :                 -97.374             : -1            
+   116 : 2003-07-06 06:49:19       0        1       0 :                 -97.381             : -1            
+   117 : 2003-07-06 06:49:29       0        1       0 :                 -97.382             : -1            
+   118 : 2003-07-06 06:49:39       0        1       0 :                 -97.379             : -1            
+   119 : 2003-07-06 06:49:49       0        1       0 :                 -97.374             : -1            
+   120 : 2003-07-06 06:49:59       0        1       0 :                 -97.363             : -1            
+   121 : 2003-07-06 06:50:09       0        1       0 :                 -97.348             : -1            
+   122 : 2003-07-06 06:50:19       0        1       0 :                 -97.337             : -1            
+   123 : 2003-07-06 06:50:29       0        1       0 :                 -97.312             : -1            
+   124 : 2003-07-06 06:50:39       0        1       0 :                 -97.291             : -1            
+   125 : 2003-07-06 06:50:49       0        1       0 :                 -97.269             : -1            
+   126 : 2003-07-06 06:50:59       0        1       0 :                 -97.257             : -1            
+   127 : 2003-07-06 06:51:09       0        1       0 :                 -97.230             : -1            
+   128 : 2003-07-06 06:51:19       0        1       0 :                 -97.210             : -1            
+   129 : 2003-07-06 06:51:29       0        1       0 :                 -97.190             : -1            
+   130 : 2003-07-06 06:51:39       0        1       0 :                 -97.168             : -1            
+   131 : 2003-07-06 06:51:49       0        1       0 :                 -97.149             : -1            
+   132 : 2003-07-06 06:51:59       0        1       0 :                 -97.129             : -1            
+   133 : 2003-07-06 06:52:09       0        1       0 :                 -97.108             : -1            
+   134 : 2003-07-06 06:52:19       0        1       0 :                 -97.093             : -1            
+   135 : 2003-07-06 06:52:29       0        1       0 :                 -97.068             : -1            
+   136 : 2003-07-06 06:52:39       0        1       0 :                 -97.046             : -1            
+   137 : 2003-07-06 06:52:49       0        1       0 :                 -97.029             : -1            
+   138 : 2003-07-06 06:52:59       0        1       0 :                 -97.014             : -1            
+   139 : 2003-07-06 06:53:09       0        1       0 :                 -96.991             : -1            
+   140 : 2003-07-06 06:53:19       0        1       0 :                 -96.970             : -1            
+   141 : 2003-07-06 06:53:29       0        1       0 :                 -96.954             : -1            
+   142 : 2003-07-06 06:53:39       0        1       0 :                 -96.939             : -1            
+   143 : 2003-07-06 06:53:49       0        1       0 :                 -96.917             : -1            
+   144 : 2003-07-06 06:53:59       0        1       0 :                 -96.900             : -1            
+   145 : 2003-07-06 06:54:09       0        1       0 :                 -96.878             : -1            
+   146 : 2003-07-06 06:54:19       0        1       0 :                 -96.862             : -1            
+   147 : 2003-07-06 06:54:29       0        1       0 :                 -96.845             : -1            
+   148 : 2003-07-06 06:54:39       0        1       0 :                 -96.828             : -1            
+   149 : 2003-07-06 06:54:49       0        1       0 :                 -96.815             : -1            
+   150 : 2003-07-06 06:54:59       0        1       0 :                 -96.794             : -1            
+   151 : 2003-07-06 06:55:09       0        1       0 :                 -96.773             : -1            
+   152 : 2003-07-06 06:55:19       0        1       0 :                 -96.755             : -1            
+   153 : 2003-07-06 06:55:29       0        1       0 :                 -96.744             : -1            
+   154 : 2003-07-06 06:55:39       0        1       0 :                 -96.723             : -1            
+   155 : 2003-07-06 06:55:49       0        1       0 :                 -96.703             : -1            
+   156 : 2003-07-06 06:55:59       0        1       0 :                 -96.688             : -1            
+   157 : 2003-07-06 06:56:09       0        1       0 :                 -96.672             : -1            
+   158 : 2003-07-06 06:56:19       0        1       0 :                 -96.653             : -1            
+   159 : 2003-07-06 06:56:29       0        1       0 :                 -96.636             : -1            
+   160 : 2003-07-06 06:56:39       0        1       0 :                 -96.617             : -1            
+   161 : 2003-07-06 06:56:49       0        1       0 :                 -96.603             : -1            
+   162 : 2003-07-06 06:56:59       0        1       0 :                 -96.583             : -1            
+   163 : 2003-07-06 06:57:09       0        1       0 :                 -96.562             : -1            
+   164 : 2003-07-06 06:57:19       0        1       0 :                 -96.550             : -1            
+   165 : 2003-07-06 06:57:29       0        1       0 :                 -96.525             : -1            
+   166 : 2003-07-06 06:57:39       0        1       0 :                 -96.505             : -1            
+   167 : 2003-07-06 06:57:49       0        1       0 :                 -96.483             : -1            
+   168 : 2003-07-06 06:57:59       0        1       0 :                 -96.464             : -1            
+   169 : 2003-07-06 06:58:09       0        1       0 :                 -96.446             : -1            
+   170 : 2003-07-06 06:58:19       0        1       0 :                 -96.427             : -1            
+   171 : 2003-07-06 06:58:29       0        1       0 :                 -96.407             : -1            
+   172 : 2003-07-06 06:58:39       0        1       0 :                 -96.390             : -1            
+   173 : 2003-07-06 06:58:49       0        1       0 :                 -96.369             : -1            
+   174 : 2003-07-06 06:58:59       0        1       0 :                 -96.349             : -1            
+   175 : 2003-07-06 06:59:09       0        1       0 :                 -96.331             : -1            
+   176 : 2003-07-06 06:59:19       0        1       0 :                 -96.313             : -1            
+   177 : 2003-07-06 06:59:29       0        1       0 :                 -96.289             : -1            
+   178 : 2003-07-06 06:59:39       0        1       0 :                 -96.266             : -1            
+   179 : 2003-07-06 06:59:49       0        1       0 :                 -96.244             : -1            
+   180 : 2003-07-06 06:59:59       0        1       0 :                 -96.227             : -1            
+       :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter ID
+cdo    info: Processed 180 values from 1 variable over 180 timesteps [0.00s 22MB].
Binary file test-data/outfile_latitude.nc has changed
Binary file test-data/split_latitude.nc has changed
Binary file test-data/timeseries.nc has changed
Binary file test-data/timeseries_sub.nc has changed
Binary file test-data/timeseries_timavg.nc has changed