predict.tide {TideHarmonics} | R Documentation |
Predict the tide values at specified times.
## S3 method for class 'tide'
predict(object, from, to, by = NULL, split = FALSE,
which = NULL, msl = !split, ...)
object |
An object of class |
from |
Time and date from which to calculate tide values. Should be a POSIXct object or something which can be converted to a POSIXct object. If no time zone is given then UTC is assumed. |
to |
Time and date up to which to calculate tide values. Should be a POSIXct object or something which can be converted to a POSIXct object. If no time zone is given then UTC is assumed. |
by |
The time interval in hours between calculated tidal
predictions. If |
split |
If |
which |
If |
msl |
Add the mean sea-level to the predictions? A time-varying mean sea-level will be used if this has been implemented for the tidal object. |
... |
Not used. |
Note that nodal corrections and time-varying mean sea-levels will be used if and only if they were implemented for the tidal object. The longitude formulas will also be the same as those used for the tidal object.
A numeric vector of predictions (if split
is FALSE
) or
a numeric matrix of predictions (if split
is TRUE
).
hfit1 <- ftide(Hillarys$SeaLevel, Hillarys$DateTime, hc60)
hfit2 <- ftide(Hillarys$Sea, Hillarys$Date, hc7, smsl=TRUE)
t1 <- as.POSIXct("2012-12-31 23:00", tz = "UTC")
t2 <- as.POSIXct("2013-01-01 14:00", tz = "UTC")
predict(hfit1, t1, t2)
predict(hfit2, t1, t2, split = TRUE)
predict(hfit2, t1, t2, split = TRUE, which = c("M2","S2"))
predict(hfit2, t1, t2, which = "M2", msl = FALSE)