Skip to content

Commit 990cc2a

Browse files
Merge pull request #82 from znichollscr/add-abrupt-experiments
Add abrupt* experiments
2 parents 04f9129 + 882e29b commit 990cc2a

5 files changed

Lines changed: 96 additions & 69 deletions

File tree

activity/cfmip.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"@context": "000_context.jsonld",
3-
"type": "activity",
43
"id": "cfmip",
5-
"name": "CFMIP",
6-
"cmip_acronym": "CFMIP",
7-
"long_name": "Cloud Feedback Model Intercomparison Project",
8-
"url": null,
4+
"type": "activity",
5+
"description": "Cloud feedback model intercomparison project. Focussed primarily on cloud feedbacks with a secondary focus on understanding of response to forcing, model biases, circulation, regional-scale precipitation, and non-linear changes.",
96
"drs_name": "CFMIP"
10-
}
7+
}

experiment/abrupt-0p5xco2.json

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,22 @@
22
"@context": "000_context.jsonld",
33
"id": "abrupt-0p5xco2",
44
"type": "experiment",
5-
"experiment_id": "abrupt-0p5xCO2",
6-
"activity_id": [
7-
"cfmip"
8-
],
5+
"description": "Abrupt halving of atmospheric carbon dioxide levels. All other conditions are kept the same as piControl.",
6+
"drs_name": "abrupt-0p5xCO2",
7+
"start_timestamp": null,
8+
"end_timestamp": null,
9+
"activity": "cfmip",
910
"additional_allowed_model_components": [
1011
"aer",
1112
"chem",
1213
"bgc"
1314
],
14-
"description": "Identical to the DECK abrupt-4xCO2, but at 0.5xCO2",
15-
"end_year": null,
16-
"experiment": "abrupt halving of CO2",
17-
"min_number_yrs_per_sim": "150",
18-
"parent_activity_id": [
19-
"cmip"
20-
],
21-
"parent_experiment_id": [
22-
"picontrol"
23-
],
15+
"branch_information": "Branch from `piControl` at a time of your choosing",
16+
"min_ensemble_size": 1,
17+
"parent_activity": "cmip",
18+
"parent_experiment": "picontrol",
2419
"required_model_components": [
2520
"aogcm"
2621
],
27-
"start_year": null,
28-
"sub_experiment_id": [
29-
"none"
30-
],
31-
"tier": "2",
32-
"drs_name": "abrupt-0p5xCO2"
33-
}
22+
"tier": 1
23+
}

experiment/abrupt-2xco2.json

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,22 @@
22
"@context": "000_context.jsonld",
33
"id": "abrupt-2xco2",
44
"type": "experiment",
5-
"experiment_id": "abrupt-2xCO2",
6-
"activity_id": [
7-
"cfmip"
8-
],
5+
"description": "Abrupt doubling of atmospheric carbon dioxide levels. All other conditions are kept the same as piControl.",
6+
"drs_name": "abrupt-2xCO2",
7+
"start_timestamp": null,
8+
"end_timestamp": null,
9+
"activity": "cfmip",
910
"additional_allowed_model_components": [
1011
"aer",
1112
"chem",
1213
"bgc"
1314
],
14-
"description": "Identical to the DECK abrupt-4xCO2, but at 2xCO2",
15-
"end_year": null,
16-
"experiment": "abrupt doubling of CO2",
17-
"min_number_yrs_per_sim": "150",
18-
"parent_activity_id": [
19-
"cmip"
20-
],
21-
"parent_experiment_id": [
22-
"picontrol"
23-
],
15+
"branch_information": "Branch from `piControl` at a time of your choosing",
16+
"min_ensemble_size": 1,
17+
"parent_activity": "cmip",
18+
"parent_experiment": "picontrol",
2419
"required_model_components": [
2520
"aogcm"
2621
],
27-
"start_year": null,
28-
"sub_experiment_id": [
29-
"none"
30-
],
31-
"tier": "2",
32-
"drs_name": "abrupt-2xCO2"
33-
}
22+
"tier": 1
23+
}

