Home > atmlab > h2o > thermodynamics > e2T_eq_water.m

e2T_eq_water

PURPOSE ^

E2T_EQ_WATER estimates temperature from equilibrium water vapor pressure

SYNOPSIS ^

function T = e2T_eq_water(ew)

DESCRIPTION ^

 E2T_EQ_WATER  estimates temperature from equilibrium water vapor pressure
               over liquid water

 Calculate the temperature from equilibrium water vapor pressure over
 a plane surface of liquid water according to Sonntag, 1994. For details
 see the <e_eq_water>.
 
 The temperature of 0C corresponds to 273.15K. (Not 273.16K, as stated
 in the Leiterer paper.)
 
 The Sonntag method is to estimate ew from temperaure as follows:
 ei(T) = exp[ a/T + b + cT + dT^2 + e Ln(T) ]
 for the temperatures range between -100 and 100 C, Ln(T) ranges
 between 5.1542 and 5.922. The mean value of Ln(T) which is for T = 273.15
 is equal to 5.61. First, the mean value of Ln(T) is used to help to solve
 the equation analytically. Matlab function 'toots' is used to calculate
 roots of the resulted function. 
 In normal range of the temperature, estimated T differs about 5 K but
 outside this range the difference is much more. In the next step, a loop 
 is used to adjust T.

 FORMAT   T = e2T_eq_water(ew)

 OUT    T  = Temperature in [K]. 
 IN    ew = Equilibrium water vapor pressure in [Pa].
            It must be a scalar.

 EXAMPLE:
       T = e2T_eq_water(1500)
       Te = 286.1712

 ACCURACY: The accuracy was checked using e_eq_water(T). I calculated ew
 using e_eq_water for a given T then used ew as input of this function and
 afterwards compared the output of this function to the original T:
 T1 = [150:0.1:370]
 ew = e_eq_water(T1)
 for i=1:1:length(T1), T2(i) = e2T_eq_water(ew(i)); end
 max(abs(T2 - T1)) = 0.0086
 min(abs(T2 - T1)) = 3.6522e-04
 mean(abs(T2 - T1)) = 0.0027

 References:
 
 Sonntag, D., Advancements in the field of hygrometry, Meteorologische
 Zeitschrift, 3, 51-66, 1994.
 
 Helten, M. et al, In-flight comparison of MOZAIC and POLINAT water
 vapor measurements, JGR, 104, 26.087-26.096, 1999.
 
 Leiterer U. et al, Improvements in Radiosonde Humidity Profiles Using
 RS80/RS90 Radiosondes of Vaisala, Beitr. Phys. Atmosph., 70(4),
 319-336, 1997. 

 2009-08-27 Created by Isaac Moradi

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

e2T_eq_water.m

SOURCE CODE ^

0001 function T = e2T_eq_water(ew)
0002 % E2T_EQ_WATER  estimates temperature from equilibrium water vapor pressure
0003 %               over liquid water
0004 %
0005 % Calculate the temperature from equilibrium water vapor pressure over
0006 % a plane surface of liquid water according to Sonntag, 1994. For details
0007 % see the <e_eq_water>.
0008 %
0009 % The temperature of 0C corresponds to 273.15K. (Not 273.16K, as stated
0010 % in the Leiterer paper.)
0011 %
0012 % The Sonntag method is to estimate ew from temperaure as follows:
0013 % ei(T) = exp[ a/T + b + cT + dT^2 + e Ln(T) ]
0014 % for the temperatures range between -100 and 100 C, Ln(T) ranges
0015 % between 5.1542 and 5.922. The mean value of Ln(T) which is for T = 273.15
0016 % is equal to 5.61. First, the mean value of Ln(T) is used to help to solve
0017 % the equation analytically. Matlab function 'toots' is used to calculate
0018 % roots of the resulted function.
0019 % In normal range of the temperature, estimated T differs about 5 K but
0020 % outside this range the difference is much more. In the next step, a loop
0021 % is used to adjust T.
0022 %
0023 % FORMAT   T = e2T_eq_water(ew)
0024 %
0025 % OUT    T  = Temperature in [K].
0026 % IN    ew = Equilibrium water vapor pressure in [Pa].
0027 %            It must be a scalar.
0028 %
0029 % EXAMPLE:
0030 %       T = e2T_eq_water(1500)
0031 %       Te = 286.1712
0032 %
0033 % ACCURACY: The accuracy was checked using e_eq_water(T). I calculated ew
0034 % using e_eq_water for a given T then used ew as input of this function and
0035 % afterwards compared the output of this function to the original T:
0036 % T1 = [150:0.1:370]
0037 % ew = e_eq_water(T1)
0038 % for i=1:1:length(T1), T2(i) = e2T_eq_water(ew(i)); end
0039 % max(abs(T2 - T1)) = 0.0086
0040 % min(abs(T2 - T1)) = 3.6522e-04
0041 % mean(abs(T2 - T1)) = 0.0027
0042 %
0043 % References:
0044 %
0045 % Sonntag, D., Advancements in the field of hygrometry, Meteorologische
0046 % Zeitschrift, 3, 51-66, 1994.
0047 %
0048 % Helten, M. et al, In-flight comparison of MOZAIC and POLINAT water
0049 % vapor measurements, JGR, 104, 26.087-26.096, 1999.
0050 %
0051 % Leiterer U. et al, Improvements in Radiosonde Humidity Profiles Using
0052 % RS80/RS90 Radiosondes of Vaisala, Beitr. Phys. Atmosph., 70(4),
0053 % 319-336, 1997.
0054 %
0055 % 2009-08-27 Created by Isaac Moradi
0056 
0057 % Coefficients for Ew:
0058 a = -6096.9385;
0059 b = 21.2409642;
0060 c = -2.711193e-2;
0061 d = 1.673952e-5;
0062 e = 2.433502;
0063 
0064 % set initial temperature as 273.15
0065 T = 273.15;
0066 T1 = T - 100; % just to allow loop to start
0067 
0068 % continue the loop until the difference between the temperatures calculated
0069 % at two consequent steps is less than 0.05 K
0070 while abs(T1 - T) > 0.05    
0071     T1 = T;
0072     % calculate coefficients of the cubic function
0073     f = e .* log(T1) + b - log(ew);
0074 
0075     % coefficients for the cubic function which is
0076     % d .* ew^3 + c  .* ew^2 + f .* ew + a
0077     p = [d c f a];
0078 
0079     % roots of the mentioned cubic function
0080     T = roots(p);
0081 
0082     % pick the real number
0083     T = T(3);
0084 end
0085

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