Add Cross Sections for Observed Soundings
What should we add?
GEMPAK provides the program SNCROSS, which draws cross sections through observed sounding data. MetPy offers metpy.interpolate.cross_section, which assists in the generation of cross sections for gridded data (analogous to GEMPAK's GDCROSS), but I'm not aware of any ready-made way to generate the plots SNCROSS does with MetPy.
The basic algorithm GEMPAK seems to use is to:
- Determine where in view coordinates (i.e., along the x-axis) each sounding station is located
- Calculate the desired parameters at each level for each sounding
- Contour the resulting irregular grid(s), and/or plot the resulting vectors (barbs or arrows)
- Add extra stuff like the curve showing what portion of the cross-section is underground Various options are provided such as whether you want the y-axis logarithmic with respect to pressure or linear with respect to pressure.
Reference
No response
Thanks for submitting this, it would be a great addition. In the mean time, we have an example of this on the Unidata Python Gallery (which will be incorporated into the new MetPy Cookbook we are working and will be hosted through Project Pythia).
https://unidata.github.io/python-training/gallery/observational_data_cross_section/
There is an function created in the example that could serve as a starting point for making a plotting class for an observational cross section.
Thanks for the example! That would definitely serve as a good start for a MetPy implementation.