[python #BPA-530494]: Station Plot Projection Issues
- Subject: [python #BPA-530494]: Station Plot Projection Issues
- Date: Fri, 27 Oct 2017 14:13:00 -0600
Thanks for writing. Regarding the shift of barbs: based on a bit of testing
this looks like something that CartoPy handles correctly, but somehow MetPy's
station plot code breaks. Can you open an issue about this at:
That way we can track it and try to get it fixed before the upcoming bug fix
Regarding the use of PlateCarree for the "transform" argument: the transform
argument is something we pass on to CartoPy. CartoPy uses the "transform"
argument as the way for you to tell CartoPy how to interpret the x,y values
that you are passing to plotting functions. So PlateCarree (or Geodetic) are
required when your x,y values correspond to lon,lat values; the projection of
the map (and all drawing on top of it) is done using the projection specified
when creating the axis. It's possible to manually transform your lon/lat values
into e.g. Lambert Conformal, and pass those to plotting functions. You'd then
have to change the "transform" argument to Lambert Conformal (or leave it out
altogether if it matches the projection of the axes).
For barbs (and quiver), things get more complicated. The "transform" argument
in this case not only specifies how to interpret the locations (x,y), but also
defines the native coordinate system for the u,v vector components. Thus, it's
probably easiest to use "transform" as PlateCarree() for station plot.
Regardless, you're still getting the data plotted in the projection you
requested, you're just using "transform" to specify what the native data
coordinate system is.
> I am currently trying to make an upper air map using Metpy's station plot
> and using the Canadian RDPS model data as objective analysis overtop of
> the data. I have been having issues with the projection using cartopy. I
> have attached two images (one of the image I created and another from
> the University of Wyoming) plus a test script I am using to generate
> the map so you can see how things are being done. If you look at the
> winds from my plot in contrast to the one from the University of Wyoming
> in both Alaska and Labrad or you can see the winds are actually skewed
> than the plot from the University of Wyoming. It seems as you move away
> from the central longitude the winds become more skewed. Just wondering
> why this is? Also why do we have to use the PlateCarree() projection
> as our transform in the StationPlot() function? I have tried using the
> same projection as what the map is being generated in (LambertConformal)
> and all the stations plot overtop of each other at one point. I have also
> tried changing projections but I keep ending up with the same issue. Any
> advice or help with this would be much appreciated.
Ticket ID: BPA-530494
Department: Support Python
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata
inquiry tracking system and then made publicly available through the web. If
you do not want to have your interactions made available in this way, you must
let us know in each email you send to us.