Learn R Programming

oce (version 0.9-18)

adp-class: Class to Hold adp (adcp) Data

Description

This class stores data from acoustic Doppler profilers. Some manufacturers call these ADCPs, while others call them ADPs; here the shorter form is used by analogy to ADVs.

Arguments

methods

Extracting values Matrix data may be accessed as illustrated above, e.g. or an adp object named adv, the data are provided by adp[["v"]], adp[["a"]], and adp[["q"]]. As a convenience, the last two of these can be accessed as numeric (as opposed to raw) values by e.g. adp[["a", "numeric"]]. The vectors are accessed in a similar way, e.g. adp[["heading"]], etc. Quantities in the metadata slot are also available by name, e.g. adp[["velocityResolution"]], etc.

Assigning values. This follows the standard form, e.g. to increase all velocity data by 1 cm/s, use adp[["v"]] <- 0.01 + adp[["v"]].

Overview of contents The show method (e.g. show(d)) displays information about an ADP object named d.

Dealing with suspect data

There are many possibilities for confusion with adp devices, owing partly to the flexibility that manufacturers provide in the setup. Prudent users will undertake many tests before trusting the details of the data. Are mean currents in the expected direction, and of the expected magnitude, based on other observations or physical constraints? Is the phasing of currents as expected? If the signals are suspect, could an incorrect scale account for it? Could the transformation matrix be incorrect? Might the data have exceeded the maximum value, and then ``wrapped around'' to smaller values? Time spent on building confidence in data quality is seldom time wasted.

References

1. Teledyne-RDI, 2007. WorkHorse commands and output data format. P/N 957-6156-00 (November 2007).

2. Teledyne-RDI, 2012. VmDas User's Guide, Ver. 1.46.5.

Details

The metadata slot contains various items relating to the dataset, including source file name, sampling rate, velocity resolution, velocity maximum value, and so on. Some of these are particular to particular instrument types, and prudent researchers will take a moment to examine the whole contents of the metadata, either in summary form (with str(adp[["metadata"]])) or in detail (with adp[["metadata"]]). Perhaps the most useful general properties are adp[["bin1Distance"]] (the distance, in metres, from the sensor to the bottom of the first bin), adp[["cellSize"]] (the cell height, in metres, in the vertical direction, not along the beam), and adp[["beamAngle"]] (the angle, in degrees, between beams and an imaginary centre line that bisects all beam pairs).

The diagram provided below indicates the coordinate-axis and beam-numbering conventions for three- and four-beam ADP devices, viewed as though the reader were looking towards the beams being emitted from the transducers.

html{

adp_beams.png
{options: width=400px alt="Figure: adp_beams.png"}} The bin geometry of a four-beam profiler is illustrated below, for adp[["beamAngle"]] equal to 20 degrees, adp[["bin1Distance"]] equal to 2m, and adp[["cellSize"]] equal to 1m. In the diagram, the viewer is in the plane containing two beams that are not shown, so the two visible beams are separated by 40 degrees. Circles indicate the centres of the range-gated bins within the beams. The lines enclosing those circles indicate the coverage of beams that spread plus and minus 2.5 degrees from their centreline. html{
adpgeometry2.png
{options: width=400px alt="Figure: adpgeometry2.png"}}

Note that adp[["oceCoordinate"]] stores the present coordinate system of the object, and it has possible values "beam", "xyz" or "enu". (This should not be confused with adp[["originalCoordinate"]], which stores the coordinate system used in the original data file.)

The data slot holds some standardized items, and many that vary from instrument to instrument. One standard item is adp[["v"]], a three-dimensional numeric matrix of velocities in m/s. In this matrix, the first index indicates time, the second bin number, and the third beam number. The meanings of the beams depends on whether the object is in beam coordinates, frame coordinates, or earth coordinates. Corresponding to the velocity matrix are two matrices of type raw, and identical dimension, accessed by adp[["a"]] and adp[["q"]], holding measures of signal strength and data quality quality, respectively. (The exact meanings of these depend on the particular type of instrument, and it is assumed that users will be familiar enough with instruments to know both the meanings and their practical consequences in terms of data-quality assessment, etc.)

