You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so it appears that for temperatures this is potentially broken as inappropriate units are being reattached after the calculation is done correctly in base units.
The text was updated successfully, but these errors were encountered:
Doing a bit of testing, this appears to be an issue with the use of temperature units. If you substitute in different units (e.g., m/s) then you get the expected result. Due to differences being taken in the process, that is likely where something is going awry. What is coming out is the average value in Kelvin (likely getting to Kelvin somewhere in the process to get to a base unit), but then just attaching the original units to this.
It appears that the trapz function accepts units at this point and removing the magnitude calls in the function yields the following results:
Whether we wish have the result return the original units can be open to discussion, although with this current behavior it would act similarly to the parcel_profile function to return the temperatures in Kelvin. An initial PR fixing this issue will be submitted shortly.
This would product an expected value of around 19 degrees, but there appears to be a unit issue.
produces
292.2026315789474 <Unit('degree_Celsius')>
Now if we try
produces
19.05263157894737 <Unit('kelvin')>
so it appears that for temperatures this is potentially broken as inappropriate units are being reattached after the calculation is done correctly in base units.
The text was updated successfully, but these errors were encountered: