Learn R Programming

Overview

The futureheatwaves package takes a directory of climate projection files and, for each, identifies and characterizes all of a certain type of multi-day extreme events (e.g., heat waves). The definition used to identify extreme events can be customized. Characterizations include several metrics of event length, intensity, and timing in the year. The identified extreme events can be explored by applying custom functions across all generated heat wave files.

Installing

You can download the latest stable version of this package directly from CRAN:

install.packages("futureheatwaves")

The development version of this package can be installed directly from GitHub using install_github from the devtools package:

library(devtools)
install_github("geanders/futureheatwaves", build_vignettes = TRUE)
library(futureheatwaves)

Because this package includes some C++ functions, this installation from GitHub requires the compiling of some code. If you get an error when trying to install this package from GitHub, it may be because your computer lacks the required tools to compile that part of the code. In this case, you can either download and install the required tools or email me to get a source version of the code for your operating system (where the C++ code has already been compiled).

Using the package

There are extensive details on using this package in the package vignette, which can be accessed once you install the package using:

vignette("futureheatwaves")

A version of this vignette is also available through CRAN here.

The development version of the package also includes a vignette with details on how to prepare CMIP5 netCDF climate model output files for use with this package. If you have downloaded the development version of the package directly from GitHub, you can access that vignette with:

vignette("starting_from_netcdf")

Copy Link

Version

Install

install.packages('futureheatwaves')

Monthly Downloads

48

Version

1.0.3

License

GPL-2

Maintainer

Last Published

December 31st, 2016

Functions in futureheatwaves (1.0.3)

acquireDirectoryStructure

Acquire structure of input directory
average_mean_temp

Calculate average variable of extreme events
buildStructureEnsembles

List files for a single ensemble member
apply_all_models

Apply a function across heat waves from all projections
buildStructureExperiments

Generate file structure for an experiment
check_params

Check for input parameter errors
checkCustomBounds

Check year boundaries for errors
buildStructureModels

Generate list of file structure
apply_hw_projections

Apply a function to projected extreme events
average_length

Calculate average length of extreme events
datafr

Example data to input to extreme event identifier functions
formDates

Create date vector for requested time period
closest_point

Find closest grid point to a city location
formHwFrame

Create heat wave dataframe for an ensemble
createHwDataframe

Characterize heat waves
consolidate

Consolidate heat wave dataframes
futureheatwaves

Find, Characterize, and Explore Heat Waves in Climate Projections
createEnsembleWriter

Ensemble writer factory function
createAccumulators

Create accumulator closure
createCityProcessor

Create closure to identify and aggregate heat waves
getBounds

Acquire boundaries of time series data
processModel

Process valid models
gen_hw_set

Create and write extreme event projections
processProjections

Create heat wave dataframe for climate projection
IDHeatwavesCPP

Identify heat waves that are a certain number of days long
processEnsemble

Extract projections from ensemble member
process_cities_file

Process city file
IDHeatwavesCPPwrapper

Identify heat waves in a time series
heatwave_days

Calculate total event days
hw_datafr

Example of extreme event characteristics dataset
IDheatwaves

Identify all heat waves in a time series
processThresholds

Calculate threshold temperatures
processReference

Get projection data for reference period
readtas

Read climate projection data
readLatLong

Read latitude and longitude data
IDHeatwavesAlternative

Identify heat waves in a time series
writeAccumulators

Write model information to file
storeZeroes

Helper function that adds zeroes
IDHeatwavesR

Identify heat waves in a time series
map_grid_leaflet

Create an interactive map of model grid
readTimes

Read projection dates data
map_grid

Create a map of model grid
storeHeatwaveEntry

Helper function that adds entries
number_of_heatwaves

Calculate number of extreme_events