Treffer: Transformation pathways for a carbon-neutral electricity system in Kazakhstan - Model and data
Weitere Informationen
PyPSA Model Kazakhstan: A simplified PyPSA power-system optimization model for the power sector of Kazakhstan. This repository contains two Jupyter notebooks plus all input data, scenario outputs, sensitivity results and generated figures. --- ##Directory structure: PyPSA Model Kazakhstan/ ├── notebooks/ # Jupyter notebooks │ ├── 01_main.ipynb # data loading, model building and optimization │ └── 02_results.ipynb # post-processing & plotting ├── Input Data/ # raw input tables, shapefiles, etc. ├── Scenario Analysis Results/ # optimized .nc network snapshots (baseline & scenarios) ├── Sensitivity Analysis Results/ # optimized .nc snapshots for sensitivity runs └── Generated Illustrations/ # all generated illustrations --- ##Requirements: Python 3.8+ Install dependencies via conda or pip: using conda conda create -n pypsa-kaz python=3.10 conda activate pypsa-kaz conda install -c conda-forge pypsa pandas xarray geopandas cartopy matplotlib seaborn openpyxl linopy pyomo or with pip python -m venv venv source venv/bin/activate pip install pypsa pandas xarray geopandas cartopy matplotlib seaborn openpyxl linopy pyomo --- ##Configuration: At the top of each notebook we use a single “path cell” to locate your project root automatically: from pathlib import Path ####Option A: climb until “Input Data” is found BASE_DIR = Path.cwd() while not (BASE_DIR / "Input Data").exists() and BASE_DIR.parent != BASE_DIR: BASE_DIR = BASE_DIR.parent #### Option B: hard-code once if you prefer ##### BASE_DIR = Path(r"/mnt/tubcloud/MA_Carsten_Jan_384133/PyPSA Model Kazakhstan") INPUT_DIR = BASE_DIR / "Input Data" SCENARIO_DIR = BASE_DIR / "Scenario Analysis Results" SENSITIVITY_DIR = BASE_DIR / "Sensitivity Analysis Results" FIG_DIR = BASE_DIR / "Generated Illustrations" --- ##Usage: Sync or download the entire PyPSA Model Kazakhstan folder (e.g. via tubcloud). Open a terminal in that folder. Activate your conda/env (see Requirements). Launch Jupyterlab In _main.ipynb: Make sure to select the SOLVER of preference in order to ...