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
Windchill formula uses direct values of Celsius. The hack we had in
there to make that work with units did not work properly with Kelvin.
Instead, just convert to Celsius, drop units, and attach proper units
after calc.
This should work, but doesn't (full trace included).
/Users/johnleeman/anaconda/envs/unidata-workshop/lib/python3.6/site-packages/metpy/units.py in wrapper(*args, **kwargs)
204 ' x = x * units.meter / units.second')
205 raise ValueError(msg)
--> 206 return func(*args, **kwargs)
207
208 return wrapper
/Users/johnleeman/anaconda/envs/unidata-workshop/lib/python3.6/site-packages/metpy/calc/basic.py in windchill(temperature, speed, face_level_winds, mask_undefined)
159 delta = temperature - 0. * units.degC
160 wcti = (13.12 * units.degC + 0.6215 * delta -
--> 161 11.37 * units.delta_degC * speed_factor + 0.3965 * delta * speed_factor)
162
163 # See if we need to mask any undefined values
/Users/johnleeman/anaconda/envs/unidata-workshop/lib/python3.6/site-packages/pint/quantity.py in add(self, other)
585
586 def add(self, other):
--> 587 return self._add_sub(other, operator.add)
588
589 radd = add
/Users/johnleeman/anaconda/envs/unidata-workshop/lib/python3.6/site-packages/pint/quantity.py in _add_sub(self, other, op)
574 units = other._units
575 else:
--> 576 raise OffsetUnitCalculusError(self._units, other._units)
577
578 return self.class(magnitude, units)
OffsetUnitCalculusError: Ambiguous operation with offset unit (degC, kelvin).
The text was updated successfully, but these errors were encountered: