Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2753ac3

Browse files
author
Ilja J. Kocken
committed
docs updates
1 parent5580f15 commit2753ac3

17 files changed

+211
-140
lines changed

‎CITATION.cff‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repository-code: 'https://github.com/japhir/snvecR'
2626
url:'https://japhir.github.io/snvecR/'
2727
repository-artifact:'https://zenodo.org/record/7865280'
2828
abstract:>-
29-
Easily calculate precession and obliquity from an astronomical solution (defaults to ZB18a from Zeebe and Lourens (2019)) and assumed or reconstructed values fortidal dissipation (Td) anddynamical ellipticity (Ed). This is a translation and adaptation of the 'C'-code in the supplementary material to Zeebe and Lourens (2022), with further details on the methodology described in Zeebe (2022). The name of the 'C'-routine is 'snvec', which refers to the key units of computation: spin vector s and orbit normal vector n.
29+
Easily calculate precession and obliquity from an astronomical solution (defaults to ZB18a from Zeebe and Lourens (2019)) and assumed or reconstructed values fordynamical ellipticity (Ed) andtidal dissipation (Td). This is a translation and adaptation of the 'C'-code in the supplementary material to Zeebe and Lourens (2022), with further details on the methodology described in Zeebe (2022). The name of the 'C'-routine is 'snvec', which refers to the key units of computation: spin vector s and orbit normal vector n.
3030
keywords:
3131
-orbital forcing
3232
-precession

‎DESCRIPTION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Authors@R:
77
person("Richard", "Zeebe", , "zeebe@soest.hawaii.edu", role = c("aut"),
88
comment = c(ORCID = "0000-0003-0806-8387"))
99
)
10-
Description: Easily calculate precession and obliquity from an orbital solution (defaults to ZB18a from Zeebe and Lourens (2019) <doi:10.1126/science.aax0612>) and assumed or reconstructed values fortidal dissipation (Td) anddynamical ellipticity (Ed). This is a translation and adaptation of the 'C'-code in the supplementary material to Zeebe and Lourens (2022) <doi:10.1029/2021PA004349>, with further details on the methodology described in Zeebe (2022) <doi:10.3847/1538-3881/ac80f8>. The name of the 'C'-routine is 'snvec', which refers to the key units of computation: spin vector s and orbit normal vector n.
10+
Description: Easily calculate precession and obliquity from an orbital solution (defaults to ZB18a from Zeebe and Lourens (2019) <doi:10.1126/science.aax0612>) and assumed or reconstructed values fordynamical ellipticity (Ed) andtidal dissipation (Td). This is a translation and adaptation of the 'C'-code in the supplementary material to Zeebe and Lourens (2022) <doi:10.1029/2021PA004349>, with further details on the methodology described in Zeebe (2022) <doi:10.3847/1538-3881/ac80f8>. The name of the 'C'-routine is 'snvec', which refers to the key units of computation: spin vector s and orbit normal vector n.
1111
License: GPL (>= 3)
1212
Encoding: UTF-8
1313
Roxygen: list(markdown = TRUE)

‎R/data.R‎

Lines changed: 72 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,50 @@
11
# document the astronomical solutions
22
# we cache them locally, so I document them with @name and return type NULL.
33

4-
#' Full Astronomical Solution ZB18a for the past 100 Myr
4+
#' Full Astronomical Solution ZB18a
55
#'
6-
#' The HNBody output of Zeebe & Lourens (2019) after some pre-processing using
6+
#' The full ZB18a solution spans the past 100 Myr.
7+
#' It contains the HNBody output of Zeebe & Lourens (2019) after some pre-processing using
78
#' [prepare_solution()]. The wikipedia page on [Orbital
89
#' elements](https://en.wikipedia.org/wiki/Orbital_elements) describes what the
9-
#' components relate to in order to uniquely specify an orbital plane. The
10-
#' function asks to download the files to the user's cache directory so that
11-
#' they can be accessed more quickly in the future.
10+
#' components relate to in order to uniquely specify an orbital plane.
1211
#'
1312
#' @format ## `get_solution("full-ZB18a")`
1413
#' A data frame with 250,001 rows and 20 columns:
1514
#' \describe{
16-
#' \item{t}{Time \eqn{t} (days).}
15+
#' \item{t}{Time \eqn{t}{t} (days).}
1716
#' \item{time}{Time in thousands of years (kyr).}
18-
#' \item{aa}{Semimajor axis \eqn{a} in astronomical units (au).}
19-
#' \item{ee}{Eccentricity \eqn{e} (unitless).}
20-
#' \item{inc}{Inclination \eqn{I} (degrees).}
21-
#' \item{lph}{Longitude of perihelion \eqn{\varpi} (degrees).}
22-
#' \item{lan}{Longitude of the ascending node \eqn{\Omega} (degrees).}
23-
#' \item{arp}{Argument of perihelion \eqn{\omega} (degrees).}
24-
#' \item{mna}{Mean anomaly \eqn{M} (degrees).}
17+
#' \item{aa}{Semimajor axis \eqn{a}{a} in astronomical units (au).}
18+
#' \item{ee}{Eccentricity \eqn{e}{e} (unitless).}
19+
#' \item{inc}{Inclination \eqn{I}{I} (degrees).}
20+
#' \item{lph}{Longitude of perihelion \eqn{\varpi}{varpi} (degrees).}
21+
#' \item{lan}{Longitude of the ascending node \eqn{\Omega}{Omega} (degrees).}
22+
#' \item{arp}{Argument of perihelion \eqn{\omega}{omega} (degrees).}
23+
#' \item{mna}{Mean anomaly \eqn{M}{M} (degrees).}
2524
#'
2625
#' The following columns were computed from the above input with [prepare_solution()]:
2726
#'
28-
#' \item{lphu}{Unwrapped longitude of perihelion \eqn{\varpi} (degrees without
29-
#' jumps).}
27+
#' \item{lphu}{Unwrapped longitude of perihelion \eqn{\varpi}{varpi} (degrees
28+
#'withoutjumps).}
3029
#'
31-
#' \item{lanu}{Unwrapped longitude of the ascending node \eqn{\Omega}
30+
#' \item{lanu}{Unwrapped longitude of the ascending node \eqn{\Omega}{Omega}
3231
#' (degrees without jumps).}
3332
#'
34-
#' \item{hh}{Variable: \eqn{e\sin(\varpi)}{ee *sin(lph / R2D)}.}
33+
#' \item{hh}{Variable: \eqn{e\sin(\varpi)}{esin(lph)}.}
3534
#'
36-
#' \item{kk}{Variable: \eqn{e\cos(\varpi)}{ee *cos(lph / R2D)}.}
35+
#' \item{kk}{Variable: \eqn{e\cos(\varpi)}{ecos(lph)}.}
3736
#'
38-
#' \item{pp}{Variable: \eqn{2\sin(0.5I)\sin(\Omega)}{2*sin(0.5* inc / R2D) *
39-
#' sin(lan / R2D)}.}
37+
#' \item{pp}{Variable: \eqn{2\sin(0.5I)\sin(\Omega)}{2 sin(0.5I)
38+
#' sin(Omega)}.}
4039
#'
41-
#' \item{qq}{Variable: \eqn{2\sin(0.5I)\cos(\Omega)}{2*sin(0.5*inc / R2D) *
42-
#' cos(lan / R2D)}.}
40+
#' \item{qq}{Variable: \eqn{2\sin(0.5I)\cos(\Omega)}{2 sin(0.5 inc) *
41+
#' cos(Omega)}.}
4342
#'
44-
#' \item{cc}{Helper: \eqn{\cos(I)}{cos(inc / R2D)}.}
43+
#' \item{cc}{Helper: \eqn{\cos(I)}{cos(I)}.}
4544
#'
46-
#' \item{dd}{Helper: \eqn{\cos(I)/2}{cos(inc /R2D / 2)}.}
45+
#' \item{dd}{Helper: \eqn{\cos(I)/2}{cos(I) /2}.}
4746
#'
48-
#' \item{nnx, nny, nnz}{The \eqn{x}, \eqn{y}, and \eqn{z}-components of the
47+
#' \item{nnx, nny, nnz}{The \eqn{x}{x}, \eqn{y}{y}, and \eqn{z}{z}-components of the
4948
#' Eart's orbit unit normal vector \eqn{\vec{n}}{n}, normal to Earth's
5049
#' instantaneous orbital plane.}
5150
# HCI = heliocentric inertial
@@ -76,14 +75,19 @@
7675
#' @aliases full-ZB18a
7776
NULL
7877

79-
#' Astronomical Solutions ZB17 for the past 100 Myr
78+
#' Astronomical Solutions ZB17
79+
#'
80+
#' The ZB17x eccentricity solutions span the past 100 Myr.
81+
#' Available solutions include `"ZB17a"`, `"ZB17b"`, `"ZB17c"`, `"ZB17d"`,
82+
#' `"ZB17e"`, `"ZB17f"`, `"ZB17h"`, `"ZB17i"`, `"ZB17j"`, `"ZB17k"`, and
83+
#' `"ZB17p"`.
8084
#'
8185
#' @format ## `get_solution("ZB17x")`
8286
#' A data frame with 62,501 rows and 3 columns:
8387
#' \describe{
8488
#' \item{time}{Time in thousands of years (kyr).}
85-
#' \item{ecc}{Eccentricity \eqn{e} (unitless).}
86-
#' \item{inc}{Inclination \eqn{I} (degrees).}
89+
#' \item{ecc}{Eccentricity \eqn{e}{e} (unitless).}
90+
#' \item{inc}{Inclination \eqn{I}{I} (degrees).}
8791
#' }
8892
#' @inherit full_ZB18a source
8993
#' @references
@@ -94,14 +98,17 @@ NULL
9498
#' @aliases ZB17a ZB17b ZB17c ZB17d ZB17e ZB17f ZB17h ZB17i ZB17j ZB17k ZB17p
9599
NULL
96100

97-
#' Astronomical Solution ZB18a for the Past 100 Myr
101+
#' Astronomical Solution ZB18a
102+
#'
103+
#' The ZB18a_100 eccentricity solution spans the past 100 Myr. See [ZB18a_300]
104+
#' for the past 300 Myr.
98105
#'
99106
#' @format ## `get_solution("ZB18a-100")`
100107
#' A data frame with 62,501 rows and 3 columns:
101108
#' \describe{
102109
#' \item{time}{Time in thousands of years (kyr).}
103-
#' \item{ecc}{Eccentricity \eqn{e} (unitless).}
104-
#' \item{inc}{Inclination \eqn{I} (degrees).}
110+
#' \item{ecc}{Eccentricity \eqn{e}{e} (unitless).}
111+
#' \item{inc}{Inclination \eqn{I}{I} (degrees).}
105112
#' }
106113
#' @inherit full_ZB18a source
107114
#' @references
@@ -112,19 +119,21 @@ NULL
112119
#' @aliases "ZB18a-100"
113120
NULL
114121

115-
#' Astronomical Solution ZB18a for the Past 300 Myr
122+
#' Astronomical Solution ZB18a
123+
#'
124+
#' The ZB18a_300 eccentricity solution spans the past 300 Myr. See [ZB18a_100]
125+
#' for the past 100 Myr.
116126
#'
117127
#' @format ## `get_solution("ZB18a-300")`
118128
#' A data frame with 187,501 rows and 3 columns:
119129
#' \describe{
120-
#' \item{time}{Time in thousands of years (kyr).}
121-
#' \item{ecc}{Eccentricity \eqn{e} (unitless).}
122-
#'\item{inc}{Inclination\eqn{I} (degrees).}
130+
#'\item{time}{Time in thousands of years (kyr).}
131+
#'\item{ecc}{Eccentricity \eqn{e}{e} (unitless).} \item{inc}{Inclination
132+
#'\eqn{I}{I} (degrees).}
123133
#' }
124134
#' @inherit full_ZB18a source
125-
#' @references
126-
#' Zeebe, R. E., & Lourens, L. J. (2019). Solar System chaos and the
127-
#' Paleocene–Eocene boundary age constrained by geology and astronomy.
135+
#' @references Zeebe, R. E., & Lourens, L. J. (2019). Solar System chaos and
136+
#' the Paleocene–Eocene boundary age constrained by geology and astronomy.
128137
#' _Science_, 365(6456), 926–929. \doi{10.1126/science.aax0612}.'
129138
#'
130139
#' Zeebe, R. E. and Lourens, L. J. (2022). Geologically constrained
@@ -134,14 +143,17 @@ NULL
134143
#' @aliases ZB18a "ZB18a-300"
135144
NULL
136145

