Jonathan Kennel, Beth Parker


Code background

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 Rcpp, RcppEigen, and RcppThread. 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.


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\)


The primary inputs are 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 returns 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. The first five constituents are plotted in the following example. The wave_groups parameter is specified using a data.frame having the start and end frequencies for each component.

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)

Wave grouping

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 one (1) month of data you would select the “1 month” dataset.

tms <- as.POSIXct("2015-01-01", tz = "UTC") + 0:(24*31) * 3600

wg <- eterna_wavegroups
wg <- na.omit(wg[wg$time=='1 month',])

##   name    start      end    time
## 3   MM 0.020885 0.054747 1 month
## 4   MF 0.054748 0.091348 1 month
## 5  MTM 0.091349 0.501369 1 month
## 6   Q1 0.501370 0.911390 1 month
## 7   O1 0.911391 0.947991 1 month
## 8   M1 0.947992 0.981854 1 month

LOD (length of day) tide and pole tide

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)

Speed for large datasets

The speed of generating the tidal datasets can be achieved by reducing the number of waves used. The cutoff parameter controls how many waves are used. In general, the speed should be as good as or better than the fortran version of ETERNA, given the parallel computation. The cutoff parameter determines the number of waves used in the analysis. A larger cutoff value means fewer waves will be used leading to a faster but less accurate result.


Hartmann, T., Wenzel, H.-G., 1995. The HW95 tidal potential catalogue. Geophys. Res. Lett. 22, 3553–3556. \url(

Kudryavtsev, S.M., 2004. Improved harmonic development of the Earth tide-generating potential. J. Geod. 77, 829–838. \url(

Wenzel, H.G. 1996: The nanogal software: Earth tide data processing package ETERNA 3.30. Bull. Inf. Marges Terrestres. 124, 9425-9439.


This package is still in development. The following changes are planned: