comparison shift-longitudes.xml @ 0:5708a3a46f2e draft default tip

planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/shift-longitudes commit c1362af034361b6fb869411f1ea928388f230d72
author climate
date Thu, 25 Apr 2019 18:12:13 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5708a3a46f2e
1 <tool id="shyft_longitudes" name="shift longitudes" version="0.1.0">
2 <description>from netCDF data</description>
3 <requirements>
4 <requirement type="package" version="3.6.7">python</requirement>
5 <requirement type="package" version="1.4.1">netcdf4</requirement>
6 <requirement type="package" version="0.10.9">xarray</requirement>
7 </requirements>
8 <command detect_errors="exit_code"><![CDATA[
9 python3 '$__tool_directory__/shift_lon.py'
10 '$ifilename'
11 '$longitude'
12 '$ofilename'
13 ]]></command>
14 <inputs>
15 <param name="ifilename" type="data" format="netcdf" label="input with geographical coordinates (netCDF format)"></param>
16 <param name="longitude" type="text" value="lon" label="variable name for longitude as given in the netCDF file" />
17 </inputs>
18 <outputs>
19 <data name="ofilename" format="netcdf"></data>
20 </outputs>
21 <tests>
22 <test>
23 <param name="ifilename" value="TS.f2000.T31T31.control.cam.h0.0014-12.nc" />
24 <output name="ofilename" ftype="netcdf" file="TS.f2000.T31T31.control.cam.h0.0014-12.180.nc" compare="sim_size" delta="500"/>
25 </test>
26 <test>
27 <param name="ifilename" value="TS.f2000.T31T31.control.cam.h0.0014-12.180.nc" />
28 <output name="ofilename" ftype="netcdf" file="TS.f2000.T31T31.control.cam.h0.0014-12.180.nc" compare="sim_size" delta="500"/>
29 </test>
30 </tests>
31 <help><![CDATA[
32
33 **Shift longitudes**
34 ================================================
35
36 This tool wraps the functionality of ``shift-lon.py``.
37
38
39 .. class:: infomark
40
41 The wrapper aims at providing a simple utility to shift longitudes ranging from
42 0. and 360 degrees to -180. and 180. degrees.
43 The input file must be in netCDF format with geographical coordinates
44 (latitudes, longitudes) given in degrees.
45
46 **What it does**
47 ----------------
48
49 This tools creates a netCDF file with the same variables as the original file but
50 where longitudes range from -180. to 180.
51
52 **Usage**
53
54 ::
55
56 usage: shift-lon.py [-h] [-v] input output
57
58
59 Positional arguments:
60 ~~~~~~~~~~~~~~~~~~~~~
61
62 - **input**: input filename with geographical coordinates (netCDF format)
63 - **longitude**: variable name for longitudes as stored in netCDF file
64 - **output**: output filename for data with shifted longitudes
65
66 Optional arguments:
67 ~~~~~~~~~~~~~~~~~~~~~
68
69 -h, --help show this help message and exit
70 -v, --verbose switch on verbose mode
71
72 It uses ``xarray`` python package to generate plots. More information about
73 ``xarray`` can be found at http://xarray.pydata.org/en/stable/
74
75 ]]></help>
76 <citations>
77 </citations>
78 </tool>