Use weighted_continuous_average in bunkers_storm_motion#2999
Use weighted_continuous_average in bunkers_storm_motion#2999dopplershift merged 3 commits intoUnidata:mainfrom
Conversation
dopplershift
left a comment
There was a problem hiding this comment.
I'm happy with this. I'm curious how bad the test value changes are...I would hope they're not significant.
|
|
Probably a little bigger than I'd like (percentage-wise) but not really scary. |
|
@dcamron Do you want to fix up the tests to get this in the release? |
|
If there's no other community input and we feel good about these changes, I'm glad to. |
|
Hello @dopplershift @dcamron! After reviewing #2092 and #2144 , I think using mean_pressure_weighted for bunkers storm motion calculation might be better. Because the get_layer function in weighted_continuous_average only return pressure profile to pres_prof, which is used in calculating [trapezoid(var_prof, x=pres_prof) / (pres_prof[-1] - pres_prof[0]) for var_prof in others] |
|
@yfNJU Hi! I would point you to #1361, where we intentionally changed EDIT: If you have an updated peer-reviewed publication indicating broad acceptance that using a pressure-weighted mean yields an improved technique, I'd love to see it and would be interested then in updating MetPy's implementation to reflect the latest science. |
Thank you very much for you reply! I reviewed #1361 and confirmed that the method mentioned therein aligns with Eq. (1) in Bunker [(2014)]. Additionally, I agree with #2092's consideration that Eq. (1) in Bunker (2014) appears to assume even sampling of levels in a vertical profile, whereas #2092's approach of using the average value between adjacent layers multiplied by the pressure difference as a weighting factor is more convincing. Additionally, I recommend adding Bunker (2014). to the references of |
From recent discussions and #2092 (comment), a quick update to use
weighted_continuous_averageinbunkers_storm_motionfor the layer wind averages instead ofnp.mean. Opening this up to any discussion before updating any test values (and making sure a small change works back to Minimum.)Checklist