In addition to the matrices, there are time-based vectors. The vector adp[["time"]] (of length equal to the first index of adp[["v"]], etc.) holds times of observation. Depending on type of instrument and its configuration, there may also be corresponding vectors for sound speed (adp[["soundSpeed"]]), pressure (adp[["pressure"]]), temperature (adp[["temperature"]]), heading (adp[["heading"]]) pitch (adp[["pitch"]]), and roll (adp[["roll"]]), depending on the setup of the instrument.

The precise meanings of the data items depend on the instrument type. All instruments have v (for velocity), q (for a measure of data quality) and a (for a measure of backscatter amplitude, also called echo intensity). Teledyne-RDI profilers have an additional item g (for percent-good). VmDas-equiped Teledyne-RDI profilers additional navigation data, with details listed in the table below; note that the RDI documentation [2] and the RDI gui use inconsistent names for most items.

lll{ Oce name RDI doc name RDI GUI name avgSpeed Avg Speed Speed/Avg/Mag avgMagnitudeVelocityEast Avg Mag Vel East ? avgMagnitudeVelocityNorth Avg Mag Vel North ? avgTrackMagnetic Avg Track Magnetic Speed/Avg/Dir (?) avgTrackTrue Avg Track True Speed/Avg/Dir (?) avgTrueVelocityEast Avg True Vel East ? avgTrueVelocityNorth Avg True Vel North ? directionMadeGood Direction Made Good Speed/Made Good/Dir firstLatitude First latitude Start Lat firstLongitude First longitude Start Lon firstTime UTC Time of last fix End Time lastLatitude Last latitude End Lat lastLongitude Last longitude End Lon lastTime UTC Time of last fix End Time numberOfHeadingSamplesAveraged Number heading samples averaged ? numberOfMagneticTrackSamplesAveraged Number of magnetic track samples averaged ? numberOfPitchRollSamplesAvg Number of magnetic track samples averaged ? numberOfSpeedSamplesAveraged Number of speed samples averaged ? numberOfTrueTrackSamplesAvg Number of true track samples averaged ? primaryFlags Primary Flags ? shipHeading Heading ? shipPitch Pitch ? shipRoll Roll ? speedMadeGood Speed Made Good Speed/Made Good/Mag speedMadeGoodEast Speed MG East ? speedMadeGoodNorth Speed MG North ? }

For Teledyne-RDI profilers, there are four three-dimensional arrays holding beamwise data. In these, the first index indicates time, the second bin number, and the third beam number (or coordinate number, for data in xyz, enu or other coordinate systems). In the list below, the quoted phrases are quantities as defined in Figure 9 of reference 1.

  • vis ``velocity'' in m/s, inferred from two-byte signed integer values (multiplied by the scale factor that is stored invelocityScalein the metadata).
  • qis ``correlation magnitude'' a one-byte quantity stored as typerawin the object. The values may range from 0 to 255.
  • ais ``backscatter amplitude``, also known as ``echo intensity'' a one-byte quantity stored as typerawin the object. The values may range from 0 to 255.
  • gis ``percent good'' a one-byte quantity stored asrawin the object. The values may range from 0 to 100.

Finally, there is a vector adp[["distance"]] that indicates the bin distances from the sensor, measured in metres along an imaginary centre line bisecting beam pairs. The length of this vector equals dim(adp[["v"]])[2].

The processingLog slot is in standard form and needs little comment.

See Also

A file containing ADP data is usually recognized by Oce, and so read.oce will usually read the data. If not, one may use the general ADP function read.adp or specialized variants read.adp.rdi, read.adp.nortek or read.adp.sontek or read.adp.sontek.serial.

ADP data may be plotted with plot.adp function, which is a generic function so it may be called simply as plot.

Statistical summaries of ADP data are provided by the generic function summary, while briefer overviews are provided with show.

Conversion from beam to xyz coordinates may be done with beamToXyzAdp, and from xyz to enu (east north up) may be done with xyzToEnuAdp. toEnuAdp may be used to transfer either beam or xyz to enu. Enu may be converted to other coordinates (e.g. aligned with a coastline) with enuToOtherAdp.