Narwhal is a Python library built on pandas and matplotlib for manipulating and visualizing oceanographic survey data.
Cast
and CastCollection
classes make organizing and processing data more
intuitive. These can also serialize themselves as zipped JSON objects for data
storage and sharing. WOCE CTD casts in NetCDF format may be read directly.
The narwhal.plotting
submodule contains convenience methods for creating
attractive T-S diagrams, cast plots, and section plots. Here's some
data from the WOCE P17N
line, collected on a cruise by the Thomas G. Thomson.
Narwhal provides a wrapper for the
Gibbs Seawater Toolbox
in the narwhal.gsw
submodule, making things like the following possible:
density = narwhal.gsw.rho(cast["abssal"], cast["constemp"], cast["pres"])
git clone https://github.com/njwilson23/narwhal.git
pip install -r narwhal/requirements.txt
pip install narwhal
- Python 2.7+ or Python 3.2+
- pandas
- numpy
- scipy
- requests
- dateutil
- six
- karta
- matplotlib (optional; for plotting)
- C-compiler (optional; for GSW)
Narwhal is experimental. Also consider python-oceans and oce (R).