Publications by Dan Kelley Blog/R

DE solution in R (nonlinear oscillator)

15.06.2014

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 ...

2969 sym R (1320 sym/8 pcs) 6 img 4 tbl

Gulf Stream centre detection

22.06.2014

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 and where therefore the...

1383 sym R (1631 sym/5 pcs) 2 img 2 tbl

landsat thermal imaging

01.07.2014

Introduction The tirs1 band of landsat-8 imagery (see [1]) is a near-thermal band, from which a quantity called “brightness temperature’’ may be inferred. As explained in [2], 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 last...

1913 sym R (608 sym/2 pcs) 2 img 1 tbl

solar navigation

09.11.2014

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” [1] inv...

2572 sym R (1614 sym/5 pcs) 2 img 2 tbl

World Ocean Atlas changes

25.01.2015

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 ...

1091 sym R (1536 sym/4 pcs) 12 img 2 tbl

Assessing mapdata world coastline

27.01.2015

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 follow...

1274 sym R (808 sym/2 pcs) 2 img 1 tbl

Solar eclipse

19.03.2015

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 [1]. Eclipses being rare and solar power being a new thing, this event caused unprecedented reduction of solar power [2]. A good spot for...

3039 sym R (999 sym/2 pcs) 2 img 1 tbl

scientific notation for R/latex

21.03.2015

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...

1490 sym R (1103 sym/8 pcs) 2 img 3 tbl

map projections in oce

02.04.2015

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 i...

1909 sym R (15625 sym/208 pcs) 208 img 104 tbl

ITS-90 temperature scale

09.05.2015

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 hand...

2058 sym R (370 sym/16 pcs) 6 tbl