get_ensemble_stats: Download ensemble statistics

Description Usage Arguments Examples

View source: R/get_ensemble_stats.R

Description

Statistics can be from either two time periods: 2046 - 2065 and 2081 - 2100 and are all given in units relative to a control period: 1961 - 2000. Derived statistics can be any of the following:

Statistic Description Units
tmin_means Average daily minimum temperature degrees Celsius
tmax_means Average daily maximum temperature degrees Celsius
tmax_days90th Number of days with maximum temperature above the control period 90th percentile (hot days) days
tmin_days90th Number of days with minimum temperature above the control period 90th percentile (warm nights) days
tmax_days10th Number of days with maximum temperature below the control period 10th percentile (cool days) days
tmin_days10th Number of days with minimum temperature below the control period 10th percentile (cold nights) days
tmin_days0 Number of days with minimum temperature below 0 degrees Celsius days
ppt_days Number of days with precipitation greater than 0.2 mm days
ppt_days2 Number of days with precipitation greater than 2 mm days
ppt_days10 Number of days with precipitation greater than 10 mm days
ppt_days90th Number of days with precipitation greater than the control periods 90th percentile days
ppt_dryspell Average number of days between precipitation events days
ppt_means Average daily precipitation mm

Usage

1

Arguments

locator

The ISO3 country code that you want data about. (http://unstats.un.org/unsd/methods/m49/m49alpha.htm) or the basin ID [1-468]

type

the type of data you want "mavg" for monthly averages, "annualavg"

stat

The statistics of interest, must be one of the ones listed above.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
 ### Request data on the US for days of rain over 2 mm
 ens_dat <- get_ensemble_stats("USA","mavg","ppt_days2")
 # subset to the 50th percentile and just until the year 2100
 ens_dat <- subset(ens_dat, ens_dat$percentile == 50)
 ens_dat <- subset(ens_dat,ens_dat$toYear == 2100)
 ggplot(ens_dat,aes(x = as.factor(month), y= monthVals, group=scenario,
 colour=scenario)) + geom_point() + geom_line()

## End(Not run)

rWBclimate documentation built on May 29, 2017, 11:23 a.m.