metoppv / improver

IMPROVER is a library of algorithms for meteorological post-processing.
http://improver.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
103 stars 85 forks source link

Utility to enforce coordinate order #237

Closed gavinevans closed 6 years ago

gavinevans commented 7 years ago

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:

Things to consider:

This utility will be extended in the future, as use cases emerge.

Acceptance criteria:

gavinevans commented 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.

bayliffe commented 6 years ago

Work completed.