Skip to content

SPLATteam/Model-Supply-Regions-MSR-Toolset

Repository files navigation

Code Authors:

MSR_Creator.py, AttributorCombiner.py, Screener.py: Bilal Hussain
Profile_Generator.py: Bilal Hussain, Yunshu Li, Sebastian Sterl
Clustering.py: Yunshu Li
Methodology contributions: Asami Miketa, Daniel Russo, Pablo Carvajal, Mohamed Elabbas
Contact : bhussain@irena.org, ssterl@irena.org, y_li@outlook.com

Feel free to drop quick emails of your interest, queries and motivations to extend the tool individually or in collaboration. We would also like to track your feedback for impact reporting purposes particularly on how the tool can/has contributed value to your work. Please also cite the MSR toolset methodology paper in your academic/professional works.

Introduction:

This is the public repository of Model Supply Regions (MSR) tool. The tool produces geo-referenced geometries of potential utility scale power supply regions of weather dependent renewable technologies and develops their cost and performance attributes to serve as inputs for energy/power system planning models including generation expansion models (e.g. IRENA SPLAT Models for Africa). The current version can model Solar PV & Wind-onshore technologies. This tool has been applied on 50 countries in Africa. Results of Africa analysis along with methodological details of the tool and definitions of computed attributes is available in the methodology paper. Final outputs are placed in Zenodo. Inputs for MSR creator are available in this sharepoint link.

How to use MSR toolset:

MSR toolset comprises of five python scripts that are run sequentially. A high level description of each script and process flow is illustrated below.

Each script is enclosed in a separate folder along with its respective control file.xlsx. Profile_Generator.py requires ERA5 reanalysis data as input, which can be downloaded from the Copernicus Climate Data Store (CDS, after having created an account and followed the instructions on installing the CDS API) using the ERA5 API script available in the respective folder as a starting point.

Folders are numbered as per order of running scheme. All scripts use a list of input regions (countrynames.csv) available in the repository. Users can edit this list to run the toolset on desired number of input regions. For a single country run, just add single region name only. Take care that the input region names align with the input shapefile on region boundaries and relevant control files.

Before running any script in the toolset, make sure that the .py file is placed with ControlFile.xlsx in same directory. Also make sure that ControlFile.xlsx holds correct file/folder addresses and code/analysis configurations as per user requirements.

Primary Dependencies:

geopandas = 0.9.0 | geocube = 0.1.0 | matplotlib = 3.4.3 | netcdf4 = 1.5.7 | pandas = 1.3.2 | pyproj = 3.1.0 | pvlib = 0.8.1 | rasterio = 1.3.9 | richdem = 0.3.4 | rioxarray = 0.9.0 | rasterstats = 0.15.0 | scipy = 1.7.1 | shapely = 1.7.1 | tslearn = 0.5.2 | xarray = 0.20.2 | xarray-spatial = 0.3.0 | openpyxl = 3.1.2 | rtree = 1.1.0 | datacube = 1.8.5 | gdal = 3.3.2 | numpy = 1.20.0 | h5py = 3.10.0 | threadpoolctl = 3.1.0

Library versions mentioned above serve only for guidance. The scripts may run flexibly on other library versions with or without minor updates as necessary. However, we recommend to follow initially the above environment, installing packages in the order given, as unforeseen conflicts may arise between newer versions of packages.

Versions:

Version 0.1.0 - March 2022

License:

See license here

Disk space requirements:

MSR_Creator.py requires large disk space to store outputs. It creates region wise folders and sub-folders carrying datasets from different steps executed by the code. A single country folder size can vary significantly from 2GB for small countries like Ivory Coast to 20 GB for large countries like Algeria. For a set of 50 Africa countries, the script produced outputs of total 140GB for one technology. Most outputs produced by the script are relevant for diagnostic purposes only. User can find several commented commands at the script end which can be activated to delete some output folders that are not used by next scripts.

Profile_Generator.py also produces outputs that occupy large diskspace. For 50 country Africa run, it produced around 5GB data for single technology. If user decides to use just one of two time zones, the non-selected time zone data can be deleted which halves the output data size.

All remaining scripts of MSR toolset, produce outputs of size well below 1GB.

Toolset run time:

Indicative code run times for a single country are as follows:

MSR_Creator: 15 minutes per technology

Profile_Generator: Depends on number of MSRs for which profiles are to be created. On average it is around 1 minute/20 MSR.

AttributorCombiner, Screener, Cluster: Less than 5 minutes

Total run time (all scripts) for complete Africa dataset (50 countries) took 36 hours for single technology. This run time can significantly decrease if stricter exclusion and resource criteria is adopted in ControFile_MSRCreator.xlsx.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages