Mercurial > repos > ecology > xarray_mapplot
comparison xarray_mapplot.xml @ 1:dc05bf0af58f draft
"planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
| author | ecology |
|---|---|
| date | Thu, 20 Jan 2022 17:09:04 +0000 |
| parents | d7479b6dfbe8 |
| children | 506b6d6880ff |
comparison
equal
deleted
inserted
replaced
| 0:d7479b6dfbe8 | 1:dc05bf0af58f |
|---|---|
| 1 <tool id="xarray_mapplot" name="NetCDF xarray map plotting" profile="20.05" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> | 1 <tool id="xarray_mapplot" name="NetCDF xarray map plotting" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
| 2 <description>Visualize netCDF variables on a geographical map</description> | 2 <description>Visualize netCDF variables on a geographical map</description> |
| 3 <macros> | 3 <macros> |
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 <import>macros_mapplot.xml</import> | |
| 5 </macros> | 6 </macros> |
| 6 <expand macro="edam_ontology"/> | 7 <expand macro="edam_ontology"/> |
| 7 <requirements> | 8 <requirements> |
| 9 <requirement type="package" version="@TOOL_VERSION@">xarray</requirement> | |
| 8 <requirement type="package" version="3">python</requirement> | 10 <requirement type="package" version="3">python</requirement> |
| 9 <requirement type="package" version="1.5.6">netcdf4</requirement> | 11 <requirement type="package" version="1.5.6">netcdf4</requirement> |
| 10 <requirement type="package" version="@TOOL_VERSION@">xarray</requirement> | |
| 11 <requirement type="package" version="0.19.0">cartopy</requirement> | 12 <requirement type="package" version="0.19.0">cartopy</requirement> |
| 12 <requirement type="package" version="3.4.2">matplotlib</requirement> | 13 <requirement type="package" version="3.4.2">matplotlib</requirement> |
| 13 <requirement type="package" version="1.2">cmcrameri</requirement> | 14 <requirement type="package" version="1.2">cmcrameri</requirement> |
| 15 <requirement type="package" version="2021.12.0">dask</requirement> | |
| 14 </requirements> | 16 </requirements> |
| 15 <command detect_errors="exit_code"><![CDATA[ | 17 <command detect_errors="exit_code"><![CDATA[ |
| 16 mkdir output_dir && | 18 mkdir output_dir && |
| 17 mkdir -p `pwd`/mlp_tmpdir && | 19 mkdir -p `pwd`/mlp_tmpdir && |
| 18 MPLCONFIGDIR=`pwd`/mlp_tmpdir && | 20 MPLCONFIGDIR=`pwd`/mlp_tmpdir && |
| 19 echo "Galaxy xarray version @TOOL_VERSION@" > $version && | 21 echo "Galaxy xarray version @TOOL_VERSION@" > $version && |
| 20 python '$__tool_directory__/xarray_mapplot.py' '$input' '$var' | 22 python '$__tool_directory__/xarray_mapplot.py' '$input' '$var' |
| 21 #if $condi_datetime.datetime=="yes" | 23 --config '$map_customization' --proj '$map_projection' |
| 22 --time="$condi_datetime.time_values" | |
| 23 #end if | |
| 24 --latitude='$lat_dim' | |
| 25 --longitude='$lon_dim' | |
| 26 #if $colorbar_label | |
| 27 --label='$colorbar_label' | |
| 28 #end if | |
| 29 #if $title | |
| 30 --title=$title | |
| 31 #end if | |
| 32 #if $cmap | |
| 33 --cmap='$cmap' | |
| 34 #end if | |
| 35 #if $proj | |
| 36 --proj='$proj' | |
| 37 #end if | |
| 38 #if $land | |
| 39 --land='$land' | |
| 40 #end if | |
| 41 #if $ocean | |
| 42 --ocean='$ocean' | |
| 43 #end if | |
| 44 #if $coastline | |
| 45 --coastline='$coastline' | |
| 46 #end if | |
| 47 #if $borders | |
| 48 --borders='$borders' | |
| 49 #end if | |
| 50 #if $threshold | |
| 51 --threshold='$threshold' | |
| 52 #end if | |
| 53 #if $range | |
| 54 --range='$range' | |
| 55 #end if | |
| 56 #if $xlim | |
| 57 --xlim='$xlim' | |
| 58 #end if | |
| 59 #if $ylim | |
| 60 --ylim='$ylim' | |
| 61 #end if | |
| 62 #if $shift | 24 #if $shift |
| 63 --shift | 25 --shift |
| 64 #end if | 26 #end if |
| 65 --output plot.png | 27 --output plot.png |
| 66 --verbose && | 28 --verbose && |
| 67 mv *.png output_dir | 29 mv *.png output_dir |
| 68 ]]></command> | 30 ]]></command> |
| 31 <expand macro="config_map"/> | |
| 69 <inputs> | 32 <inputs> |
| 70 <param type="data" name="input" label="Input netcdf file" format="netcdf"/> | 33 <param type="data" name="input" label="Input netcdf file" format="netcdf"/> |
| 71 <param type="data" label="Tabular of variables" name="var_tab" format="tabular" help="Select the tabular file which summarize the available variables and dimensions."/> | 34 <param type="data" label="Tabular of variables" name="var_tab" format="tabular" help="Select the tabular file which summarize the available variables and dimensions."/> |
| 72 <param name="var" type="select" label="Choose the variable to plot"> | 35 <param name="var" type="select" label="Choose the variable to plot"> |
| 73 <options from_dataset="var_tab"> | 36 <options from_dataset="var_tab"> |
| 101 </param> | 64 </param> |
| 102 </when> | 65 </when> |
| 103 </conditional> | 66 </conditional> |
| 104 <param name="xlim" type="text" optional="true" label="longitudes values 'lonW,lonE' for limited geographical area (optional and only available with some projections)" /> | 67 <param name="xlim" type="text" optional="true" label="longitudes values 'lonW,lonE' for limited geographical area (optional and only available with some projections)" /> |
| 105 <param name="ylim" type="text" value="" optional="true" label="latitudes values 'latS,latN' for limited geographical area (optional and only available with some projections)" /> | 68 <param name="ylim" type="text" value="" optional="true" label="latitudes values 'latS,latN' for limited geographical area (optional and only available with some projections)" /> |
| 106 <param name="shift" type="select" optional="true" display="radio" label="Shift longitudes [0,360] --> [-180,180]"> | 69 <param name="shift" type="select" display="radio" label="Shift longitudes [0,360] --> [-180,180]"> |
| 107 <option value="" selected="true">No</option> | 70 <option value="" selected="true">No</option> |
| 108 <option value="Yes">Yes</option> | 71 <option value="Yes">Yes</option> |
| 109 </param> | 72 </param> |
| 110 <param name="range" type="text" optional="true" label="Range of values for plotting e.g. minimum value abd maximum value (minval,maxval) (optional)" /> | 73 <param name="range" type="text" optional="true" label="Range of values for plotting e.g. minimum value and maximum value (minval,maxval) (optional)" /> |
| 111 <param name="threshold" type="float" optional="true" label="Do not plot values below this threshold (optional)" /> | 74 <param name="threshold" type="float" optional="true" label="Do not plot values below this threshold (optional)" /> |
| 112 <expand macro="customize_appearance_plots" /> | 75 <expand macro="customize_appearance_plots" /> |
| 113 <param name="proj" type="text" optional="true" label='Specify the projection (proj4) on which we draw e.g. {"proj":"PlateCarree"} with double quote (optional)'> | 76 <param name="proj" type="text" optional="true" label='Specify the projection (proj4) on which we draw e.g. {"proj":"PlateCarree"} with double quote (optional)'> |
| 114 <sanitizer> | 77 <sanitizer> |
| 115 <valid initial="string.ascii_letters,string.digits,string.punctuation,string.whitespace"> | 78 <valid initial="string.ascii_letters,string.digits,string.punctuation,string.whitespace"> |
| 170 <element name="plot_time0" ftype="png" file="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133_time0.png"/> | 133 <element name="plot_time0" ftype="png" file="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133_time0.png"/> |
| 171 <element name="plot_time1" ftype="png" file="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133_time1.png"/> | 134 <element name="plot_time1" ftype="png" file="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133_time1.png"/> |
| 172 </output_collection> | 135 </output_collection> |
| 173 <output name="version" ftype="tabular" file="version.tabular"/> | 136 <output name="version" ftype="tabular" file="version.tabular"/> |
| 174 </test> | 137 </test> |
| 138 <test> | |
| 139 <param name="input" value="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133.nc"/> | |
| 140 <param name="var" value="chl"/> | |
| 141 <param name="var_tab" value="var_tab_dataset-ibi"/> | |
| 142 <param name="lat_dim" value="latitude"/> | |
| 143 <param name="lon_dim" value="longitude"/> | |
| 144 <conditional name="condi_datetime"> | |
| 145 <param name="datetime" value="yes"/> | |
| 146 <param name="time_tab" value="time.tabular"/> | |
| 147 <param name="time_values" value="0"/> | |
| 148 </conditional> | |
| 149 <param name="cmap" value="vik_r"/> | |
| 150 <param name="proj" value='{"proj":"EquidistantConic", "central_longitude": 20.0, "central_latitude": 70.0 }'/> | |
| 151 <param name="land" value="0.1"/> | |
| 152 <param name="ocean" value="0.1"/> | |
| 153 <param name="coastline" value="0.2"/> | |
| 154 <param name="borders" value="0.5"/> | |
| 155 <param name="title" value="Xarray map test"/> | |
| 156 <param name="colorbar_label" value="My personal label (X)" /> | |
| 157 <output_collection name="output_dir" type="list" count="1"> | |
| 158 <element name="plot_time0" ftype="png" file="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133_time0_title.png"/> | |
| 159 </output_collection> | |
| 160 <output name="version" ftype="tabular" file="version.tabular"/> | |
| 161 </test> | |
| 175 </tests> | 162 </tests> |
| 176 <help><