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

[python #AEC-201933]: Help with MetPy plotting?



Greetings!

Apologies, there was a glitch in the code I sent you that I didn't catch while 
testing. `assign_coords` doesn't work in-place, but returns a new Dataset that 
you need to hold onto and use. There's also an issue where Metpy's plotting 
expects longitude to have some units, so you need to assign those units after 
assigning the coordinate. Try this:

    ds = ds.assign_coords(longitude=ds.longitude - 360)

    # Set units on longitude
    ds.longitude.attrs['units'] = 'degree'

Cheers!

Ryan


Ticket Details
===================
Ticket ID: AEC-201933
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.