season.trajectory: Functions to process and analyse storm trajectories

View source: R/rtools.trajectory.R

season.trajectoryR Documentation

Functions to process and analyse storm trajectories

Description

Functions to process and analyse storm trajectories

Usage

## S3 method for class 'trajectory'
season(x, format = "character", verbose = FALSE)

Arguments

x

A trajectory object

verbose

if TRUE print information about progress

...

Other arguments

type

type of anomaly: 'first' gives you the spatial anomaly with regards to the first time step of the trajectory and 'mean' centers the trajectories around the mean longitude and latitude

param

parameters to calculate anomaly of

Value

A trajecory object

Author(s)

Kajsa M. Parding

Examples


# Load trajectory example data
data('imilast.M03')
# Calculate anomaly
x <- anomaly(imilast.M03)
# Show maps of original trajectories and spatial anomalies
map(imilast.M03, new=FALSE)
map(x, new=FALSE)
# Transform trajectory anomalies back to regular trajectories
y <- anomaly2trajectory(x)
# Print longitudes of first trajectory
imilast.M03[1,1:12]
x[1,1:12]
y[1,12]

# Fit polynomial to trajectories
y <- polyfit.trajectory(x)
# Show coefficients of first trajectory
print(attr(y,"coefs")[,1])
# Plot original trajectory and polynomial fit
ilon <- colnames(x)=="lon"
ilat <- colnames(x)=="lat"
plot(x[1,ilon], x[1,ilat], col="black", pch=1)
lines(y[1,ilon], y[1,ilat], col="blue", lty=2)


metno/esd documentation built on April 29, 2024, 3:34 p.m.