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

mc_calc_pact(
  data,
  temp_sensor = "HOBO_T",
  rh_sensor = "HOBO_RH",
  output_sensor = "p_act",
  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.

rh_sensor

name of relative air humidity sensor. Humidity sensor must be in RH physical.

output_sensor

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

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_act sensor

Examples

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