[python #MDL-836889]: metpy station plot
- Subject: [python #MDL-836889]: metpy station plot
- Date: Tue, 09 Jul 2019 09:29:05 -0600
I ran our station plot example within the MetPy repository on the versions of
Cartopy and Metpy that you provided, but was unable to recreate your issue. Can
you provide your full code and data so that we can recreate the issue on our
side and see what's going on?
> Iâve been using station_plot to create maps of a local observation network.
> It was working great, but I was having unrelated issues with my anaconda
> installation and decided to start clean. Now when I run the same code, I get
> the following error message:
> line 299, in plot_barb
> u, v = self.ax.projection.transform_vectors(trans, self.x, self.y, u, v)
> File "lib/cartopy/_crs.pyx", line 437, in cartopy._crs.CRS.transform_vectors
> AttributeError: 'list' object has no attribute âshape'
> Hereâs a little snippet of my code that calls station_plot:
> u,v=wind_components(wsparr*units('m/s'), wdirarr*units.deg)
> Iâve checked the u and v wind components that are being passed into
> station_plot, and they do have a shape attribute:
> Out: (9,)
> If I comment out line 299 in station_plot.py ( u, v =
> self.ax.projection.transform_vectors(trans, self.x, self.y, u, v) ), things
> seem to work as they should.
> By the way, this is with version 0.10.0 of metpy and 0.17.0 of cartopy. Iâm
> not sure which package versions I was using before when things worked fine.
Ticket ID: MDL-836889
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.