Skip to content

Commit 088f17e

Browse files
Merge pull request #85 from znichollscr/add-scenario-aerchemmip
Add AerChemMIP scenario entries
2 parents 602281e + 64762cf commit 088f17e

9 files changed

Lines changed: 283 additions & 0 deletions

experiment/esm-scen7-h-aer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@context": "000_context.jsonld",
3+
"id": "esm-scen7-h-aer",
4+
"type": "experiment",
5+
"description": "PLACEHOLDER TBC. CMIP7 ScenarioMIP high emissions future. Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. This is for models without interactive chemistry. Models with interactive chemistry should run `esm-scen7-h-Aq` instead.",
6+
"drs_name": "esm-scen7-h-Aer",
7+
"start_timestamp": "2022-01-01",
8+
"end_timestamp": "2100-12-31",
9+
"min_number_yrs_per_sim": 79.0,
10+
"activity": "aerchemmip",
11+
"additional_allowed_model_components": [
12+
"bgc",
13+
"chem"
14+
],
15+
"branch_information": "Branch from `esm-hist` at 2022-01-01.",
16+
"min_ensemble_size": 3,
17+
"parent_activity": "cmip",
18+
"parent_experiment": "esm-hist",
19+
"parent_mip_era": "cmip7",
20+
"required_model_components": [
21+
"aogcm",
22+
"aer"
23+
],
24+
"tier": 1
25+
}

experiment/esm-scen7-h-aq.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@context": "000_context.jsonld",
3+
"id": "esm-scen7-h-aq",
4+
"type": "experiment",
5+
"description": "PLACEHOLDER TBC. CMIP7 ScenarioMIP high emissions future. Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. This is for models with interactive chemistry. Models without interactive chemistry should run `esm-scen7-h-Aer` instead.",
6+
"drs_name": "esm-scen7-h-AQ",
7+
"start_timestamp": "2022-01-01",
8+
"end_timestamp": "2100-12-31",
9+
"min_number_yrs_per_sim": 79.0,
10+
"activity": "aerchemmip",
11+
"additional_allowed_model_components": [
12+
"bgc"
13+
],
14+
"branch_information": "Branch from `esm-hist` at 2022-01-01.",
15+
"min_ensemble_size": 3,
16+
"parent_activity": "cmip",
17+
"parent_experiment": "esm-hist",
18+
"parent_mip_era": "cmip7",
19+
"required_model_components": [
20+
"aogcm",
21+
"aer",
22+
"chem"
23+
],
24+
"tier": 1
25+
}

experiment/esm-scen7-vl-aer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@context": "000_context.jsonld",
3+
"id": "esm-scen7-vl-aer",
4+
"type": "experiment",
5+
"description": "PLACEHOLDER TBC. CMIP7 ScenarioMIP very low emissions future. Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. This is for models without interactive chemistry. Models with interactive chemistry should run `esm-scen7-vl-Aq` instead.",
6+
"drs_name": "esm-scen7-vl-Aer",
7+
"start_timestamp": "2022-01-01",
8+
"end_timestamp": "2100-12-31",
9+
"min_number_yrs_per_sim": 79.0,
10+
"activity": "aerchemmip",
11+
"additional_allowed_model_components": [
12+
"bgc",
13+
"chem"
14+
],
15+
"branch_information": "Branch from `esm-hist` at 2022-01-01.",
16+
"min_ensemble_size": 3,
17+
"parent_activity": "cmip",
18+
"parent_experiment": "esm-hist",
19+
"parent_mip_era": "cmip7",
20+
"required_model_components": [
21+
"aogcm",
22+
"aer"
23+
],
24+
"tier": 1
25+
}

experiment/esm-scen7-vl-aq.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@context": "000_context.jsonld",
3+
"id": "esm-scen7-vl-aq",
4+
"type": "experiment",
5+
"description": "PLACEHOLDER TBC. CMIP7 ScenarioMIP very low emissions future. Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. This is for models with interactive chemistry. Models without interactive chemistry should run `esm-scen7-vl-Aer` instead.",
6+
"drs_name": "esm-scen7-vl-AQ",
7+
"start_timestamp": "2022-01-01",
8+
"end_timestamp": "2100-12-31",
9+
"min_number_yrs_per_sim": 79.0,
10+
"activity": "aerchemmip",
11+
"additional_allowed_model_components": [
12+
"bgc"
13+
],
14+
"branch_information": "Branch from `esm-hist` at 2022-01-01.",
15+
"min_ensemble_size": 3,
16+
"parent_activity": "cmip",
17+
"parent_experiment": "esm-hist",
18+
"parent_mip_era": "cmip7",
19+
"required_model_components": [
20+
"aogcm",
21+
"aer",
22+
"chem"
23+
],
24+
"tier": 1
25+
}

experiment/scen7-h-aer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@context": "000_context.jsonld",
3+
"id": "scen7-h-aer",
4+
"type": "experiment",
5+
"description": "PLACEHOLDER TBC. CMIP7 ScenarioMIP high emissions future. Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. This is for models without interactive chemistry. Models with interactive chemistry should run `scen7-h-Aq` instead.",
6+
"drs_name": "scen7-h-Aer",
7+
"start_timestamp": "2022-01-01",
8+
"end_timestamp": "2100-12-31",
9+
"min_number_yrs_per_sim": 79.0,
10+
"activity": "aerchemmip",
11+
"additional_allowed_model_components": [
12+
"bgc",
13+
"chem"
14+
],
15+
"branch_information": "Branch from `historical` at 2022-01-01.",
16+
"min_ensemble_size": 3,
17+
"parent_activity": "cmip",
18+
"parent_experiment": "historical",
19+
"parent_mip_era": "cmip7",
20+
"required_model_components": [
21+
"aogcm",
22+
"aer"
23+
],
24+
"tier": 1
25+
}

experiment/scen7-h-aq.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@context": "000_context.jsonld",
3+
"id": "scen7-h-aq",
4+
"type": "experiment",
5+
"description": "PLACEHOLDER TBC. CMIP7 ScenarioMIP high emissions future. Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. This is for models with interactive chemistry. Models without interactive chemistry should run `scen7-h-Aer` instead.",
6+
"drs_name": "scen7-h-AQ",
7+
"start_timestamp": "2022-01-01",
8+
"end_timestamp": "2100-12-31",
9+
"min_number_yrs_per_sim": 79.0,
10+
"activity": "aerchemmip",
11+
"additional_allowed_model_components": [
12+
"bgc"
13+
],
14+
"branch_information": "Branch from `historical` at 2022-01-01.",
15+
"min_ensemble_size": 3,
16+
"parent_activity": "cmip",
17+
"parent_experiment": "historical",
18+
"parent_mip_era": "cmip7",
19+
"required_model_components": [
20+
"aogcm",
21+
"aer",
22+
"chem"
23+
],
24+
"tier": 1
25+
}

experiment/scen7-vl-aer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@context": "000_context.jsonld",
3+
"id": "scen7-vl-aer",
4+
"type": "experiment",
5+
"description": "PLACEHOLDER TBC. CMIP7 ScenarioMIP very low emissions future. Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. This is for models without interactive chemistry. Models with interactive chemistry should run `scen7-vl-Aq` instead.",
6+
"drs_name": "scen7-vl-Aer",
7+
"start_timestamp": "2022-01-01",
8+
"end_timestamp": "2100-12-31",
9+
"min_number_yrs_per_sim": 79.0,
10+
"activity": "aerchemmip",
11+
"additional_allowed_model_components": [
12+
"bgc",
13+
"chem"
14+
],
15+
"branch_information": "Branch from `historical` at 2022-01-01.",
16+
"min_ensemble_size": 3,
17+
"parent_activity": "cmip",
18+
"parent_experiment": "historical",
19+
"parent_mip_era": "cmip7",
20+
"required_model_components": [
21+
"aogcm",
22+
"aer"
23+
],
24+
"tier": 1
25+
}

experiment/scen7-vl-aq.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@context": "000_context.jsonld",
3+
"id": "scen7-vl-aq",
4+
"type": "experiment",
5+
"description": "PLACEHOLDER TBC. CMIP7 ScenarioMIP very low emissions future. Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. This is for models with interactive chemistry. Models without interactive chemistry should run `scen7-vl-Aer` instead.",
6+
"drs_name": "scen7-vl-AQ",
7+
"start_timestamp": "2022-01-01",
8+
"end_timestamp": "2100-12-31",
9+
"min_number_yrs_per_sim": 79.0,
10+
"activity": "aerchemmip",
11+
"additional_allowed_model_components": [
12+
"bgc"
13+
],
14+
"branch_information": "Branch from `historical` at 2022-01-01.",
15+
"min_ensemble_size": 3,
16+
"parent_activity": "cmip",
17+
"parent_experiment": "historical",
18+
"parent_mip_era": "cmip7",
19+
"required_model_components": [
20+
"aogcm",
21+
"aer",
22+
"chem"
23+
],
24+
"tier": 1
25+
}

