pypsa-meets-earth / pypsa-earth

PyPSA-Earth: A flexible Python-based open optimisation model to study energy system futures around the world.
https://pypsa-earth.readthedocs.io/en/latest/
234 stars 193 forks source link

rule build_shapes #1130

Open milyas009 opened 1 month ago

milyas009 commented 1 month ago

In PyPSA-earth while executing the "Rule build_shapes" for any other countries, the output still contain "resources/shapes/africa_shape.geojson". May be just a naming mistake?

output: resources/shapes/country_shapes.geojson, resources/shapes/offshore_shapes.geojson, **resources/shapes/africa_shape.geojson**, resources/shapes/gadm_shapes.geojson
    log: logs/build_shapes.log
davide-f commented 1 month ago

Thanks @milyas009 :D The content of africa_shape.geojson always depends on the countries selected in the workflow. For example, if you choose TH, then the content will be TH. We agree that the choice of the name "africa_shape" is misleading and indeed it would be great to have a PR that proposes a revision of its naming to something like "region_shape" or alike that is country/continent neutral. Proposals are welcome :)

The expected changes related to the file "Snakefile" in particular, changing all references to "africa_shape" in the snakefile, such as: https://github.com/pypsa-meets-earth/pypsa-earth/blob/b64623d8d3d8127e186dbe3b9a899e326e1bcb72/Snakefile#L186

Would you like to try? :)