Closed ibarraespinosa closed 5 months ago
Hello @ibarraespinosa !
Try this function to calculate RH using T2, Q2 and P from WRF output:
# q [Kg/Kg]
# t [K]
# p [Pa]
# P T Q RH (from NCL example)
# (Pa) (K) (KG/KG) (%)
# 100800 302.45 0.02038 79.8228
rh <- function(q = 0.0002038, t = 302.45, p = 100800){
t <- t - 273.15
e <- q * p / 0.622
es <- 610.8 * exp(17.3*t /(t + 237.3))
RH <- 100 * e / es
if(RH > 1)
RH = 1
return(100 * RH)
}
rh()
# 80.76 %
Im including this function on hackWRF, but I will change many of this functions (including this) to a different package
cool man
On Thu, Mar 21, 2024 at 1:49 PM Daniel Schuch @.***> wrote:
Im including this function on hackWRF, but I will change many of this functions (including this) to a different package
— Reply to this email directly, view it on GitHub https://github.com/atmoschem/eixport/issues/67#issuecomment-2013537729, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGRM74H7VNXTCC2FDZPF2KTYZM2WLAVCNFSM4277FIUKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBRGM2TGNZXGI4Q . You are receiving this because you were mentioned.Message ID: @.***>
we need an RH calculator