calc_SiteClimate: Calculate climate variables from daily weather

View source: R/sw_Miscellaneous_Functions.R

calc_SiteClimateR Documentation

Calculate climate variables from daily weather

Description

Calculate climate variables from daily weather

Usage

calc_SiteClimate(
  weatherList,
  year.start = NA,
  year.end = NA,
  do_C4vars = FALSE,
  do_Cheatgrass_ClimVars = FALSE,
  simTime2 = NULL,
  latitude = 90
)

Arguments

weatherList

A list. Each element is an object of class rSOILWAT2::swWeatherData containing daily weather data of a specific year.

year.start

An integer value. The first year of the range of years for which climate variables should be calculated.

year.end

An integer value. The last year of the range of years for which climate variables should be calculated.

do_C4vars

A logical value. If TRUE then additional output is returned.

do_Cheatgrass_ClimVars

A logical value. If TRUE then additional output is returned.

simTime2

A list with two named elements. The elements are numeric vectors month_ForEachUsedDay_NSadj and year_ForEachUsedDay_NSadj; they are calculated internally if NULL; alternatively, they can be generated by a call to the function simTiming_ForEachUsedTimeUnit. They are only used if isTRUE(do_C4vars).

latitude

A numeric value. The latitude in degree of the site. Used to adjust seasons between northern/southern hemisphere only if isTRUE(do_C4vars) and simTime2 has to be re-calculated.

Value

A list with named elements

  • “meanMonthlyTempC” A numeric vector of length 12. Mean monthly mean daily air temperature in degree Celsius.

  • “minMonthlyTempC” A numeric vector of length 12. Mean monthly minimum daily air temperature in degree Celsius.

  • “maxMonthlyTempC” A numeric vector of length 12. Mean monthly maximum daily air temperature in degree Celsius.

  • “meanMonthlyPPTcm” A numeric vector of length 12. Mean monthly precipitation in centimeters.

  • “MAP_cm” A numeric value. Mean annual precipitation in centimeters.

  • “MAT_C” A numeric value. Mean annual air temperature in degree Celsius.

  • “dailyTempMin” A numeric vector. If isTRUE(do_C4vars), then minimum daily air temperature in degree Celsius for each day of time period between year.start and year.end. If !isTRUE(do_C4vars), then NA.

  • “dailyTempMean” A numeric vector. Similar as for dailyTempMin but for mean daily air temperature.

  • “dailyC4vars” If isTRUE(do_C4vars), then a named numeric vector containing the output of sw_dailyC4_TempVar, else NA.

  • “monthlyCheatgrass_ClimVars” If isTRUE(do_Cheatgrass_ClimVars), then a named numeric vector containing the output of sw_Cheatgrass_ClimVar, else NA.

Examples

## Load weather dataset from rSOILWAT2
utils::data("weatherData", package = "rSOILWAT2")
clim1 <- calc_SiteClimate(weatherList = weatherData)
clim2 <- calc_SiteClimate(weatherList = weatherData, do_C4vars = TRUE)
clim3 <- calc_SiteClimate(weatherList = weatherData,
  do_Cheatgrass_ClimVars = TRUE)


Burke-Lauenroth-Lab/rSOILWAT2 documentation built on Dec. 9, 2023, 1:46 a.m.