annotate xarray_netcdf2netcdf.xml @ 3:c91c27b63fb2 draft default tip

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit fd8ad4d97db7b1fd3876ff63e14280474e06fdf7
author ecology
date Sun, 31 Jul 2022 21:20:00 +0000
parents e87073edecd6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
1 <tool id="xarray_netcdf2netcdf" name="NetCDF xarray operations" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
2 <description>manipulate xarray from netCDF and save back to netCDF</description>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
3 <macros>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
4 <import>macros.xml</import>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
5 <import>macros_netcdf2netcdf.xml</import>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
6 <import>macros_tests_netcdf2netcdf.xml</import>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
7 </macros>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
8 <expand macro="edam_ontology"/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
9 <requirements>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
10 <requirement type="package" version="@TOOL_VERSION@">xarray</requirement>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
11 <requirement type="package" version="3">python</requirement>
3
c91c27b63fb2 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit fd8ad4d97db7b1fd3876ff63e14280474e06fdf7
ecology
parents: 2
diff changeset
12 <requirement type="package" version="1.6.0">netcdf4</requirement>
c91c27b63fb2 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit fd8ad4d97db7b1fd3876ff63e14280474e06fdf7
ecology
parents: 2
diff changeset
13 <requirement type="package" version="2022.7.0">dask</requirement>
2
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
14 </requirements>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
15 <command detect_errors="exit_code"><![CDATA[
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
16 mkdir output_dir &&
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
17 python '$__tool_directory__/xarray_netcdf2netcdf.py'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
18 '$input'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
19 '$variable.var'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
20 --filter
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
21 #for $i,$uc in enumerate($subset_coords.tsel.user_choice)
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
22 #if $uc.condi_between.comparator == "sl"
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
23 '${uc.dim}#${uc.condi_between.comparator}#${uc.condi_between.t1}#${uc.condi_between.t2}'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
24 #elif $subset_coords.tsel.by_click == "sel" and $uc.condi_between.method != 'None'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
25 '${uc.dim}#${uc.condi_between.comparator}#${uc.condi_between.value}#${uc.condi_between.method}'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
26 #else
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
27 '${uc.dim}#${uc.condi_between.comparator}#${uc.condi_between.value}'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
28 #end if
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
29 #end for
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
30 #if $subset_coords.tsel.by_click == "sel"
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
31 --selection
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
32 #end if
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
33 #if $variable.scale
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
34 --scale '$variable.scale'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
35 #end if
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
36 #if ($variable.write_all) or (str($variable.var) == 'None')
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
37 --write_all
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
38 #end if
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
39 #if $variable.keep_attributes
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
40 --keep_attributes
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
41 #end if
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
42 #if str($mask_values.mask_condi.mask_option) == 'drop'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
43 --drop
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
44 #elif str($mask_values.mask_condi.mask_option) == 'other'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
45 --other '$mask_values.mask_condi.set_other'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
46 #end if
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
47 #if str($mask_values.where_condition) != ""
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
48 --where '$mask_values.where_condition'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
49 #end if
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
50 --verbose
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
51 --output '$output_netcdf'
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
52 ]]> </command>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
53 <inputs>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
54 <param type="data" name="input" multiple="true" min="1" label="Input netcdf file" format="netcdf"/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
55 <param type="data" label="Metadata Infos" name="var_tab" format="tabular" help="Select the tabular file which summarize the available variables and dimensions."/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
56 <expand macro="section_variables"/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
57 <expand macro="section_coords"/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
58 <expand macro="section_where"/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
59 </inputs>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
60 <outputs>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
61 <data name="output_netcdf" format="netcdf"/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
62 </outputs>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
63 <expand macro="section_tests"/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
64 <help><![CDATA[
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
65 **What it does**
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
66
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
67 Select a variable ans can restrict over any of its dimension and apply a scaling (1 by default).
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
68 the result is stored in a new netCDF file.
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
69 One can also select the range of time (for timeseries) to apply these operations over the range only
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
70 when a range of time is selected and when scaling, one can choose to save the entire timeseries or
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
71 the selected range only.
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
72 when scaling, one can add additional filters on dimensions (typically used to filter
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
73 over latitudes and longitudes)
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
74
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
75
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
76 -------------------------------------------------
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
77
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
78 The xarray select tool can be used after the xarray Info and xarray Coord.
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
79 ]]> </help>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
80 <expand macro="citations"/>
e87073edecd6 "planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
ecology
parents: 1
diff changeset
81 </tool>