Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Calculating relative humidity at reference height (RHREFHT)

sur23beeb

ST
Member
How is RHREFHT calculated in CAM? Is there a link that displays the equation? The relevant line in the code is:
Code:
      ! Calculate and output reference height RH (RHREFHT)

      call qsat(cam_in%tref(:ncol), state%ps(:ncol), tem2(:ncol), ftem(:ncol))
      ftem(:ncol) = cam_in%qref(:ncol)/ftem(:ncol)*100._r8
but instead of trawling through multiple subroutines, it would be easier to just see the equation. The manual does not seem to provide this information.
 

nusbaume

Jesse Nusbaumer
CSEG and Liaisons
Staff member
Hi ST,

The equation for RHREFHT is the following:

RHREFHT = QREFHT / Qsat(TREFHT) * 100

Where "QREFHT" is the specific humidity at two meters above the surface, and "TREFHT" is the air temperature at two meters.

"Qsat" is then a function of the air temperature which represents the saturation specific humidity at the reference height (two meters). This is calculated from the saturation vapor pressure like so:

qsat(TREFHT) = epsilo * es(TREFHT) / [pres - (1-epsilo)*es(TREFHT)]

where "epsilo" is the ratio of the molecular weight of H2O over the molecular weight of dry air, and "pres" is the atmospheric pressure at one's location (which for the reference height is just the surface pressure, PS). Finally, "es" is the saturation vapor pressure at the provided reference height temperature value. There are multiple different ways this can be calculated in the model, but for CESM2.1.3 it defaults to the Goff-Gratch method, which can be found online here:


Anyways, I hope that helps, and if you need any additional details just let me know.

Thanks, and have a great day!

Jesse
 

sur23beeb

ST
Member
Hi ST,

The equation for RHREFHT is the following:



Where "QREFHT" is the specific humidity at two meters above the surface, and "TREFHT" is the air temperature at two meters.

"Qsat" is then a function of the air temperature which represents the saturation specific humidity at the reference height (two meters). This is calculated from the saturation vapor pressure like so:



where "epsilo" is the ratio of the molecular weight of H2O over the molecular weight of dry air, and "pres" is the atmospheric pressure at one's location (which for the reference height is just the surface pressure, PS). Finally, "es" is the saturation vapor pressure at the provided reference height temperature value. There are multiple different ways this can be calculated in the model, but for CESM2.1.3 it defaults to the Goff-Gratch method, which can be found online here:


Anyways, I hope that helps, and if you need any additional details just let me know.

Thanks, and have a great day!

Jesse
Hi Jesse:
I was trying to rederive this and noticed a typo. The parameter "epsilo" is the ratio of the molecular weight of dry air to that of water vapor, not the other way round.
 

nusbaume

Jesse Nusbaumer
CSEG and Liaisons
Staff member
Hi ST,

I went back into the code, and confirmed that "epsilo" is the following:

Code:
epsilo = molecular_weight_H2O / molecular_weight_dry_air

Is that not what you got in your derivation? If not, can you send your derivation to us? You can just attach a PDF or something equivalent if you don't want to type it all out on the forum itself. If we have a bug in the code it would be great to get it rectified.

Thanks!

Jesse
 

sur23beeb

ST
Member
I am at work right now and don't have the sheet of paper on which I rederived it. But here's a link that is saying the same thing.

Is it possible that in the actual equation, they are using 1/epsilo and not epsilo?
 

sur23beeb

ST
Member
Here is another link. The parameter epsilon is defined in the section "Mixing Ratio" as the ratio of the mass of dry air to that of water vapor and is equal to 0.622. If you scroll down to the "specific humidity" section, you can see how q_s is being calculated.

I am still wondering if somehow the actual parameter entering the equation in the code is 1/epsilo and not epsilo.
 

sur23beeb

ST
Member
Or it could be a mistake just in the documentation and the right number (0.622) is entering the equation for q_s.
 

nusbaume

Jesse Nusbaumer
CSEG and Liaisons
Staff member
Hi ST,

I double-checked the values and epsilo is ~0.622, which is the ratio of the molecular weight of H2O over the molecular weight of dry air (i.e. the equation above). Please note that in the equations you sent they are using the gas constants and not the molecular weights, hence the difference in the order. So it looks like everything is correct as-is, at least in the model code. Thanks for helping me double check though!

Jesse
 

lufiedler

Lukas Fiedler
New Member
Hi Jesse, Hi ST,

sorry for re-opening this discussion more than one year later. I recently stumbled across RHREFHT fields as well. In some first investigations with the CESM2 Single Forcing Experiment RHREFHT seems to go up to 200 and is often higher than 100 which I can not explain with the equation at the top of this thread or the common definition of relative humidity. Could you help me out, what am I missing to understand the physical meaning of RHREFHT?

Cheers,
Lukas
 
Top