MetPy icon indicating copy to clipboard operation
MetPy copied to clipboard

Add Cross Sections for Observed Soundings

Open sgdecker opened this issue 2 years ago • 2 comments

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:

  1. Determine where in view coordinates (i.e., along the x-axis) each sounding station is located
  2. Calculate the desired parameters at each level for each sounding
  3. Contour the resulting irregular grid(s), and/or plot the resulting vectors (barbs or arrows)
  4. 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

sgdecker avatar Sep 13 '23 14:09 sgdecker

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.

kgoebber avatar Sep 13 '23 21:09 kgoebber

Thanks for the example! That would definitely serve as a good start for a MetPy implementation.

sgdecker avatar Sep 14 '23 20:09 sgdecker