Skip to content
CIOOS

Ocean Data Parser

A python tool to parse common ocean data proprietary formats.

Get started Go to GitHub

Compatibility

Compatible with a number of broadly used proprietary formats

Standards

Follow common metadata standards: CF, ACDD, IOOS, etc

Integration

Seamless Integration with xarray and command line interface available

Documentation

Notebook examples and api documentation available

Installation

Install the package in a local environment via the following command:

pip install git+https://github.com/cioos-siooc/ocean-data-parser.git

How to

via Command Line Interface odpy

Once installed, the package is usable via the command line interface via the odpy command. As an example to convert a series of cnv files to netcdf, you can use the following command:

odpy convert -i '**/*.cnv'

For futher details see here or run the following command:

odpy --help 

via ocean_data_parser.read.file

Load a compatible file with the global read.file method

from ocean_data_parser import read
from ocean_data_parser import read

# Load a file to an xarray object
ds = read.file('Path to file')

# Save to netcdf
ds.to_netcdf('save-path.nc')

via from ocean_data_parser.parsers import ...

Or specify the specific parser to use for this file format:

from ocean_data_parser.parsers import ...
from ocean_data_parser.parsers import seabird

# Load a seabird cnv file as an xarray dataset
ds = seabird.cnv('Path to seabird cnv file')

# Save to netcdf
ds.to_netcdf('save-path.nc')