In this PR I have switched emissions accounting to use the pypsa.statistics.StatisticsAccessor methods. Specifically I have:
Added a new function to find primary energy consumption called get_primary_energy_use
Added a new function to find generator/node/carrier emissions called get_node_carrier_emissions_timeseries
Modified the get_node_emissions_timeseries and get_technology_emissions_timeseries functions to use the get_node_carrier_emissions_timeseries
While two new functions are added, overall, the logic is much simpler as we are not looping over all the different components to find primary energy use.
I did a qualitative check on the graphs to make sure the results have not changed.
Checklist
[x] I tested my contribution locally and it seems to work fine.
[x] Code and workflow changes are sufficiently documented.
[x] Changed dependencies are added to envs/environment.yaml.
[x] Changes in configuration options are added in all of config.default.yaml.
[x] Changes in configuration options are also documented in doc/configtables/*.csv.
Changes proposed in this Pull Request
In this PR I have switched emissions accounting to use the
pypsa.statistics.StatisticsAccessor
methods. Specifically I have:get_primary_energy_use
get_node_carrier_emissions_timeseries
get_node_emissions_timeseries
andget_technology_emissions_timeseries
functions to use theget_node_carrier_emissions_timeseries
While two new functions are added, overall, the logic is much simpler as we are not looping over all the different components to find primary energy use.
I did a qualitative check on the graphs to make sure the results have not changed.
Checklist
envs/environment.yaml
.config.default.yaml
.doc/configtables/*.csv
.