# Converting Specific Humidity to Relative Humidity

Quote of the Day

Keep away from people who try to belittle your ambitions. Small people always do that, but the really great people make you feel that you too, can become great.

— Mark Twain. As always, he said it just right.

## Introduction

Figure 1: Relative Humidity Vs Temperature For
a Fix Specific Humidity (24 grams of Water
Vapor/kg of Air).

I often have to interpret odd test requirements. In a test specification based on GR-487, a humidity test is called out where we need to have a fixed specific humidity (i.e. 24 grams of water vapor per per kilogram of air). For a given specific humidity, the relative humidity will vary with temperature. Since my test gear can control relative humidity, I need to derive a relationship between relative humidity and the specific humidity, which I show in Figure 1.

This was a quick Friday afternoon calculation. I was a bit surprised that I could not find a table that contained this information – I pulled out Mathcad and solved the problem on my own.

Here is my Mathcad work if you are interested.

## Background

### GR-487 Test Requirement

Here is an excerpt from GR-487 that calls out the specific humidity requirement.

At temperatures above 32° F (90°F), the relative humidity may be limited to that corresponding to a specific humidity of 0.024 kg of water per kg of dry air. During the period of descending temperatures – i.e. 32° C (90°F) to 4.4° C (40° F) – the relative humidity shall be 80-95%.

There is a small error in this statement. Strictly speaking, the requirement is specified in terms of kg of water vapor versus kg of dry air. Technically, this term is known as the mixing fraction, but it is very close in value to the specific humidity. Both terms are described below.

### Definitions

mixing fraction (symbol w) AKA Humidity Ratio (HR)
Ratio of the mass of water vapor to the mass of dry air. It is often expressed in terms of gram of water vapor per kg of dry air. Symbolically it is defined as $w\triangleq \frac{{{{m}_{v}}}}{{{{m}_{d}}}}$, where mv is the mass of water vapor, and md is the mass of dry air (Source).
Dew Temperature (symbol tdew)
The dew temperature is the temperature at which dew forms and is a measure of atmospheric moisture. It is the temperature to which air must be cooled at constant pressure and water content to reach saturation (Source).
Relative Humidity (symbol RH)
Relative humidity is the ratio of the partial pressure of water vapor to the equilibrium vapor pressure of water at the same temperature. Relative humidity depends on temperature and the pressure of the system of interest (Source).
Absolute Humidity (symbol AH)
Absolute humidity is the total mass of water vapor present in a given volume of air. It does not take temperature into consideration. Absolute humidity in the atmosphere ranges from near zero to roughly 30 grams per cubic meter when the air is saturated at 30 °C (Source).
Specific Humidity (symbol SH)
Specific humidity is the ratio of water vapor mass (mv) to the air parcel's total (i.e., including dry) mass (ma) and is sometimes referred to as the humidity ratio. Specific humidity is approximately equal to the "mixing ratio", which is defined as the ratio of the mass of water vapor in an air parcel to the mass of dry air for the same parcel. We can express the specific humidity as $SH = \frac{w}{1+w} = \frac{m_v}{m_v+m_d}$.

## Analysis

### Relative Humidity Given Dew Point and Temperature

Figure 2 shows how I computed the relative humidity given the air temperature and dew point. For references, see the documents in Appendix A or click on the links in Figure 2 (brown color).

Figure 2: Relative Humidity Versus Temperature and Dew Point.

I perform a verification of this routine in Appendix B.

### Calculation of Specific Humidity (SH) Given RH and Temperature (T) and Pressure (P)

Figure 3 shows how I calculated the specific humidity given the air temperature and relative humidity given the model in this paper. Here is a numerical example that I used to check my result. Further checks are done in Appendix C.

Figure 3: Specific Humidity Function.

In Appendix D, I compare the the formula from Figure 3 to a standard psychrometric curve that relates the humidity ratio (HR) = SH/(1-SH) to relative humidity and temperature. The agreement is good.

### Calculation of RH Given T and SH

In Figure 3, I have a relationship between SH vs RH, T, and P. In Figure 1, I need to invert this relationship to obtain RH vs SH, T, and P. I perform this inversion numerically (i.e. root function) in Figure 4 to generated Figure 1.

