Closed ccarouge closed 1 year ago
The code tries to handle temperature in C and K but the handling isn't great or complete.
This line in wetbulb will break if ta is in C: delta_t=(ta-t_dewpoint)/steps At this point, ta is still in C but t_dewpoint is in K.
delta_t=(ta-t_dewpoint)/steps
Possible solution: add a function to convert ta to K.
Was wondering if it might be useful to use Pint and then noticed pint-xarray is a thing, and pint in cf-xarray is a work in progress.
Now using metpy which solves this problem.
The code tries to handle temperature in C and K but the handling isn't great or complete.
This line in wetbulb will break if ta is in C:
delta_t=(ta-t_dewpoint)/steps
At this point, ta is still in C but t_dewpoint is in K.Possible solution: add a function to convert ta to K.