multi_model_statistics
fail when only a single dataset is given
#1469
Labels
preprocessor
Related to the preprocessor
(Apologies for posting this again in case this was already discussed, but I didn't find an issue about this.)
While testing #673 I realized that
multi_model_statistics
fails when only a single input dataset is given:ESMValCore/esmvalcore/preprocessor/_multimodel.py
Lines 294 to 296 in 9c008ee
Especially with the introduction of
groupy
andensemble_statistics
, I don't think this is good behavior. For most statistics we support there are reasonable default values (i.e. the formulas used to calculate these values work perfectly fine for just one value), e.g. simply return the input data formean
,gmean
,hmean
,min
,max
,sum
,rms
; or return 0 forstd
,var
. I'm not entirely sure about others like percentiles.Would it make sense to just "hardcode" these defaults for these special cases? Unfortunately
iris
also raises an error in this case:iris.exceptions.CoordinateCollapseError: Cannot collapse a dimension which does not describe any data
. @ESMValGroup/esmvaltool-coreteamNote: It is possible to avoid this by using the
exclude
key, but since this only takes dataset names into account it might fail for more complex ensembles andgroupby
settings.The text was updated successfully, but these errors were encountered: