python4oceanographers

Turning ripples into waves

Simple least squares fit to study residuals

I got a question from a friend: how do I fit a function, using least-squares, to analyze the residuals. To answer that I cook this notebook up and made a post out of it ;-)

For the example I create a fake tidal signal, that we want fit and remove, added ...

SciPy 2015 sprint: pyugrid

Last week, at the SciPy conference, I had chance to sprint on the pyugrid. The pyugrid module aims to be a Python API to utilize data written using the netCDF unstructured grid conventions. Right now it support only triangular meshes, but the conventions cover any type of unstructured grids.

Let ...

Plotting an static image over an interactive map

I just read an issue at the folium issue tracker that gave me an idea. How can I hack folium's HTML to quickly test new leaflet features? Well... The answer is simple, inline modification of the HTML ;-)

I want to test the raster plotting feature. First, just to check ...

Packaging all my iris workarounds

After copying-and-pasting so many of my iris code snippets I decided to package everything in a new module: TARDIS.

Tardis is nothing more than a hackish wrapper around iris that expands some of the iris methods to work with 2D-Coords and to facilitate some of its methods calls.

Virtually everything ...

High resolution coastline

A friend asked for a nice figure for the Baía de Todos os Santos. Requests like that are always troublesome! It is hard to find high resolution datasets for the coastline for South America. They do exist, but are rarely online and, if you find someone that owns such data ...

Iris load, loads, and load_raw

Anyone that reads this blog knows that I use iris a lot. Still, every now and then I get bitten by some iris quirkiness. This post is to explain on of those quirkiness that a lot of my colleagues, myself included, like to rant about: "How to load a cube ...