137-
#' Astronomical Solutions ZB20 for the past 300 Myr
146+
#' Astronomical Solutions ZB20
147+
#'
148+
#' The ZB20x eccentricity solutions span the past 300 Myr. Available solutions
149+
#' include `"ZB20a"`, `"ZB20b"`, `"ZB20c"`, and `"ZB20d"`.
138150
#'
139151
#' @format ## `get_solution("ZB20x")`
140152
#' A data frame with 187,501 rows and 3 columns:
141153
#' \describe{
142154
#' \item{time}{Time in thousands of years (kyr).}
143-
#' \item{ee}{Eccentricity \eqn{e} (unitless).}
144-
#' \item{inc}{Inclination \eqn{I} (degrees).}
155+
#' \item{ee}{Eccentricity \eqn{e}{e} (unitless).}
156+
#' \item{inc}{Inclination \eqn{I}{I} (degrees).}
145157
#' }
146158
#' @inherit full_ZB18a source
147159
#' @references
@@ -152,15 +164,21 @@ NULL
152164
#' @aliases ZB20a ZB20b ZB20c ZB20d
153165
NULL
154166

155-
#' Astronomical Solutions PT-ZB18a(x.xxxx,y.yyyy) for the past 100 Myr
167+
#' Astronomical Solutions PT-ZB18a(E<sub>d</sub>,T<sub>d</sub>)
156168
#'
157-
#' @format ## `get_solution("PT-ZB18a(1,1)")`
169+
#' The pre-computed precession-tilt solutions
170+
#' PT-ZB18a(E<sub>d</sub>,T<sub>d</sub>) span the past 100 Myr. Available
171+
#' solutions include all combinations of dynamical ellipticity values between
172+
#' 0.9950 and 1.0050 in increments of 0.0010 and tidal dissipation values
173+
#' between 0.000 and 1.2000 in increments of 0.1.
174+
#'
175+
#' @format ## `get_solution("PT-ZB18a(1.000,1.000)")`
158176
#' A data frame with 249,480 rows and 4 columns:
159177
#' \describe{
160178
#' \item{time}{Time in thousands of years (kyr).}
161-
#' \item{epl}{Obliqity \eqn{\epsilon} (radians).}
162-
#' \item{phi}{Axial Precession \eqn{phi} (radians).}
163-
#' \item{cp}{Climatic Precession \eqn{e sin(\bar{\omega})} (unitless).}
179+
#' \item{epl}{Obliqity \eqn{\epsilon}{epsilon} (radians).}
180+
#' \item{phi}{Axial Precession \eqn{\phi}{phi} (radians).}
181+
#' \item{cp}{Climatic Precession \eqn{e\sin(\bar{\omega})}{e sin(baromega)} (unitless).}
164182
#' }
165183
#' @inherit full_ZB18a source
166184
#' @references
@@ -171,16 +189,19 @@ NULL
171189
#' @aliases PT-ZB18a "PT-ZB18a(1,1)" "PT-ZB18a(1,0)"
172190
NULL
173191

174-
#' Astronomical Solutions ZB23.RXX for the past 3.6 Gyr
192+
#' Astronomical Solutions ZB23.Rxx
193+
#'
194+
#' The ZB23.Rxx eccentricity solutions spand the past 3.6 Gyr. Available solutions include
195+
#' `"ZB23.R01"` to `"ZB23.R60"` and `"ZB23.R62"` to `"ZB23.R64"`.
175196
#'
176197
#' @format ## `get_solution("ZB23.Rxx")`
177198
#' A data frame with 8,750,001 rows and 5 columns:
178199
#' \describe{
179200
#' \item{time}{Time in thousands of years (kyr).}
180-
#' \item{ecc}{Eccentricity \eqn{e} (unitless).}
181-
#' \item{inc}{Inclination \eqn{I} (radians).}
182-
#' \item{obliquity}{Obliqity \eqn{\epsilon} (radians).}
183-
#' \item{cp}{Climatic Precession \eqn{e sin(\bar{\omega})} (unitless).}
201+
#' \item{ecc}{Eccentricity \eqn{e}{e} (unitless).}
202+
#' \item{inc}{Inclination \eqn{I}{I} (radians).}
203+
#' \item{obliquity}{Obliqity \eqn{\epsilon}{epsilon} (radians).}
204+
#' \item{cp}{Climatic Precession \eqn{e\sin(\bar{\omega})}{e sin(baromega)} (unitless).}
184205
#' }
185206
#' @inherit full_ZB18a source
186207
#' @references

