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:

The (ocean) physics of The Ocean Cleanup's System 001 2019-01-06 Introduction The Ocean Cleanup, brainchild of Dutch inventor Boyan Slat, was in the news again this past week after announcing that in addition to the fact that their system is unable to collect plastic as intended, it suffered a mechanical failure. “Wilson” is currently being towed to Hawaii, where it will undergo repairs and upgrades, presumably to be towed back out to the garbage patch for a second trial. ...
Recording and replaying plots with the `recordPlot()` function 2017-12-11 This post is not going to focus on anything oceanographic, but on a little trick that I just learned about using base graphics in R – the recordPlot() function. R plot systems First, for those who either don’t use R or who have been living under a rock, there are (in my opinion) two major paradigms for producing plots from data in R. The first is the original “base graphics” system – the sequence of functions bundled with R that are part of the graphics package which is installed and loaded by default. ...
Bootstrapping uncertainties with the boot package 2017-10-25 People often ask me what I like about R compared to other popular numerical analysis software commonly used in the oceanographic sciences (coughMatlabcough). Usually the first thing I say is the package system (including the strict rules for package design and documentation), and how easy it is to take advantage of work that others have contributed in a consistent and reproducible way. The second is usually about how the well-integrated the statistics and the statistical methods are in the various techniques. ...
Predicting tides in R 2017-04-14 This entry is actually a re-post of a great blog I found written by Marcus Beck. It was such a great summary of the tidal analysis capabilities built in to the oce package, that I thought it would make a great addition to the (growing) library of posts here. The original post can be found here, but I’ve reproduced the Rmarkdown in its entirety here with Marcus’ permission (with a few minor format tweaks). ...
Adding NOAA bottom profile to section plots 2017-04-01 I use the section-class plotting method in the oce package a lot. It’s one of the examples I really like showing to new oceanographic users of R and oce, to see the power in making quick plots from potentially very complicated data sets. A canonical example is to use the built-in data(section) dataset: library(oce) data(section) plot(section, which='temperature') Note the grey bottom profile that is automatically overlaid on the plot – the values for those points come from the individual stations in the section object, from the waterDepth metadata item in each of the stations in the section. ...
A Plain Markdown Post 2016-12-30 This is a post written in plain Markdown (*.md) instead of R Markdown (*.Rmd). The major differences are: You cannot run any R code in a plain Markdown document, whereas in an R Markdown document, you can embed R code chunks (```{r}); A plain Markdown post is rendered through Blackfriday, and an R Markdown document is compiled by rmarkdown and Pandoc. There are many differences in syntax between Blackfriday’s Markdown and Pandoc’s Markdown. ...
Using the R apply() family with oce objects 2015-09-01 Introduction In the oce package, the various different data formats are stored in consistently structured objects. In this post, I’ll explore a way to access elements of multiple oce objects using the R lapply(), from the apply family of functions. Example with a ctd object The objects always contain three fields (or “slots”): metadata, data, and processingLog. The layout of the object can be visualized using the str() command, like: ...
Hello R Markdown 2015-07-23 R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. You can embed an R code chunk like this: summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 1st Qu.: 26.00 ## Median :15.0 Median : 36.00 ## Mean :15.4 Mean : 42.98 ## 3rd Qu. ...
Lorem Ipsum 2015-01-01 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Switching from Matlab to R: Part 1 2014-01-19 Introduction I was thinking recently about how best to help someone transitioning from Matlab(TM) to R, and did my best to recall what sorts of things I struggled with when I made the switch. Though I resisted for quite a while, when I finally committed to making the change I recall that it mostly happened in a matter of weeks. It helped that my thesis supervisor exclusively used R, and we were working on code for a paper together at the time, but in the end I found that the switch was easier than I had anticipated. ...