comparison mean-per-zone.xml @ 1:639192aa63f5 draft default tip

planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/mean-per-zone commit a5d176b7d0dc81bae07569d396edced43cfa2702
author climate
date Mon, 24 Jun 2019 02:41:08 -0400
parents 40727a2668d6
children
comparison
equal deleted inserted replaced
0:40727a2668d6 1:639192aa63f5
1 <tool id="mean_per_zone" name="zonal statistics" version="0.1.0"> 1 <tool id="mean_per_zone" name="zonal statistics" version="0.2.0">
2 <description>over each area</description> 2 <description>over each area</description>
3 <requirements> 3 <requirements>
4 <requirement type="package" version="3">python</requirement> 4 <requirement type="package" version="3">python</requirement>
5 <requirement type="package" version="0.13.1">rasterstats</requirement> 5 <requirement type="package" version="0.13.1">rasterstats</requirement>
6 <requirement type="package" version="0.4.1">geopandas</requirement> 6 <requirement type="package" version="0.4.1">geopandas</requirement>
7 <requirement type="package" version="0.11.3">xarray</requirement> 7 <requirement type="package" version="0.11.3">xarray</requirement>
8 <requirement type="package" version="1.4.3.2">netcdf4</requirement> 8 <requirement type="package" version="1.5.1.2">netcdf4</requirement>
9 </requirements> 9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
11 mkdir -p shp_tmp &&
12 ln -s '$shapefile' 'shp_tmp/temp.shp' &&
13 ln -s '$shapefilex' 'shp_tmp/temp.shx' &&
14 python3 '$__tool_directory__/zonal_statistics.py' 11 python3 '$__tool_directory__/zonal_statistics.py'
15 '$ifilename' 12 '$ifilename'
16 'shp_tmp' 13 '$shapefile.extra_files_path'
17 '$variable' 14 '$variable'
18 '$ofilename' 15 '$ofilename'
19 --stat '$stat_type' 16 --stat '$stat_type'
20 #if str($title).strip() != '' 17 #if str($title).strip() != ''
21 --title '$title' 18 --title '$title'
22 #end if 19 #end if
23 ]]></command> 20 ]]></command>
24 <inputs> 21 <inputs>
25 <param name="ifilename" type="data" format="netcdf,h5" label="input with geographical coordinates (netCDF format)"/> 22 <param name="ifilename" type="data" format="netcdf,h5" label="input with geographical coordinates (netCDF format)"/>
26 <param name="shapefile" type="data" format="binary" label="shapefile (shp) with polygons for which statistics will be computed"/> 23 <param name="shapefile" type="data" format="shp" label="shapefile (shp) with polygons for which statistics will be computed"/>
27 <param name="shapefilex" type="data" format="binary" label="shapefile (shx) with polygons for which statistics will be computed"/>
28 <!--param name="name" type="text" value="" label="Shapefile name" /--> 24 <!--param name="name" type="text" value="" label="Shapefile name" /-->
29 <param name="variable" type="text" value="TS" label="variable name as given in the netCDF file" /> 25 <param name="variable" type="text" value="TS" label="variable name as given in the netCDF file" />
30 <param name="title" type="text" value="" label="Title of the generated plot" /> 26 <param name="title" type="text" value="" label="Title of the generated plot" />
31 <param name="stat_type" type="select"> 27 <param name="stat_type" type="select">
32 <option value="min" selected="true">minimum</option> 28 <option value="min">minimum</option>
33 <option value="max" selected="true">maximum</option> 29 <option value="max">maximum</option>
34 <option value="mean" selected="true">mean</option> 30 <option value="mean" selected="true">mean</option>
35 <option value="count" selected="true">count</option> 31 <option value="count">count</option>
36 </param> 32 </param>
37 </inputs> 33 </inputs>
38 <outputs> 34 <outputs>
39 <data name="ofilename" format="png"></data> 35 <data name="ofilename" format="png"></data>
40 </outputs> 36 </outputs>
41 <tests> 37 <tests>
42 <test> 38 <test>
43 <param name="ifilename" value="TS.f2000.T31T31.control.cam.h0.0014-12.180.nc" /> 39 <param name="ifilename" value="TS.f2000.T31T31.control.cam.h0.0014-12.180.nc" />
44 <param name="variable" value="TS" /> 40 <param name="variable" value="TS" />
45 <param name="title" value="Mean Surface Temperature per country" /> 41 <param name="title" value="Mean Surface Temperature per country" />
46 <param name="shapefile" value="TM_WORLD_BORDERS_SIMPL-0.3/TM_WORLD_BORDERS_SIMPL-0.3.shp" /> 42 <param name="shapefile" value="TM_WORLD_BORDERS_SIMPL-0.3.html" ftype="shp" >
47 <param name="shapefilex" value="TM_WORLD_BORDERS_SIMPL-0.3/TM_WORLD_BORDERS_SIMPL-0.3.shx" /> 43 <composite_data value="TM_WORLD_BORDERS_SIMPL-0.3/TM_WORLD_BORDERS_SIMPL-0.3.shp"/>
48 <param name="name" value="TM_WORLD_BORDERS_SIMPL-0.3" /> 44 <composite_data value="TM_WORLD_BORDERS_SIMPL-0.3/TM_WORLD_BORDERS_SIMPL-0.3.shx"/>
45 <composite_data value="TM_WORLD_BORDERS_SIMPL-0.3/TM_WORLD_BORDERS_SIMPL-0.3.dbf"/>
46 <composite_data value="TM_WORLD_BORDERS_SIMPL-0.3/TM_WORLD_BORDERS_SIMPL-0.3.prj"/>
47 </param>
48 <!--param name="name" value="TM_WORLD_BORDERS_SIMPL-0.3" /-->
49 <output name="ofilename" ftype="png" file="TS.f2000.T31T31.control.cam.h0.0014-12.180.png" compare="sim_size" delta="1500"/> 49 <output name="ofilename" ftype="png" file="TS.f2000.T31T31.control.cam.h0.0014-12.180.png" compare="sim_size" delta="1500"/>
50 </test> 50 </test>
51 </tests> 51 </tests>
52 <help><![CDATA[ 52 <help><![CDATA[
53 53
80 80
81 Positional arguments: 81 Positional arguments:
82 ~~~~~~~~~~~~~~~~~~~~~ 82 ~~~~~~~~~~~~~~~~~~~~~
83 83
84 - **raster**: input raster filename with geographical coordinates (netCDF format) 84 - **raster**: input raster filename with geographical coordinates (netCDF format)
85 - **vector**: input raster filename with polygons 85 - **vector**: input shapefile filename with polygons
86 - **variable**: variable used from raster file to compute statistics 86 - **variable**: variable used from raster file to compute statistics
87 - **output**: output filename for png file containing the resulting plot. 87 - **output**: output filename for png file containing the resulting plot.
88 88
89 Optional arguments: 89 Optional arguments:
90 ~~~~~~~~~~~~~~~~~~~~~ 90 ~~~~~~~~~~~~~~~~~~~~~