Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to be more permissible about meta data #771

Open
clintseinen opened this issue Jan 29, 2025 · 4 comments
Open

ability to be more permissible about meta data #771

clintseinen opened this issue Jan 29, 2025 · 4 comments

Comments

@clintseinen
Copy link

In previous versions of CMOR (3.5.0 was what we were using) if there were problems with some meta associated with parent runs, for example, say:

parent_activity_id=piControl

and the activity_id for the child run was also set to piControl, according to the CMIP6 CVs, CMOR would see that the only valid parent_activity_id for this simulation is piControl-spinup so it would make a silent replacement and give this warning:

C Traceback:
In function: _CV_checkExperiment
! called from: cmor_setGblAttr
! called from: cmor_write
!

!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Warning: Your input attribute "parent_experiment_id" with value
! "piControl" will be replaced with value "piControl-spinup"
! as defined for experiment_id "piControl".
!
!  See Control Vocabulary JSON file.(projects/CMIP6/cmor-tables/CMIP6_CV.json)
!
!
!!!!!!!!!!!!!!!!!!!!!!!!!

and carry on its merry way. However, now that we are finally moving to 3.9.0 I ran some tests and I've noted that this is now an error. This new behaviour is undoubtedly the better way to go, as we don't want meta data being silently updated for users.

However, we have gotten quite used to cmorizing data for development runs, where we are fast and loose with defining what type of experiment/activity our runs our (many users of our modelling system aren't even aware these variables are important). So much so that we've add functionality to:

  1. let our cmor wrapper pycmor be more permissible about things if a --production flag is not used and
  2. hack the CV's at our model configuration step

ultimately so developers can use the same analysis tools on our dev runs, compared to the production runs.

This brings me to my question - is there a way via the CMOR API's to make it more permissible to CV misses like this? If so, I could extend our --production flag such that it extends to the CMOR API calls and toggle that option for dev runs.

@clintseinen
Copy link
Author

Happy to just close the issue if there is an way to toggle this! If not, a feature like this would be nice. Priority for it would be low, as there are work arounds and once CMIP7 starts in ernest, we will definitely want these to be flagged as errors

@matthew-mizielinski
Copy link

In the input json file e.g. here there is a "_cmip6_option" entry. I think if you omit this option then a lot, but not all, of the metadata checking is skipped (e.g. experiment_id and activity_id can be any string).

It might be worth considering renaming, or adding a suitable alias, for this option with a view to its use in CMIP7.

@mauzey1
Copy link
Collaborator

mauzey1 commented Jan 30, 2025

Yes, removing the _cmip6_option parameter from your input file will remove CV checks for the source_id, experiment_id, and parent attributes.

I might keep _cmip6_option in CMOR for legacy reasons and add another parameter that does the same thing for CMIP7 and others.

@durack1
Copy link
Contributor

durack1 commented Feb 12, 2025

@mauzey1 it seems there may be an action with regard to code changes for CMIP7 in this issue, e.g. a _cmip7_option or similar, so not sure this should be closed.

It likely relates to #762, so maybe the key point should be migrated into that issue, and this one closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants