read.lobo {oce}R Documentation

Read a lobo data file

Description

Read a data file created by a LOBO instrument.

Usage

read.lobo(file, cols=7, processingLog)

Arguments

file

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

cols

number of columns in dataset.

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

This version of read.lobo is really quite crude, having been developed mainly for a “predict the Spring bloom” contest at Dalhousie University. In particular, the function assumes that the data columns are exactly as specified in the Examples section; if you reorder the columns or add new ones, this function is unlikely to work correctly. Furthermore, it should be noted that the file format was inferred simply by downloading files; the supplier makes no claims that the format will be fixed in time.

It is also worth noting that there is no read.oce equivalent to read.lobo, because the file format has no recognizable header.

Value

An object of class "lobo", which has the following slots:

data

: a list containing the following vectors:

time

the times of observation

u

one horizontal component of velocity (necessarily eastward) [m/s]

v

an orthogonal component of horizontal velocity [m/s]

salinity

the salinity [PSU]

temperature

the in-situ temperature [degC]

p

the pressure [dbar]

nitrate

the nitrate concentration [unit?]

fluorescence

[unit?]

metadata

: a list containing header, the header from the data file.

processingLog

: a processingLog of processing, in the standard oce format.

Note

The oce author was unable to find a description of the data format, and so read.lobo makes some restrictive assumptions about the data format, e.g. trying to find columns whose names contain the following strings "date", "current across", "current along", "nitrate", "fluorescence", "salinity", "temperature" and "Air temperature". The data slot in the return value will be filled in with these data, or with vectors with NA values, for unfound columns.

Author(s)

Dan Kelley

Source

The file was created as given in the example.

References

http://lobo.satlantic.com and http://www.mbari.org/lobo/

See Also

The documentation for lobo-class explains the structure of LOBO objects, and also outlines the other functions dealing with them.

Examples

## Not run: 
library(oce)
uri <- paste("http://lobo.satlantic.com/cgi-bin/nph-data.cgi?",
  "min_date=20070220&max_date=20070305",
  "&x=date&",
  "y=current_across1,current_along1,nitrate,fluorescence,salinity,temperature&",
  "data_format=text",sep="")
lobo <- read.lobo(uri)

## End(Not run)

[Package oce version 0.9-18 Index]