-
Notifications
You must be signed in to change notification settings - Fork 415
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
Add Mean Sea Level Pressure Reduction #1700
base: main
Are you sure you want to change the base?
Conversation
In general, this looks pretty good. Is vapor pressure what's usually used in the NWS correction? |
Yes, that is my understanding. I am attaching the NWS manual since it is hard to find online. SLP reduction is in chapter 7. |
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'm ok with using vapor pressure since that's the native form. We have to pick one, might as well go with the native.
Fitted from table of empirically derived values found in NWS Manual of Barometry. | ||
""" | ||
const = np.array([5.04969979e-6, 1.30236277, 1.96926239e-1]) | ||
return (const[0] * (height.to('meter').m**const[1]) + const[2]) * units('degF / hPa') |
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 units on the correction should be delta_degF / hPa
mean_temp = temperature.to('kelvin') + \ | ||
((lapse_rate * geopotential_height) / 2.).to('kelvin') + \ | ||
(vapor_pressure * humidity_correction(geopotential_height)).to('kelvin') |
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.
You shouldn't need to manually convert to Kelvin if you make the change above.
Description Of Changes
Adds function for sea level pressure reduction from surface variables and altitude. I am marking this as a draft as I am expecting the need for some discussion regarding implementation details. The function implements the NWS standard reduction with some minor changes, most notably using a curve fit rather than look-up table. Discussion regarding the appropriate moisture variable to expect may also be desired. Some additional testing on real data is still needed, my initial testing with model output looked pretty good, I want to compare more directly with other implementations and use it on some surface station data.
Checklist