lookup_annual_CO2a: Look-up yearly atmospheric CO2 concentration values

View source: R/sw_Miscellaneous_Functions.R

lookup_annual_CO2aR Documentation

Look-up yearly atmospheric CO2 concentration values

Description

Look-up yearly atmospheric CO2 concentration values

Usage

lookup_annual_CO2a(start, end, name_co2, tr_CO2a = rSOILWAT2::sw2_tr_CO2a)

Arguments

start

An integer value. First year for which to look-up values.

end

An integer value. Last year for which to look-up values.

name_co2

A character string. The (partial) name of the CO2 series, i.e., a column name of tr_CO2a. See details.

tr_CO2a

A numeric data.frame with the CO2 values [ppm]. Default values are taken from sw2_tr_CO2a.

Details

name_co2 may contain multiple data set names, either as vector of strings, or as names separated by "|". Values of the first match are used; any missing values are filled in from the second matching column, and so forth.

See Also

sw2_tr_CO2a for description of data

Examples

lookup_annual_CO2a(start = 1765, end = 2300, name_co2 = "RCP45")
lookup_annual_CO2a(start = 1765, end = 2300, name_co2 = "CMIP5_RCP45")
lookup_annual_CO2a(start = 1980, end = 2005, name_co2 = "CMIP5_historical")
lookup_annual_CO2a(
  start = 1980,
  end = 2021,
  name_co2 = c("CMIP6_historical", "CMIP6_SSP119")
)
lookup_annual_CO2a(
  start = 1980,
  end = 2021,
  name_co2 = "CMIP6_historical|CMIP6_SSP119"
)

## Not run: 
## This fails because "CMIP5_historical" has no values after 2005
lookup_annual_CO2a(start = 1980, end = 2020, name_co2 = "CMIP5_historical")

## End(Not run)


DrylandEcology/rSOILWAT2 documentation built on Jan. 12, 2024, 9:06 p.m.