-
Notifications
You must be signed in to change notification settings - Fork 300
Description
Content update 2019-12-09
The notes below identify various problem areas, which leads to the following division of sub-tickets
(Todo list) :
-
Cube.copyandCube.__eq__: Fix copy to include Ancillary variables and Cell measures #3546 - cube indexing =
Cube.__getitem__: __getitem__ gets ancillary variables #3548 - concatenate and merge : Ancillary Variables - Fix concatenate, merge #3552
- cube arithmetic : (cf. [PI] Implement new cube arithmetic proposal #3478)
- statistics = collapse/aggregated_by/rolling_window : PI-3483: Ensure collapsed/aggregated_by/rolling_window treat ancillary variables properly #3549
- "all other cube operations" : ref Ancillary Variables - validate 'all other' cube operations #3554 . Includes :
- 'other' indexing-like cube methods :
Cube.subsetandCube.intersection - regrid/interpolate :
Cube.regid,Cube.interpolateand all schemes code Cube.xml()
- 'other' indexing-like cube methods :
Original summary
Followon from #3422
A bunch of cube operations are not respecting Ancillary Variables.
We are deferring these issues from #3422.
See this comment to #3422.
In principle, for most of these things the handling should be the same as for AuxCoords and (probably) CellMeasures. Unfortunately, it seems that there are some nasty outstanding bugs relating to CellMeasures anyway -- e.g. they don't survive cube.copy() !.
At least these operations need fixing :
cube indexing (__getitem__) is discarding AVs, even when they don't map to the indexed dimensioncube.copy() is discarding AVsand it is also discarding CellMethods !
cube equality (__eq__) is ignoring AVsbut not AuxCoords.CellMethods I'm not sure ?
- updated 2019-11-22 above core cube ops are now fixed
- copy : indexing : equality/equality#2
- however fixing those probably has knock-ons elsewhere within this list of things to fix ..
- cube arithmetic is discarding AVs
- but not AuxCoords.
- CellMethods I'm not sure ?
- ( note : probably fixed by fixing 'copy' ? )
- cube.collapsed() is discarding AVs
- even when they don't map to collapsed dimensions
- for AuxCoords it applies the same aggregator as the main data
- for CellMethods I'm not sure
- cube.xml ignores AVs
- also CellMethods ?
- but not AuxCoords.
There is also a longer list of 'similar' cube operations which should be checked, some of which may be fixed "automatically" by addressing the above ones, and others possibly not :
- stats : aggregated_by; rolling_window
- regrid-like : regrid, interpolate,
- index-like : extract, subset, intersection,
Notes:
- In all the cases where the result dimensions are different from the input, we need to check for correct handling both when Ancillary Variables are mapped over the modified/lost dimensions, and when they are not.
- in some cases, the appropriate solution may not be the same for all of AuxCoords, CellMeasures and Ancillary Variables.
- for example, AuxCoords are regridded with the main data : Probably is also appropriate for Ancillary Variables (the nature and meaning of which is not known), but arguably not to Cell Measures (where it is).
NOTE:
It may well prove appropriate to fix these issues by grouping together AuxCoords, CellMeasures and AncillaryVariables, and handling them all similarly.