bluegreen-labs/phenor

VPD is VP, convert in formatting routine

khufkens opened this issue · 2 comments

Bug by @akpost21 flagging that the conversion between VP and VPD is not done. Only affects not commonly used GSI models.

#Extract variables
VPa <- as.matrix(All_1day_trans50$cperuvb$VPDi)
Ti <- as.matrix(All_1day_trans50$cperuvb$Ti)

#convert units from Pa to kPa
VPa2 <- VPa/1000

#calculate saturated VP (based on temp)
VPs <- 0.611*exp((17.502*Ti)/(Ti+240.97))

#calculate VPD
VPD <- VPs - VPa2