-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The units parsing doesn't currently handle composite unit combinations. Should adjust the following to try to parse the unit strings and allow them through if unyt understands:
yt_xarray/yt_xarray/accessor/_xr_to_yt.py
Lines 62 to 70 in 26a2ace
| def _find_units(self, xr_ds) -> dict: | |
| units = {} | |
| for field in self.fields: | |
| unit = getattr(xr_ds[field], "units", "") | |
| if unit != "" and hasattr(unyt.unit_symbols, unit) is False: | |
| unit = "" | |
| units[field] = unit | |
| return units |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request