Home > atmlab > h2o > thermodynamics > e2spechum.m

e2spechum

PURPOSE ^

E2SPECHUM Converts the water vapor pressure to a specific humidity

SYNOPSIS ^

function [q] = e2spechum(e,P)

DESCRIPTION ^

 E2SPECHUM   Converts the water vapor pressure to a specific humidity

  Converts water vapor pressure (e) to specific humidity (q) according to 
  equation 3.57 and 3.59 on page 80 of Atmospheric Science An Introductory 
  Survey. John M. Wallace & Peter V. hobbs 2nd Edition 

  FORMAT [q] = e2spechum(e,P)

  OUT       q = specific humidity [kg/kg].
  IN      e = vapor pressure of water [Pa]
          P = total Pressure in [Pa]

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

e2spechum.m

SOURCE CODE ^

0001 % E2SPECHUM   Converts the water vapor pressure to a specific humidity
0002 %
0003 %  Converts water vapor pressure (e) to specific humidity (q) according to
0004 %  equation 3.57 and 3.59 on page 80 of Atmospheric Science An Introductory
0005 %  Survey. John M. Wallace & Peter V. hobbs 2nd Edition
0006 %
0007 %  FORMAT [q] = e2spechum(e,P)
0008 %
0009 %  OUT       q = specific humidity [kg/kg].
0010 %  IN      e = vapor pressure of water [Pa]
0011 %          P = total Pressure in [Pa]
0012 
0013 % 2010-08-18 Created by Marston Johnston
0014 
0015 function [q] = e2spechum(e,P)
0016 
0017 rqre_element_math(e,P);
0018 
0019 eps = 0.622;
0020 
0021 q = (eps * e) ./ (P-(1-eps) .* e);
0022

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