as.sealevel {oce} | R Documentation |
Coerces a dataset (minimally, a sequence of times and heights) into a sealevel dataset.
as.sealevel(eta, t, header=NULL, station.number=NA, station.version=NA, station.name=NULL, region=NA, year=NA, latitude=NA, longitude=NA, GMT.offset=NA, decimation.method=NA, reference.offset=NA, reference.code=NA, sampling.interval=NA)
eta |
a list of sea-level heights in metres, in an hourly sequence. |
t |
optional list of times, in POSIXct format. If missing, the list will be constructed assuming hourly samples, starting at 0000-01-01 00:00:00. |
header |
a character string as read from first line of a standard data file. |
station.number |
three-character string giving station number. |
station.version |
single character for version of station. |
station.name |
the name of station (at most 18 characters). |
region |
the name of the region or country of station (at most 19 characters). |
year |
the year of observation. |
latitude |
the latitude in decimal degrees, positive north of the equator. |
longitude |
the longitude in decimal degrees, positive east of Greenwich. |
GMT.offset |
offset from GMT, in hours. |
decimation.method |
a coded value, with 1 meaning filtered, 2 meaning a simple average of all samples, 3 meaning spot readings, and 4 meaning some other method. |
reference.offset |
? |
reference.code |
? |
sampling.interval |
optional interval between samples, in hours; if not provided, 1 hour is assumed. |
The arguments are based on the standard data format, as described at ftp://ilikai.soest.hawaii.edu/rqds/hourly.fmt.
An object of class
"sealevel"
(for
details, see read.sealevel
).
Dan Kelley
ftp://ilikai.soest.hawaii.edu/rqds/hourly.fmt.
read.sealevel
reads data, summary.sealevel
summarizes the information. Use plot.sealevel
to
produce a summary plot, and use tidem
to fit a tidal
model to the data. Sample sea-level data sets are provided with
data(sealevel.hal)
and data(sealevel.tuk)
.
library(oce) # Construct a year of M2 tide, starting at the default time # 0000-01-01T00:00:00. h <- seq(0, 24*365) eta <- 2.0 * sin(2*pi*h/12.4172) sl <- as.sealevel(eta) summary(sl) # As above, but start at the Y2K time. t <- as.POSIXct("2000-01-01") + h * 3600 sl <- as.sealevel(eta, t) summary(sl)