Learn R Programming

oce (version 0.1.67)

read.sealevel: Read a sea-level data file

Description

Read a data file holding sea level data. BUG: the time vector assumes GMT, regardless of the GMT.offset value.

Usage

read.sealevel(file, debug=FALSE)

Arguments

file
A connection or a character string giving the name of the file to load.
debug
Set to TRUE to get debugging information during processing.

Value

  • A sealevel object containing
  • headerThe header line (helpful if detail extraction failed)
  • station.numberidentifier for the station.
  • station.versionsee online docs at site mentioned in References.
  • station.namename of station
  • regiona region code.
  • yearyear in which the observations were made.
  • latitudelatitude, decimal degrees, positive north of equator.
  • longitudelongitude, decimal degrees, positive east of Greenwich.
  • GMT.offsetoffset from GMT time.
  • decimation.methodsee online docs at site mentioned in References.
  • reference.offseta reference offset; see online docs at site mentioned in References.
  • reference.codea reference code; see online docs at site mentioned in References.
  • unitsunit of observations (normally "MM")
  • nnumber of observations
  • dataa list containing t, times of observations and eta, the sealevel observations, in units units (normally, mm)
  • processing.loga processing log.

Details

This function starts by scanning the first line of the file, from which it determines whether the file is in one of two known formats: the tabular format used at the Hawaii archive centre, or the comma-separated-value format used by the Marine Environmental Data Service. If the file is in neither of these known formats, the user might wish to scan the data by some other means, and then to use as.sealevel to create the sealevel object.

References

The Hawaii archive site at http://ilikai.soest.hawaii.edu/uhslc/datai.html provides a graphical interface for downloading sealevel data; the format is described at ftp://ilikai.soest.hawaii.edu/rqds/hourly.fmt. The MEDS data are at http://www.meds-sdmm.dfo-mpo.gc.ca/meds/Databases/TWL/TWL_inventory_e.htm.

See Also

The generic function read.oce provides an alternative to this. A sealevel object may be summarized with summary.sealevel and plotted with plot.sealevel.

A sealevel object can also be constructed with as.sealevel.

Examples

Run this code
library(oce)
h <- read.sealevel("ftp://ilikai.soest.hawaii.edu/rqds/pacific/monthly/m652a.dat")
summary(h)
plot(h)

Run the code above in your browser using DataLab