Skip to content

Xarray Unit Troubles In 1.0 #1749

Answered by jthielen
jsillin asked this question in Q&A
Mar 5, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

This looks to be a current sticking point in MetPy (I've opened #1752 to have an issue to keep track of it). Based on some quick exploration, I can get basic SkewT stuff working with just xarray, but not cape/cin shading. Mixing xarray and Pint Quantities reproduces the TypeError/ConversionError you found above, and it looks like you have some manual creation of quantities rather than just using source xarray objects, so I believe that is what going on in your example.

Unfortunately, this likely means either waiting for fixes in MetPy (or maybe even upstream in matplotlib if we can't fix the mixed object issues here) or casting all your xarray objects in the plotting calls to Pint quantit…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jsillin
Comment options

@jthielen
Comment options

jthielen Mar 7, 2021
Collaborator

@jsillin
Comment options

@jsillin
Comment options

Answer selected by dopplershift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants