Home > atmlab > h2o > thermodynamics > water_vapor_pressure.m

water_vapor_pressure

PURPOSE ^

WATER_VAPOR_PRESSURE water vapor pressure ew

SYNOPSIS ^

function ew = water_vapor_pressure(rh,T,p)

DESCRIPTION ^

 WATER_VAPOR_PRESSURE water vapor pressure ew

 FORMAT    ew =  water_vapor_pressure(rh, T, p)
        
 OUT   ew  water vapor pressure [Pa]
 IN    rh  relative humidity [%], a scalar or a tensor
       T   air temperature [K], a scalar or a tensor
       p   air pressure [Pa], a scalar or a tensor

 EXAMPLE:
       ew = water_vapor_pressure(50, 298, 100000)
       ew = 1.5959e+03

 ACCURACY: WATER_VAPOR_PRESSURE calculates water vapor pressure
           according to thermodynamic functions without any assumptions.
           The accuracy is decreased if air pressure is not provided.

 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.20

 2009-08-15   Created by Isaac Moradi.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

water_vapor_pressure.m

SOURCE CODE ^

0001 function ew = water_vapor_pressure(rh,T,p)
0002 % WATER_VAPOR_PRESSURE water vapor pressure ew
0003 %
0004 % FORMAT    ew =  water_vapor_pressure(rh, T, p)
0005 %
0006 % OUT   ew  water vapor pressure [Pa]
0007 % IN    rh  relative humidity [%], a scalar or a tensor
0008 %       T   air temperature [K], a scalar or a tensor
0009 %       p   air pressure [Pa], a scalar or a tensor
0010 %
0011 % EXAMPLE:
0012 %       ew = water_vapor_pressure(50, 298, 100000)
0013 %       ew = 1.5959e+03
0014 %
0015 % ACCURACY: WATER_VAPOR_PRESSURE calculates water vapor pressure
0016 %           according to thermodynamic functions without any assumptions.
0017 %           The accuracy is decreased if air pressure is not provided.
0018 %
0019 % Reference: A short course in cloud physics (Chapter II, water vapor and
0020 %             its thermodynamic effects); 1996, By: R. R. Rogers and M. M. Yau
0021 %             page: 17, Eq.:2.20
0022 %
0023 % 2009-08-15   Created by Isaac Moradi.
0024 
0025 es = e_eq_water(T);
0026 
0027 % use simply e/es if p isnt given
0028 if nargin < 3
0029     ew = rh .* es ./ 100;    
0030 else
0031     ew = rh .* es .* p ./ (100 .* (p - es) + rh .* es);
0032 end
0033 
0034 
0035 
0036 
0037

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