Units of the parcel temperature profile #1773
-
Hi MetPy support, I think the end result is the same, but I just want to confirm this. I saw that the parcel temperature profile returned by the 'parcel_profile_with_lcl' is given in Kelvin, but when the 'lfc' function is called (e.g. when calculating LFC, or CAPE/CIN), but my environment temperature profile is given in deg. Celsius. I was wondering whether the 'find_intersections' function in the 'lfc' function takes the different units into consideration (i.e, convert the environment and parcel temperature profiles to the same unit) before finding the intersections between the two. If so, how is this handled? Is this done by the units wrapper called before the 'find_intersections' function (@units.wraps(('=A', '=B'), ('=A', '=B', '=B', None, None)))? Just making sure. I'm not very familiar with MetPy, so I have lots of stupid questions. Thanks, David |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Greetings! No such thing as a stupid question. 😆 So the |
Beta Was this translation helpful? Give feedback.
Greetings! No such thing as a stupid question. 😆
So the
@units.wraps(('=A', '=B'), ('=A', '=B', '=B', None, None))
around the definition offind_intersections
uses Pint to say that the first 3 arguments tofind_intersections
have units of A, B, B, respectively, and returns two values with the units of A and B.wraps
also checks to make sure that's correct.