iris
iris copied to clipboard
Post merge promote aux coord to dim
✨ Feature Request
Suggestion: After merge, if the result has multiple aux coords representing the same dimension, and all but one contain a single repeating point, then that one coord should be promoted to a dim coord, and the others demoted to scalars.
Motivation
When loading certain model output, the pressure coord for geopotential height is not a dim coord, it's an aux coord. There is a forecast period and a time coord, for the same dimension, which contain a single reapeating value. This doesn't happen for other cubes in the same file, which get normal pressure dim coords. This causes the saved netcdf output to contain two separate pressure coordinates, causing problems downstream - mainly in Met and ncview, I think. Ncview also doesn't seem to realise it's pressure at all, it's just called dim0 and shows up as indices instead of pressure levels.
Additional context
We can work around this using loading callbacks.