This function creates a new virtual sensor on locality within the myClim data object. The virtual sensor represents the saturation vapor pressure (in kPa) calculated from temperature.

mc_calc_psat(
  data,
  temp_sensor = "HOBO_T",
  output_sensor = "p_sat",
  elevation = 0,
  metadata_elevation = TRUE,
  localities = NULL
)

Arguments

data

cleaned myClim object see myClim-package

temp_sensor

name of temperature sensor. Temperature sensor must be in T_C physical.

output_sensor

name of new virtual p_sat sensor (default "p_sat")

elevation

value in meters (default 0)

metadata_elevation

if TRUE then elevation from metadata of locality is used (default TRUE)

localities

list of locality_ids for calculation; if NULL then all (default NULL)

Value

myClim object same as input but with added p_sat sensor

Examples

agg_data <- mc_calc_psat(mc_data_example_agg, "HOBO_T", localities="A2E32")