ESMValGroup / ESMValCore

ESMValCore: A community tool for pre-processing data from Earth system models in CMIP and running analysis scripts.
https://www.esmvaltool.org
Apache License 2.0
42 stars 38 forks source link

cmip6 gfdl_cm4: fix tas height fix to work for concatenated scenarios #2332

Closed mwjury closed 7 months ago

mwjury commented 7 months ago

In its current form the fix for correcting the height in TAS of GFDL-CM4 fails when concatenating the historical with ssp experiments with:

ValueError: Can not concatenate cubes: failed to concatenate into a single cube.
  Scalar coordinates values or metadata differ: height != height

This is due to:

        double height ;
            height:long_name = "height" ;
            height:units = "m" ;
            height:missing_value = 1.e+20 ;
            height:_FillValue = 1.e+20 ;
            height:cell_methods = "time: point" ;
            height:axis = "Z" ;
            height:positive = "up" ;
            height:standard_name = "height" ;
            height:description = "~2 m standard surface air temperature and surface humidity  height" ;

However, the error is raised solely due to:

height:description = "~2 m standard surface air temperature and surface humidity height" ;

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (3f610e7) 94.07% compared to head (13899bd) 94.07%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2332 +/- ## ======================================= Coverage 94.07% 94.07% ======================================= Files 240 240 Lines 13306 13306 ======================================= Hits 12517 12517 Misses 789 789 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

valeriupredoi commented 7 months ago

though a slightly less destructive approach would be to check if that description attr exists, and add it with the said value - but am not 100% sure 1. how useful that is, and 2. if that will change in future data iterations and that'll break iris again :+1: