Code Monkey home page Code Monkey logo

pypsa-earth-sec's Introduction

PyPSA-Earth-Sec: A Sector-Coupled Open Optimisation Model of the Global Energy System

Development Status: Version 0.0.2

Status Linux Status Mac Status Windows Documentation Status Size License: GPL v3 Code style: black pre-commit.ci status Discord Google Drive

Disclaimer: PyPSA-Earth-Sec is still under development.

The workflow is adaped to work smoothly for the following countries: Morocco, Namibia, Nigeria and Benin. The spatial and temporal resolution of the model are flexible. It's advisable to use more than 3 nodes per country and a timestep not smaller than 3-hours.

Currently, no real sectoral demand data is used for the country inspected, instead, we use dummy data. The collection, compilation and processing of real data is underway.

The model now includes the following energy carriers: electricity, hydrogen, gas, oil* and biomass as well as carbon as gas emissions and feedstock for the synthesis of the carriers.

The demand sectors covered are: residential, industry, land transport, aviation, shipping, services and agriculture.

The diagram below depicts one representative clustered node showing the combination of carriers and sectors covered in the model as well as the generation and conversion technologies included.

alt text

Installation

  1. Open your terminal at a location where you want to install pypsa-earth-sec. Type the following in your terminal to download the package and the dependency (pypsa-earth) from GitHub. Note that the tag --recursive-submodules is needed to automatically clone also the pypsa-earth dependency.

        .../some/path/without/spaces % git clone --recurse-submodules https://github.com/pypsa-meets-earth/pypsa-earth-sec.git

    To make sure you run the latest version of the submodule (if desired), run the following command to update the git submodules:

        .../some/path/without/spaces % git submodule update
  2. Move the current directory to the head of the repository.

        .../some/path/without/spaces % cd pypsa-earth-sec
  3. (optional) For reproducibility and compatibility purposes, it is possible to specify a specific version of the pypsa-earth submodule. To do so, feel to reproduce the following lines, yet this is not mandatory. If you desire to run the latest pypsa-earth model, please skip this point 3.

        .../pypsa-earth-sec % cd pypsa-earth
        .../pypsa-earth % git reset --hard \{commit id\}
        .../pypsa-earth % cd ..
  4. The python package requirements are curated in the envs/environment.yaml file of the pypsa-earth repository. The environment can be installed using:

        .../pypsa-earth-sec % conda env create -f pypsa-earth/envs/environment.yaml
  5. For running the optimization one has to install the solver. We can recommend the open source HiGHs solver which installation manual is given here.

  6. To use jupyter lab (new jupyter notebooks) continue with the ipython kernel installation and test if your jupyter lab works:

        .../pypsa-earth % ipython kernel install --user --name=pypsa-earth
        .../pypsa-earth % jupyter lab

Test run

  • In the folder pypsa-earth-sec open a terminal/command window to be located at this path ./pypsa-earth-sec/

  • Rename config.default.yaml to config.yaml. For instance in Linux: mv config.default.yaml config.yaml

  • Open the file config.yaml and follow the steps done before in pypsa-earth

    • choose the country you want to model. For example countries: ["MA"]
  • Run a dryrun of the Snakemake workflow by typing simply in the terminal:

    snakemake -j 1 solve_all_networks -n

    Remove the -n to do a real run. Follow the tutorial of PyPSA-Eur 1 and 2 on YouTube to continue with an analysis.

pypsa-earth-sec's People

Contributors

hazemakhalek avatar energyls avatar davide-f avatar pre-commit-ci[bot] avatar restyled-commits avatar glenkiely-ieg avatar eddy-jv avatar rajesh-ieg avatar cpschau avatar restyled-io[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.