Skip to content

Update cmor-cvs.json#336

Closed
matthew-mizielinski wants to merge 1 commit intoesgvoc_devfrom
matthew-mizielinski-cmor-cvs-changes
Closed

Update cmor-cvs.json#336
matthew-mizielinski wants to merge 1 commit intoesgvoc_devfrom
matthew-mizielinski-cmor-cvs-changes

Conversation

@matthew-mizielinski
Copy link
Copy Markdown
Contributor

@znichollscr, these are the changes I've had to make to use the CVs json file with the examples in https://github.com/WCRP-CMIP/cmip7-cmor-tables/

This isn't for merging, but it would be good to fix the easy items in the code that generates the CVs Json file for cmor, and get an update on the automatic generation of this file as updates to the CVs come in.

Copy link
Copy Markdown
Collaborator

@znichollscr znichollscr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @matthew-mizielinski, all looks good

Only one small question. I assume that the steps needed to add MOHC stuff are clear enough (we have to alter the CVs, then regenerate the table, I can help with this)?

Comment thread cmor-cvs.json
"filename_path_example": "tas_tavg-h2m-hxy-u_mon_glb_g99_CanESM6-MR_1pctCO2_r1i1p1f1_185001-202112.nc",
"filename_path_template": "<variable_id>_<branding_suffix>_<frequency>_<region>_<grid_label>_<source_id>_<experiment_id>_<variant_label>[_<timeRange>].nc"
"filename_example": "tas_tavg-h2m-hxy-u_mon_glb_g99_CanESM6-MR_1pctCO2_r1i1p1f1_185001-202112.nc",
"filename_template": "<variable_id><branding_suffix><frequency><region><grid_label><source_id><experiment_id><variant_label>"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the removal of time range on purpose? As I understand it, that is meant to be there so it should be something like

"filename_template": "<variable_id><branding_suffix><frequency><region><grid_label><source_id><experiment_id><variant_label>[<timeRange>]"

I also don't know whether the trailing .nc is meant to be there or not..?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@znichollscr, I don't think <timeRange> is understood by CMOR at all. If I add it in then we end up with file names like

MIP-DRS7/CMIP7/CMIP/CCCma/CanESM6-MR/1pctCO2/r9i1p1f3/glb/mon/tos/tavg-u-hxy-sea/g99/v20260127/tos_tavg-u-hxy-sea_mon_glb_g99_CanESM6-MR_1pctCO2_r9i1p1f3_timeRange_201801-201802.nc

if I add just .nc to the end I get

MIP-DRS7/CMIP7/CMIP/CCCma/CanESM6-MR/1pctCO2/r9i1p1f3/glb/mon/tos/tavg-u-hxy-sea/g99/v20260127/tos_tavg-u-hxy-sea_mon_glb_g99_CanESM6-MR_1pctCO2_r9i1p1f3_.nc_201801-201802.nc

So it seems leaving these two items out is necessary for recent versions of CMOR (in older versions this string wasn't picked up from the CV json file at all).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, is the bottom line that CMOR is currently hard-wired to append the time-range to whatever filename structure is specified by the data provider in the cmor-cvs.json file? If so, is the time-range something we should put on the list of things that should be handled as input in a future release? Note that for fixed fields (when frequency = "fx"), the time-range is omitted.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it seems leaving these two items out is necessary for recent versions of CMOR (in older versions this string wasn't picked up from the CV json file at all).

Ok great, thanks for checking. Updated now

So, is the bottom line that CMOR is currently hard-wired to append the time-range to whatever filename structure is specified by the data provider in the cmor-cvs.json file?

This is my understanding

If so, is the time-range something we should put on the list of things that should be handled as input in a future release?

Up to the CMOR developers I would say. We're probably not going to change this convention anytime soon so it's not a big issue right now (if we ever do this change the convention, then CMOR will need an update - up to the CMOR developers whether they do the work now 'just in case' or wait until it's actually a problem).

@znichollscr
Copy link
Copy Markdown
Collaborator

znichollscr commented Jan 24, 2026

Thanks @matthew-mizielinski. In terms of how we can implement this, it's a little bit complicated. I've made some pull requests to show you how this works:

  1. fix up generation of the CMOR CVs file (currently the CI for checking the CMOR CVs file in the CMIP7 CVs repo has been ignored, so I had to get that going again first)
  2. update the data specs version entry
  3. update the UKMO information

Once you do all of that, then you end up with a CMOR CVs file like what you have here, see https://github.com/znichollscr/CMIP7-CVs/blob/add-ukmo-entries/cmor-cvs.json

@znichollscr
Copy link
Copy Markdown
Collaborator

For further context about how to keep the CMOR CVs file up to date, see #271

@matthew-mizielinski
Copy link
Copy Markdown
Contributor Author

Only one small question. I assume that the steps needed to add MOHC stuff are clear enough (we have to alter the CVs, then regenerate the table, I can help with this)?

Correct, I think we need a pretty minimal set of details for each model that could be constructed from the information collected by EMD.

@znichollscr
Copy link
Copy Markdown
Collaborator

I'm going to close this PR as I think we've got everything out of it now. #336 (comment) will still be there - up to you whether you continue the conversation in that thread or start a dedicated issue

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

Successfully merging this pull request may close these issues.

3 participants