python4oceanographers

Turning ripples into waves

Reading custom binaries

Every now and then we stumble upon some weird custom binary file containing that precious piece of data. This post show how to read the weirdest one I have see so far.

My former advisor had all his data stored in a custom binary format he called OASP (instead of ...

CTD-processing

I'm re-factoring the python-oceans module. The first step was to create another module just for the CTD tools (python-ctd)

The new module is already at PyPI and the API will remain the same as before. To install it type:

pip install ctd

Now we can import the module:

In ...

Basemap inset

This example is a modified version of the inset example from the geophysique blog.

In [2]:
import numpy as np
import numpy.ma as ma
import matplotlib.pyplot as plt
from oceans.datasets import etopo_subset

We need to import Basemap, Polygon and inset_axes:

In [3]:
from mpl_toolkits.basemap import Basemap ...

CTD2DataFrame take 2

The easiest way to obtain the ctd.py module used in previous posts is to download the source code for the oceans python module and add the python-oceans/oceans directory to your PYTHONPATH similar to what we done for the python-gsw.

To clone the repository using mercurial type:

hg clone ...

Plotting AVISO track using a kmz file

AVISO Altimetry data is available in two formats, gridded and along-track data. Sometimes the along-track data is desirable, instead of the gridded data, to augment hydrographic data. The along-track has a higher spatial and avoids the several assumptions made for the grid interpolation.

This example helps to find the nearest ...