¶
Installation¶
First, install the uv package manager
Next, clone the repository to your local machine, enter the project directory and use uv sync to setup the package.
git clone https://github.com/cioos-siooc/ocean-data-parser
cd ocean-data-parser
uv sync --python 3.9
This process will create a Python 3.9 virtual environment in the a .venv directory and populate it with the packages described in the pyproject.toml and uv.lock files.
Activate the new environment
Test the install
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:
For futher details see here or run the following command:
via ocean_data_parser.read.file¶
Load a compatible file with the global read.file method
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: