Unidata / UDUNITS-2

API and utility for arithmetic manipulation of units of physical quantities
http://www.unidata.ucar.edu/software/udunits
Other
62 stars 36 forks source link

Temperature difference conversion #122

Open jamarav opened 7 months ago

jamarav commented 7 months ago

Hello everybody,

I am opening this issue concerning temperature processing and conversion. I often encounter the problem of obtaining an incorrect conversion in the case of using variables that by definition result from considering a temperature difference (e.g., in the Heat pump field superheat is defined as SH=Tsuction-Tevap). In this case 5ºC should be considered as 5K. This could be generalized as:

1ΔK = 1Δ°C = 1.8Δ°F = 1.8Δ°R

I usually deal with this problem manually. However, I think it would be more convenient to have a native way to deal with it.

Perhaps it would be useful to have new unit definitions such as delta_kelvin, delta_celsius, etc. Or some alternative way that can distinguish whether the defined temperature is a temperature difference or should be treated in a conventional way.