Open vrs01 opened 7 years ago
You can calculate AH from density (rho, in kg/m^3), pressure (p, in Pa), relative humidity (RH, in percent), and temperature (T, in degK) using the following sequence of formulas:
es = 611.2*exp(17.67*(T-273.15)/(T-29.65))
rvs = 0.622*es/(p - es)
rv = RH/100. * rvs
qv = rv/(1 + rv)
AH = qv*rho
You can also use p = rho * Rd * T
to calculate one of the three required quantities from the other two.
can I use the FluidSolver for this?
Yes, using debug=True. Though it should be simpler to use calculate. Specifically:
from atmos import calculate
print(calculate('AH', RH=50., p=1e5, T=300., debug=True)
The second returned value should be a list of functions, and you can look at their docstrings or at their equation
property (e.g. rv_from_e_es.equation
).
Hey there, Thanks for the simple sequence of formulas. Its really convenient. Can you please provide reference from where you got the formulas? I want to add them in my report for reference. Many thanks.
@iamz33 when writing I put references down in the docstrings for equations, using an automatic documentation thing I wrote in the equations module. The dictionary ref
at the top contains all the references, and for each equation you can see which references it uses in the references
argument for @autodoc
.
Ah, cool. You can also access the references of the equations using e.g. rv_from_e_es.references
.
Perfect!! Thanks.
Hi!
I got a bit lost in all of these formulas. Could someone tell what would be the most elegant way to calculate the absolute humidity from a given temperature and a relative humidity value?
Best, vrs01