Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
137f09f
first commit
alaupin-ipsl Aug 27, 2025
57f8111
feat : Add activity_id
alaupin-ipsl Aug 29, 2025
a2b714a
feat : Add CMIP_brandedVariable collection
alaupin-ipsl Aug 29, 2025
85820ef
feat : Add CMIP7_dataConventions collection
alaupin-ipsl Aug 29, 2025
228d093
feat : Add CMIP7_dataRegion collection
alaupin-ipsl Aug 29, 2025
b120bcb
feat : Add CMIP7_datasetSpecs collection
alaupin-ipsl Aug 29, 2025
d84e8a8
feat : Add CMIP7_datasetVariant collection
alaupin-ipsl Aug 29, 2025
da3d5b6
feat : Add CMIP7_datasetVersion collection
alaupin-ipsl Aug 29, 2025
7f79e14
feat : Add CMIP7_dateCreated collection
alaupin-ipsl Aug 29, 2025
599e0ef
feat : Add CMIP7_experiment collection
alaupin-ipsl Aug 29, 2025
cc89e54
feat : Add CMIP7_forcing collection
alaupin-ipsl Aug 29, 2025
035ddd2
feat : Add CMIP7_gridLabel collection
alaupin-ipsl Aug 29, 2025
550bec2
feat : Add CMIP7_initialization collection
alaupin-ipsl Aug 29, 2025
4cd6ae4
feat : Add CMIP7_license collection
alaupin-ipsl Aug 29, 2025
5ae1b98
feat : Add CMIP7_nominalResolution collection
alaupin-ipsl Aug 29, 2025
77fae06
feat : Add CMIP7_physics collection
alaupin-ipsl Aug 29, 2025
d66a4a5
feat : Add CMIP7_realization collection
alaupin-ipsl Aug 29, 2025
caca702
feat : Add CMIP7_realm collection
alaupin-ipsl Aug 29, 2025
ef48346
feat : Add CMIP7_reportingInterval collection
alaupin-ipsl Aug 29, 2025
1ce0f90
feat : Add CMIP7_timeRange collection
alaupin-ipsl Aug 29, 2025
a752a60
feat : Add CMIP7_uniqueField collection
alaupin-ipsl Aug 29, 2025
598e433
feat : Add project_specs.json
alaupin-ipsl Aug 29, 2025
90977a5
feat : Add screation scripts
alaupin-ipsl Aug 29, 2025
6f23b9e
fix : Remove all brandedVariables
alaupin-ipsl Aug 29, 2025
7dbdf88
feat : Add CMIP7_brandedVariable
alaupin-ipsl Sep 1, 2025
79f25be
feat : Add overriding fields on experiment CV terms for all fields up…
alaupin-ipsl Sep 2, 2025
6eb9383
feat : Add script to create CV terms for known_branded_variable
alaupin-ipsl Sep 2, 2025
a9e8920
feat : Add gitignore
alaupin-ipsl Sep 2, 2025
8352562
feat : Add experiment context jsonld
alaupin-ipsl Sep 3, 2025
2d668e0
fix : Change resolution type name
alaupin-ipsl Sep 3, 2025
37dbb5d
fix : change nominal_resolution into resolution
ltroussellier Sep 10, 2025
3db6cbc
fix : add missing context
ltroussellier Sep 11, 2025
2ce3f1c
fix : Update brandedVariables
alaupin-ipsl Sep 11, 2025
b71f63e
Merge branch 'main' of https://github.com/alaupin-ipsl/CMIP7_CVs
alaupin-ipsl Sep 11, 2025
d40a56b
fix : remove .json from id
ltroussellier Sep 11, 2025
2d78c4f
feat : rework of experiment script
ltroussellier Sep 11, 2025
084c5d6
fix : Fix project_specs source_collections names and add some missing…
alaupin-ipsl Sep 11, 2025
83de658
fix : some things
alaupin-ipsl Sep 11, 2025
f5675d9
fix : rename realization in realisation
ltroussellier Sep 11, 2025
ec71eb2
feat : add collection and term CMIP7_archive
ltroussellier Sep 11, 2025
a3d7b29
feat : Add ...Labels
alaupin-ipsl Sep 11, 2025
00bb254
Merge branch 'main' of https://github.com/alaupin-ipsl/CMIP7_CVs
alaupin-ipsl Sep 11, 2025
13664ad
fix : Remove Prefix CMIP7_ from all directory + minor tweaks
ltroussellier Sep 12, 2025
fd96eaf
fix : remove obselete prefixes
ltroussellier Sep 12, 2025
3f3f864
fix : z into s
ltroussellier Sep 15, 2025
e0fc718
Issue #276: Remove scenario experiments from esgvoc branch
matthew-mizielinski Sep 26, 2025
2f4e7bb
Merge pull request #281 from WCRP-CMIP/276_ScenarioMIP-experiment-rem…
ltroussellier Sep 26, 2025
1907fc3
feat : split json into 4 yaml files
ltroussellier Sep 23, 2025
f787775
feat : update for last release of esgvoc
ltroussellier Sep 26, 2025
a05787f
Merge branch 'esgvoc' into esgvoc_main
ltroussellier Oct 3, 2025
e990f9c
chore : rename docs to not be considered as a collection
ltroussellier Oct 3, 2025
c27937a
chore : delete unused file
ltroussellier Oct 3, 2025
eedc8da
feat : Better README
ltroussellier Oct 3, 2025
279f3d2
fix : disable workflows for now
ltroussellier Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/check_ld.yml
Copy link
Member

