CFLib.org – Common Function Library Project

CalculateWindChill(intAirTemperature, intWindSpeed)

Last updated August 22, 2001

Version: 1 | Requires: ColdFusion 5 | Library: ScienceLib

 
Rated 4 time(s). Average Rating: 3.5

Description:
This function calculates the wind chill based upon the new NWS Wind Chill Index calculations. Source: http://www.crh.noaa.gov/dmx/0winter/new_windchill.html According to the documentation, this new cacluation will:

  • Use wind speed calculated at 5 feet (average human face height)
  • Be based upon a human face model
  • Incorporate modern heat flow theory
  • Lower the calm wind threshold to 3 mph
  • Use a consistant standard for skin tissue resistance
  • Assume the worst case for solar radiation (clear night sky)

Return Values:
Returns the wind chill.

Example:

view plain print about
<cfset VARIABLES.intFahrenheit = 35>
<cfset VARIABLES.intWindSpeed = 30>
The Wind Chill is <cfoutput>#CalculateWindChill(VARIABLES.intFahrenheit, VARIABLES.intWindSpeed)#</cfoutput> degrees Fahrenheit.<br>

Parameters:

Name Description Required
intAirTemperature Temperature Yes
intWindSpeed Wind speed in MPH Yes

Full UDF Source:

view plain print about
<cfscript>
/**
 * This function calculates the wind chill based upon the new NWS Wind Chill Index calculations.
 * 
 * @param intAirTemperature      Temperature 
 * @param intWindSpeed      Wind speed in MPH 
 * @return Returns the wind chill. 
 * @author Russel Madere (rmadere@turbosquid.com) 
 * @version 1, August 22, 2001 
 */

function CalculateWindChill(intAirTemperature, intWindSpeed)
{

    return Round(35.74 + (0.6215 * intAirTemperature) - (35.75 * (intWindSpeed ^ 0.16)) + (0.4275 * intAirTemperature * (intWindSpeed ^ 0.16)));

}
</cfscript>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Tayo Akinmade Tayo Akinmade added
arrayTrim
11 day(s) ago

Will Belden Will Belden added
longTime
17 day(s) ago

James Sleeman James Sleeman added
quickSort
27 day(s) ago

Ben Forta Ben Forta added
GetHostAddress
30 day(s) ago

Top Rated

Darwan Leonardo Sitepu EksporSQLData
Rated 5.0, 16 time(s)

Darwan Leonardo Sitepu backupDatabase
Rated 5.0, 13 time(s)

Barney Boisvert indentXml
Rated 5.0, 10 time(s)

Kevin Pepperman generateSsccAsn
Rated 5.0, 4 time(s)

Created by Raymond Camden / Design by Justin Johnson