Skip to contents

Download supported astronomical solutions from the web and store it in the user's cache directory. The next use of the function will load the data from the cache rather than downloading it again. This also provides a wrapper for astrochron::getLaskar() if one of their supported solutions is specified, but converts the output to a tibble. Note that we do not cache these solutions locally, however.

Usage

get_solution(
  astronomical_solution = "full-ZB18a",
  quiet = FALSE,
  force = FALSE
)

Arguments

astronomical_solution

Character vector with the name of the desired solution. Defaults to "full-ZB18a".

quiet

Be quiet?

  • If TRUE, hide info messages.

  • If FALSE (the default) print info messages and timing.

force

Force re-downloading the results, even if the solution is saved to the cache.

Value

A tibble with the astronomical solution (and some preprocessed new columns).

References

Zeebe, R. E., & Lourens, L. J. (2019). Solar System chaos and the Paleocene–Eocene boundary age constrained by geology and astronomy. Science, 365(6456), 926–929. doi:10.1126/science.aax0612 .

Zeebe, R. E. and Lourens, L. J. (2022). A deep-time dating tool for paleo-applications utilizing obliquity and precession cycles: The role of dynamical ellipticity and tidal dissipation. Paleoceanography and Paleoclimatology. doi:10.1029/2021PA004349

See also

Examples

# \donttest{
# \dontshow{
# set the cachedir to a temporary directory
pth <- withr::local_tempdir(pattern = "snvecR")
withr::local_options(snvecR.cachedir = pth)
# }
get_solution("full-ZB18a")
#>  The astronomical solution "full-ZB18a" has not been downloaded.
#>  Reading full-ZB18a.dat from website <http://www.soest.hawaii.edu/oceanography/faculty/zeebe_files/Astro/PrecTilt/OS/ZB18a/ems-plan3.dat>.
#>  Calculating helper columns.
#>  The cache directory is /home/runner/.cache/R/snvecR.
#>  Saved full-ZB18a.dat to cache.
#>  Saved cleaned-up full-ZB18a.csv to cache.
#>  Saved astronomical solution with helper columns full-ZB18a.rds to cache.
#>  Future calls to `get_solution("full-ZB18a")` will read from the cache.
#> ! If you don't want this, specify `force = TRUE`.
#> # A tibble: 250,001 × 20
#>           t  time    aa     ee   inc   lph   lan   arp   mna  lphu  lanu      hh
#>       <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>   <dbl>
#>  1        0   0    1.00 0.0167  7.15  27.3  180. -153. -2.45  27.3  180. 0.00767
#>  2  -146100  -0.4  1.00 0.0169  7.15  26.1 -180. -154.  1.27  26.1  180. 0.00742
#>  3  -292200  -0.8  1.00 0.0171  7.14  24.7 -179. -156.  5.22  24.7  181. 0.00713
#>  4  -438300  -1.2  1.00 0.0172  7.12  23.7 -179. -158.  8.75  23.7  181. 0.00690
#>  5  -584400  -1.6  1.00 0.0173  7.11  22.1 -178. -160. 12.8   22.1  182. 0.00653
#>  6  -730500  -2    1.00 0.0175  7.10  21.0 -178. -161. 16.4   21.0  182. 0.00627
#>  7  -876600  -2.4  1.00 0.0177  7.08  19.6 -178. -163. 20.3   19.6  182. 0.00594
#>  8 -1022700  -2.8  1.00 0.0178  7.06  18.5 -177. -164. 24.0   18.5  183. 0.00564
#>  9 -1168800  -3.2  1.00 0.0179  7.04  17.3 -177. -166. 27.7   17.3  183. 0.00531
#> 10 -1314900  -3.6  1.00 0.0181  7.02  15.8 -176. -168. 31.7   15.8  184. 0.00492
#> # ℹ 249,991 more rows
#> # ℹ 8 more variables: kk <dbl>, pp <dbl>, qq <dbl>, cc <dbl>, dd <dbl>,
#> #   nnx <dbl>, nny <dbl>, nnz <dbl>
get_solution("ZB20a")
#>  The astronomical solution "ZB20a" has not been downloaded.
#>  Reading ZB20a.dat from website <http://www.soest.hawaii.edu/oceanography/faculty/zeebe_files/Astro/300Myr/ZB20a.dat>.
#>  The cache directory is /home/runner/.cache/R/snvecR.
#>  Saved ZB20a.dat to cache.
#>  Saved cleaned-up ZB20a.csv to cache.
#>  Saved astronomical solution with helper columns ZB20a.rds to cache.
#>  Future calls to `get_solution("ZB20a")` will read from the cache.
#> ! If you don't want this, specify `force = TRUE`.
#> # A tibble: 187,501 × 3
#>     time    ecc   inc
#>    <dbl>  <dbl> <dbl>
#>  1   0   0.0167  7.15
#>  2  -1.6 0.0173  7.11
#>  3  -3.2 0.0179  7.04
#>  4  -4.8 0.0184  6.95
#>  5  -6.4 0.0188  6.84
#>  6  -8   0.0192  6.70
#>  7  -9.6 0.0195  6.54
#>  8 -11.2 0.0196  6.36
#>  9 -12.8 0.0196  6.16
#> 10 -14.4 0.0196  5.94
#> # ℹ 187,491 more rows
get_solution("La11")
#> Warning:  Relying on astrochron to get solution "La11"
#>  We do not cache these results.
#> ! astrochron converts time from -kyr to ka by default.
#>  * Downloading Laskar et al. (2011) astronomical solution: La2011
#> 
#>    Please cite: Laskar, J., Fienga, A., Gastineau, M., Manche, H., 2011,
#>    La2010: A new orbital solution for the long-term motion of the Earth:
#>    Astron. Astrophys., Volume 532, A89.
#>   AND:
#>    Laskar, J., Gastineau, M., Delisle, J.-B., Farres, A., Fienga, A.: 2011,
#>    Strong chaos induced by close encounters with Ceres and Vesta:
#>    Astron. Astrophys., Volume 532, L4.
#>  * Decompressing solution
#> Warning:  Output has column names "Time_ka" and "ecc_LA11"
#> # A tibble: 100,000 × 2
#>    Time_ka ecc_LA11
#>      <dbl>    <dbl>
#>  1       0   0.0167
#>  2       1   0.0172
#>  3       2   0.0175
#>  4       3   0.0178
#>  5       4   0.0182
#>  6       5   0.0185
#>  7       6   0.0187
#>  8       7   0.0189
#>  9       8   0.0192
#> 10       9   0.0193
#> # ℹ 99,990 more rows
# }