section.grid {oce}R Documentation

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 object containing the 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 value is provided, it is taken as a step for a seq() running from 0 to the maximum pressure (rounded to that step). If p="levitus", then the levels of the Levitus atlas are used. If a list of numerical values is provided, then it is used as is.
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.

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.

Value

An object of class "section" that contains stations whose pressure values match identically.

Author(s)

Dan Kelley

See Also

Sections are normally created with read.section or make.section. subset may be used to create a new section consisting of just a subset of an existing station, e.g. to focus on a particular region.

Examples

# Gulf Stream
library(oce)
# File source -- http://cchdo.ucsd.edu/data_access?ExpoCode=90CT40_1
# a03 <- read.section("a03_hy1.csv")
data(a03)
Gulf.Stream <- subset(a03, indices=124:102)
Gulf.Stream.gridded <- section.grid(Gulf.Stream, p=seq(0, 5000, 100))
data(coastline.world)
plot(Gulf.Stream.gridded, coastline=coastline.world, map.xlim=c(-80,-60))

[Package oce version 0.1-76 Index]