def sort_coords(coord):
import iris<EOL>order = {'<STR_LIT:T>': -<NUM_LIT:2>, '<STR_LIT>': -<NUM_LIT:1>, '<STR_LIT:X>': <NUM_LIT:1>, '<STR_LIT:Y>': <NUM_LIT:2>}<EOL>axis = iris.util.guess_coord_axis(coord)<EOL>return (order.get(axis, <NUM_LIT:0>), coord and coord.name())<EOL>
Sorts a list of DimCoords trying to ensure that
dates and pressure levels appear first and the
longitude and latitude appear last in the correct
order.