Skip to content

Include to utility functions #7

@Schuch666

Description

@Schuch666
# 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 % 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions