Open sgdecker opened 3 years ago
How do you calculate a zonal/meridional mean that's still plot-able in a 2D plan view? What does that even look like? At best you'd be smearing something across one dimension, which doesn't seem...useful. I'd love to see a concrete use of this from GEMPAK to see what we can do.
Here's a quick example showing what GEMPAK produces using XAV
. At this time, we can see the mean jet position is north of the CONUS, but south of most of Alaska. It would be harder to determine that without the map.
For a more in-depth example, see Fig. 2.24 in Lackmann's textbook.
cough That would require me to have said textbook 😉 I'm an OU grad, there is only "Book of Howie Bluestein". 😆
Since broadcasting should work without copying data in calculation contexts, we could consider adding support in the declarative framework to do what you're looking for when receiving 1D data.
Ha! Well, in any case, adding support would be great. I've personally never used YAV
myself, but I figure if XAV
can be done, the other would be almost free.
The GEMPAK Conversion Guide recommends
numpy.mean(a, axis=1)
as equivalent toXAV
, but the NumPy (or xarray) version removes the dimension across which the mean is computed, so you can't plot it on a map without doing extra work. This is a request to have functions that do that work.To be specific, for a suitably defined DataArray
ht500
, this generates a plot:but this does not:
I am suggesting we add a function that can generate a zonal or meridional mean that can be plotted w/o extra work on the user's part. Or, if there is a variation of
mean
that does what I am looking for that I haven't discovered yet, the suggestion would be to modify the GEMPAK Comparison Guide accordingly.