Default units of "1" or "unknown"
- Dominant language
- Python
- Stars
- 7
- Forks
- 10
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 5
Description
# ✨ Feature Request
Iris 3 changed the default unit for a cube from "1" to "unknown". As part of the work to upgrade ANTS to use iris 3, a couple of functions were altered to preserve the iris 2 behaviour: [here](https://github.com/MetOffice/ANTS/blob/dbda2a48738af462776ad85da7ea308a6168a703/lib/ants/utils/cube.py#L1133-L1134) and [here](https://github.com/MetOffice/ANTS/blob/dbda2a48738af462776ad85da7ea308a6168a703/lib/ants/utils/cube.py#L1449-L1450).
## Requirements
We should:
1. Confirm the iris 3 behaviour is consistent with CF conventions (it most likely is, but it's worth checking).
2. Remove those workarounds to instead use the iris 3 behaviour.
3. Evaluate the impact. For F03 ancillary files, there should be no change (the unit information is defined by the STASH code rather than the units attribute), so testing should focus on UKCA netCDFs and UG-ANTS/LFRic.
Related issue: https://github.com/MetOffice/ancillary-file-science/issues/33
Contributor guide
Research direction
Start in lib/ants/utils/cube.py at the two linked workarounds around lines 1133-1134 and 1449-1450, then verify Iris 3's default-unit behavior against CF conventions. Remove the compatibility handling and assess the effect on UKCA netCDFs and UG-ANTS/LFRic, confirming that F03 ancillary files remain unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100