Learn R Programming

oce (version 0.9-17)

drifterGrid: Grid a drifter

Description

Grid a drifter, by interpolating to fixed pressure levels.

Usage

drifterGrid(drifter, p, debug=getOption("oceDebug"), ...)

Arguments

drifter
a drifter object to be gridded.
p
optional indication of the pressure levels to which interpolation should be done. If this is not supplied, the pressure levels will be calculated based on the existing values, using medians. If p="levitus", then pressures w
debug
a flag that turns on debugging. Higher values provide deeper debugging.
...
optional arguments to approx, which is used to do the gridding.

Value

  • An object of class "drifter" that contains a pressure matrix with constant values along the first index.

Details

The gridding is done with approx. If there is sufficient user demand, other methods may be added, by analogy to sectionGrid.

See Also

The documentation for drifter-class explains the structure of drifter objects, and also outlines the other functions dealing with them.

Examples

Run this code
library(oce)
data(drifter)
g <- drifterGrid(drifter, p=seq(0, 100, 1))
par(mfrow=c(2,1))
t <- g[["time"]]
z <- -g[["pressure"]][,1]
## Set zlim because of spurious temperatures.
imagep(t, z, t(g[['temperature']]), ylim=c(-100,0), zlim=c(0,20))
imagep(t, z, t(g[['salinity']]), ylim=c(-100,0))

Run the code above in your browser using DataLab