Home > atmlab > h2o > thermodynamics > potential_temperature.m

potential_temperature

PURPOSE ^

POTENTIAL_TEMPERATURE estimates potential temperature theta

SYNOPSIS ^

function theta = potential_temperature(rh, T, p)

DESCRIPTION ^

 POTENTIAL_TEMPERATURE estimates potential temperature theta

   theta The temperature that an unsaturated parcel of dry air would have
   if brought adiabatically and reversibly from its initial state to a
   standard pressure, p0, typically 100 kPa 
   (REF: http://amsglossary.allenpress.com/glossary/)

 FORMAT    theta = potential_temperature(rh, T, p)
        
 OUT   theta   potential temperature [K]
 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:
       theta = potential_temperature(50, 298, 110000)
       theta = 290.0127

 ACCURACY: 
           POTENTIAL_TEMPERATURE gives a very good estimation of theta

 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 7, Eq., 1.23 but k is replaced with that in E. 2.27,
              page 19.

 2009-08-15   Created by Isaac Moradi.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

potential_temperature.m

SOURCE CODE ^

0001 function theta = potential_temperature(rh, T, p) 
0002 % POTENTIAL_TEMPERATURE estimates potential temperature theta
0003 %
0004 %   theta The temperature that an unsaturated parcel of dry air would have
0005 %   if brought adiabatically and reversibly from its initial state to a
0006 %   standard pressure, p0, typically 100 kPa
0007 %   (REF: http://amsglossary.allenpress.com/glossary/)
0008 %
0009 % FORMAT    theta = potential_temperature(rh, T, p)
0010 %
0011 % OUT   theta   potential temperature [K]
0012 % IN    rh  relative humidity [%, rh > 0], it can be a scalar or a tensor
0013 %       T   air temperature [K], it can be a scalar or a tensor
0014 %       p   air pressure [Pa], it can be a scalar or a tensor
0015 % EXAMPLE:
0016 %       theta = potential_temperature(50, 298, 110000)
0017 %       theta = 290.0127
0018 %
0019 % ACCURACY:
0020 %           POTENTIAL_TEMPERATURE gives a very good estimation of theta
0021 %
0022 % Reference: A short course in cloud physics (Chapter II, water vapor and
0023 %             its thermodynamic effects); 1996, By: R. R. Rogers and M. M. Yau
0024 %              page 7, Eq., 1.23 but k is replaced with that in E. 2.27,
0025 %              page 19.
0026 %
0027 % 2009-08-15   Created by Isaac Moradi.
0028 
0029 % set constants
0030 cp = constants('SPECIFIC_HEAT_CP_DRY_AIR');
0031 cv = constants('SPECIFIC_HEAT_CV_DRY_AIR');
0032 k = (cp - cv) / cp; % c is specific heat at constant pressure and volume
0033 
0034 % calculate water vapor mixing ratio
0035 r = water_vapor_mixing_ratio(rh, T, p);
0036 
0037 % calculate potential temperature theta
0038 k_m = k .* (1 - 0.2 .* r);
0039 theta = T .* power((100 ./ (p ./ 1000)), k_m);      
0040

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