Creating a vertical grid cross section in Wradlib

I produced a gridded product of Reflectivity using wradlib and I want to take a vertical grid cross-section with a start and end point in terms of lat and long. How to do it ?

If it is an xarray.Dataset, I would use metpy’s cross section functionality!

https://unidata.github.io/MetPy/latest/examples/cross_section.html

This is what is used in Py-ART under the hood for the plot_cross_section method of the GridDisplay

@mgrover1 Thanks for your reply. Let me check it out this metpy fuction

I used this Py-ART plot_cross_section. The problem is the interpolation (Barnes, Barnes2, Cressman and Nearest). All interpolation gives me unwanted results, especially near cloud edges. But the interpolation technique used by wradlib gave me better results. So I thought is there any technique to plot vertical cross sections just like Py-ART is available on Wradlib?

Using the metpy functionality here would give you the same result as using the plot_cross_section function. It works generically on xarray datasets, with the exact line here:

You should be able to apply this to grid output from wradlib, as long as it is an xarray dataset.

@mgrover1

This is applicable for pyart grid object which saved as NC file right ?

@adithiyrnair yup! You can read that back in using xarray since it is a netcdf file.

1 Like

@adithiyrnair Thats where you need to fill in fill value areas with a number. Some times I have gone back in and calculated what the minimum detectable signal will be and filled in fill values with that to give the algorithm something to grid to. Otherwise if convolutes (smears) the value out to the search radius.

1 Like