Learn R Programming

oce (version 0.2-1)

ctdTrim: Trim start/end portions of a CTD cast

Description

Trim start/end portions of a CTD cast.

Usage

ctdTrim(x, method=c("downcast","index","range"), 
  inferWaterDepth=TRUE, parameters, debug=getOption("oceDebug"))

Arguments

x
A ctd object, e.g. as read by read.ctd.
method
Various methods exist, some of which use parameters: [object Object] "index"{Select values only in indicated list of indices, e.g. selection <- ctdTrim(ctd, "range", parameters = list(item="index", from=10,

Value

  • An object of class "ctd", with data having been trimmed in some way.

item

  • inferWaterDepth
  • parameters
  • debug

code

metadata$water.depth

Details

For normal CTD profiling, the goal is to isolate only the downcast, discarding measurements made in the air, in an equilibration phase in which the device is held below the water surface, and then the upcast phase that follows the downcast. This is handled reasonably well by ctdTrim with method="downcast". (The datasets provided with oce were produced this way.)

However, for detailed work it makes sense to do things semi-manually. The eye is simply better at handling exceptional cases. The process is simple: use plot.ctd.scan() to get an idea of the scan indices of the downacast, and then use ctdTrim with method="index". A few trials will normally identify the downcast very well.

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 for trimming with ctdTrim.

Examples

Run this code
library(oce)
data(ctd.raw) 
plot(ctd.raw) # barely recognizable, due to pre- and post-cast junk
plot(ctdTrim(ctd.raw)) # looks like a real profile ...
plot(ctdDecimate(ctdTrim(ctd.raw),method="boxcar")) # ... smoothed

Run the code above in your browser using DataLab