relative humidity
Added by Ismaial DIALLO over 12 years ago
Hello CDO user's
Does someone have idea on how to calculate the relative humidity from temperature and specific humidity by using cdo. Other methods also welcome.
regards
I-
Replies (2)
RE: relative humidity - Added by Marston Ward over 12 years ago
If you have all the dependent variables in one netcdf file, you can use the cdo expr or cdo exprf commands. Here you can formulate the RH equation and pass it to cdo.
I do a similar thing for the air density:
cdo expr,'rhom=((pressure/(8.314*T))*(1/((1-Q)/(Q*0.02896)+(1/0.01802))))' ifile.nc rhom.nc
The RH is tricky since you will first need to calculate the saturation vapor pressure/humidity w.r.t. water, ice, and in the mixed phase. So decide which formulation for RH you'll use and put all the dependent variables in one netcdf file, then use one of the cdo command above (exprf means the equation is read from a file).
If your question is if cdo chooses the formulation and calculates the RH for you blindly, then no, I don't think so. Besides, most people wouldn't want that.
Hope this helps.
/M
RE: relative humidity - Added by Matti Kämäräinen almost 9 years ago
Hi all,
I try to convert the specific humidity to relative using T, Q, and p. The problem is that in my file p is a dimension and CDO apparently can not handle it as a variable, and my cdo expr command leads to an error. Is there any nice way to turn pressure to a (3d) variable or otherwise solve this problem?
Thanks & regards,
Matti