Skip to content

ILAMB cmip7 baselines blocked by ZeroDivisionError in ilamb3 spatial_distribution (Taylor score) #781

Description

@lewisjared

Summary

The cmip7 regression baselines for gpp-wecann and gpp-fluxnet2015 cannot be minted: the ILAMB run fails during reference-intermediate generation with a ZeroDivisionError in ilamb3's spatial-distribution (Taylor) analysis. Their cmip6 baselines mint fine; only the CMIP7 path is affected.

Where

ilamb3/analysis/spatial_distribution.py:133:

taylor_score = 4 * (1 + corr) / ((norm_std + 1 / norm_std) ** 2 * 2)

norm_std is the model field's normalised spatial standard deviation. On the CMIP7-converted CanESM5 data for these gpp diagnostics it evaluates to 0, so 1 / norm_std raises ZeroDivisionError. A zero/degenerate spatial standard deviation should be handled (e.g. guard the reciprocal and emit NaN) rather than crashing the whole analysis.

Reproduce

ref test-cases fetch --diagnostic gpp-fluxnet2015
ref test-cases mint --provider ilamb --diagnostic gpp-fluxnet2015
# -> ilamb/gpp-fluxnet2015/cmip7: source stage failed during mint:
#    Reference intermediate data was not generated.  (ZeroDivisionError)

Traceback tail:

File ".../ilamb3/run.py", line 656, in run_analyses
    df, ds_ref, ds_com = a(ref, com)
File ".../ilamb3/analysis/spatial_distribution.py", line 133, in __call__
    taylor_score = 4 * (1 + corr) / ((norm_std + 1 / norm_std) ** 2 * 2)
ZeroDivisionError: float division by zero

Impact

gpp-wecann/cmip7 and gpp-fluxnet2015/cmip7 ship with cmip6 baselines only until this is resolved upstream in ilamb3. Likely affects any diagnostic whose CMIP7 model field is spatially constant over the comparison region.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions