|
12 | 12 | from datetime import date |
13 | 13 |
|
14 | 14 | # EDIT this line upon each release of dscim-facts-epa |
15 | | -VERSION = "0.2.0" |
| 15 | +VERSION = "0.4.0" |
16 | 16 |
|
17 | 17 | discount_conversion_dict = { |
18 | 18 | "1.016010255_9.149608e-05": "1.5% Ramsey", |
@@ -92,7 +92,7 @@ def generate_meta( |
92 | 92 | dict( |
93 | 93 | machine=machine_name, |
94 | 94 | commit=gitlabel, |
95 | | - url=f"https://github.com/ClimateImpactLab/dscim-epa/commit/{gitlabel}", |
| 95 | + url=f"https://github.com/ClimateImpactLab/dscim-facts-epa/commit/{gitlabel}", |
96 | 96 | ) |
97 | 97 | ) |
98 | 98 |
|
@@ -184,7 +184,7 @@ def epa_scghg( |
184 | 184 | ): |
185 | 185 |
|
186 | 186 | if menu_option != "risk_aversion": |
187 | | - raise Exception("DSCIM-EPA provides only 'risk_aversion' SCGHGs") |
| 187 | + raise Exception("DSCIM-FACTS-EPA provides only 'risk_aversion' SCGHGs") |
188 | 188 |
|
189 | 189 | # Manually add other config parameters that are not meant to change run to run |
190 | 190 | conf["global_parameters"] = { |
@@ -520,18 +520,23 @@ def epa_scghgs( |
520 | 520 | for key, value in attrs.items(): |
521 | 521 | f.write("%s:%s\n" % (key, value)) |
522 | 522 |
|
523 | | - # Saves global consumption no pulse |
524 | | - # Fewer GCNPs are saved because they vary across fewer dimensions than SCGHGs |
525 | | - if gcnp: |
526 | | - out_dir = Path(conf["save_path"]) / "gcnp" |
527 | | - makedir(out_dir) |
528 | | - df_full_gcnp.attrs = attrs |
529 | | - print(f"Saving {sector_short} global consumption no pulse (gcnp)") |
530 | | - df_full_gcnp.to_netcdf( |
531 | | - out_dir / f"{conf_savename}gcnp-dscim-{sector_short}.nc4" |
532 | | - ) |
533 | | - print(f"gcnp is available in {str(out_dir)}") |
| 523 | + # save global consumption no pulse for each sector. Does not vary by pulse_year |
| 524 | + if pulse_year == pulse_years[0]: |
| 525 | + # Fewer GCNPs are saved because they vary across fewer dimensions than SCGHGs |
| 526 | + if gcnp: |
| 527 | + out_dir = Path(conf["save_path"]) / "gcnp" |
| 528 | + makedir(out_dir) |
| 529 | + df_full_gcnp.attrs = attrs |
| 530 | + print(f"Saving {sector_short} global consumption no pulse (gcnp)") |
| 531 | + df_full_gcnp.to_netcdf( |
| 532 | + out_dir / f"{conf_savename}gcnp-dscim-{sector_short}.nc4" |
| 533 | + ) |
| 534 | + print(f"gcnp is available in {str(out_dir)}") |
534 | 535 |
|
535 | 536 | print( |
536 | 537 | f"{'territorial_us' if terr_us else 'global'}_scghgs are available in {str(Path(conf['save_path']))}/{'territorial_us' if terr_us else 'global'}_scghgs" |
537 | 538 | ) |
| 539 | + if uncollapsed: |
| 540 | + print( |
| 541 | + f"Full distributions of {'territorial_us' if terr_us else 'global'}_scghgs are available in {str(Path(conf['save_path']))}/{'territorial_us' if terr_us else 'global'}_scghgs/full_distributions" |
| 542 | + ) |
0 commit comments