Learn R Programming

oce (version 0.1.69)

section.grid: Grid a section

Description

Grid a section, by interpolating to fixed pressure levels.

Usage

section.grid(section, p, method=c("approx","boxcar","lm"), ...)

Arguments

section
A section 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 typical spacing in the ctd profiles stored within section. If a single numerical
method
the algorithm to use for interpolation to the pressure levels; see Details below for a sketch, and see ctd.decimate for a deeper discussion.
...
optional arguments to be supplied to ctd.decimate.

Value

  • A section object.

Details

The "approx", "boxcar" and "lm" methods are described in the documentation for ctd.decimate, which is used to do this processing. The default "approx" method is best for bottle data, the "boxcar" is best for ctd data, and the "lm" method is probably too slow to recommend for exploratory work, in which it is common to do trials with a variety of "p" values.

See Also

Sections are normally created with read.section or make.section.

Examples

Run this code
# Gulf Stream
library(oce)
# File source -- http://cchdo.ucsd.edu/data_access?ExpoCode=90CT40_1
# a03 <- read.section("a03_hy1.csv")
data(a03)
a03g <- section.grid(a03, p=seq(0,2000,10))
data(coastline.world)
# Select the Gulf Stream region
plot(a03g,station.indices=seq(124,102),coastline=coastline.world,map.xlim=c(-80,-60))

Run the code above in your browser using DataLab