Unidata / MetPy

MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.
https://unidata.github.io/MetPy/
BSD 3-Clause "New" or "Revised" License
1.25k stars 414 forks source link

Alternative calculations #142

Open nguy opened 8 years ago

nguy commented 8 years ago

Without opening a can of worms, are the developers open to alternative calculations (i.e. non-Bolton). For example allowing the user to choose water or ice for saturation vapor pressure calculation?

dopplershift commented 8 years ago

Open to it, absolutely. I don't think it can be done without opening a can of worms, but this seems like stuff that's general and therefore within scope.

Do you have a list in mind? Because it'd be useful to list a bunch to see how it would make sense to proceed.

nguy commented 8 years ago

The proposed list is below. Feel free to nix any/all.

Some of these are implementations of Univ. Wyo sounding page calculations, which in some cases use GEMPAK calculations are far as I'm aware. @oolman can comment on this maybe?

thermo.py

kinematics.py

deeplycloudy commented 8 years ago

While we're talking non-Bolton formulations, there is an extensive list of saturation vapor pressure formulations with respect to water and ice at http://cires1.colorado.edu/~voemel/vp.html - including IDL source for each formula at the bottom of the page. As the page notes, these can be important when dealing with outputs from certain instruments that assume certain formulations. And the WMO standard is Goff-Gratch, not Bolton, though of course Bolton is widely used.

There are ~infinite refinements we could undertake - Pruppacher and Klett also give formulae for the temperature dependence of the specific heats of each water phase, which in turn impact the latent heating value and other calculations. A choice of smart defaults useful for self-consistent calculations at a high level seems like a good idea.

For theta-e and friends, George Bryan (2008, On the Computation of Pseudoadiabatic Entropy and Equivalent Potential Temperature, MWR) has a optimized, self-consistent set of equations for theta-E with a constant Lv.

deeplycloudy commented 3 years ago

As part of work on a class project by @Janfisch, @mlasel and @jcssouza, an extensive inter-comparison of saturation vapor pressure calculations has been completed. It include expressions over both water and ice, drawn from both theoretical and empirical fits, and plots comparisons to known laboratory data. Please see the notebook at their repository for a detailed discussion and recommendations. They note that their discussion also touches on #1469 and #508.

@wam-salley and @michaelanand01 were also undertook a similar class project and implemented a couple options for saturation vapor pressure over water. I’ve asked them to revise the implementation in their notebook to clarify whether their implementation of Huang is for SVP over ice or water, to include some percentage error plots. Note there is an accompanying notebook with the narrative discussion accompanying the Huang implementation and plots.