Be the first to rate this file! 28 Downloads (last 30 days) File Size: 242 KB File ID: #30553




27 Feb 2011 (Updated )

Convert humidity between different formats.

| Watch this File

File Information

Convert humidity between any two of the following formats:
- partial pressure of water vapor
- specific humidity
- mixing ratio
- relative humidity
- dew point temperature
- virtual temperature

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
14 Jul 2014 Felipe G. Nievinski

@hosseini: please take a look at the tests included in the bottom of file convert_humidity.m. For example, to convert specific humidity (s) to relative humidity (r) you'd do:
r = convert_humidity (P, T, s, 'specific humidity', 'relative humidity');
where P and T stands for pressure and temperature.

Comment only
14 Jul 2014 hosseini

dear Felipe
I added the functions to my MATLAB but I don't know how to use the functions and syntaxes.Please help me.


Comment only
21 Aug 2013 Felipe

Felipe (view profile)

pls see <>

Comment only
21 Aug 2013 Katie

Katie (view profile)

I used this function to convert from specific humidity to relative humidity. A few of my values (about 6%) were above 100% relative humidity. The data I am using is straight from CMIP5, and has not been altered. All the variables are in the correct units. Any idea why I have impossible above 100% values?????? (there are some that are 100.2% and others that are 120%). The rest of the values look normal around 60 - 90 percent.

Comment only
16 Apr 2011

Included PDF describing formulation; applied more tags.

Contact us