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

Fix AB water vapor pressure calc #4956

Merged
merged 5 commits into from
May 29, 2017
Merged

Fix AB water vapor pressure calc #4956

merged 5 commits into from
May 29, 2017

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror commented Feb 27, 2017

Fix #4951

This will effect both AtragMX and AB.
_pSat was in hPa, needs to be converted to Pa

This will require dll rebuild, so I'm thinking push to 3.10?
The effect on air density is fairly small.

Edit: We could just change all extension calls to use 100 * EGVAR(weather,currentHumidity) to avoid having to recompile? Effect would be the same.

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Feb 27, 2017
@bux
Copy link
Member

bux commented Feb 28, 2017

Good find.

Copy link
Member

@TheMagnetar TheMagnetar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for better clarity/consistency

@@ -94,7 +94,7 @@ double calculateAirDensity(double temperature, double pressure, double relativeH

if (relativeHumidity > 0) {
double _pSat = 6.1078 * pow(10, ((7.5 * temperature) / (temperature + 237.3)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't 6.1078 (hPa) be converted to Pa directly here instead of converting it in vaporPressure? I find it more clear than later multiplying by 100.0 and having _pSat in hPa while vaporPressure in Pa

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to use 610.78 and added note

@PabstMirror PabstMirror merged commit ff212d5 into master May 29, 2017
@PabstMirror PabstMirror deleted the fixABHumidity branch May 29, 2017 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants