Skip to content

Commit f5f9c5f

Browse files
khaeruglatterf42
authored andcommitted
Update base model name to SSP_SSP{}_v2.1
1 parent a4b05af commit f5f9c5f

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

message_ix_models/data/sdmx/IIASA_ECE_CL_TRANSPORT_SCENARIO(1.0.0).xml

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<mes:Header>
44
<mes:ID>none</mes:ID>
55
<mes:Test>false</mes:Test>
6-
<mes:Prepared>2025-01-15T10:37:47.926181</mes:Prepared>
6+
<mes:Prepared>2025-02-20T10:44:16.460424</mes:Prepared>
77
<mes:Sender id="none"/>
8-
<mes:Source xml:lang="en">Generated by message_ix_models 2025.1.11.dev1+gabce19674.d20250113</mes:Source>
8+
<mes:Source xml:lang="en">Generated by message_ix_models 2025.1.11.dev97+gdf7a6cee.d20250211</mes:Source>
99
</mes:Header>
1010
<mes:Structures>
1111
<str:Codelists>
12-
<str:Codelist isExternalReference="none" isFinal="none" agencyID="IIASA_ECE" version="1.0.0" id="CL_TRANSPORT_SCENARIO" urn="urn:sdmx:org.sdmx.infomodel.codelist.Codelist=IIASA_ECE:CL_TRANSPORT_SCENARIO(1.0.0)">
12+
<str:Codelist isExternalReference="false" isFinal="false" agencyID="IIASA_ECE" version="1.0.0" id="CL_TRANSPORT_SCENARIO" urn="urn:sdmx:org.sdmx.infomodel.codelist.Codelist=IIASA_ECE:CL_TRANSPORT_SCENARIO(1.0.0)">
1313
<str:Code id="SSP1">
1414
<com:Annotations>
1515
<com:Annotation id="SSP-URN">
@@ -22,7 +22,7 @@
2222
<com:AnnotationText xml:lang="en">None</com:AnnotationText>
2323
</com:Annotation>
2424
<com:Annotation id="base-scenario-URL">
25-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP1_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
25+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP1_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
2626
</com:Annotation>
2727
</com:Annotations>
2828
</str:Code>
@@ -38,7 +38,7 @@
3838
<com:AnnotationText xml:lang="en">None</com:AnnotationText>
3939
</com:Annotation>
4040
<com:Annotation id="base-scenario-URL">
41-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP2_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
41+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP2_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
4242
</com:Annotation>
4343
</com:Annotations>
4444
</str:Code>
@@ -54,7 +54,7 @@
5454
<com:AnnotationText xml:lang="en">None</com:AnnotationText>
5555
</com:Annotation>
5656
<com:Annotation id="base-scenario-URL">
57-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP3_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
57+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP3_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
5858
</com:Annotation>
5959
</com:Annotations>
6060
</str:Code>
@@ -70,7 +70,7 @@
7070
<com:AnnotationText xml:lang="en">None</com:AnnotationText>
7171
</com:Annotation>
7272
<com:Annotation id="base-scenario-URL">
73-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP4_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
73+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP4_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
7474
</com:Annotation>
7575
</com:Annotations>
7676
</str:Code>
@@ -86,7 +86,7 @@
8686
<com:AnnotationText xml:lang="en">None</com:AnnotationText>
8787
</com:Annotation>
8888
<com:Annotation id="base-scenario-URL">
89-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP5_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
89+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP5_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
9090
</com:Annotation>
9191
</com:Annotations>
9292
</str:Code>
@@ -102,7 +102,7 @@
102102
<com:AnnotationText xml:lang="en">None</com:AnnotationText>
103103
</com:Annotation>
104104
<com:Annotation id="base-scenario-URL">
105-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP1_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
105+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP1_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
106106
</com:Annotation>
107107
</com:Annotations>
108108
<com:Name xml:lang="en">Low Energy Demand/High-with-Low scenario with SSP1 demographics</com:Name>
@@ -119,7 +119,7 @@
119119
<com:AnnotationText xml:lang="en">None</com:AnnotationText>
120120
</com:Annotation>
121121
<com:Annotation id="base-scenario-URL">
122-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP2_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
122+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP2_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
123123
</com:Annotation>
124124
</com:Annotations>
125125
<com:Name xml:lang="en">Low Energy Demand/High-with-Low scenario with SSP2 demographics</com:Name>
@@ -136,7 +136,7 @@
136136
<com:AnnotationText xml:lang="en">'CA'</com:AnnotationText>
137137
</com:Annotation>
138138
<com:Annotation id="base-scenario-URL">
139-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP2_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
139+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP2_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
140140
</com:Annotation>
141141
</com:Annotations>
142142
<com:Name xml:lang="en">EDITS scenario with ITF PASTA 'CA' activity</com:Name>
@@ -153,7 +153,7 @@
153153
<com:AnnotationText xml:lang="en">'HA'</com:AnnotationText>
154154
</com:Annotation>
155155
<com:Annotation id="base-scenario-URL">
156-
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP2_v1.1/baseline_DEFAULT_step_13'</com:AnnotationText>
156+
<com:AnnotationText xml:lang="en">'ixmp://ixmp-dev/SSP_SSP2_v2.1/baseline_DEFAULT_step_13'</com:AnnotationText>
157157
</com:Annotation>
158158
</com:Annotations>
159159
<com:Name xml:lang="en">EDITS scenario with ITF PASTA 'HA' activity</com:Name>

