You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Python toolbox for handling ODV ascii format from OceanDataView adopted by SeaDataNet.
Please also see our Matlabtoolbox ODV for ODV files.

Getting the toolbox

The free and open source python ODV toolbox can be downloaded from https://svn.oss.deltares.nl/repos/openearthtools/trunk/python/OpenEarthTools/openearthtools/io/pyodv/ when you join openearth, download the tools with SubVersion and add them to your python path.

ODV file loading, merging and parsing

For setting up WPS for remote processing of collections of ODV files a python io library pyodv has been created. Please also see our MATLAB toolbox ODV for ODV files.

ODV      = pyodv.odv2df('test01.txt')

The Odv object can be inspected with

print(ODV)

ODV plotting

The ODV object can be viewed as html ODV.html() or as formatted command line text print(ODV). More advanced views are available for trajectory data as png and kmx images

pyodv.odv2map   ('test01.png',ODV,variable,clims,colormap)
pyodv.odv2mapkmz('test01.kmz',ODV,variable,clims,colormap)

where odvpar is the name of an ODV column, clims are the colorlimits and colormap is a Matplotlib colormap.

For vertical profile data

pyodv.odv2profile('test01.png',ODV,variable_name,z_variable_name,clims)

pydov as WPS

On our test server we host pyodv with some server-side datafiles as WPS. On the server the pyodv WPS wrappers are hosted here

/var/lib/wsgi/wps/processes

and the WPS can be accessed via

http://dtvirt5.deltares.nl/wps?Request=GetCapabilities&Service=WPS

The WPS wrappers have the same name as the pydov functions

wps:ProcessOfferings>

<wps:Process wps:processVersion="$$">
<ows:Identifier>odv2map</ows:Identifier>
<ows:Title>OceanDataView Process</ows:Title>
<ows:Abstract>odv2map returns a planview plot of a remote ODV file or folder as png and kmz</ows:Abstract></wps:Process>

<wps:Process wps:processVersion="$$">
<ows:Identifier>odv2profile</ows:Identifier>
<ows:Title>OceanDataView Process</ows:Title>
<ows:Abstract>odv2profile returns a scatter/profile plot of one parameter from a remote ODV file as png</ows:Abstract></wps:Process>

<wps:Process wps:processVersion="$$">
<ows:Identifier>odvGetParameters</ows:Identifier>
<ows:Title>OceanDataView Process</ows:Title>
<ows:Abstract>odvGetParameters returns the contents of a remote ODV file as html</ows:Abstract>
</wps:Process>
  • No labels