ftide(x, dto, hcn = TideHarmonics::hc60, astlon = c("task","cartwright"),
nodal = TRUE, smsl = FALSE, span = 0.75, degree = 1, …)
x
,
which 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. No missing values are allowed.TRUE
, then a smooth curve is fitted to
the mean sea-level based on the loess function. This is
designed to account for smooth changes at periods longer
than the lowest speed harmonic, which by default is the
solar annual term Sa.lm
.c('tide','lm')
. This is exactly the
save as a standard lm
object but with the following
additional componentshcn
vector.dto
vector.smsl
is
TRUE
) or a single number (if smsl
is FALSE
).smsl
is TRUE
.Different names are used by various organizations for identical constituents. This package is designed to be robust, so that any common name can be used. In the output, the name will get converted to the set of names that we employ.
For constituents based on underlying components, we use our own
(logical) naming scheme rather than the (totally confusing)
historical scheme. See harmonics
and the package
vignette for details. Either scheme should work for the input
vector hcn
.
The UTC time zone is assumed by default. Even if a different
time zone is used, the phase lags will be calculated in UTC.
The utc
argument of coef.tide
can be used to
derive phase lags for different time zones.
An error will be produced if two specified harmonic components have virtually identical speeds (specifically, if the first five Doodson numbers are the same), even if the nodal corrections are different. This is to avoid numerical problems in the linear model fit, because these components will be difficult (or impossible) to identify separately.
The slowest harmonics in the default hc60 vector is the annual solar term Sa. If you do not have at least one year of data you should not include Sa. The fastest harmonics in hc60 have periods of just over 4 hours. If your frequency of observation is more than 2 hours you should not include the faster constituents.
harmonics
, hc114
, plot.tide
, predict.tide
hfit1 <- ftide(Hillarys$SeaLevel, Hillarys$DateTime, hc60)
hfit2 <- ftide(Hillarys$Sea, Hillarys$Date, hc7, smsl=TRUE)
hfit1
hfit2
Run the code above in your browser using DataLab