Skip to content

Accept Fahrenheit as temperature units

Currently several (all?) temperature based index_functions contain the following check of input data

assert (units == Unit("Kelvin")) or (units == Unit("degree_Celsius"))

which does not allow for US (and some other) observational datasets. Consider replacing this with the following

assert unit in temperature_units

and somewhere else:

temperature_units = [
    Unit("Kelvin"), 
    Unit("degree_Celsius"), 
    Unit("degree_Fahrenheit"),
]
# other T-units seems less likely, but
# can easily be added at this one place