scripts/generate-experiments.py

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ class Holder(BaseModel):
166166

167167
def initialise_activities(self) -> "Holder":
168168
self.activities = [
169+
ActivityProject(
170+
id="aerchemmip",
171+
experiments=[],
172+
urls=[
173+
"https://doi.org/10.5194/gmd-10-585-2017",
174+
],
175+
),
169176
ActivityProject(
170177
id="c4mip",
171178
experiments=[],
@@ -986,6 +993,80 @@ def add_scenario_entries(self) -> "Holder":
986993

987994
return self
988995

996+
def add_scenario_aerchemmip_entries(self) -> "Holder":
997+
for base in ["vl", "h"]:
998+
conc_driven_drs_name = self.get_scenario_drs_name(base)
999+
for base_drs_name in [
1000+
conc_driven_drs_name,
1001+
self.get_scenario_esm_drs_name(conc_driven_drs_name),
1002+
]:
1003+
base_experiment_universe_l = [
1004+
v for v in self.experiments_universe if v.drs_name == base_drs_name
1005+
]
1006+
if len(base_experiment_universe_l) != 1:
1007+
raise AssertionError(base_drs_name)
1008+
base_experiment_universe = base_experiment_universe_l[0]
1009+
1010+
for (
1011+
suffix,
1012+
required_model_components,
1013+
additional_allowed_model_components,
1014+
desc_suffix,
1015+
) in (
1016+
(
1017+
"-AQ",
1018+
["aogcm", "aer", "chem"],
1019+
["bgc"],
1020+
(
1021+
"This is for models with interactive chemistry. "
1022+
"Models without interactive chemistry should run "
1023+
f"`{base_experiment_universe.drs_name}-Aer` instead."
1024+
),
1025+
),
1026+
(
1027+
"-Aer",
1028+
["aogcm", "aer"],
1029+
["bgc", "chem"],
1030+
(
1031+
"This is for models without interactive chemistry. "
1032+
"Models with interactive chemistry should run "
1033+
f"`{base_experiment_universe.drs_name}-Aq` instead."
1034+
),
1035+
),
1036+
):
1037+
aerchemmip_experiment_universe = (
1038+
base_experiment_universe.model_copy()
1039+
)
1040+
aerchemmip_experiment_universe.drs_name = (
1041+
f"{aerchemmip_experiment_universe.drs_name}{suffix}"
1042+
)
1043+
aerchemmip_experiment_universe.activity = "aerchemmip"
1044+
1045+
desc_base = aerchemmip_experiment_universe.description.split(
1046+
" Run with prescribed"
1047+
)[0]
1048+
aerchemmip_experiment_universe.description = (
1049+
f"{desc_base} "
1050+
"Altered to use high aerosol and tropospheric non-methane ozone precursor emissions. "
1051+
f"{desc_suffix}"
1052+
)
1053+
1054+
aerchemmip_experiment_universe.min_ensemble_size = 3
1055+
aerchemmip_experiment_universe.required_model_components = (
1056+
required_model_components
1057+
)
1058+
aerchemmip_experiment_universe.additional_allowed_model_components = additional_allowed_model_components
1059+
1060+
aerchemmip_experiment_project = self.get_scenario_project(
1061+
aerchemmip_experiment_universe
1062+
)
1063+
self.experiments_universe.append(aerchemmip_experiment_universe)
1064+
self.experiments_project.append(aerchemmip_experiment_project)
1065+
self.add_experiment_to_activity(aerchemmip_experiment_project)
1066+
1067+
# TODO: ask someone to translate/write hist-piAQ for me.
1068+
# Not sure what hist-piAQ is or how it is defined.
1069+
9891070
def add_geomip_entries(self) -> "Holder":
9901071
for (
9911072
drs_name,
@@ -1061,6 +1142,7 @@ def add_geomip_entries(self) -> "Holder":
10611142

10621143
self.add_experiment_to_activity(proj)
10631144

1145+
10641146
return self
10651147

10661148
def write_files(self, project_root: Path, universe_root: Path) -> None:
@@ -1128,6 +1210,7 @@ def main():
11281210
holder.add_damip_entries()
11291211
holder.add_pmip_entries()
11301212
holder.add_scenario_entries()
1213+
holder.add_scenario_aerchemmip_entries()
11311214
holder.add_geomip_entries()
11321215

11331216
holder.write_files(project_root=project_root, universe_root=universe_root)

0 commit comments

Comments
 (0)