Skip to content

Commit

Permalink
Merge pull request #372 from GermanZero-de/year_ref-should-be-a-entry
Browse files Browse the repository at this point in the history
Introduce m_year_ref in Entries
  • Loading branch information
bgrundmann authored Nov 20, 2023
2 parents a6f44d1 + 6470db6 commit 87e83cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/climatevision/generator/entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class Entries:
m_population_sta: int # population of state in 2018
m_year_target: int
m_year_today: int
m_year_ref: int # reference year for data (i.e RefData.year_ref() )
r_area_m2: float
r_area_m2_1flat: float
r_area_m2_2flat: float
Expand Down
1 change: 1 addition & 0 deletions src/climatevision/generator/makeentries.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ def compute_efactor_from_n2o(
m_population_sta=m_population_sta,
m_year_target=m_year_target,
m_year_today=m_year_today,
m_year_ref=data.year_ref(),
r_area_m2=r_area_m2,
r_area_m2_1flat=r_area_m2_1flat,
r_area_m2_2flat=r_area_m2_2flat,
Expand Down
1 change: 1 addition & 0 deletions tests/end_to_end_expected/entries_03159016_2035.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"m_population_sta": 7982448,
"m_year_target": 2035,
"m_year_today": 2022,
"m_year_ref": 2018,
"r_area_m2": 5125600.0,
"r_area_m2_1flat": 1238094.45,
"r_area_m2_2flat": 513206.64,
Expand Down

0 comments on commit 87e83cf

Please sign in to comment.