Blog Archives

ITS-90 temperature scale

May 9, 2015
By

Introduction Recently, oce has been gaining flexibility in terms of conductivities stored in data files. This is necessitated by the fact that RBR files store conductivity in mS/cm, whereas calculations for seawater properties use the unitless conductivity ratio. With the CTD code under examination for this work, it might make sense to also handle temperatures stored in files. The two choices for that seem...

Read more »

map projections in oce

April 2, 2015
By
map projections in oce

Introduction The latest version (4.9.0) of the PROJ.4 library is being incorporated into the development version of the oce R package. The work is not finalized yet, but I thought it might be useful to share an early version of the test suite, so people could get an idea of the upcoming capabilities. Note that some projections work quite poorly in oce at the...

Read more »

scientific notation for R/latex

March 21, 2015
By
scientific notation for R/latex

Motivation Using R within a latex document can be a component of reproducible research, offering (a) some assurance against typographical errors in transcribing results to the latex file and (b) the ability for others to reproduce the results. For example, one might like to explain how close the computed integral of the Witch of Agnesi function 1 2woa <- function(x, a=1) 8 * a^3 / (x^2 +...

Read more »

Solar eclipse

March 19, 2015
By
Solar eclipse

Introduction Today there was a solar eclipse that was not visible on my side of the Atlantic, but was seen on the European side, either as a partial eclipse, towards the south, or a total one, towards the north . Eclipses being rare and solar power being a new thing, this event caused unprecedented reduction of solar power . A good spot for viewing the...

Read more »

Assessing mapdata world coastline

January 27, 2015
By
Assessing mapdata world coastline

Introduction The mapdata R package contains a coastline called worldHires which is contained within a text file with a bit over 2 million lines. Since the coastlineWorldFine dataset in the ocedata package contains about 0.5 million points, I thought I would explore how much better the mapdata coastline might be. Methods First, I wrote the following C file to translate the...

Read more »

World Ocean Atlas changes

January 25, 2015
By
World Ocean Atlas changes

Introduction The ocedata R package has a dataset named levitus, which stores sea-surface temperature and salinity. Today, the development version of ocedata (available at github) was updated from the 2009 version of this atlas to the 2013 version. Differences between the two datasets are illustrated here. Methods The code provided below requires that the old dataset be saved into an RDA...

Read more »

solar navigation

November 9, 2014
By
solar navigation

Introduction Solar altitude is a function of time, longitude and latitude, and so it can be possible to infer location based on measuring altitude as a function of time. This form of solar navigation can be based on sunrise and sunset times, at least on non-equinox days. I have explored this for a school-based project I call “SkyView” involving light sensors and Arduino microcontrollers,...

Read more »

landsat thermal imaging

July 1, 2014
By
landsat thermal imaging

Introduction The tirs1 band of landsat-8 imagery (see ) is a near-thermal band, from which a quantity called ``brightness temperature’’ may be inferred. As explained in , the brightness temperature in Kelvin is computed with where and are stored in the image metadata, and , where again and are stored in the metadata. In this...

Read more »

Gulf Stream centre detection

June 22, 2014
By
Gulf Stream centre detection

Introduction Definitions of Gulf Stream location sometimes centre on thermal signature, but it might make sense to work with dynamic height instead. This is illustrated here, using a model for , with the distance along the transect. The idea is to select , the halfway point in the function, where the slope is maximum...

Read more »

DE solution in R (nonlinear oscillator)

June 15, 2014
By
DE solution in R (nonlinear oscillator)

Introduction The function lsoda() from the deSolve package is a handy function for solving differential equations in R. This is illustrated here with a classic example: the nonlinear oscillator. Theory As explained in any introductory Physics textbook, the nondimensionalized oscillator equation can be simplified to provided that , i.e. in the “small angle” limit. The linear form has solution for initial conditions ...

Read more »