Learn R Programming

oce (version 0.9-18)

argoGrid: Grid a Argo drifter path

Description

Grid a Argo drifter, by interpolating to fixed pressure levels.

Usage

argoGrid(argo, p, debug=getOption("oceDebug"), ...)

Arguments

argo
a argo 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 "argo" 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 argo-class explains the structure of argo objects, and also outlines the other functions dealing with them.

Examples

Run this code
library(oce)
data(argo)
g <- argoGrid(argo, 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