read.adp {oce} | R Documentation |
Read an ADP data file, producing an object of type adp
.
read.adp(file, from=0, to, by=1, type=c("rdi", "nortek", "sontek"), debug=getOption("oce.debug"), monitor=TRUE, log.action) read.adp.rdi(file, from=0, to, by=1, type=c("workhorse"), debug=getOption("oce.debug"), monitor=TRUE, log.action) read.adp.nortek(file, from=0, to, by=1, type=c("aquadopp high resolution"), debug=getOption("oce.debug"), monitor=TRUE, log.action) read.adp.sontek(file, from=0, to, by=1, type=c("adp"), withHeader=FALSE, debug=getOption("oce.debug"), monitor=TRUE, log.action)
file |
a connection or a character string giving the name of the file to load. |
from |
number of profiles to skip at start, or the POSIXt time at
which to start reading. See “Examples”, and make careful
note of the use of the tz argument. |
to |
optional number of profiles to read, or the last POSIXt time to read. |
by |
an indication of the stride length to use while walking
through the file. If this is an integer, then by-1
profiles are skipped between each pair of profiles that is read. If
this is a string representing a time interval, in colon-separated
format, then this interval is divided by the sampling interval, to
get the stride length. |
type |
a character string indicating th type of file. |
withHeader |
a boolean indicating whether the file has a proper header (NOT SUPPORTED YET) or is a partial file, chopped out into smaller time chunks with a deck unit (SUPPORTED. |
debug |
a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more. |
monitor |
boolean, set to TRUE to provide an indication
(with numbers and dots) of every profile read. |
log.action |
if provided, the action item to be stored in the log. (Typically only provided for internal calls; the default that it provides is better for normal calls by a user.) |
Reads a binary-format ADP file. Two types can be handled at
the moment: the Teledyne-RDI (2007) Workhorse instrument using
firmware version 16.28, and the NorTek Aquadopp High Resolution
profiler. read.adp
may also work on other RDI
units, but this has not been tested. It definitely does not work on
other NorTek units, because the binary format is different for each.
There are three types of element stored in the result's data
,
namely space-series, time-series, and matrix. These are contained
within lists named data$ss
, data$ts
and data$ma
,
and their contents are as follows.
ss
distance
, which
stores the distance of cells from the transducer head, in the
vertical (not slant-wise) direction.ts
time
pressure
temperature
salinity
depth.of.transducer
heading
pitch
roll
ma
v
a
q
The first index corresponds to profile number, the second index
to cell number (distance from sensor), and the third to beam
number. Objects of class rdi
typically have 4 beams, while
those of type aquadopp
have 3 beams.
In addition to the data
entry, the metadata
entry holds
general information about such things as beam geometry, etc.
An object of class
"adp"
, which
contains measurements made with an ADP device. The value of
metadata$coordinate
is set to "beam"
, a fact that is
used in other steps in processing. For information on data stored in
the object, see “Details”.
Dan Kelley
Teledyne-RDI, 2007. WorkHorse commands and output data format. P/N 957-6156-00 (November 2007).
Information on the Nortek profiler is available at http://www.nortekusa.com/. (One must join the site to see the manuals, so no citation is provided here.)
The generic function read.oce
provides an
alternative to this. An adp
object may be summarized with
summary.adp
, and plotted with plot.adp
.
Several functions are provided to manipulate adp
objects. For
example, in many research applications, the records are stored in beam
coordinates, instead of the further-processed forms such as instrument
or enu coordinates. Accordingly, adp.beam2xyz
is
provided, convert the velocity portions of adp
objects from
beam coordinates to xyz-based (also called ship-based or
instrument-based) coordinates. Similarly,
adp.xyz2enu
converts from xyz to enu
coordinates, taking into account the varying orientation of an
instrument attached to a ship or a mobile mooring. For applications
in which enu-based coordinates are not desired (e.g. if a coordinate
is to be aligned with the local coastline or a mean current),
adp.enu2other
is provided, to convert from enu
coordinates to another coordinate system.
Another convenience
function is adp.beam.attenuate
, which performs a
correction for r^2 beam spreading.
## Not run: library(oce) # A day sampled at 1/2 hour interval. Note the timezone. d <- read.oce("~/SL08F001.000", from=as.POSIXct("2008-06-26", tz="UTC"), to=as.POSIXct("2008-06-27", tz="UTC"), by="30:00") summary(d) plot(d) ## End(Not run)