dT | R Documentation |
dX
, dY
, and dT
are functions to estimate derivatives for
gridded field objects based on a fit to truncated Fourier series.
The three functions give the x-, y- and time derivatives respectively.
See Benestad, R.E. (2005) 'A review of the solar cycle length estimates'
GRL 32 L15714, doi:10.1029/2005GL023621, August 13
dT(y, m = NULL, plot = FALSE, verbose = FALSE)
y |
A zoo, station or field object |
m |
number of harmonics for fitting the Fourier series |
plot |
if TRUE show plot |
verbose |
show diagnostics of the progress |
a list with several components:
Z |
original data |
a |
Fourier coefficients for cosine |
b |
Fourier coeffieicnes for sine |
z0 |
defunct? |
dZ |
The component contains the first derivative. |
dZ2 |
The component contains the second derivative (quicker to do both in one go). |
lon |
longitude |
lat |
latitude |
dx |
spatial resolution |
span |
spatial extent |
Rz <- Sunspots()
## Estimate the time derivative using only the gravest Fourier frequencies
d.Rz.dt <- dT(Rz,m=30)
## The original series
plot(d.Rz.dt$y)
## The fitted series
lines(d.Rz.dt$y.fit,col='red',lty=2)
## first derivative
plot(d.Rz.dt$dy)
## Second derivative
plot(d.Rz.dt$dy2)
co2 <- CO2()
dco2dt <- dT(co2)
plot(dco2dt$y)
lines(dco2dt$y.fit,col='red',lty=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.