‎R/get_solution.R‎

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
11
#' Get an Astronomical Solution
22
#'
3-
#' Download supported astronomical solutions from the web and store it in the
4-
#' user's cache directory. The next use of the function will load the data from
5-
#' the cache rather than downloading it again. This also provides a wrapper for
6-
#' [astrochron::getLaskar()] if one of their supported solutions is specified,
7-
#' but converts the output to a [tibble][tibble::tibble-package]. Note that we
8-
#' do not cache these solutions locally, however.
3+
#' `get_solution()` downloads an astronomical solution and stores it in the user's cache
4+
#' directory. The next time the function is called, it will load the data from
5+
#' the cache rather than downloading it again.
6+
#'
7+
#' @details
8+
#'
9+
#' All astronomical solutions by Zeebe can be found on
10+
#' <http://www.soest.hawaii.edu/oceanography/faculty/zeebe_files/Astro.html>.
11+
#' Supported solutions include:
12+
#'
13+
#' - [full-ZB18a]
14+
#' - [ZB17]
15+
#' - [ZB18a_100] and [ZB18a_300]
16+
#' - [ZB20]
17+
#' - [ZB23]
18+
#' - [PT-ZB18a]
19+
#'
20+
#' See their respective documentation pages for details and citations.
21+
#'
22+
#' This also provides a wrapper for [astrochron::getLaskar()] if one of
23+
#' `"La04"`, `"La10a"`, `"La10b"`, `"La10c"`, `"La10d"`, or `"La11"` is
24+
#' specified, but converts the output to a [tibble][tibble::tibble-package].
25+
#' Note that we do not cache these solutions locally, however.
26+
#'
27+
#' It is possible to change the location of the cache directory with
28+
#' `options(snvecR.cachedir = "/path/to/cache")`.
929
#'
1030
# astronomical_solution, quiet, and force are documented in get_ZB
1131
#' @inheritParams get_ZB
1232
#' @inherit get_ZB references
13-
#' @seealso [full_ZB18a], [ZB17], [ZB18a_100], [ZB18a_300] [ZB20], [PT_ZB18a], [ZB23]
33+
#' @seealso [prepare_solution], [full_ZB18a], [ZB17], [ZB18a_100], [ZB18a_300] [ZB20], [ZB23], [PT_ZB18a]
1434
#' @returns A [tibble][tibble::tibble-package] with the astronomical solution
1535
#' (and some preprocessed new columns).
1636
#' @examples
17-
#' \donttest{
1837
#' \dontshow{
1938
#' # set the cachedir to a temporary directory
2039
#' pth <- withr::local_tempdir(pattern = "snvecR")
2140
#' withr::local_options(snvecR.cachedir = pth)
2241
#' }
42+
#' \donttest{
2343
#' get_solution("full-ZB18a") # input for snvec
2444
#' get_solution("ZB18a-300") # eccentricity
2545
#' get_solution("ZB20a")
@@ -153,7 +173,7 @@ get_solution <- function(astronomical_solution = "full-ZB18a", quiet = FALSE, fo
153173
# #'
154174
#' @param astronomical_solution Character vector with the name of the desired
155175
#' solution. Defaults to `"full-ZB18a"`.
156-
# TODO:add something like "for list of valid solutions, mistype it on purpose."
176+
# TODO:document that you can also pass a dataframe directly?
157177
#' @param quiet Be quiet?
158178
#'
159179
#' * If `TRUE`, hide info messages.

‎R/prepare_solution.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Prepare Astronomical Solution
22
#'
3-
#'Calculates helper columns from an astronomical solution input.
3+
#'`prepare_solution()` calculates helper columns from an astronomical solution input.
44
#'
55
#' @export
66
#' @param data A data frame with the following columns:

‎README.Rmd‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ withr::local_options(list(snvecR.cachedir = pth))
2929

3030
Easily calculate precession and obliquity from an astronomical solution (AS,
3131
defaults to ZB18a from Zeebe and Lourens (2019)) and assumed or reconstructed
32-
values fortidal dissipation (T<sub>d</sub>) anddynamical ellipticity
33-
(E<sub>d</sub>). This is a translation and adaptation of the C-code in the
32+
values fordynamical ellipticity (E<sub>d</sub>) andtidal dissipation
33+
(T<sub>d</sub>). This is a translation and adaptation of the C-code in the
3434
supplementary material to Zeebe and Lourens (2022), with further details on the
3535
methodology described in Zeebe (2022). The name of the C-routine is snvec,
3636
which refers to the key units of computation: spin vector s and orbit normal

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp