pypsa-meets-earth/pypsa-earth

Simplify network lead to a bug in GADM shapes

Open

#382 opened on Jun 16, 2022

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Python (349 forks)auto 404
buggood first issuehelp wanted

Repository metrics

Stars
 (351 stars)
PR merge metrics
 (PR metrics pending)

Description

Checklist

  • I am using the current main branch or the latest release. Please indicate.
  • I am running on an up-to-date pypsa-africa environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

Summary of bugs:

  • Administrative zone is removed in gadm_regions to onshore_regions conversion
  • Multiple administrative zones are associated to one shape after simplify_network.

I am running PyPSA-Africa for Nigeria with the GADM clustering option which retrieves GADM shapes also known as administrative zones. See the automatic download: gadm-shapes Creating the regions_onshore looks still fine. I am not sure yet what the colour change means. Maybe it is indicating an error? One bug is that black hole inside Africa! regions_onshore Nevertheless, the real bug appears when running simplify_network.py which then creates networks/elec_s{simpl}.nc. As you can see, hovering over one shape, it seems that some shapes are combined. regions_onshore_elec_s

One needs to debug simplify_network and investigate the step where this occurs. We need to find a solution to this issue.

Contributor guide