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

Add Mean Sea Level Pressure Reduction #1700

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

tjwixtrom
Copy link
Contributor

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

  • Tests added
  • Fully documented
  • Test on more real data

Base automatically changed from master to main February 22, 2021 22:39
@dopplershift
Copy link
Member

In general, this looks pretty good. Is vapor pressure what's usually used in the NWS correction?

@tjwixtrom
Copy link
Contributor Author

Yes, that is my understanding. I am attaching the NWS manual since it is hard to find online. SLP reduction is in chapter 7.
manual_of_barometry_1.pdf

Copy link
Member

@dopplershift dopplershift left a 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')
Copy link
Member

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

Comment on lines +1252 to +1254
mean_temp = temperature.to('kelvin') + \
((lapse_rate * geopotential_height) / 2.).to('kelvin') + \
(vapor_pressure * humidity_correction(geopotential_height)).to('kelvin')
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants