Skip to content

Multi-model statistics on changed standard names through CMIP projects #1985

@bettina-gier

Description

@bettina-gier

Describe the bug
I'm a walking bugfinder right now =D
I wanted to apply the multi_model_statistics preprocessor on gpp obs data for a "multi-obs mean", but encountered an error with the standard name

ValueError: Multi-model statistics failed to merge input cubes into a single array:
0: gross_primary_productivity_of_carbon / (kg m-2 s-1) (time: 72; latitude: 90; longitude: 180)
1: gross_primary_productivity_of_biomass_expressed_as_carbon / (kg m-2 s-1) (time: 72; latitude: 90; longitude: 180)
  cube.standard_name differs: 'gross_primary_productivity_of_carbon' != 'gross_primary_productivity_of_biomass_expressed_as_carbon'
  cube.long_name differs: 'Carbon Mass Flux out of Atmosphere due to Gross Primary Production on Land' != 'Carbon Mass Flux out of Atmosphere Due to Gross Primary Production on Land [kgC m-2 s-1]'

Turns out the standard name of gpp is different in CMIP5 and CMIP6
The CMIP5 standard name is considered an official alias according to the cf conventions, so it isn't wrong.

This occurs because two of the datasets are OBS while another is OBS6. As the OBS6 dataset isn't added yet, I've made a small example recipe just using CMIP5 and CMIP6 data to reproduce the error:

Example recipe
# ESMValTool
---
documentation:

  title: test
  description: test
  authors:
    - gier_bettina

preprocessors:

  test:
    regrid:
      target_grid: 2x2
      scheme: linear
    multi_model_statistics:
      span: overlap
      statistics: [mean]

diagnostics:

  diag_test:
    variables:
      gpp:
        preprocessor: test
        mip: Lmon
        project: CMIP6
        exp: historical
        ensemble: r1i1p1f1
        grid: gn
        start_year: 2000
        end_year: 2005
        additional_datasets:
          - {dataset: ACCESS-ESM1-5}
          - {dataset: BNU-ESM, project: CMIP5, ensemble: r1i1p1}
    scripts: null

I assume this is more of an iris issue and I guess we should forward it to them to ask if they will allow the use of different standard_names on cube merges if they are official aliases @ESMValGroup/technical-lead-development-team? @zklaus probably interesting for you as our standards person!

In my current case I was using the multi_model_statistics in the diagnostic so I did a quick and dirty workaround, just wanted to raise this issue to make it known!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions