Skip to contents

This pre-processing helper function converts a list of warming temperatures in degrees Celsius (temps) from global to CONUS (from="global") or vice versa (from="conus"). The equations for converting between CONUS and global temperatures and back again are described elsewhere in this report.

Usage

convertTemps(temps, from)

Arguments

temps

A numeric vector of CONUS or global temperatures in degrees Celsius.

from

A character string (one of c("conus", "global")), indicating whether users are converting from CONUS to global temperatures (from="conus") or from global to CONUS (from="global").

Temperatures for the contiguous U.S. (CONUS) in degrees Celsius are converted to global temperatures (convertTemps(temps, from="conus")) in degrees Celsius by multiplying CONUS temperatures by a constant 1/k (where k=1.421).

Global temperatures in degrees Celsius are converted to CONUS temperatures (convertTemps(temps, from="global")) in degrees Celsius by multiplying global temperatures by a constant k (where k=1.421).

Value

Outputs a numeric vector of temperatures in degrees Celsius.

References

Environmental Protection Agency (EPA). 2021. Technical Documentation on The Framework for Evaluating Damages and Impacts (FrEDI). Technical Report EPA 430-R-21-004, EPA, Washington, DC. Available at https://epa.gov/cira/FrEDI/.

Examples

convertTemps(1:7, from = "global")
#> [1] 1.421 2.842 4.263 5.684 7.105 8.526 9.947
convertTemps(1:7, from = "conus")
#> [1] 0.7037298 1.4074595 2.1111893 2.8149191 3.5186488 4.2223786 4.9261084