T_TIDE
package (Pawlowicz et al.,
2002). It results from measurements made in 1975 at Tuktoyaktuk,
Northwest Territories, Canada. The data set contains 1584 points, some of which have NA for sea-level
height.
Although Foreman's Appendix 7.2 states that times are in Mountain standard
time, the timezone is set to UTC
in the present case, so that the
results will be similar to those he provides in his Appendix 7.3.
data(sealevelTuktoyaktuk)
T_TIDE
dataset, which in turn seems
to be based on Appendix 7.2 of Foreman (1977). Minor editing was on file
format, and then the sealevelTuktoyaktuk
object was created as
follows.
# Note: the data file is not supplied with Oce.
tuk <- read.table("tuk/tuk_time_elev.dat", header=FALSE, as.is=TRUE)
time <- as.POSIXlt(strptime(tuk$V1, "%d-%b-%Y %H:%M:%S", tz="GMT"), tz="GMT")
elevation <- tuk$V2
sealevelTuktoyaktuk <- as.sealevel(elevation=elevation, time=time,
stationName="Tuktoyaktuk", region="NWT", stationNumber=6485,
longitude=-133.0292, latitude=69.43889,
year=1975, GMTOffset=0)
#save(sealevelTuktoyaktuk, file="oce/data/sealevelTuktoyaktuk.rda") Pawlowicz, Rich, Bob Beardsley, and Steve Lentz, 2002.
Classical tidal harmonic analysis including error estimates in MATLAB using T_TIDE
.
Computers and Geosciences, 28, 929-937.
sealevel-class
explains the
structure of sea-level objects, and also outlines the other functions
dealing with them.data(sealevelTuktoyaktuk)
time <- sealevelTuktoyaktuk[["time"]]
elevation <- sealevelTuktoyaktuk[["elevation"]]
oce.plot.ts(time, elevation, type='l', ylab="Height [m]", ylim=c(-2,6))
legend("topleft", legend=c("Tuktoyaktuk (1975)","Detided"),
col=c("black","red"),lwd=1)
tide <- tidem(sealevelTuktoyaktuk)
detided <- elevation - predict(tide)
lines(time, detided, col="red")
Run the code above in your browser using DataLab