Home > atmlab > h2o > thermodynamics > water_vapor_mixing_ratio.m

water_vapor_mixing_ratio

PURPOSE ^

WATER_VAPOR_MIXING_RATIO water vapor mixing ratio r

SYNOPSIS ^

function r = water_vapor_mixing_ratio(rh, T, p)

DESCRIPTION ^

 WATER_VAPOR_MIXING_RATIO water vapor mixing ratio r

   r mixing ratio is the ratio of kilograms of water vapour, mw, 
   per kilogram of dry air, md, at a given pressure. It can be expressed
   using water vapor pressure and air pressure.

 FORMAT    r = water_vapor_mixing_ratio(rh, T, p)
        
 OUT   r   mixing ratio []
 IN    rh  relative humidity [%, rh > 0], it can be a scalar or a tensor
       T   air temperature [K], it can be a scalar or a tensor
       p   air pressure [Pa], it can be a scalar or a tensor
 EXAMPLE:
       r = water_vapor_mixing_ratio(50, 298, 100000)
       r = 0.0099

 ACCURACY: WATER_VAPOR_MIXING_RATIO calculates water vapor mixing ratio
           according to thermodynamic functions without any assumptions.

 Reference: A short course in cloud physics (Chapter II, water vapor and
             its thermodynamic effects); 1996, By: R. R. Rogers and M. M. Yau
             page: 17, Eq.:2.18

 2009-08-15   Created by Isaac Moradi.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

water_vapor_mixing_ratio.m

SOURCE CODE ^

0001 function r = water_vapor_mixing_ratio(rh, T, p)  
0002 % WATER_VAPOR_MIXING_RATIO water vapor mixing ratio r
0003 %
0004 %   r mixing ratio is the ratio of kilograms of water vapour, mw,
0005 %   per kilogram of dry air, md, at a given pressure. It can be expressed
0006 %   using water vapor pressure and air pressure.
0007 %
0008 % FORMAT    r = water_vapor_mixing_ratio(rh, T, p)
0009 %
0010 % OUT   r   mixing ratio []
0011 % IN    rh  relative humidity [%, rh > 0], it can be a scalar or a tensor
0012 %       T   air temperature [K], it can be a scalar or a tensor
0013 %       p   air pressure [Pa], it can be a scalar or a tensor
0014 % EXAMPLE:
0015 %       r = water_vapor_mixing_ratio(50, 298, 100000)
0016 %       r = 0.0099
0017 %
0018 % ACCURACY: WATER_VAPOR_MIXING_RATIO calculates water vapor mixing ratio
0019 %           according to thermodynamic functions without any assumptions.
0020 %
0021 % Reference: A short course in cloud physics (Chapter II, water vapor and
0022 %             its thermodynamic effects); 1996, By: R. R. Rogers and M. M. Yau
0023 %             page: 17, Eq.:2.18
0024 %
0025 % 2009-08-15   Created by Isaac Moradi.
0026 
0027 eps = constants('GAS_CONST_DRY_AIR') / constants('GAS_CONST_WATER_VAPOR'); 
0028 
0029 es = e_eq_water(T);
0030 e = rh .* es ./ 100;
0031 r = eps .* e ./ (p - e);
0032

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005