read.odf {oce} | R Documentation

## Read an ODF file, producing an oce object

### Description

Read an ODF file, producing an oce object

### Usage

    read.odf(file, debug = getOption("oceDebug"))

### Arguments

`file` | the file containing the data.
`debug` | a debugging flag, 0 for none, 1 for some debugging

### Details

ODF (Ocean Data Format) is a format developed at the Bedford Institute of Oceanography and also used at other Canadian Department of Fisheries and Oceans (DFO) facilities. It can hold various types of time-series data, which includes a variety of instrument types. Thus, `read.odf` is used by `read.ctd.odf` for CTD data, etc. As of mid-2015, `read.odf` is still in development, with features being added as a project with DFO makes available more files.

Note that some elements of the metadata are particular to ODF objects, e.g. `depthMin`, `depthMax` and `sounding`, which are inferred from ODF items named `MIN_DEPTH`, `MAX_DEPTH` and `SOUNDING`, respectively. In addition, the more common metadata item `waterDepth`, which is used in `ctd` objects to refer to the total water depth, is here identical to `sounding`.

### Value

an object of class `oce`. It is up to a calling function to determine what to do with this object.

### References

Anthony W. Isenor and David Kellow, 2011. ODF Format Specification Version 2.0. (A .doc file downloaded from a now-forgotten URL by Dan Kelley, in June 2011.)

### See Also

`ODF2oce` will be an alternative to this, once (or perhaps if) a `ODF` package is released by the Canadian Department of Fisheries and Oceans.

### Examples

    library(oce)
    odf <- read.odf(system.file("extdata", "CTD_BCD2014666_008_1_DN.ODF", package="oce"))
    # Figure 1. make a CTD, and plot (with span to show NS)
    plot(as.ctd(odf), span=500, fill='lightgray')
    # show levels with bad QC flags
    subset(odf, flag!=0)
    # Figure 2. highlight bad data on TS diagram
    plotTS(odf, type='o') # use a line to show loops
    bad <- odf[["flag"]]!=0
    points(odf[['salinity']][bad],odf[['temperature']][bad],col='red',pch=20)

[Package oce version 0.9-18 Index]