Greenland sunset

Welcome!

I am a physical oceanographer interested in how ocean water is mixed and transformed. I am a Research Scientist at the Bedford Institute of Oceanography in Halifax, Nova Scotia.

Recent Posts:

Fetching a Github pull request for testing 2021-06-10 One of my primary research programs is to use ocean gliders (a type of autonomous underwater sampling vehicle) to monitor ocean conditions on the Scotian Shelf near my home of Halifax, NS. As part of that work, I have been exploring ways to build a pipeline for converting the raw data into a consistently-formatted netCDF file with all the relevant data and metadata. I recently starting learning some python, with the goal of using the pyglider toolbox developed by my colleague Jody Klymak as part of his C-PROOF project. ...
A fast time series plotting function for R/oce 2021-04-13 Introduction The other day I wrote a quick post about a few tricks for speeding up plots in R, and specifically in “base” R (i.e. not ggplot). However after writing that post my brain didn’t stop thinking about it, particularly since the third solution I provided there (to just subsample the data before plotting) didn’t really sit well with me, since there’s a good chance that it could produce a plot that looks different from one made with the entire dataset, due to subsampling away the variability that gives a plot it’s “character”. ...
Speeding up plotting of large data in base R 2021-04-11 Introduction I love R (obviously). And I even love base graphics – it’s refreshingly dumb about so many things, that it means that you don’t (usually) have to fight it to get it to do what you want for a complicated plot (see e.g. legend()). The ggplot2 system is great – especially for those who find themselves adrift in the tidyverse, but in my experiments of plotting oceanographic data with ggplot I have found it to be very slow (and I’m not the only one). ...
Fitting an error function interface model to data 2021-01-26 In the spirit of continuing blog posts, this post follows from the last one: “Functions to model ocean interfaces”, in which I explored the “error function” as a nice model for a diffusive interface between two homogenous layers. Often I use these kinds of idealized interfaces for synthetic gradients, to simulate ocean sensor responses as they profile through a dynamic environment (see e.g. this recent paper by Martini et al. ...
Functions to model ocean interfaces 2021-01-24 A while ago, I found a beautiful CTD profile in our AZMP data archive, that was a nearly perfect fit to one of my favourite functions, the \(\tanh\) function: A perfect CTD profile. library(oce) ctd <- read.oce('D19002034.ODF') ## Warning in read.odf(file = file, columns = columns, exclude = exclude, debug = ## debug - : "CRAT_01" should be unitless, but the file states the unit as "S/m" so ## that is retained in the object metadata. ...
Migrating this site from Github+Jekyll to Netlify+Hugo (with the amazing blogdown package) 2020-08-30 When updating my blog last week, for the first time this year, I was reminded that while I have really liked being able to use Github pages combined with jekyll to build a free static blog/website, maintaining the jekyll dependencies and ensuring that I can locally build my site on a number of different computers/OSes has turned out to be a bit of a pain. Lately it has seemed that every time I go to make an update, something was broken and I would have to spend an hour or so Googling how to fix it, only to have to go through it all again when I updated from a different computer. ...
A new default colormap for the `oce` package 2020-08-17 Introduction A lot has happened since my last post (and really, I mean A LOT). However, in the spirit of that last post, one good thing that has happened is that in the upcoming 1.3-0 release of the oce package on CRAN we have changed the default colormap (or “palette” as it’s often referred in the R world) to something not nearly sucky as the classic “jet” colormap (originally made popular by Matlab). ...
Discrete colorbars with R and the oce package 2019-12-28 Introduction Making plots in oceanography (or anything, really) often requires creating some kind of “color map” – that is, having a color represent a field in a plot that is otherwise two-dimensional. Frequently this is done when making “image”-style plots (known in MatlabTM parlance as “pcolor” or pseudocolor plots), but could also be in coloring points on a 2D scatter plot based on a third variable (e.g. a TS plot with points colored for depth). ...
CO2 concentration at birth 2019-12-27 Introduction There is a recent trend in places like Twitter to include in your bio the atmospheric CO2 concentration when you were born. I like it, since it is both a neat measure of the range of ages of people that you can interact with (without being really about age per se), and also since it is a sobering reminder of just how much damage we as a species have done in a very short amount of time. ...
A perfect CTD profile 2019-11-14 I love the \(\tanh\) function. A lot. It’s such a perfect model for a density interface in the ocean, that it is commonly used in theoretical and numerical models and I regularly used it for both research and demonstration/example purposes. Behold, a \(\tanh\) interface: \[ T(z) = T_0 + \delta T \tanh \left( \frac{z-z_0}{dz} \right) \] T <- function(z, T0=10, dT=5, z0=-25, dz=5) T0 + dT*tanh((z - z0)/dz) z <- seq(0, -60) plot(T(z), z) But whenever I use it, especially for teaching, I’m always saying how it’s idealized and really doesn’t represent what an ocean interface actually looks like. ...