xarray-contrib / pint-xarray

Interface for using pint with xarray, providing convenience accessors
https://pint-xarray.readthedocs.io/en/latest/
Apache License 2.0
101 stars 12 forks source link

make sure re-quantifying dimension coordinates works #174

Closed keewis closed 2 years ago

keewis commented 2 years ago

Now that we use call_on_dataset the call does not fail because of xarray, but because we pass a Unit object to parse_units. This PR fixes that and adds tests to make sure it stays that way.

I also tightened the restriction on dimension coordinates, as it was possible to change their units by re-quantifying. For #47 we might want to partially lift this restriction again.

keewis commented 2 years ago

I'll merge this now and add a PR to close #47 this week-end