@wolfiex wolfiex Oct 3, 2025

Choose a reason for hiding this comment

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

Hard coded disabling is bad practice. You can disable the actions directly, specify when to run (ie not on main). Or define a global variable / file to determine what the action does.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
check-graph:
if: false
runs-on: ubuntu-latest # Specify the machine type

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

jobs:
deploy-docs:
if: false
runs-on: ubuntu-latest

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ concurrency:

jobs:
deploy:
if: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-jsonld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
update-jsonld:
if: false
runs-on: ubuntu-latest # Specify the machine type

steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,4 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
scripts/WCRP-universe_known_branded_variable/*
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,71 @@ This work is sponsored by the Regional and Global Model Analysis ([RGMA](https:/
alt="UK Met Office"
>
</p>


This repository contains the controlled vocabularies (CVs) for the CMIP7 project. It defines project-specific collections of terms used for organizing
and documenting CMIP7 climate simulation data.

## Overview

CMIP7_CVs is a project-specific CV repository that works in conjunction with the https://github.com/WCRP-CMIP/WCRP-universe repository. While the
universe contains all possible terms with complete metadata, this repository contains collections that reference those terms by ID, selecting only the
terms relevant to CMIP7.

## Key Concepts

- **WCRP-universe**: The canonical repository containing all possible terms with full metadata (experiments, institutions, models, variables, etc.)
- **CMIP7_CVs**: Project-specific collections that reference universe terms by ID, with optional project-specific overrides
- **Collections**: Folders containing JSON files that list term IDs from a specific data descriptor (e.g., activity/, experiment/, institution/)
- **Terms**: Individual JSON files representing a controlled vocabulary entry (e.g., experiment/historical.json)

## Repository Structure

CMIP7_CVs/
├── project_specs.json # DRS (Data Reference Syntax) and global attributes
├── project_specs.yaml # Project metadata
├── activity/ # Activity IDs (CMIP, ScenarioMIP, etc.)
├── experiment/ # Experiment definitions
├── institution/ # Institutions
├── source/ # Climate models
├── brandedVariable/ # Variable names
├── reportingInterval/ # Temporal frequencies
└── ... # Other collections

Each collection folder contains:
- 000_context.jsonld: JSON-LD context for semantic web compatibility
- {term-id}.json: Individual term files that reference universe terms

### How Terms Link to the Universe

Terms in CMIP7_CVs reference the universe using minimal JSON:
```json
Example - CMIP7_CVs/activity/cmip.json:
{
"@context": "000_context.jsonld",
"id": "cmip",
"type": "activity"
}
```
This references the full definition in WCRP-universe/activity/cmip.json:
```json
{
"@context": "000_context.jsonld",
"type": "activity",
"id": "cmip",
"name": "CMIP",
"cmip_acronym": "CMIP",
"long_name": "CMIP DECK: 1pctCO2, abrupt4xCO2, amip, ...",
"url": "https://gmd.copernicus.org/articles/9/1937/2016/...",
"drs_name": "CMIP"
}
```
Projects can override or add properties by including them in their term files.

### Using with esgvoc

The https://github.com/ESGF/esgf-vocab provides a Python API and CLI to interact with these controlled vocabularies.

Documentation can be find : https://esgf.github.io/esgf-vocab/


File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions _scripts/create_activity_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import json
import os
from pathlib import Path

import esgvoc.api as ev
import requests

# URLs of the JSON files on GitHub
json_url = "https://raw.githubusercontent.com/WCRP-CMIP/CMIP7-CVs/refs/heads/main/CMIP7-CVs_activity.json"

# Directory where the JSON files will be saved
save_dir = "CMIP7_activity"

# Create the directory if it doesn't exist
os.makedirs(save_dir, exist_ok=True)


# Function to fetch and load JSON data from a URL
def fetch_json(url):
response = requests.get(url)
response.raise_for_status() # Check for request errors
return response.json()


data = fetch_json(json_url)["activity"]

known_sources_in_universe = ev.get_all_terms_in_data_descriptor("activity")
print(known_sources_in_universe)
for item in data:
found_item = None
for activity in known_sources_in_universe:
if activity.drs_name == item:
found_item = activity
break

if found_item is None:
print(item, "not found in universe")
else:
# Create json file
dict_to_save = {
"@context": "000_context.jsonld",
"id": found_item.id,
"type": found_item.type,
}
# print(dict_to_save)
with open(Path(save_dir) / f"{found_item.id}.json", "w") as f:
json.dump(dict_to_save, f, indent=4)
24 changes: 24 additions & 0 deletions _scripts/create_bv_labels.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import esgvoc.api as ev
from icecream import IceCreamDebugger
import devtools

ic = IceCreamDebugger(argToStringFunction=devtools.pformat)


def main():
known_bv_in_universe = ev.get_all_terms_in_data_descriptor("known_branded_variable")
i = 0
for bv in known_bv_in_universe:
i = i + 1
if i == 5:
break
ic(bv)
temporal_label = bv.temporal_label
vertical_label = bv.vertical_label
horizontal_label = bv.horizontal_label
area_label = bv.area_label
ic([temporal_label, vertical_label, horizontal_label, area_label])


if __name__ == "__main__":
main()
Loading