Hello,
I am encountering an ATTR005 consistency error when running the QC checks on CORDEX-CMIP6 files and I would like to ask if this could be related to the filename consistency check implementation.
The error reported is:
[ATTR005] Consistency: Filename vs Global Attributes
* Filename component 'experiment_id' ('None') does not match global attribute ('evaluation').
* Global attribute 'table_id' not found, skipping comparison.
* Global attribute 'variant_label' not found, skipping comparison.
* Global attribute 'grid_label' not found, skipping comparison.
However, the filename follows the CORDEX-CMIP6 Archive Specifications as described in the official documentation:
https://doi.org/10.5281/zenodo.15047096
According to the specification, CORDEX filenames should follow the pattern:
<variable_id><domain_id><driving_source_id><driving_experiment_id><driving_variant_label><institution_id><source_id><version_realization><frequency>[_<StartTime>-<EndTime>].nc
The .nc file I am testing follows this structure.
Looking at the code, the function check_consistency_filename_from_config calls: check_filename_vs_global_attrs which compares filename components against a predefined list (https://github.com/ESGF/cc-plugin-wcrp/blob/master/checks/consistency_checks/check_attributes_match_filename.py):
_FILENAME_KEYS_CMIP6_COMPARE = [
"variable_id",
"table_id",
"source_id",
"experiment_id",
"variant_label",
"grid_label",
]
From what I understand, the filename is parsed using the filename_template_keys from the CORDEX configuration, but the comparison step still uses the fixed CMIP6 key list (_FILENAME_KEYS_CMIP6_COMPARE). This seems to result in CORDEX filenames being parsed using the CORDEX template but compared using CMIP6 tokens, which could produce false ATTR005 mismatches.
So I would like to ask:
1. Is this behavior expected when running the checker on CORDEX-CMIP6 data?
2. 2. Should CORDEX filename keys also be used in the comparison step instead of the fixed CMIP6 list? Would it make sense to either include a CORDEX-CMIP6 filename key list alongside the CMIP6/CMIP7 ones, or alternatively use the filename_template_keys provided by the configuration for both parsing and comparison so that CORDEX filenames are evaluated using the appropriate template?
Thank you very much for your help @Ayoubnac1 .
Hello,
I am encountering an ATTR005 consistency error when running the QC checks on CORDEX-CMIP6 files and I would like to ask if this could be related to the filename consistency check implementation.
The error reported is:
However, the filename follows the CORDEX-CMIP6 Archive Specifications as described in the official documentation:
https://doi.org/10.5281/zenodo.15047096
According to the specification, CORDEX filenames should follow the pattern:
<variable_id><domain_id><driving_source_id><driving_experiment_id><driving_variant_label><institution_id><source_id><version_realization><frequency>[_<StartTime>-<EndTime>].ncThe .nc file I am testing follows this structure.
Looking at the code, the function
check_consistency_filename_from_configcalls:check_filename_vs_global_attrswhich compares filename components against a predefined list (https://github.com/ESGF/cc-plugin-wcrp/blob/master/checks/consistency_checks/check_attributes_match_filename.py):From what I understand, the filename is parsed using the filename_template_keys from the CORDEX configuration, but the comparison step still uses the fixed CMIP6 key list (
_FILENAME_KEYS_CMIP6_COMPARE). This seems to result in CORDEX filenames being parsed using the CORDEX template but compared using CMIP6 tokens, which could produce false ATTR005 mismatches.So I would like to ask:
1. Is this behavior expected when running the checker on CORDEX-CMIP6 data?
2. 2. Should CORDEX filename keys also be used in the comparison step instead of the fixed CMIP6 list? Would it make sense to either include a CORDEX-CMIP6 filename key list alongside the CMIP6/CMIP7 ones, or alternatively use the
filename_template_keysprovided by the configuration for both parsing and comparison so that CORDEX filenames are evaluated using the appropriate template?Thank you very much for your help @Ayoubnac1 .