Closed gavinevans closed 6 years ago
Use case:
In circular_kernel.py, there is a section of code that reorders the resulting cube. This could be factored out and potentially generalised, as at the moment, it is hard-coded to use the percentiles_over_neighbourhood
coordinate. There is some similar functionality existing in check_cube_coordinates for modifying coordinates within an output cube to match the coordinates within the input cube. However, the function suggested in this issue would order the coordinates within an output cube without the need for an input cube. See discusstion in https://github.com/metoppv/improver/pull/259#discussion_r143487493.
Work completed.
As an IMPROVER developer, I want a single utility that consolidates existing functionality that orders coordinates so that I can easily pass a cube into the utility and be confident that the resulting cube has coordinates in the correct order.
Related issues: #209, #166, #236
Existing utilities:
make_stat_coordinate_first
method in #236.ensure_dimension_is_the_zeroth_dimension
function within ensemble_calibration_utilities.pycheck_cube_coordinates
method.Things to consider:
This utility will be extended in the future, as use cases emerge.
Acceptance criteria: