Skip to content

modelblocks-org/module_geo_boundaries

Repository files navigation

Modelblocks - Geo-boundaries module

A module to create arbitrary regional boundary datasets for energy systems modelling

About

This is a modular snakemake workflow created as part of the Modelblocks project. It can be imported directly into any snakemake workflow.

For more information, please consult the Modelblocks documentation, the integration example, and the snakemake documentation.

Overview

Data processing steps:

  1. The configuration file is read to identify which requested geopolitical combination (scenarios) was requested. These can be any number of nations (countries), each coming from a distinct dataset (source) and with its own subnational aggregation (subtype).
  2. Individual country files are downloaded and harmonised to fit a standardised schema.
    • If identified, contested regions are removed at this stage.
    • Land is clipped using maritime Exclusive Economic Zones (EEZ).
    • Optionally, a Voronoi algorithm is run to separate EEZ areas to fit subnational regions.
  3. The country files requested in the scenario are combined and then clipped using their neighbours to minimise overlapping polygons.

Tip

Keep in mind the following

  • All downloaded data is kept locally for future reuse across scenarios to minimise stress on the data sources the module relies on.
  • Data source availability can vary. Always consult the data source website to identify if a country is available at the desired resolution.

Caution

Be aware of the following known issues.

  • Overture Maps replicability: this data source does not retain versions for long. If replicability is important to you, we suggest configuring other sources.
  • Anti-meridian distortions: regions near the 180/-180 line (e.g., Fiji, Hawaii, New Zealand, Alaska) might be distorted during processing. This is a known issue in the libraries we rely on (geopandas, GDAL) and something that is being actively worked on at the moment. For now, we advice to use global projections (EPSG:3857, EPSG:8857) as a way to mitigate it.

Configuration

Please consult the configuration README and the configuration example for a general overview on the configuration options of this module.

Input / output structure

This module only has one output: a geoparquet file with your requested geo-boundary "shapes" for each of the the configured scenarios.

Please consult the interface file for more information.

Development

We use pixi as our package manager for development. Once installed, run the following to clone this repository and install all dependencies.

git clone git@github.com:modelblocks-org/module_geo_boundaries.git
cd module_geo_boundaries
pixi install --all

For testing, simply run:

pixi run test-integration

To test a minimal example of a workflow using this module:

pixi shell    # activate this project's environment
cd tests/integration/  # navigate to the integration example
snakemake --use-conda --cores 2  # run the workflow!

References

This module is based on the following research and datasets. We encourage users to cite both the original source and our workflow.

About

A module to create arbitrary regional boundary datasets for energy systems modelling

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages