Learn R Programming

oce (version 0.1.59)

ctd.trim: Trim start/end portions of a CTD cast

Description

Trim start/end portions of a CTD cast.

Usage

ctd.trim(x, method="downcast",parameters=NULL)

Arguments

x
A ctd object, e.g. as read by read.ctd.
method
Various methods exist, some of which use parameters: "downcast"{Select only data for which the CTD is descending, as inferred from the pressure change over time} "upcast"{Reverse of "downcast" ... not too useful}
parameters
Depends on method; see above.

Value

  • A new ctd object.

Details

The code is quite straightforward, and indeed it's a good idea to check the code, if you want something more sophisticated, e.g. selecting data based on a T-S criterion. The most common use of this is to run plot.ctd.scan() together with ctd.trim, identifying by eye an initial period in which the CTD is in the air or unequilibrated in the water, and a final period in which the CTD is no longer descending.

References

The Seabird CTD instrument is described at http://www.seabird.com/products/spec_sheets/19plusdata.htm.

See Also

The ctd object may be read with read.ctd. plot.ctd.scan is very useful in providing guidance in how to trim; it is common practice to plot a scan first, then to trim by scan.

Examples

Run this code
library(oce)
data(ctd) 
ctd.trimmed <- ctd.trim(ctd, "pressure", c(3, 5))
summary(ctd.trimmed)

Run the code above in your browser using DataLab