-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cluster by arbitrary shapes (NUTS1, NUTS2, NUTS3, GADM) #263
Comments
Hi Fabian, the Or is there a particular reason for adjusting |
But the Voronoi cells are build on basis of the ENTSOE gridmap, i.e. their nodes. I think the problem remains the same, as the nodes of the ENTOSE maps have to be aligned to the NUTS3 regions... |
Yes, true. The problem stays the same. What was nice with the Voronoi bus map technique is that each region had a clear connection. One node was connected to another one with a line. The main question is now with NUTS/GADM or other arbitrary shapes. How are these regions connected? Which region is linked to each with which magnitude? In general what can happen:
We would do the following:
One could then also develop some nice search algorithms i.e.
|
Hmmm, I don't really see a good way of defining the clustered regions further upstream without a tremendous amount of work. Everything is tied around the ENTSO-E grid map.
|
This should not be a problem, the performance with large regions is pretty solid. But anyhow, it would require a lot of rearrangement considering the simplify_network and correct assignment of load time series. |
@Hazem-IEG, were you planning to transfer this also to PyPSA-Eur at some point? |
@fneum, yes, I already started working on it locally and did some initial tests a while back but stopped to focus on the sector coupled version of PyPSA-Earth.. soon I'll continue working on it |
@Hazem-IEG any updates? This would be a nice feature to add to PyPSA-Eur. |
This is in PyPSA-Earth: Look for "alternative clustering": https://github.com/pypsa-meets-earth/pypsa-earth/blob/main/scripts/cluster_network.py https://github.com/pypsa-meets-earth/pypsa-earth/blob/main/scripts/simplify_network.py |
Also https://www.geoboundaries.org/globalDownloads.html which is very good to download selectively. |
Also @bobbyxng worked this out in PyPSA-Eur: https://github.com/bobbyxng/kodekiste/tree/main/scripts/cluster-by-nuts |
It is already possible to specify a custom busmap to the
cluster_network
rule to support arbitrary clustering. But that is so far a manual process.There are many use cases for clustering according to administrative areas (NUTS, GADM, etc).
These are usually available as shapefiles (e.g. https://gisco-services.ec.europa.eu/distribution/v2/nuts/download/#nuts21).
I would like to automate clustering to arbitrary shapefiles. That could look something like this:
To create (note that you need not to supply a number of clusters):
snakemake -j all "networks/elec_s_shapes.nc"
Provide a shapefile in
config.yaml
:That becomes and optional input to the
snakemake
rule in theSnakefile
:I think the busmap should be relatively straightforward to create using
geopandas.sjoin()
. One would add a function toscripts/cluster_network.py
:Two difficulties I can think of right now:
The text was updated successfully, but these errors were encountered: