cf_units.py broken with pint>=0.24
ATM test cases are failing with
FAILED tests/core/test_sdk.py::TestInput::test_fail_accept - KeyError: 'dimensionless'
FAILED tests/data/test_cf_units.py::TestCfUnits::test_cf_units - KeyError: 'dimensionless'
FAILED tests/data/test_tools.py::TestDataTools::test_prepare - KeyError: 'dimensionless'
FAILED tests/data/test_tools.py::TestDataTools::test_quantify - KeyError: 'dimensionless'
FAILED tests/modules/test_debug.py::TestPushDebugConsumer::test_consumer - KeyError: 'dimensionless'
FAILED tests/modules/test_simplex_noise.py::TestSimplexNoise::test_simplex_uniform - KeyError: 'dimensionless'
FAILED tests/modules/test_simplex_noise.py::TestSimplexNoise::test_simplex_unstructured - KeyError: 'dimensionless'
FAILED tests/modules/test_weighted_sum.py::TestWeightedSum::test_weighted_sum_fail_units_weights - KeyError: 'dimensionless'
FAILED tests/tools/test_inspect.py::TestInspect::test_inspect_component - KeyError: 'dimensionless'
Which is due to a bug in the cf_units.py module we copied from cf-xarray.
They already investigate this problem:
- https://github.com/xarray-contrib/cf-xarray/pull/523
- https://github.com/xarray-contrib/cf-xarray/issues/522
- https://github.com/hgrecco/pint/issues/2024
We could integrate the fix from the pull-request in cf-xarray to fix this.