Skip to content

Bug Report: Inconsistent execution of Data Plausibility checks and numpy.ndarray error #6

@Ayoubnac1

Description

@Ayoubnac1

Summary

When running the Data Plausibility section (DATA001DATA006) of cmip6.py of the cc-plugin-wcrp compliance checks on different CMIP6 variables, the behavior is inconsistent between files :

  • For some variables (e.g. tas, pr), the Data Plausibility checks (DATA001–DATA006) are not executed at all.
  • For others (e.g. sfcWind), the checks do run, but one of them throws the following error:
    'numpy.ndarray' object has no attribute 'filled'`
  • Despite this error appearing in all datasets, only sfcWind shows the full [DATA001] to [DATA006] block in the report, while tas and pr skip the entire group.

Observed Behavior

  • Example excerpt from the sfcWind report:
{
  "name": "[DATA002] FillValue/MissingValue plausibility for 'sfcWind'",
  "weight": 2,
  "value": [0, 1],
  "msgs": [
    "Warning: _FillValue and missing_value are the same.",
    "Error during FillValue check: 'numpy.ndarray' object has no attribute 'filled'"
  ]
}

But in the corresponding tas and pr reports:

  • No DATA001–DATA006 entries appear at all.
  • The error message is not logged, even though the same exception occurs internally.

Steps to Reproduce

  1. Run the plugin on the three different CMIP6 files (daily frequency):
compliance-checker -t wcrp_cmip6:1.0 pr_day_NorCPM1_historical_r1i1p1f1_gn_19500101-20141231.nc -f json -o output_pr.json
compliance-checker -t wcrp_cmip6:1.0 tas_day_NorCPM1_historical_r1i1p1f1_gn_19500101-20141231.nc  -f json -o output_tas.json
compliance-checker -t wcrp_cmip6:1.0 sfcWind_day_NorCPM1_historical_r1i1p1f1_gn_19500101-20141231.nc  -f json -o output_sfcWind.json
  1. Compare the generated JSON reports :
  • sfcWind → [DATA001]–[DATA006] appear with partial errors.
  • tas and pr → missing the entire [DATAxxx] block.
  1. Notice the identical traceback message printed during execution:
    'numpy.ndarray' object has no attribute 'filled'

Attachments

the 3 cmip6 test files to download via this link : https://filesender.renater.fr/?s=download&token=dafaaff9-de23-4ef5-953d-86428f044218

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions