[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[python #UMK-725743]: nexrad level III plotting with Metpy
- Subject: [python #UMK-725743]: nexrad level III plotting with Metpy
- Date: Mon, 28 Jun 2021 16:22:26 -0600
Greetings!
I think changing your call to pcolor to:
plot = ax.pcolor(lat, lon, data, cmap=cmap, norm=norm, zorder = 0,
transform=ccrs.PlateCarree())
In your original code, with CartoPy when you don't pass `transform`, it assumes
the x/y values you pass in (the `lat` and `lon` arrays in this case) are in the
same coordinates as your Axes, which in this case is a Lambert Conformal
projection. To tell it they represent coordinates in a lat/lon projection, you
need to pass `transform=ccrs.PlateCarree()`, as I've done above.
Hope this helps!
Ryan
> Hi Ryan,
> Thanks for the tips. OK, I've made some progress, but I think I'm missing
> something still.
>
> the FSX-demo5.py script :
> http://www.met.sjsu.edu/weather/radartest/FSX-demo5.py
>
> produces this, with correct radar data and orientation:
> http://www.met.sjsu.edu/weather/radartest/demo-5.png
>
> But when I uncomment the set_extent line, I can get the counties to plot,
> but not the actual data.
> http://www.met.sjsu.edu/weather/radartest/FSX-demo6.py
>
> http://www.met.sjsu.edu/weather/radartest/demo-6.png
>
> <http://www.met.sjsu.edu/weather/radartest/demo-6.png>
Ticket Details
===================
Ticket ID: UMK-725743
Department: Support Python
Priority: Low
Status: Closed
===================
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.