1

I'm a metpy user.

I was calculating the unit of temperature using metpy.

I found one difference in the process of subtraction.

For Celsius and Fahrenheit temperatures, subtracting or adding values will output delta_degree_celsius, but for kelvin temperature, it will be output as kelvin.

I wonder what are the differences between these and the results.

d1 = 10 * units.degC
d2 = 5 * units.degC

d1 - d2
= 5 delta_degree_celsius

d3 = 10 * units.kelvin
d4 = 5 * units.kelvin

d3 - d4
= 5 kelvin
Pranav Hosangadi
  • 23,755
  • 7
  • 44
  • 70
이수현
  • 11
  • 2
  • 1
    Because Celsius is not an absolute unit. https://unidata.github.io/MetPy/latest/tutorials/unit_tutorial.html#temperature Sure, 5 deltaDegC is e same as 5 Kelvin, but I suppose they want to remember that it came from Celsius for some reason – Pranav Hosangadi Jan 11 '23 at 17:05
  • Thank you. Thanks to you, I understood right away. – 이수현 Jan 13 '23 at 12:35

1 Answers1

0

While Kelvin and delta_degree_Celsius are equivalent, the delta_degree_Celsius is created by Pint (the unit library used by MetPy) as part of its machinery to generically handle units that have a non-0 offset. For more information, see Pint's documentation on temperature conversion.

DopplerShift
  • 5,472
  • 1
  • 21
  • 20