I've been experimenting with checking CMOR's output with the IOOS Compliance Checker using cc-plugin-wcrp. My first experiments have so far been with the Python examples. The command compliance-checker -t wcrp_cmip7 was used to test against CMIP7 compliance checks. Below are the issues that were found in the output of the examples.
I've attached the report that was created with Codex to help find these compliance issues: cmip7_compliance_report.md
Mandatory Issues
Consolidated Metadata
This was an issue that we tried to tackle when making CMOR's output compliant with cmip7_repack (see issue #880). We were able to get CMOR to handle the chunking but not the metadata consolidation. We settled on having that part be done post-CMORization.
We might explore having this performed in CMOR in the future to avoid needing extra steps in the publication pipeline.
Time Squareness
The compliance checker took issue with the monthly time axis using bounds of [0, 31, 60] and time values of [15.5, 45.5] with the 360_day calendar. It expected the time axis to have bounds of [0, 30, 60] and time values of [15, 45].
You can still create compliant files with CMOR as long as you enter compliant time values. However, CMOR currently doesn't check time values if they meet the checker's compliance. The CMIP7 checker validates time values against the filename's start date, frequency, calendar, and time-related cell_methods.
Having CMOR be more rigorous with the time bounds and midpoint checks would be helpful.
standard_hybrid_sigma Coordinate Monotonicity
This is specific to the file generated by example_05_model_levels.py. There was an issue with the values and bounds for the standard_hybrid_sigma axis not being stored in increasing order. It didn't matter which order you gave the values in the example code as CMOR would store them in decreasing order.
The fix was to change the stored_direction attribute of standard_hybrid_sigma to increasing in CMIP7_coordinate.json.
"standard_hybrid_sigma": {
"stored_direction": "increasing",
This either requires a change to the standard_hybrid_sigma entry in the CMIP7 tables, or a change in the compliance checker if it is wrong.
Warning Issues
Missing cell_measures
This was an issue caused by not using the CMIP7_cell_measures.json file to set the cell_measures variable attribute. Using it got rid of all of the warnings for this except for htovgyre. In the case of the htovgyre variable, the compliance checker was expecting its cell_measures to have an empty string. However, CMOR removes attributes that have emtpy string values.
Should CMOR allow attributes with empty strings, or should the compliance checker consider attributes without values or are empty strings to be unnecessary or invalid?
long_name Mismatches
Similar to the cell_measures issue, this could be resolved by using the CMIP7_long_name_overrides.json file to override the long_name attribute of variables to those that are compliant. However, the current file only has a few overrides that don't cover cases for tas or hfls variables in the examples.
The solution should be to expand the long_name overrides to include more cases.
Missing Parent and Sub-Experiment Global Attributes
parent_experiment_id and sub_experiment_id were considered missing required attributes by the compliance checker. However, we have already established that experiments without a parent should not have parent attributes and that subexperiments are not a part of CMIP7. This appears to be a clear mismatch between compliance checker expectations and CMIP7 standards.
Plan
- The most actionable one on CMOR's end that we can start working on is the time axis check. We should make it so that it takes into account the same dataset information as the compliance checker when checking the bounds and midpoint values for time.
- For the consolidated metadata, we could either stick with just doing the repack step after CMORizing or incorporating it into CMOR so that it is performed when writing a file.
- The
long_name and cell_measures issues will require updating our CMIP7 tests and demos to use CMIP7_long_name_overrides.json and CMIP7_cell_measures.json, but it will also require some changes in the cmip7-cmor-trables repo to include more long_name overrides.
standard_hybrid_sigma may need to have its stored_direction value changed. This might include other coordinates with the stored_direction attribute.
- The rules for parent attributes and subexperiments will need to be changed in the compliance checker.
@durack1 @taylor13 @matthew-mizielinski
I've been experimenting with checking CMOR's output with the IOOS Compliance Checker using cc-plugin-wcrp. My first experiments have so far been with the Python examples. The command
compliance-checker -t wcrp_cmip7was used to test against CMIP7 compliance checks. Below are the issues that were found in the output of the examples.I've attached the report that was created with Codex to help find these compliance issues: cmip7_compliance_report.md
Mandatory Issues
Consolidated Metadata
This was an issue that we tried to tackle when making CMOR's output compliant with cmip7_repack (see issue #880). We were able to get CMOR to handle the chunking but not the metadata consolidation. We settled on having that part be done post-CMORization.
We might explore having this performed in CMOR in the future to avoid needing extra steps in the publication pipeline.
Time Squareness
The compliance checker took issue with the monthly time axis using bounds of
[0, 31, 60]and time values of[15.5, 45.5]with the360_daycalendar. It expected the time axis to have bounds of[0, 30, 60]and time values of[15, 45].You can still create compliant files with CMOR as long as you enter compliant time values. However, CMOR currently doesn't check time values if they meet the checker's compliance. The CMIP7 checker validates time values against the filename's start date,
frequency,calendar, and time-relatedcell_methods.Having CMOR be more rigorous with the time bounds and midpoint checks would be helpful.
standard_hybrid_sigmaCoordinate MonotonicityThis is specific to the file generated by example_05_model_levels.py. There was an issue with the values and bounds for the
standard_hybrid_sigmaaxis not being stored in increasing order. It didn't matter which order you gave the values in the example code as CMOR would store them in decreasing order.The fix was to change the
stored_directionattribute ofstandard_hybrid_sigmatoincreasingin CMIP7_coordinate.json.This either requires a change to the
standard_hybrid_sigmaentry in the CMIP7 tables, or a change in the compliance checker if it is wrong.Warning Issues
Missing
cell_measuresThis was an issue caused by not using the CMIP7_cell_measures.json file to set the
cell_measuresvariable attribute. Using it got rid of all of the warnings for this except forhtovgyre. In the case of thehtovgyrevariable, the compliance checker was expecting itscell_measuresto have an empty string. However, CMOR removes attributes that have emtpy string values.Should CMOR allow attributes with empty strings, or should the compliance checker consider attributes without values or are empty strings to be unnecessary or invalid?
long_nameMismatchesSimilar to the
cell_measuresissue, this could be resolved by using the CMIP7_long_name_overrides.json file to override thelong_nameattribute of variables to those that are compliant. However, the current file only has a few overrides that don't cover cases fortasorhflsvariables in the examples.The solution should be to expand the
long_nameoverrides to include more cases.Missing Parent and Sub-Experiment Global Attributes
parent_experiment_idandsub_experiment_idwere considered missing required attributes by the compliance checker. However, we have already established that experiments without a parent should not have parent attributes and that subexperiments are not a part of CMIP7. This appears to be a clear mismatch between compliance checker expectations and CMIP7 standards.Plan
long_nameandcell_measuresissues will require updating our CMIP7 tests and demos to use CMIP7_long_name_overrides.json and CMIP7_cell_measures.json, but it will also require some changes in the cmip7-cmor-trables repo to include morelong_nameoverrides.standard_hybrid_sigmamay need to have itsstored_directionvalue changed. This might include other coordinates with thestored_directionattribute.@durack1 @taylor13 @matthew-mizielinski