PyPSA / pypsa-usa

PyPSA-USA: An Open-Source Energy System Optimization Model for the United States
https://pypsa-usa.readthedocs.io
MIT License
35 stars 15 forks source link

Clarify Capacity Factor Heatmaps #243

Open trevorb1 opened 3 months ago

trevorb1 commented 3 months ago

Feature Request

I believe our capacity factor heatmaps follow a different definition than the pypsa definition of capacity factor. We should probably sync with the pypsa nomenclature, and rename ours.

Suggested Solution

Rename our capacity factor to renewable potential timeseries.

Additional Info

Our definition takes p_max_pu to generate which is a renewable timeseries potential (ie. uses input parameters)

https://github.com/PyPSA/pypsa-usa/blob/f5a56fc7c94a5685eac85ee5ed55c8b05141c54e/workflow/scripts/plot_statistics.py#L837-L884

The pypsa definition in StatisticsAccessor takes actual generation and divides by optimal capacity (ie. uses result variables)

https://github.com/PyPSA/PyPSA/blob/467db67af6674c5daea2ff00c91fba9b8778e379/pypsa/statistics.py#L993-L1048

trevorb1 commented 3 months ago

I guess for variable renewable capacity factors it wont matter too much, but for dispatchable it may. Since we are using it to plot hydro cf (which I know is locked to BE data right now), that could lead to different results.

trevorb1 commented 3 months ago

To get per-component-bus-carrier results, use:

StatisticsAccessor(n).capacity_factor(aggregate_time=False, groupby=get_bus_and_carrier, comps=["Generator"])