Hooks to pre-processor functions
Experience from using Midas in a "production" context shows that reading real-world datasets from CORDEX into midas (by analogy thus also iris) using the vanilla functions of iris causes massive failures because of shortcomings and errors in the metadata. In the wake of perfect metadata climix (and midas) should be equipped with hooks for calling a suitable set of pre-processor functions provided by the user. Tentatively, these functions would handle the following tasks:
- Process the list of files supplied as input argument before the files are read.
- Supplying constraints to the iris.read_raw() for subsetting the input files.
- Process the CubeList immediately after reading and before concatenation.
- Process attributes that differ between the individual cubes in the CubeList (and thus prevents concatenation).
- Handle the situation that concatenation was not fully successful and did not return one cube only. This should be done in an iterative way until the result is one cube, or fail.
- Feed processed attributrtes (from point 4) to the resulting output cube.
- Produce a template for the output filename based on the input filenames.