Figure 4: Mathcad Code to Plot Figure 1.

## Conclusion

Our testing of an assembly was held up while we discussed the required RH required. I view this as another example of the endless number of unit conversions that I end up doing.

## Appendix A: Key Reference Material

I am going to use Appendix A to store some useful reference material.

## Appendix B: Reference Material For Checking Results

Figure 5 shows a table of dew points that I found on the web. I will duplicate that table using my routine for computing relative humidity given temperature and dew point.

Figure 5: Reference of Dew points Values for Different Temperatures and Relative Humidities.

Figure 6 shows the same type of table generated by my Mathcad routine. The agreement at high temperatures (>20 °C) is excellent – less so at low temperatures. Since my GR-487 work is at high temperature, my results will be accurate.

Figure 6: My Dew Point Calculation Results.

Figure 7 shows the Mathcad code that generated Figure 6.

Figure 7: Mathcad code for Generating Reference Table.

## Appendix C: More Reference Material For Checking Results

Figure 8 shows a simple comparison of a table of specific humidity values generated using my SH formula for 100% humidity at various temperatures. A comparable formula from the web is also shown.

Figure 8: Second Table Used for Checking My Model.

Figure 9 shows the Mathcad code that generated the results of Figure 8.

Figure 9: Mathcad Code for Generating Specific Humidity Example.

## Appendix D: Psychrometric Curve vs Fig 3 Formula.

Figure 10 shows a comparison between the formula shown in Figure 3 and a standard psychrometric chart.

Figure 10: Psychrometric Chart vs Fig. 3 Formula.

This entry was posted in General Science. Bookmark the permalink.

### 7 Responses to Converting Specific Humidity to Relative Humidity

1. Filip says:

Dear Mark, very interesting subject, as usual. I am afraid I cannot completely duplicate your Mathcad analysis as I seem to miss some information (eta, tdew). Would you mind linking your Mathcad worksheet to the blog?

• mathscinotes says:

I put this link in the main document. Thanks for the comment.

mathscinotes

2. Zonal says:

Hi, the title says "Converting Specific Humidity to Relative Humidity" but you have presented:

"Relative Humidity Given Dew Point and Temperature"
"Calculation of Specific Humidity Given Temperature and RH"

Where is the calculation of Relative Humidity from Specific Humidity ??
Thanks

• mathscinotes says:

I agree with you. I was not clear at all when I present RH vs SH, T, and P (Figure 3) and then immediately present SH vs RH, T, and P in Figure 4. Here is what I have done to improve the presentation:

• I changed a heading title to "Calculation of RH Given T and SH" and I explicitly show that I am using the Mathcad root function to invert the SH vs RH, T, and P function shown in Figure 3. I never actually presented a formula to compute RH from SH. I was quite sneaky in doing the inversion without making it clear what I was doing. An explicit formula would be complex, so I just did a numerical inversion, which is quick and gave me the answer I needed.
• I added Appendix D, which relates the formula presented in Figure 3 to a standard psychometric chart. This shows how well I can model the data using my formula. I used my formulas to recreate part of the psychometric chart.
• I revealed the argument in Figure 4 so that it would be clear that I was using the numerical inversion.
3. Earles McCaul says:

Is this the *correct* way to calculate humidity ratio (W) in IP units from RH and T?:

Pw = (RH/100)*EXP[ 17.863-9621/(T+460) ] ... vapor pressure @ RH & T
W = 7000*0.62198/(29.92/Pw-1) ... specific humidity in lb-water/lb-dry air @ sealevel

I'm actually looking for a way to calculate 'grains-per-pound' from dew point temp and barometric pressure, but haven't found any direct way yet. Can't use Psychrometric Chart because it's NOT barometric variable; usually only Sea Level, 2500' or 5000'.

4. Sufiyan says:

I need to convert a reading of a temperature, say 70 degrees and a Relative Humidity at 52 degrees to provide the Grains Per Pound which would be 56 GPP (Grains per Pound).

Thanks

5. Sana says:

Hi, Can we calculate Relative Humidity from Specific Humidity having the data of air temperature, pressure and at different altitudes?