Learn R Programming

oce (version 0.9-18)

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, tz=getOption("oceTz"), 
              processingLog, debug=getOption("oceDebug"))

Arguments

file
a connection or a character string giving the name of the file to load. See Details for the types of files that are recognized.
tz
time zone. The default value, oceTz, is set to UTC at setup. (If a time zone is present in the file header, this will supercede the value given here.)
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.)
debug
set to TRUE to get debugging information during processing.

Value

  • An object of class "sealevel", which is a list containing
  • data: a list containing [object Object],[object Object]
  • metadata: a list containing [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
  • processingLog: a log of processing, in the standard oce format.

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: type 1, the format used at the Hawaii archive centre, and type 2, the comma-separated-value format used by the Marine Environmental Data Service. (The file type is inferred by checking for the existence of the string Station_Name on the first line of the file, indicating type 2.) If the file is in neither of these formats, the user might wish to scan it directly, and then to use as.sealevel to create a sealevel object.

References

The Hawaii archive site at http://ilikai.soest.hawaii.edu/uhslc/datai.html provides a graphical interface for downloading sealevel data in Type 1, with format as described at http://ilikai.soest.hawaii.edu/rqds/hourly.fmt (this link worked for years but failed at least temporarily on December 4, 2016). The MEDS repository (http://www.isdm-gdsi.gc.ca/isdm-gdsi/index-eng.html) provides Type 2 data.

See Also

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

Examples

Run this code
library(oce)
# this yields the sealevel dataset
sl <- read.oce("h275a96.dat")
summary(sl)
plot(sl)
m <- tidem(sl)
plot(m)

Run the code above in your browser using DataLab