meteoplot: Plots point meteorological series

Description Usage Arguments Details Author(s) See Also Examples

Description

Simple plotting of a meteorological series for a given point.

Usage

1
2
meteoplot(object, index=1, var="MeanTemperature", 
          fun=NULL, freq=NULL, dates = NULL, months = NULL, add = FALSE,...)

Arguments

object

A data frame with daily meteorological data (in this case index is not used) or an object of class SpatialPointsMeteorology. Alternatively, an object of class SpatialPointsDataFrame containing the meta data (columns dir, filename and possibly format) of meteorological files.

index

An integer to indicate the point in the SpatialPointsMeteorology object (or the SpatialPointsDataFrame object).

var

The meteorological variable to be plotted.

fun

The name of a function to be calculated for summaries (only valid if freq is specified).

freq

A string giving an interval specification for summaries (e.g., "week", "month", "quarter" or "year").

dates

An object of class Date to define the period to be plotted. If dates = NULL then all dates in object are processed.

months

A numeric vector to indicate the subset of months for which plotting is desired (e.g. c(7,8) for July and August). When combined with fun and freq, this parameter allows plotting summaries for particular seasons. For example fun = "sum" freq = "years" and months = 6:8 leads to plotting the sum over summer months of each year.

add

A flag to indicate wether drawing should be done on the current plot (using function lines).

...

Additional parameters for functions plot or lines.

Details

Daily precipitation is plotted using bars (i.e. type = "h" when calling plot). Otherwise the function draws lines (i.e. type = "l" when calling plot). If object is of class SpatialPointsDataFrame-class then the function reads the meteorological data to be plotted from the disk.

Author(s)

Miquel De Cáceres Ainsa, Biodiversity and Landscape Ecology Laboratory, Centre Tecnologic Forestal de Catalunya

See Also

summarypoints

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(examplegridtopography)
data(exampleinterpolationdata)

#Creates spatial topography points from the grid
p = 1:2
spt = as(examplegridtopography, "SpatialPointsTopography")[p]

#Interpolation of two points for the whole time period (2000-2003)
mp = interpolationpoints(exampleinterpolationdata, spt)

#Plot interpolated meteorological series
meteoplot(mp,1, ylab="Daily mean temperature")

meteoplot(mp,1, ylab="Monthly mean temperature", fun=mean, freq="months")

miquelcaceres/meteoland documentation built on May 8, 2019, 11:57 p.m.