Describe the bug
The CO2S derived variable adds a non-scalar auxiliary coordinate for the pressure, which makes the multi-model statistics preprocessor fail with the following error message:
File "/work/bd0854/b309137/esmval/ESMValCore/esmvalcore/preprocessor/_multimodel.py", line 427, in _combine
raise ValueError(
ValueError: Multi-model statistics failed to merge input cubes into a single array:
0: mole_fraction_of_carbon_dioxide_in_air / (1e-06) (time: 60)
1: mole_fraction_of_carbon_dioxide_in_air / (1e-06) (time: 60)
2: mole_fraction_of_carbon_dioxide_in_air / (1e-06) (time: 60)
Coordinates in cube.aux_coords (non-scalar) differ: air_pressure.
The recipe runs when using a regridding function before the global mean, as that removes this aux coordinate. Barring the idea of removing the aux coordinate from the derived variable, as this is nice information to have in some circumstances, there are a few options I could see to solve this issue:
Remove non-scalar aux coordinates for multi-model statistics calculations, similar to the regrid preprocessor
Also compute the multi-model statistics for the aux variables (also non-scalar)
Also give errors using the regrid preprocessor in this case because "different aux coordinates mean they should not be mixed"
Personally I'd prefer option 2 from a physical standpoint, as it loses the least amount of information while giving plausible results. Thoughts?
Describe the bug The CO2S derived variable adds a non-scalar auxiliary coordinate for the pressure, which makes the multi-model statistics preprocessor fail with the following error message:
The recipe runs when using a regridding function before the global mean, as that removes this aux coordinate. Barring the idea of removing the aux coordinate from the derived variable, as this is nice information to have in some circumstances, there are a few options I could see to solve this issue:
Personally I'd prefer option 2 from a physical standpoint, as it loses the least amount of information while giving plausible results. Thoughts?
Minimal working recipe: