[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #XFK-525399]: A question about wind barbs



Greetings!

Glad you were able to solve it. `.m` is short for `.magnitiude` (which also 
works), and returns the data without any unit information, giving back e.g. the 
raw NumPy array. It's necessary for some functions from scipy, cartopy, etc. 
that check the types of input values.

`.to()` is another method for the Pint Quantity objects we use for unit 
tracking. Depending on how your data are read in, you may not have that method 
on those objects. Some of the MetPy functions you use may be converting your 
data from whatever objects you started with into Pint Quantities.

Hope this helps!

Ryan


> FYI, I got my plot working using sample 
> https://unidata.github.io/python-training/gallery/500hpa_hght_winds/
> 
> I still don't know what the .m does. That and the to function
> 
> uwnd_smooth.to('kt').m
> 
> 
> seem to only exist when I convert my stuff using a gaussian filter?
> 
> 


Ticket Details
===================
Ticket ID: XFK-525399
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.