createHwDataframe: Characterize heat waves

Description Usage Arguments Value Note

Description

This function takes a dataframe with identified heat waves and returns a dataframe that lists and characterizes all of the heat waves. If no heat waves were identified in a city, it returns a data frame with the same columns but no observations, to allow the empty dataframe to be joined without error to the dataframes for cities that do have heat waves under the definition.

Usage

1
createHwDataframe(city, threshold, heatwaves, ensembleSeries, i, global, custom)

Arguments

city

A character vector with the identification of the city being processed.

threshold

Numeric string with threshold temperature used in the heat wave definition, in degrees Fahrenheit.

heatwaves

A dataframe with the following columns:

  • date: Date of each observation, in class "Date";

  • tmpd: Temperature in degrees Fahrenheit;

  • hw: A binary variable designating whether a day is in a heat wave (0: not in a heat wave; 1: in a heat wave); and

  • hw.number: A numeric value, 0 if the day was not part of a heat wave, otherwise the number of the heat wave to which the day belonged.

This is the format of the output of IDheatwaves.

ensembleSeries

A list object giving the projection time series as well as a variety of other information for a single ensemble member. This is the output of processEnsemble.

i

An index specifying which city is being processed. This corresponds to the order of the cities in the citycsv file specified in gen_hw_set.

global

An list object created by gen_hw_set that includes user specifications (e.g., the path to the output directory, the path to the input climate projections, the dataframe with city locations).

custom

An list object created by gen_hw_set that includes user specifications (e.g., the name of the R function to use to identify heat waves, alternative upper and lower year boundaries for the data used to determine threshold temperatures for the heat wave definition, alternative upper and lower year boundaries for the projection period of the heat wave datasets being generated).

Value

A dataframe of identified and characterized heat waves for a single city and single ensemble member. Each row of this dataframe represents a heat wave, with the following columns:

Note

When calculating relative characteristics of heat waves, like the relative value of the heat wave's mean temperature, this function uses a time series from the date ranges specified by the user using the referenceBoundaries option in gen_hw_set. By default, these references are based on projection data from 2070 to 2079.


geanders/futureheatwaves documentation built on May 17, 2019, 12:14 a.m.