<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://ocotal.iarc.uaf.edu/index.php?action=history&amp;feed=atom&amp;title=DewPoint_Calculator_Routine</id>
	<title>DewPoint Calculator Routine - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://ocotal.iarc.uaf.edu/index.php?action=history&amp;feed=atom&amp;title=DewPoint_Calculator_Routine"/>
	<link rel="alternate" type="text/html" href="http://ocotal.iarc.uaf.edu/index.php?title=DewPoint_Calculator_Routine&amp;action=history"/>
	<updated>2026-05-12T22:48:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://ocotal.iarc.uaf.edu/index.php?title=DewPoint_Calculator_Routine&amp;diff=1641&amp;oldid=prev</id>
		<title>137.229.92.251 at 20:53, 28 November 2011</title>
		<link rel="alternate" type="text/html" href="http://ocotal.iarc.uaf.edu/index.php?title=DewPoint_Calculator_Routine&amp;diff=1641&amp;oldid=prev"/>
		<updated>2011-11-28T20:53:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This shorty calculates dew point from dry bulb air temperature and relative humidity so daily / monthly averages can be computed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sub DewPoint_Calcs()&lt;br /&gt;
&lt;br /&gt;
'' This subroutine runs through a worksheet and calculates dewpoint from relative humidity and air temperature&lt;br /&gt;
'' as per the Dingman book appendix.&lt;br /&gt;
&lt;br /&gt;
    Dim inputrow As Long&lt;br /&gt;
    Dim outputrow As Long&lt;br /&gt;
    Dim inputtempcol As Integer&lt;br /&gt;
    Dim inputrhcol As Integer&lt;br /&gt;
    Dim outputdpcol As Integer&lt;br /&gt;
    Dim inputWS As Integer&lt;br /&gt;
    Dim outputWS As Integer&lt;br /&gt;
    Dim eastar As Double&lt;br /&gt;
    Dim temperature As Double&lt;br /&gt;
    Dim Wa As Double&lt;br /&gt;
    Dim ea As Double&lt;br /&gt;
    Dim dewpoint As Double&lt;br /&gt;
    &lt;br /&gt;
    inputWS = 1&lt;br /&gt;
    inputrow = 4&lt;br /&gt;
    inputtempcol = 5&lt;br /&gt;
    inputrhcol = 8&lt;br /&gt;
    outputWS = inputWS&lt;br /&gt;
    outputrow = inputrow&lt;br /&gt;
    outputdpcol = 15&lt;br /&gt;
    &lt;br /&gt;
    Do While Worksheets(inputWS).Cells(inputrow, inputtempcol).Value &amp;lt;&amp;gt; &amp;quot;&amp;quot;&lt;br /&gt;
        '' #1 Read in the values&lt;br /&gt;
        If Abs(Worksheets(inputWS).Cells(inputrow, inputtempcol).Value) &amp;lt;&amp;gt; 6999 And _&lt;br /&gt;
                Abs(Worksheets(inputWS).Cells(inputrow, inputtempcol).Value) &amp;lt;&amp;gt; 7777 And _&lt;br /&gt;
                Abs(Worksheets(inputWS).Cells(inputrow, inputtempcol).Value) &amp;lt;&amp;gt; 9999 And _&lt;br /&gt;
                Abs(Worksheets(inputWS).Cells(inputrow, inputtempcol).Value) &amp;lt;&amp;gt; 9999.9 Then&lt;br /&gt;
            temperature = Worksheets(inputWS).Cells(inputrow, inputtempcol).Value&lt;br /&gt;
        Else:&lt;br /&gt;
          temperature = 6999&lt;br /&gt;
        End If&lt;br /&gt;
        If Abs(Worksheets(inputWS).Cells(inputrow, inputrhcol).Value) &amp;lt;&amp;gt; 6999 And _&lt;br /&gt;
                Abs(Worksheets(inputWS).Cells(inputrow, inputrhcol).Value) &amp;lt;&amp;gt; 7777 And _&lt;br /&gt;
                Abs(Worksheets(inputWS).Cells(inputrow, inputrhcol).Value) &amp;lt;&amp;gt; 9999 And _&lt;br /&gt;
                Abs(Worksheets(inputWS).Cells(inputrow, inputrhcol).Value) &amp;lt;&amp;gt; 9999.9 Then&lt;br /&gt;
            Wa = Worksheets(inputWS).Cells(inputrow, inputrhcol).Value&lt;br /&gt;
        Else:&lt;br /&gt;
            Wa = 6999&lt;br /&gt;
        End If&lt;br /&gt;
        If temperature &amp;lt;&amp;gt; 6999 And Wa &amp;lt;&amp;gt; 6999 Then&lt;br /&gt;
            eastar = 0.611 * (Exp((17.3 * temperature) / (temperature + 237.3)))&lt;br /&gt;
            ea = eastar * Wa / 100&lt;br /&gt;
            dewpoint = (Log(ea) + 0.4926) / (0.0708 - 0.00421 * Log(ea))&lt;br /&gt;
        Else:&lt;br /&gt;
            dewpoint = 6999&lt;br /&gt;
        End If&lt;br /&gt;
        Worksheets(outputWS).Cells(outputrow, outputdpcol).Value = dewpoint&lt;br /&gt;
        outputrow = outputrow + 1&lt;br /&gt;
        inputrow = inputrow + 1&lt;br /&gt;
    Loop&lt;br /&gt;
    Range(&amp;quot;A12&amp;quot;).Select&lt;br /&gt;
End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>137.229.92.251</name></author>
		
	</entry>
</feed>