Mercurial > repos > climate > shift_longitudes
view 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 |
line wrap: on
line source
<tool id="shyft_longitudes" name="shift longitudes" version="0.1.0"> <description>from netCDF data</description> <requirements> <requirement type="package" version="3.6.7">python</requirement> <requirement type="package" version="1.4.1">netcdf4</requirement> <requirement type="package" version="0.10.9">xarray</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ python3 '$__tool_directory__/shift_lon.py' '$ifilename' '$longitude' '$ofilename' ]]></command> <inputs> <param name="ifilename" type="data" format="netcdf" label="input with geographical coordinates (netCDF format)"></param> <param name="longitude" type="text" value="lon" label="variable name for longitude as given in the netCDF file" /> </inputs> <outputs> <data name="ofilename" format="netcdf"></data> </outputs> <tests> <test> <param name="ifilename" value="TS.f2000.T31T31.control.cam.h0.0014-12.nc" /> <output name="ofilename" ftype="netcdf" file="TS.f2000.T31T31.control.cam.h0.0014-12.180.nc" compare="sim_size" delta="500"/> </test> <test> <param name="ifilename" value="TS.f2000.T31T31.control.cam.h0.0014-12.180.nc" /> <output name="ofilename" ftype="netcdf" file="TS.f2000.T31T31.control.cam.h0.0014-12.180.nc" compare="sim_size" delta="500"/> </test> </tests> <help><![CDATA[ **Shift longitudes** ================================================ This tool wraps the functionality of ``shift-lon.py``. .. class:: infomark The wrapper aims at providing a simple utility to shift longitudes ranging from 0. and 360 degrees to -180. and 180. degrees. The input file must be in netCDF format with geographical coordinates (latitudes, longitudes) given in degrees. **What it does** ---------------- This tools creates a netCDF file with the same variables as the original file but where longitudes range from -180. to 180. **Usage** :: usage: shift-lon.py [-h] [-v] input output Positional arguments: ~~~~~~~~~~~~~~~~~~~~~ - **input**: input filename with geographical coordinates (netCDF format) - **longitude**: variable name for longitudes as stored in netCDF file - **output**: output filename for data with shifted longitudes Optional arguments: ~~~~~~~~~~~~~~~~~~~~~ -h, --help show this help message and exit -v, --verbose switch on verbose mode It uses ``xarray`` python package to generate plots. More information about ``xarray`` can be found at http://xarray.pydata.org/en/stable/ ]]></help> <citations> </citations> </tool>