pypsa-eur
pypsa-eur copied to clipboard
Clustering: build renewable profiles and add all assets after clustering
Closes #1189.
Changes proposed in this Pull Request
- Moved rules
simplify_networkandcluster_networkbeforeadd_electricityandbuild_renewable_profiles - Split rule
build_renewable_profilesinto two separate rules,determine_availability_matrixfor land eligibility analysis andbuild_renewable_profiles, which now only computes the profiles and total potentials from the pre-computed availability matrix. - Removed variables
weightandpotentialfrom output ofbuild_renewable_profilesas it is no longer needed - HAC-clustering is now based on wind speeds and irradiation time series rather than capacity factors
- Added new rule
build_hac_featuresthat aggregates cutout weather data to base regions - Removed
{simpl}wildcard and all associated code of themsuffix of the{cluster}wildcard. This means that the option to pre-cluster the network insimplify_networkwas removed. It will be superseded by clustering renewable profiles and potentials within clustered regions by resource classes. - The rule
build_line_ratingnow directly attaches the DLR profiles to thepypsa.Networkwhich is then returned as output. - The rule
add_extra_componentswas integrated intoadd_electricity - Added new rule
build_electricity_demand_baseto determine the load distribution of the substations in the base network (which was previously done inadd_electricity). This time series is used as weights for kmeans-clustering incluster_networkand is later added to the network inadd_electricityin aggregated form. - The weights of the kmeans clustering algorithm are now exclusively based on the load distribution. Previously, they also included the distribution of thermal capacity.
- Since the networks no longer start with the whole electricity system added pre-clustering, the files have been renamed from
elec...nctobase...nc. - The scripts
simplify_network.pyandcluster_network.pywere simplified to become less nested and profited from the removed need to deal with cost data. - New configuration options to calculate connection costs of offshore wind plants.
Updated Workflow Graph
Testing
To be done.
A first observation is that build_renewable_profiles on clustered regions is much faster!
Without a doubt, this PR is not going to be backward compatible, which is why it should be pulled after a v0.12.0 release.
Next steps
- Cluster renewable profiles and potentials within clustered regions by resource classes, emulating the previous
moption in{clusters}wildcard, but better. - Add option to cluster by administrative shapes #263.
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. - [ ] A release note
doc/release_notes.rstis added.