-
Notifications
You must be signed in to change notification settings - Fork 5
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
relhum #172
base: main
Are you sure you want to change the base?
relhum #172
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Meowdy! See your PR preview: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
ncl/ncl_entries/meteorology.ipynb
Outdated
"source": [ | ||
"## relhum\n", | ||
"\n", | ||
"NCL's `relhum` calculates relative humidity given temperature, mixing ratio, and pressure as described in \"Improved Magnus Form Approximation of Saturation Vapor Pressure\".{footcite}`magnus_1996`\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this came from the GeoCAT-comp docstring and/or the here in the NCL code for relhum_ice, but I don't know that it's a good reference for relhum. As far as I can tell the connection is to the form of equation used to approximate saturation vapor pressure (maybe) and not either the overall RH equation or a specific instance of the equation used to calculate saturation vapor pressure.
In the NCL code the comments for the relhum function reference CCM Processor routines: https://github.com/NCAR/ncl/blob/c4de4acd24af095abcd5e705d174fd7eb553f186/ni/src/lib/nfpfort/relhum_dp.f#L16
There are some old CCM Processore User's Guides that reference similar relhum equations:
https://opensky.ucar.edu/islandora/object/technotes%3A394?search_api_fulltext=processor
https://opensky.ucar.edu/islandora/object/technotes%3A151?search_api_fulltext=processor
These don't have have the (1-eps) or 0.378 term though that's in the NCL and GeoCAT code and interestingly something folks were recently confused about over on WRF-Python..
The User's Guides also don't have a reference for the table values used or how they were derived. Mike shared some old code with me, but I wasn't finding much there either for references.
It seems like a long story and perhaps related to the many different definitions / approximations.
I think the short answer here is probably to cite the NCL code and maybe leave an open issue somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the description, and made this issue in the meantime (#190)
Co-authored-by: Katelyn FitzGerald <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove the references the 1996 journal article (I'm fairly sure this isn't even the right reference for the saturation vapor pressure definition much less RH), but otherwise this looks great to me.
Co-authored-by: Katelyn FitzGerald <[email protected]>
Co-authored-by: Katelyn FitzGerald <[email protected]>
PR Summary
Covers
relhum
to calculate relative humidity given temperature, mixing ratio, and pressure as part of Meteorology functionalityRelated Tickets & Documents
Closes #165
PR Checklist
General