-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello! Can you edit your post or reply here with some of your original code and the full error you received? A screenshot or copy-and-paste will do. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I see you have a commented out line constructing a geop = gpdata['z'][:]
geop_w_units = units.Quantity(geop, 'm ** 2 / s ** 2')
# geop_w_units = geop * units('m ** 2 / s ** 2') also can work most of the time
hgt = metpy.calc.geopotential_to_height(geop_w_units) We have a more helpful error to catch this and are not using it here! So thanks for catching that 😄 |
Beta Was this translation helpful? Give feedback.
I see you have a commented out line constructing a
Quantity
. You will need to create one with associated units for yourgeop
so thatgeopotential_to_height()
can understand the units of your values, e.g.We have a more helpful error to catch this and are not using it here! So thanks for catching that 😄