dX | 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 & Chen (2006) 'The use of a
Calculus-based Cyclone Identification method for generating storm
statistics' (Tellus A 58A, 473-486, doi:10.1111/j.1600-0870.2006.00191) for
more details.
dX(
Z,
m = 10,
mask.bad = TRUE,
plot = FALSE,
r = 6378000,
accuracy = NULL,
progress = TRUE,
verbose = FALSE
)
Z |
A field object |
m |
number of harmonics for fitting the Fourier series |
mask.bad |
mask missing data |
plot |
if TRUE show plot |
r |
radius of the Earth (m) |
accuracy |
resolution of output |
progress |
show the progress |
verbose |
show diagnostics of the progress |
regfit
is a help function for generating a model for fitting the profile.
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 |
data(slp.ERA5)
slp.dx <- dX(slp.ERA5,verbose=TRUE)
map(slp.dx$Z) # map of SLP
map(slp.dx$dZ) # map of first derivative in longitude direction
map(slp.dx$dZ2) # map of second derivative in longitude direction
## Not run:
u10 <- retrieve('~/Downloads/Jan2018_ERAINT_uvp.nc',param='u10')
v10 <- retrieve('~/Downloads/Jan2018_ERAINT_uvp.nc',param='v10')
## Estimate the vorticity
zeta <- dX(v10)$dZ - dY(u10)$dZ
zeta <- attrcp(u10,zeta)
class(zeta) <- class(u10)
attr(zeta,'variable') <- 'vorticity'
attr(zeta,'unit') <- '1/s'
map(subset(zeta,it=1),projection='np')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.