Learn R Programming

oce (version 1.1-1)

read.adp.ad2cp: Read an AD2CP File

Description

This function may be incomplete in some important ways, because AD2CP data formats are not described clearly enough in references [1], [2] and [3] to be certain of how to handle the range of file configurations that may be possible. The code has been tested with a small number of files that are available to the author, but these do not cover some cases that users might require, e.g. involving echosounder and altimeter data streams. Please be on the lookout for problems and contact the author if you need help. Also, note that some of the standard read.adp.* arguments are handled differently with this function, e.g. by must equal 1, because skipping records makes little sense with blended multiple streams; see the “Arguments” section for other limitations that stem from the specifics of this file format.

Usage

read.adp.ad2cp(file, from = 1, to = 0, by = 1,
  tz = getOption("oceTz"), longitude = NA, latitude = NA,
  orientation, distance, plan, type, monitor = FALSE, despike = FALSE,
  processingLog, debug = getOption("oceDebug"), ...)

Arguments

file

A connection or a character string giving the name of the file to load.

from

An integer indicating the index number of the first record to read. This must equal 1, for this version of read.adp.ad2cp. (If not provided, from defaults to 1.)

to

An integer indicating the final record to read. (If not provided, by defaults to 1e9.)

by

An integer indicating the step from record to record. This must equal 1, for this version of read.adp.ad2cp. (If not provided, by defaults to 1.)

tz

Character value indicating time zone. This is used in interpreting times stored in the file.

longitude

Numerical value indicating the longitude of observation.

latitude

Numerical value indicating the latitude of observation.

orientation

Ignored by read.adp.ad2cp, and provided only for similarity to other adp-reading functions.

distance

Ignored by read.adp.ad2cp, and provided only for similarity to other adp-reading functions.

plan

Optional integer specifying which 'plan' to focus on (see [1] for the meaning of 'plan'). If this is not given, it defaults to the most common plan in the requested subset of the data.

type

Optional character value indicating the type of Nortek instrument. If this is not provided, an attempt is made to infer it from the file header (if there is one), and "Signature1000" is used, otherwise. The importance of knowing the type is for inferring the slantwise beam angle, which is usd in the conversion from beam coordinates to xyz coordinates. If type is provided, it must be one of "Signature250", "Signature500", or "Signature1000"; the first of these has a 20 degree slant-beam angle, while the others each have 20 degrees (see [2], section 2 on page 6). Note that oceSetMetadata can be used to alter the slantwise beam angle of an existing object, and this will alter any later conversion from beam to xyz coordinates.

monitor

Logical value indicating whether the progress in reading the file is to be illustrated by calling txtProgressBar.

despike

Ignored by this function, and provided only for similarity to other adp-reading functions.

processingLog

Character value that, if provided, is saved within the processingLog slot of th returned value.

debug

Integer value indicating the level of debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more.

Ignored by this function.

References

1. Nortek AS. “Signature Integration 55|250|500|1000kHz.” Nortek AS, 2017.

2. Nortek AS. “Operations Manual - Signature250, 500 and 1000.” Nortek AS, September 21, 2018.

3. Nortek AS. “Signature Integration 55|250|500|1000kHz.” Nortek AS, 2018. (This revision of [1] is useful in including new information about instrument orientation. Note that most of the comments within the read.adp.ad2cp code refer to [1], which has different page numbers than [3].)

See Also

Other things related to adp data: [[,adp-method, [[<-,adp-method, ad2cpHeaderValue, adp-class, adpEnsembleAverage, adp, as.adp, beamName, beamToXyzAdpAD2CP, beamToXyzAdp, beamToXyzAdv, beamToXyz, beamUnspreadAdp, binmapAdp, enuToOtherAdp, enuToOther, handleFlags,adp-method, is.ad2cp, plot,adp-method, read.adp.nortek, read.adp.rdi, read.adp.sontek.serial, read.adp.sontek, read.adp, read.aquadoppHR, read.aquadoppProfiler, read.aquadopp, rotateAboutZ, setFlags,adp-method, subset,adp-method, summary,adp-method, toEnuAdp, toEnu, velocityStatistics, xyzToEnuAdpAD2CP, xyzToEnuAdp, xyzToEnu

Examples

Run this code
# NOT RUN {
d <- read.adp.ad2cp("~/test.ad2cp", to=100) # or read.oce()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab