|
43 | 43 | # Define tools for hydro set |
44 | 44 | tools_hydro = GraphTools( |
45 | 45 | scenarios=[ |
46 | | - get_scenario("H25", 0), |
47 | | - get_scenario("H025", 0.25), |
| 46 | + get_scenario("H25", 1), |
| 47 | + get_scenario("H025", 0.75), |
48 | 48 | get_scenario("H050", 0.5), |
49 | | - get_scenario("H065", 0.65), |
50 | | - get_scenario("H085", 0.85), |
51 | | - get_scenario("1342", 1), |
| 49 | + get_scenario("H065", 0.35), |
| 50 | + get_scenario("H085", 0.15), |
| 51 | + get_scenario("1342", 0), |
52 | 52 | ], set_style=False |
53 | 53 | ) |
54 | 54 | tools_hydro.pre_graphing(multi_scenario=True) |
@@ -238,21 +238,23 @@ def plot_panel(ax, rax, rrax, rrrax, data, title=""): |
238 | 238 | plot_panel(ax, None, None, None, data_ws, "Set A: Varying Wind-vs-Solar Share") |
239 | 239 |
|
240 | 240 | ax.set_xticks([0.1, 0.2, 0.3, 0.4, 0.5, 0.6]) |
241 | | -ax.set_xticklabels(["90%-10%\nSolar-Wind", "", "70%-30%\nSolar-Wind", "", "50%-50%\nSolar-Wind", ""]) |
| 241 | +ax.set_xticklabels(["90% Solar\n10% Wind", "", "70% Solar\n30% Wind", "", "50% Solar\n50% Wind", ""]) |
| 242 | +ax.set_xlabel("Solar-Wind ratio") |
242 | 243 | ax.axvline(baseline_ws_ratio, linestyle="dotted", color="dimgrey") |
243 | 244 | ax.text(baseline_ws_ratio - 0.02, 0.1, "Baseline", rotation=90, color="dimgrey") |
244 | 245 |
|
245 | 246 | fig.legend(loc="lower center", ncol=4) |
246 | 247 |
|
247 | 248 | # %% PLOT HYDRO |
248 | | -data_hy = get_data(tools_hydro, normalize_to_baseline=1) |
| 249 | +data_hy = get_data(tools_hydro, normalize_to_baseline=0) |
249 | 250 | ax = ax_tr |
250 | 251 | # rax = rax_top_right |
251 | 252 | plot_panel(ax, None, None, None, data_hy, "Set B: Reducing Hydropower Generation") |
252 | 253 | ax.tick_params(top=False, bottom=True, right=False, left=False, which="both") |
253 | 254 | ax.set_xticks([0, 0.5, 1]) |
254 | 255 | ax.set_xticks([0.1, 0.2, 0.3, 0.4, 0.6, 0.7, 0.8, 0.9], minor=True) |
255 | | -ax.set_xticklabels(["No\nhydropower", "50%\nhydropower", "Baseline\nHydropower"]) |
| 256 | +ax.set_xticklabels(["0%\n(Baseline)", "50%", "100%\n(No Hydro)"]) |
| 257 | +ax.set_xlabel("Hydropower reduction") |
256 | 258 |
|
257 | 259 | # %% PLOT TX |
258 | 260 | ax = ax_bl |
@@ -301,7 +303,7 @@ def plot_panel(ax, rax, rrax, rrrax, data, title=""): |
301 | 303 | ax.axvline(baseline_energy_cost, linestyle="dotted", color="dimgrey") |
302 | 304 | ax.text(baseline_energy_cost - 4, 0.1, "Baseline", rotation=90, color="dimgrey") |
303 | 305 |
|
304 | | -plt.subplots_adjust(left=0.08, right=0.97, top=0.95, wspace=0.05) |
| 306 | +plt.subplots_adjust(left=0.08, right=0.97, top=0.95, wspace=0.05, hspace=0.25) |
305 | 307 |
|
306 | 308 | # %% SAVE FIGURE |
307 | 309 | save_figure("figure-2-analysis-of-4-factors.png") |
@@ -372,3 +374,23 @@ def plot_panel(ax, rax, rrax, rrrax, data, title=""): |
372 | 374 | total_power = df.groupby("scenario_name").OnlinePowerCapacityMW.sum() |
373 | 375 | total_energy = df.groupby("scenario_name").OnlineEnergyCapacityMWh.sum() |
374 | 376 | total_energy / total_power |
| 377 | +# %% California only costs |
| 378 | +df = tools_cost.get_dataframe("storage_capacity.csv") |
| 379 | +df = tools_cost.transform.load_zone(df) |
| 380 | +df = df[df.region == "CA"] |
| 381 | +df["duration"] = df["OnlineEnergyCapacityMWh"] / df["OnlinePowerCapacityMW"] |
| 382 | +print("max duration", df.groupby("scenario_name").duration.max()) |
| 383 | +print("median duration", df.groupby("scenario_name").duration.median()) |
| 384 | +print("total capacity", df.groupby("scenario_name").OnlineEnergyCapacityMWh.sum() / 1e6) |
| 385 | + |
| 386 | +cap = tools_cost.get_dataframe("gen_cap.csv") |
| 387 | +cap = tools_cost.transform.gen_type(cap) |
| 388 | +cap = cap.groupby(["scenario_index", "gen_type"], as_index=False)[ |
| 389 | + "GenCapacity" |
| 390 | +].sum() |
| 391 | +cap = cap.pivot(columns="gen_type", index="scenario_index", values="GenCapacity") |
| 392 | +cap *= 1e-3 # Convert to GW |
| 393 | +cap = cap.rename_axis("Technology", axis=1).rename_axis(None) |
| 394 | +cap = cap[["Solar"]] |
| 395 | +cap.index = cap.index.map(tools_cost.get_scenario_name) |
| 396 | +cap |
0 commit comments