Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cap windchill heat from vapor pressure to 50C #36450

Merged
merged 1 commit into from
Dec 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/weather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,14 @@ int get_local_windchill( double temperature, double humidity, double windpower )
tmpwind = tmpwind * 0.44704;
tmptemp = temp_to_celsius( tmptemp );

windchill = 0.33 * ( humidity / 100.00 * 6.105 * exp( 17.27 * tmptemp /
( 237.70 + tmptemp ) ) ) - 0.70 * tmpwind - 4.00;
// Cap the vapor pressure term to 50C of extra heat, as this term
// otherwise grows logistically to an asymptotic value of about 2e7
// for large values of temperature. This is presumably due to the
// model being designed for reasonable ambient temperature values,
// rather than extremely high ones.
windchill = 0.33 * std::min<float>( 150.00, humidity / 100.00 * 6.105 *
exp( 17.27 * tmptemp / ( 237.70 + tmptemp ) ) ) - 0.70 *
tmpwind - 4.00;
// Convert to Fahrenheit, but omit the '+ 32' because we are only dealing with a piece of the felt air temperature equation.
windchill = windchill * 9 / 5;
}
Expand Down