as.station | R Documentation |
station
objectTransform an input object into the esd class station
.
as.station
is an S3 method and will redirect to a fitting function depending on the type of input data.
as.station(x, ...)
x |
the input object |
... |
other arguments |
loc |
location(s), e.g, "Manchester" or c("Oslo","Bergen") |
param |
short name of variable |
unit |
unit of variable, e.g., 't2m' |
lon |
longitude(s), a numerical or numerical vector |
lat |
latitudes(s), a numerical or numerical vector |
alt |
altitude(s), a numerical or numerical vector |
cntr |
country, a character string or vector of character strings |
longname |
long name of variable, e.g, 'temperature at 2m' |
calendar |
calendar type |
stid |
station id, a numerical or numerical vector |
quality |
quality flag |
src |
source of data |
url |
url to website where data can be downloaded |
reference |
reference describing data set |
info |
additional information |
method |
method applied to data |
type |
type of data |
aspect |
aspect describing data, e.g., 'original', 'anomaly', 'climatology' |
verbose |
a boolean; if TRUE print information about progress |
as.station.zoo
and as.station.data.frame
adds attributes and changes the class to transform the input to a 'station' object.
as.station.field
returns an object where every grid box is represented as one station.
as.station.pca
transforms a 'pca' object (see PCA
) to a 'station' object using the method pca2station
.
as.station.eof
represents the principle components of an 'eof' object as different stations.
as.station.dsensemble
transform a dsensemble
object to a station
object in one of two ways:
i) If the input is of class dsensemble
pca
, you are redirected to as.station.dsensemble.pca
which calculates the downscaled ensemble for each station based on the downscaled ensemble of principle components,
returning a dsensemble
station
or dsensemble
list
object.
ii) If the input is a dsensemble
station
or dsensemble
list
object, you are redirected to as.station.dsensemble.station
which returns a station
object holding the ensemble mean (or another statistical characteristic of the ensemble, see input argument FUN
)
of the downscaled results for each station.
as.station.events
and as.station.trajectory
aggregate an 'event' or 'trajectory' object to a 'station' object by
aggregating some aspect of the cyclones/anti-cyclones (or other type of event). By default, the total number of events/trajectories per month is calculated
but the method can also estimate some other characteristic, e.g., the monthly mean sea level pressure at the center of the cyclones ().
a station
object
as.station.dsensemble as.station.dsensemble.pca as.station.dsensemble.station
# How to generate a new 'station' object
data <- round(matrix(rnorm(20*12),20,12),2)
colnames(data) <- month.abb
x <- data.frame(year=1981:2000,data)
X <- as.station(x,loc="",param="noise",unit="none")
# Transform a field object into a station object
slp.field <- slp.DNMI(lon=c(-20,20), lat=c(50,70)) # get example SLP data
slp.station <- as.station(slp.field) # coerce SLP field to a station object
cb <- list(pal="burd", breaks=seq(1000,1020,2)) # specify color bar for maps
map(slp.field, FUN="mean", colbar=cb) # show map of SLP field
map(slp.station, FUN="mean", colbar=cb) # show map of SLP as station data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.