Skip to content

Regridded tos fields are different with Dask<=2024.8.2 and Dask>=2024.9.0 #2607

Closed
@schlunma

Description

@schlunma

Hi, I have a fun one.

While testing #2517 using recipe_schlund20esd.yml, I found something very weird. For some models (not all!), one specific plot looks vastly different:

grafik

I could trace this back to the Dask version. Both plots use the current main branch of ESMValCore and ESMValTool, and all dependencies except for Dask are identical. The issue started appearing in Dask 2024.9.0 and also appears in the current version (2024.12.0, released yesterday). The latest version that looks ok is 2024.8.2.

This plot is derived from three variables. Only one preprocessed dataset is different in those two versions: tos, which is preprocessed like this:

  tropical_mask_40:
    regrid:
      target_grid: 2x2
      scheme: linear
    extract_region:
      start_latitude: -40
      end_latitude: 40
      start_longitude: 0
      end_longitude: 360

Here is one time slice (March 1980) of the original data and the preprocessed data with the two different Dask versions:

grafik

At first glance, both regridded datasets appear fine. However, if you look closely, you can see huge differences (e.g, 6°C in the Mediterranean Sea) between the two, but the one in the earlier Dask version clearly is more similar to the input data (which is what we want). Thus, the old version is clearly the correct one here.

I am honestly shocked that something like this could happen. The new field looks okayish and reasonable on its own, so without proper analysis and comparison to the original data you probably would think it's okay. This is super dangerous and makes this recipe not reproducible...

I have no idea what's going on here. Since all other dependencies are identical (e.g. numpy 1.26.4, iris 3.11, iris-esmf-regrid 0.11.0, netcdf4 1.7.2), this must be an issue of Dask. However, since the corresponding code is burried under many layers (iris-esmf-regrid, iris), it's very hard to find the actual problem.

@ESMValGroup/esmvaltool-coreteam any ideas? Should we pin Dask for now as an immediate fix and then try to dig deeper to find the underlying problem?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions