earthtide is a port of the ‘Fortran ETERNA 3.4’ (Wenzel, 1996) predict and part of the analyze codes with the Kudryavtsev 2004 update. The original ‘Fortran’ code was rewritten in R, and C++ using the great Rcpp, RcppArmadillo, and RcppParallel. The package is useful for generating synthetic earth tides using highly accurate tidal catalogs for prediction and regression. Attempts were made to ensure that results were consistent with the ‘ETERNA 3.4’, however, there is always the possibility that a bug was introduced during the conversion and update. For the most feature rich and up-to-date version of ‘ETERNA’ please see http://ggp.bkg.bund.de/eterna/ maintained by Klaus Schueller.
The following tidal componenents are implemented in earthtide.
Tidal component | Status | Output units |
---|---|---|
tidal_potential | tested | \(meters^2/second^2\) |
gravity | tested | \(nanometers/second^2\) |
tidal_tilt | tested | \(milliarcsec\) |
vertical_displacement | tested | \(millimeter\) |
horizontal_displacement | preliminary | \(millimeter\) |
n_s_displacement | preliminary | \(millimeter\) |
e_w_displacement | preliminary | \(millimeter\) |
vertical_strain | tested | \(nanostrain\) |
areal_strain | tested | \(nanostrain\) |
volume_strain | tested | \(nanostrain\) |
horizontal_strain | tested | \(nanostrain\) |
ocean_tides | preliminary | \(millimeter\) |
To calculate a tidal component we provide the date-time in UTC, the component name from the previous table, and the latitude and longitude. For most cases these are the minimum requirements necessary. For the full list of options see the documentation for calc_earthtide.
tms <- as.POSIXct("2015-01-01", tz = "UTC") + 0:(24*31) * 3600
gravity_tide <- calc_earthtide(utc = tms,
method = 'gravity',
latitude = 52.3868,
longitude = 9.7144)
There are two main methods of generating Earth tides: predict and analyze. Predict will return the combined tidal signal, and analyze returns a set of sin and cos curves for each wave group that is specified. This option is set using the do_predict parameter which defaults to TRUE.
gravity_tide <- calc_earthtide(utc = tms,
do_predict = TRUE,
method = 'gravity',
latitude = 52.3868,
longitude = 9.7144)
In analyze mode results are separated by wave group into sin and cos curves. The resulting sin and cos curves can be used in further analysis such as least squares models. We plot the first five constituents in the following example. We specify the start and end points for each component with the wave_groups parameter.
wg <- eterna_wavegroups
wg <- na.omit(wg[wg$time=='1 month',])
tides <- calc_earthtide(utc = tms,
do_predict = FALSE,
method = 'gravity',
latitude = 52.3868,
longitude = 9.7144,
wave_groups = wg)
The choice of wave groups is important. Wave groups are specified using a data.frame of start and end values for each group. Example groupings are provided in the dataset eterna_wavegroups. The choice of the appropriate wave groups is dependent purpose of the study and the duration of the dataset to be analyzed. For example, if the goal is to generate tidal harmonics to analyze 1 month of data you would select the “1 month” dataset.
The Length of Day (LOD) and Pole tides can also be calculated. These results differ from ETERNA in that we interpolate using splines.
tide <- calc_earthtide(utc = tms,
method = c('lod_tide', 'pole_tide'),
latitude = 52.3868,
longitude = 9.7144)
There are two primary ways to increase the speed of generating the tidal datasets. In general, the speed should be as good as or better than ETERNA, given the parallel computation, however, the values chosen for astro_update and cutoff can result in sub-optimal performance. The cutoff parameter determines the number of waves used in the analysis. A larger cutoff means fewer wave will be used in the calcuation and thus results in a faster but less accurate solution. The astro_update parameter determines how often the astronomical arguments are updated. In ETERNA this value ranges from daily to yearly. The current default in the earthtide package for astro_update is 1, which means that the parameters are updated for every time, and therefore if you are predicting in hourly increments it will be updated 24 times a day. Increasing this value typically speeds up computation and in general can be larger than 1 in all but the coarsest prediction intervals.
Hartmann, T., Wenzel, H.-G., 1995. The HW95 tidal potential catalogue. Geophys. Res. Lett. 22, 3553–3556. \url(https://doi.org/10.1029/95GL03324)
Kudryavtsev, S.M., 2004. Improved harmonic development of the Earth tide-generating potential. J. Geod. 77, 829–838. \url(https://doi.org/10.1007/s00190-003-0361-2)
Wenzel, H.G. 1996: The nanogal software: Earth tide data processing package ETERNA 3.30. Bull. Inf. Marges Terrestres. 124, 9425-9439. \url(http://www.eas.slu.edu/GGP/ETERNA34/MANUAL/ETERNA33.HTM)
This package is still in development. The following changes are planned: