ctd.trim {oce} | R Documentation |
Trim start/end portions of a CTD cast.
ctd.trim(x, method="downcast",parameters=NULL)
x |
A ctd object, e.g. as read by read.ctd . |
method |
Various methods exist, some of which use parameters:
selection <- trim.ctd(ctd, "index", seq(10,30))
selects data points 10, 11, ... 30.scan , time , etc.) falls
in the range of values indicated by parameters . If one
parameter is given, it is a lower limit. If two parameters
are given, they are a range.
For example, ctd2 <- trim.ctd(ctd, "scan", 5)
starts at scan number 5 and continues to the end,
while ctd3 <- trim.ctd(ctd, "scan", c(5,100))
also starts at scan 5, but extends only to scan 100. |
parameters |
Depends on method; see above. |
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.
A new ctd
object.
Dan Kelley Dan.Kelley@Dal.Ca
The Seabird CTD instrument is described at http://www.seabird.com/products/spec_sheets/19plusdata.htm.
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.
library(oce) data(ctd) ctd.trimmed <- ctd.trim(ctd, "pressure", c(3, 5)) summary(ctd.trimmed)