coecms / frontdetection

Apache License 2.0
2 stars 2 forks source link

Unit handling #2

Closed ccarouge closed 1 year ago

ccarouge commented 3 years 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.

Possible solution: add a function to convert ta to K.

aidanheerdegen commented 3 years ago

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.

greensh16 commented 1 year ago

Now using metpy which solves this problem.