experiment/abrupt-4xco2.json

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,22 @@
22
"@context": "000_context.jsonld",
33
"id": "abrupt-4xco2",
44
"type": "experiment",
5-
"experiment_id": "abrupt-4xCO2",
6-
"activity_id": [
7-
"cmip"
8-
],
5+
"description": "Abrupt quadrupling of atmospheric carbon dioxide levels. All other conditions are kept the same as piControl.",
6+
"drs_name": "abrupt-4xCO2",
7+
"start_timestamp": null,
8+
"end_timestamp": null,
9+
"activity": "cmip",
910
"additional_allowed_model_components": [
1011
"aer",
1112
"chem",
1213
"bgc"
1314
],
14-
"description": "DECK: abrupt-4xCO2",
15-
"end_year": null,
16-
"experiment": "abrupt quadrupling of CO2",
17-
"min_number_yrs_per_sim": 150,
18-
"parent_activity_id": [
19-
"cmip"
20-
],
21-
"parent_experiment_id": [
22-
"picontrol"
23-
],
15+
"branch_information": "Branch from `piControl` at a time of your choosing",
16+
"min_ensemble_size": 1,
17+
"parent_activity": "cmip",
18+
"parent_experiment": "picontrol",
2419
"required_model_components": [
2520
"aogcm"
2621
],
27-
"start_year": null,
28-
"sub_experiment_id": [
29-
"none"
30-
],
31-
"tier": 1,
32-
"drs_name": "abrupt-4xCO2"
33-
}
22+
"tier": 1
23+
}

scripts/generate-experiments.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ def initialise_activities(self) -> "Holder":
170170
"https://doi.org/10.5194/gmd-9-2853-2016",
171171
],
172172
),
173+
ActivityProject(
174+
id="cfmip",
175+
experiments=[],
176+
urls=["https://doi.org/10.5194/gmd-10-359-2017"],
177+
),
173178
ActivityProject(
174179
id="cmip",
175180
experiments=[],
@@ -267,6 +272,60 @@ def add_1pctco2_entries(self) -> "Holder":
267272

268273
return self
269274

275+
def add_abruptco2_entries(self) -> "Holder":
276+
for drs_name, description_start, activity in (
277+
(
278+
"abrupt-4xCO2",
279+
"Abrupt quadrupling of atmospheric carbon dioxide levels.",
280+
"cmip",
281+
),
282+
(
283+
"abrupt-2xCO2",
284+
"Abrupt doubling of atmospheric carbon dioxide levels.",
285+
"cfmip",
286+
),
287+
(
288+
"abrupt-0p5xCO2",
289+
"Abrupt halving of atmospheric carbon dioxide levels.",
290+
"cfmip",
291+
),
292+
):
293+
univ = ExperimentUniverse(
294+
drs_name=drs_name,
295+
description=(
296+
f"{description_start} All other conditions are kept the same as piControl."
297+
),
298+
activity=activity,
299+
additional_allowed_model_components=["aer", "chem", "bgc"],
300+
branch_information="Branch from `piControl` at a time of your choosing",
301+
end_timestamp=None,
302+
min_ensemble_size=1,
303+
# Defined in project
304+
min_number_yrs_per_sim="dont_write",
305+
parent_activity="cmip",
306+
parent_experiment="picontrol",
307+
# Defined in project
308+
parent_mip_era="dont_write",
309+
required_model_components=["aogcm"],
310+
start_timestamp=None,
311+
tier=1,
312+
)
313+
314+
self.experiments_universe.append(univ)
315+
316+
proj = ExperimentProject(
317+
id=univ.drs_name.lower(),
318+
activity=univ.activity,
319+
min_number_yrs_per_sim=300,
320+
parent_mip_era="cmip7",
321+
tier=1,
322+
)
323+
self.experiments_project.append(proj)
324+
325+
self.add_experiment_to_activity(proj)
326+
327+
return self
328+
270329
def write_files(self, project_root: Path, universe_root: Path) -> None:
271330
for experiment_project in self.experiments_project:
272331
experiment_project.write_file(project_root)
@@ -324,6 +383,7 @@ def main():
324383
holder.initialise_activities()
325384

326385
holder.add_1pctco2_entries()
386+
holder.add_abruptco2_entries()
327387

328388
holder.write_files(project_root=project_root, universe_root=universe_root)
329389

0 commit comments

Comments
 (0)