read.section {oce} | R Documentation

## Read a section containing multiple CTD profiles

### Description

Read a file that contains a series of `ctd` profiles that make up an oceanographic section.

### Usage

    read.section(file, directory, sectionId="", flags,
                 ship="", scientist="", institute="",
                 missingValue=-999,
                 debug=getOption("oceDebug"), processingLog)

### Arguments

`file` | a file containing a set of CTD observations. At present, only the exchange BOT format is accepted (see Details).
`directory` | a directory that contains a set of CTD files that hold individual stations in the section.
`sectionId` | optional string indicating the name for the section. If not provided, the section ID is determined by examination of the file header.
`ship` | name of the ship carrying out the sampling
`scientist` | name of chief scientist aboard ship
`institute` | name of chief scientist's institute

`flags`

optional list of salinity-quality flags that will be demanded of the salinity data. If not given, an appropriate flag will be chosen based on the data type. For example, for WOCE data, any data with salinity flag not equal to 2 will be rejected. `read.section` tries to use the salinity from the CTD (with WOCE header name `CTDSAL`), but if its flag is unacceptable, the function tries `SALNTY` (yes, that is the spelling!) instead. But if neither has an acceptable flag, the datum will not be read.

`missingValue` | numerical value used to indicate missing data
`debug` | logical. If `TRUE`, print some information that might be helpful during debugging.
`processingLog` | 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.)

### Details

Only exchange BOT comma-separated value format is permitted at this time, but other formats may be added later. It should also be noted that the parsing scheme was developed after inspection of the A03 data set (see Examples). This may cause problems if the format is not universal. For example, the header must name the salinity column "`CTDSAL`"; if not, salinity values will not be read from the file.

### Value

An object of class `section-class`.

### Author(s)

Dan Kelley

### References

Several repository sites provide section data. An example that is perhaps likely to exist for years is http://cchdo.ucsd.edu, but a search on `"WOCE bottle data"` should turn up other sites, if this one ceases to exist. Only the so-called exchange BOT data format can be processed by read.section() at this time.

### See Also

Sections can also be created with `as.section`. The documentation for `section-class` explains the structure of section objects, and outlines other functions dealing with them.

[Package oce version 0.9-18 Index]