Open mcgibbon opened 6 years ago
cf-units now works on Python 3.6/3.7. Can we restart discussion/work around this issue?
I was playing around with the code, and if I change this line: https://github.com/mcgibbon/sympl/blob/f97e21153c27e1659612699fd717be093ff106d6/sympl/_core/units.py#L81
With an equivalent statement using cf-units, the code is twice as fast. cf-units supports all aliases setup in this file. It does not understand 'dimensionless', and that needs to be handled. Otherwise, this should be easy to optimize -- use cfunits if it exists.
@JoyMonteiro brought up that currently when run in SCM mode, unit conversion checking takes up a significant amount of CliMT's runtime. We may want to add a faster backend for unit handling.
See climt/issues/75 for original discussion of this issue.
cfunits is a good candidate as a backend, but it appears to only work on Python 2. When I run cfunits-1.5.1 on Python 3, I get:
The more official package appears to be cf-units, hosted by the Met office, but that is also incompatible with Python 3 according to their docs and my attempt to download it through conda. We could try to fix it to work with Python 3 and submit a PR to them.
Or we could look for another option.