Home > atmlab > h2o > thermodynamics > r2e.m

r2e

PURPOSE ^

R2E convert water vapor mixing ratio to water vapor pressure

SYNOPSIS ^

function ew = r2e(r, p)

DESCRIPTION ^

  R2E convert water vapor mixing ratio to water vapor pressure

   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    ew = r2e(r, p)
        
 OUT   ew  water vapor pressure [Pa]
 IN    r   mixing ratio [], it can be a scalar or a vector
       p   air pressure [Pa], it can be a scalar or a vector
      
 EXAMPLE:
       ew = r2e(0.0063, 100000)
       ew = 1002.9

 ACCURACY: R2E calculates water vapor pressure 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 ^

r2e.m

SOURCE CODE ^

0001 function ew = r2e(r, p)  
0002 %  R2E convert water vapor mixing ratio to water vapor pressure
0003 %
0004 %   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    ew = r2e(r, p)
0009 %
0010 % OUT   ew  water vapor pressure [Pa]
0011 % IN    r   mixing ratio [], it can be a scalar or a vector
0012 %       p   air pressure [Pa], it can be a scalar or a vector
0013 %
0014 % EXAMPLE:
0015 %       ew = r2e(0.0063, 100000)
0016 %       ew = 1002.9
0017 %
0018 % ACCURACY: R2E calculates water vapor pressure according to thermodynamic
0019 %           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 ew = r .* p ./ (eps + r);

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