climograph {hydroTSM}R Documentation

Climograph

Description

Function to draw a climograph based on precipitation and temperature data.

Usage

climograph(pcp, tmean, tmx, tmn, na.rm=TRUE,  
           from, to, date.fmt="%Y-%m-%d", 
           main="Climograph", 
           pcp.label="Precipitation, [mm]", 
           tmean.label="Temperature, [\U00B0 C]",
           pcp.col="lightblue", 
           tmean.col="red")

Arguments

pcp

variable of type zoo with monthly, daily or subdaily precipitation data.

tmean

variable of type 'zoo' with monthly, daily or subdaily mean temperature data.

tmx

variable of type 'zoo' with monthly, daily or subdaily maximum temperature data.
ONLY used (togheter with tmn) when tmean' is missing.

tmn

variable of type 'zoo' with monthly, daily or subdaily minimum temperature data. ONLY used (togheter with tmx) when tmean is missing.

na.rm

Logical. Should missing values be removed?
-) TRUE : the monthly values are computed considering only those values different from NA
-) FALSE: if there is AT LEAST one NA within a month, the resulting average monthly value is NA .

main

Character representing the main title of the plot.

pcp.label

Character used in the legend to represent the monthly average precipitation (mostly thought for languages different from English).

tmean.label

Character used in the legend to represent the monthly average temperature (mostly thought for languages different from English).

pcp.col

Color used in the legend to represent the monthly average precipitation.

tmean.col

Color used in the legend to represent the monthly average temperature.

from

OPTIONAL, used for extracting a subset of values.
Character indicating the starting date for the values to be extracted. It must be provided in the format specified by date.fmt.

to

OPTIONAL, used for extracting a subset of values.
Character indicating the ending date for the values to be extracted. It must be provided in the format specified by date.fmt.

date.fmt

Character indicating the format in which the dates are stored in dates, from and to. See format in as.Date.
ONLY required when class(dates)=="factor" or class(dates)=="numeric".

Author(s)

Mauricio Zambrano-Bigiarini, mzb.devel@gmail

See Also

monthlyfunction

Examples

######################
## Ex1: Loading the DAILY precipitation, maximum and minimum air temperature at 
##      station Maquehue Temuco Ad (Chile)
data(MaquehueTemuco)
pcp <- MaquehueTemuco[, 1]
tmx <- MaquehueTemuco[, 2]
tmn <- MaquehueTemuco[, 3]

## Plotting the climograph
m <- climograph(pcp=pcp, tmx=tmx, tmn=tmn, na.rm=TRUE)


[Package hydroTSM version 0.5-1 Index]