Return Saturation Water Vapor Pressure by Clausius-Clapeyron Law

(c) 2013 by Barton Paul Levenson


Language:
Basic

Dialect:
Microsoft Visual Basic Express 2010

Discussion:
This routine estimates the saturation water vapor pressure using an approximation to the Clausius-Clapeyron Law. An approximation for the latent heat of water vapor (liquid to gas transition) is also used. L refers to the index number of a layer in a radiative-convective model, and is used to retrieve the ambient temperature in that layer--you can modify it to get the temperature elsewhere, of course, if you want to use this code for something other than an RCM. Rstar refers to the universal gas constant. I usually use a value of R* = 8314.4612 Joules per Kelvin per kilogram. Temp is temperature in K.


    ' CC returns the saturation water vapor pressure by the Clausius-
    ' Clapeyron law.
    Function CC(ByVal L As Integer) As Double
        Const Recip As Double = 1.0# / 273.15#
        Const Rw As Double = Rstar / 18.0153#

        Dim es As Double                ' Saturation vapor pressure.
        Dim Lw As Double                ' Latent heat of water.

        With Layer(L)
            Lw = 3148365.5# - 2370.0# * .Temp
            es = 611.18# * Exp((Lw / Rw) * (Recip - 1.0# / .Temp))
        End With
        Return es
    End Function ' CC


Page created:06/18/2013
Last modified:  06/18/2013
Author:BPL