Skip to content

Commit 5b02371

Browse files
committed
Add placeholder multi-source ID handling
1 parent accc79e commit 5b02371

4 files changed

Lines changed: 34 additions & 8 deletions

File tree

docs/dataset-overviews/anthropogenic-slcf-co2-emissions.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ The source ID that identifies the dataset to use in the different phases of CMIP
2727

2828
#### Testing
2929

30-
For the testing of CMIP7, use data with the source ID [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)
30+
For the testing of CMIP7, you will need data from the following source IDs:
31+
32+
- [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)
33+
- [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).
34+
35+
Retrieving and only using valid data will require some care.
36+
Please make sure you read the guidance given at the start of this Summary section
37+
and process the data carefully.
3138

3239
This data is for testing purposes only.
3340
Production simulations should not be started based on this data.

docs/dataset-overviews/cmip7_phases_source_ids.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
forcing_int_id,forcing,cmip7_phase,source_id_stub,source_id_stub_ignore,source_id,ok_if_not_latest
2-
1,Anthropogenic short-lived climate forcer (SLCF) and CO<sub>2</sub> emissions,testing,CEDS-CMIP,supplemental,CEDS-CMIP-2024-10-21,False
2+
1,Anthropogenic short-lived climate forcer (SLCF) and CO<sub>2</sub> emissions,testing,CEDS-CMIP,supplemental,"CEDS-CMIP-2024-10-21;CEDS-CMIP-2024-11-30",True
33
1,Anthropogenic short-lived climate forcer (SLCF) and CO<sub>2</sub> emissions,ar7_fast_track,CEDS-CMIP,supplemental,,False
44
1,Anthropogenic short-lived climate forcer (SLCF) and CO<sub>2</sub> emissions,cmip7,CEDS-CMIP,supplemental,,False
55
2,Open biomass burning emissions,testing,DRES-CMIP-BB4CMIP7,,DRES-CMIP-BB4CMIP7-1-0,False

docs/dataset-overviews/fill-out-auto-generated-sections.py

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,30 @@ def get_cmip7_phases_source_id_summary_for_forcing(forcing: str) -> tuple[str, .
263263
# )
264264
# raise ValueError(msg)
265265

266-
out.append(
267-
f"For the {cmip7_phase_pretty} of CMIP7, "
268-
"use data with the source ID "
269-
f"[{row.source_id}](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22{row.source_id}%22%7D)"
270-
)
266+
if ";" in row.source_id:
267+
# Multiple source IDs
268+
source_id_sep = "\n- "
269+
source_id_str = source_id_sep.join(
270+
[
271+
f"[{sid}](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22{sid}%22%7D)"
272+
for sid in row.source_id.split(";")
273+
]
274+
)
275+
out.append(
276+
f"For the {cmip7_phase_pretty} of CMIP7, "
277+
f"you will need data from the following source IDs:\n{source_id_sep}{source_id_str}.\n\n"
278+
"Retrieving and only using valid data will require some care.\n"
279+
"Please make sure you read the guidance given at the start of this Summary section\n"
280+
"and process the data carefully."
281+
)
282+
283+
else:
284+
out.append(
285+
f"For the {cmip7_phase_pretty} of CMIP7, "
286+
"use data with the source ID "
287+
f"[{row.source_id}](https://aims2.llnl.gov/search?project=input4MIPs&versionType=all&&activeFacets=%7B%22source_id%22%3A%22{row.source_id}%22%7D)"
288+
)
289+
271290
out.append("")
272291

273292
out.append(PHASES_COMMON_TEXT[row.cmip7_phase])

docs/dataset-overviews/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If you have any feedback, please add it to the [relevant GitHub discussion](http
3636

3737
#### Source IDs for use in this phase
3838

39-
1. *Anthropogenic short-lived climate forcer (SLCF) and CO<sub>2</sub> emissions:* [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)
39+
1. *Anthropogenic short-lived climate forcer (SLCF) and CO<sub>2</sub> 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)
4040
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)
4141
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)
4242
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)

0 commit comments

Comments
 (0)