My ooilab Python Toolbox

2 years of temperature and salinity data from 30m at Irminger Sea Flanking Mooring B showing the annual cycle.

Data portals are great for navigating and finding useful datasets. But sometimes, the easiest way to access data is with a bit of code, especially when you want to make your own graphs or do a bit of custom processing (like the above example).

For about 3 years, I’ve been using Python notebooks to grab data from the OOI, and every time I start a new notebook, I find myself copying the same 90 lines of code that I use to request and download data from the OOI. But now, I’ve finally gotten around to making my own python library so my new notebooks will be much shorter. It turns out, it’s not that difficult to make a library, but for a year I was confused by eggs and wheels (it’s long story), before Tom Connolly at Cal State showed me a much simpler approach.

And so now I’m pleased to present ooilab, my (very simple, and probably not that robust) library to request and download data from the OOI Data Portal (aka OOI Net).

You can find more information about the library on its GitHub page.  And you can check out the example below for a quick introduction on how to use it.

I should note that the OOI recently released the OOI Data Explorer, a wonderful new tool for previewing and accessing OOI data. (The demo webinar is a great intro.)

The new site includes merged and averaged datasets that are also available via Erddap, which makes it far easier to access data than ever before. However, several moorings are not yet available on the new portal, and under the hood the new system still uses the old data system to generate its data products. So if you want the highest-resolution data, or if you need to splice together telemetered and recovered streams using your own method, grabbing the data yourself via a bit of code from OOINet might still be the better option for the foreseeable future.

And with this new library, that will hopefully be a bit easier.