read.xbt.noaa2: Read an xbt File in UBT (Universal BathyThermograph) Format

View source: R/xbt.R

read.xbt.noaa2R Documentation

Read an xbt File in UBT (Universal BathyThermograph) Format

Description

This is preliminary function that might be changed through the month of February 2025. Note that, at present, this function returns a list of xbt objects, as opposed to a single xbt object. This is because the data format holds one profile per line. Also, please note that the documentation used to frame the function (Reference 1) does not accurately describe test files (Reference 2), owing to a change of year format from the documented two-character form to a more modern 4-character form. Other aspects of the documented format are also at odds with the data (see issue 2289 on the github site for oce).

Usage

read.xbt.noaa2(
  file,
  debug = getOption("oceDebug"),
  missingValue = -9.99,
  encoding = "latin1",
  processingLog
)

Arguments

file

character value naming a file, or a file connection, containing the data, with each line corresponding to an XBT profile.

debug

a flag that turns on debugging. The value indicates the depth within the call stack to which debugging applies.

missingValue

ignored.

encoding

a character value that indicates the encoding to be used for this data file, if it is textual. The default value for most functions is "latin1", which seems to be suitable for files containing text written in English and French.

processingLog

ignored.

Value

A list containing xbt objects, one per line in file.

Author(s)

Dan Kelley

References

  1. https://www.ncei.noaa.gov/data/oceans/nodc/formats/UBT_Universal_Bathythermograph.html

  2. https://data.noaa.gov/onestop/collections/details/22c9b8d0-c32b-4824-815b-04ce80078d10

See Also

Other things related to xbt data: [[,xbt-method, [[<-,xbt-method, as.xbt(), plot,xbt-method, read.xbt(), read.xbt.noaa1(), subset,xbt-method, summary,xbt-method, xbt, xbt-class, xbt.edf, xbt2.edf

Examples

# Plot the 2 profiles in a built-in data file
library(oce)
xbts <- read.xbt.noaa2(system.file("extdata", "xbt_noaa2", package = "oce"))
par(mfrow = c(1, 2))
for (xbt in xbts) {
    summary(xbt)
    plot(xbt)
}


dankelley/oce documentation built on March 1, 2025, 6:36 p.m.