Closed rcaneill closed 1 year ago
cc @keewis @aulemahal
Maybe (kg/m^3)/(g/kg)
and just avoid the exponent?
udunits2 thinks all these options are equal to 1000 m^-3 kg
i.e. cancels the g/kg to scaling constant.
So I confirm that this is an issue from pint, that was already described (https://github.com/hgrecco/pint/issues/1485). The take home message for us is that we should not use parenthesis without the *
sign outside of them.
Some units consists of multiple set of parenthesis, with exponents -1 (e.g. next line). However they are not parsed correctly by pint. https://github.com/DocOtak/gsw-xarray/blob/08a13415e0993ae2b76991d956b569c239d842a6/gsw_xarray/_attributes.py#L651
outputs (what we want):
but without the star
output
I opened an issue in pint about this: https://github.com/hgrecco/pint/issues/1730. In the meantime, we should replace these unit with either a '*' between the parenthesis, or with an extra set of parenthesis. Any opinion on which solution we should implement?