From e96ba99da28800619d3985d0b12471406cbd91b4 Mon Sep 17 00:00:00 2001 From: Zebedee Nicholls Date: Wed, 4 Dec 2024 08:05:13 +0100 Subject: [PATCH] Fix up docs and CHANGELOG --- changelog/161.deprecation.md | 2 -- changelog/161.feature.md | 2 +- .../anthropogenic-slcf-co2-emissions.md | 2 +- .../cmip7_phases_source_ids.csv | 2 +- .../fill-out-auto-generated-sections.py | 16 +++++++++++++++- docs/dataset-overviews/index.md | 2 +- 6 files changed, 19 insertions(+), 7 deletions(-) delete mode 100644 changelog/161.deprecation.md diff --git a/changelog/161.deprecation.md b/changelog/161.deprecation.md deleted file mode 100644 index 359bc7d..0000000 --- a/changelog/161.deprecation.md +++ /dev/null @@ -1,2 +0,0 @@ -Captured the fact that CEDS-CMIP-2024-10-21 non-aircraft emissions of BC, NH3, OC, CO, and CH4 data have been retracted. - diff --git a/changelog/161.feature.md b/changelog/161.feature.md index d0c8482..6cb05b7 100644 --- a/changelog/161.feature.md +++ b/changelog/161.feature.md @@ -1 +1 @@ -Added [TBD CEDS source ID] data. +Added CEDS-CMIP-2024-11-25 and CEDS-CMIP-2024-11-25-supplemental data. diff --git a/docs/dataset-overviews/anthropogenic-slcf-co2-emissions.md b/docs/dataset-overviews/anthropogenic-slcf-co2-emissions.md index 42bc051..528c436 100644 --- a/docs/dataset-overviews/anthropogenic-slcf-co2-emissions.md +++ b/docs/dataset-overviews/anthropogenic-slcf-co2-emissions.md @@ -34,7 +34,7 @@ The source ID that identifies the dataset to use in the different phases of CMIP For the testing of CMIP7, you will need data from the following source IDs: - [CEDS-CMIP-2024-10-21](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22CEDS-CMIP-2024-10-21%22%7D) -- [CEDS-CMIP-2024-11-30](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22CEDS-CMIP-2024-11-30%22%7D). +- [CEDS-CMIP-2024-11-25](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22CEDS-CMIP-2024-11-25%22%7D). Retrieving and only using valid data will require some care. Please make sure you read the guidance given at the start of this Summary section diff --git a/docs/dataset-overviews/cmip7_phases_source_ids.csv b/docs/dataset-overviews/cmip7_phases_source_ids.csv index 5998eff..5f0d119 100644 --- a/docs/dataset-overviews/cmip7_phases_source_ids.csv +++ b/docs/dataset-overviews/cmip7_phases_source_ids.csv @@ -1,5 +1,5 @@ forcing_int_id,forcing,cmip7_phase,source_id_stub,source_id_stub_ignore,source_id,ok_if_not_latest -1,Anthropogenic short-lived climate forcer (SLCF) and CO2 emissions,testing,CEDS-CMIP,supplemental,"CEDS-CMIP-2024-10-21;CEDS-CMIP-2024-11-30",True +1,Anthropogenic short-lived climate forcer (SLCF) and CO2 emissions,testing,CEDS-CMIP,supplemental,"CEDS-CMIP-2024-10-21;CEDS-CMIP-2024-11-25",True 1,Anthropogenic short-lived climate forcer (SLCF) and CO2 emissions,ar7_fast_track,CEDS-CMIP,supplemental,,False 1,Anthropogenic short-lived climate forcer (SLCF) and CO2 emissions,cmip7,CEDS-CMIP,supplemental,,False 2,Open biomass burning emissions,testing,DRES-CMIP-BB4CMIP7,,DRES-CMIP-BB4CMIP7-1-0,False diff --git a/docs/dataset-overviews/fill-out-auto-generated-sections.py b/docs/dataset-overviews/fill-out-auto-generated-sections.py index bc3cf70..b7c895d 100644 --- a/docs/dataset-overviews/fill-out-auto-generated-sections.py +++ b/docs/dataset-overviews/fill-out-auto-generated-sections.py @@ -91,6 +91,19 @@ def get_cmip7_phase_source_id_summary(cmip7_phase: str) -> tuple[str, ...]: out.append(f"1. *{row.forcing}:* No data available for this phase yet") continue + if ";" in row.source_id: + source_ids = row.source_id.split(";") + else: + source_ids = [row.source_id] + + # Make sure all source IDs are in the DB + missing_from_db = [ + sid for sid in source_ids if sid not in db_source["source_id"].tolist() + ] + if missing_from_db: + msg = f"These source IDs are not in our database: {missing_from_db}" + raise ValueError(msg) + # Check status in the database db_source_id_stub_rows = db_source[ db_source["source_id"].str.contains(row.source_id_stub) @@ -264,11 +277,12 @@ def get_cmip7_phases_source_id_summary_for_forcing(forcing: str) -> tuple[str, . if ";" in row.source_id: # Multiple source IDs + source_ids = row.source_id.split(";") source_id_sep = "\n- " source_id_str = source_id_sep.join( [ f"[{sid}](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22{sid}%22%7D)" - for sid in row.source_id.split(";") + for sid in source_ids ] ) out.append( diff --git a/docs/dataset-overviews/index.md b/docs/dataset-overviews/index.md index 8aa9e89..9ce71d5 100644 --- a/docs/dataset-overviews/index.md +++ b/docs/dataset-overviews/index.md @@ -35,7 +35,7 @@ If you have any feedback, please add it to the [relevant GitHub discussion](http #### Source IDs for use in this phase -1. *Anthropogenic short-lived climate forcer (SLCF) and CO2 emissions:* [CEDS-CMIP-2024-10-21;CEDS-CMIP-2024-11-30](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22CEDS-CMIP-2024-10-21;CEDS-CMIP-2024-11-30%22%7D) +1. *Anthropogenic short-lived climate forcer (SLCF) and CO2 emissions:* [CEDS-CMIP-2024-10-21;CEDS-CMIP-2024-11-25](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22CEDS-CMIP-2024-10-21;CEDS-CMIP-2024-11-25%22%7D) 1. *Open biomass burning emissions:* [DRES-CMIP-BB4CMIP7-1-0](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22DRES-CMIP-BB4CMIP7-1-0%22%7D) 1. *Land use:* [UofMD-landState-3-0](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22UofMD-landState-3-0%22%7D) 1. *Greenhouse gas concentrations:* [CR-CMIP-0-3-0](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22CR-CMIP-0-3-0%22%7D)