message_ix_models/model/transport/config.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def get_cl_scenario() -> "common.Codelist":
476476
)
477477

478478

479-
def refresh_cl_scenario(cl: "common.Codelist") -> "common.Codelist":
479+
def refresh_cl_scenario(cl: Optional["common.Codelist"] = None) -> "common.Codelist":
480480
"""Refresh ``Codelist=IIASA_ECE:CL_TRANSPORT_SCENARIO``.
481481
482482
The code list is entirely regenerated. If it is different from `cl`, the new
@@ -491,14 +491,21 @@ def refresh_cl_scenario(cl: "common.Codelist") -> "common.Codelist":
491491
cl_ssp_2024 = read("ICONICS:SSP(2024)")
492492

493493
candidate: "common.Codelist" = common.Codelist(
494-
id="CL_TRANSPORT_SCENARIO", maintainer=IIASA_ECE, version="1.0.0"
494+
id="CL_TRANSPORT_SCENARIO",
495+
maintainer=IIASA_ECE,
496+
version="1.0.0",
497+
is_external_reference=False,
498+
is_final=False,
495499
)
496500

497-
# - The model name is per a Microsoft Teams message on 2024-11-25.
501+
# - Model name:
502+
# - 2024-11-25: use _v1.1 per a Microsoft Teams message.
503+
# - 2025-02-20: update to _v2.1 per discussion with OF. At this point _v2.3 is the
504+
# latest appearing in the database.
498505
# - The scenario names appear to form a sequence from "baseline_DEFAULT" to
499506
# "baseline_DEFAULT_step_15" and finally "baseline". The one used below is the
500507
# latest in this sequence for which y₀=2020, rather than 2030.
501-
base_url = "ixmp://ixmp-dev/SSP_SSP{}_v1.1/baseline_DEFAULT_step_13"
508+
base_url = "ixmp://ixmp-dev/SSP_SSP{}_v2.1/baseline_DEFAULT_step_13"
502509

503510
def _a(c, led, edits):
504511
"""Shorthand to generate the annotations."""
@@ -531,7 +538,7 @@ def _a(c, led, edits):
531538
)
532539
)
533540

534-
if not candidate.compare(cl, strict=True):
541+
if cl is None or not candidate.compare(cl, strict=True):
535542
write(candidate)
536543
return candidate
537544
else:

0 commit comments

Comments
 (0)