Giter VIP home page Giter VIP logo

osembe_ecemf's Introduction

OSeMBE_ECEMF

This repository contains the scenarios modelled in OSeMBE throughout the H2020 project ECEMF - European Climate and Energy Modelling Forum.

The repo contains a workflow to run OSeMOSYS models from datapackage to results file in IAMC format.

OSeMOSYS workflow

This workflow allows to run one or multiple scenarios. Starting from an OSeMOSYS datapackage going through all steps, running the model with the Gurobi solver and producing the results in IAMC format.

In addition to the standard OSeMOSYS outputs, the workflow can produce CSV files containing the dual values for all constraints in the model.

Installation

Install snakemake using conda into a new environment called snakemake:

conda install -c conda-forge mamba
mamba create -c bioconda -c conda-forge -n snakemake snakemake-minimal

The workflow manages dependencies through conda environments. Dependencies are defined per rule and are installed upon first running the workflow.

Configuring the workflow

  1. Place the script resultify.py from the repo osemosys2iamc in the root folder of the project.
  2. For the resultify.py script to run using the .append method it is required to use Pandas <2, since the .append is no longer supported by Pandas version 2 or newer. By using pandas less than 2 (such as 1.5) one must use a Python < 3.11. After running the snakemake workflow and specifying --use-conda in the shell command, the openentrance-env will install all dependencies. When this is completed, run: pip install -e git+https://github.com/openENTRANCE/openentrance.git@main#egg=openentrance in the terminal while in the openentrance-env environment.

Adding new scenarios

  1. Place datapackage(s) in the folder input_data. Each datapackage should be placed in a folder that is named after the scenario, e.g. baseline.
  2. Check that the file config.yaml, which defines the conversion of OSeMOSYS results to IAMC format is suitable for the model.

Running the workflow

  1. Optional: To retrieve dual values from your model you need to edit the list of constraints in the file run.py.
  2. Open terminal or command prompt and change to the directory of the snakefile.
  3. Optional: Perform a dry run to test snakemake with the command: snakemake -n
  4. Start the scenario runs with the command snakemake --cores <number of cores to be used> --use-conda

osembe_ecemf's People

Contributors

hauhe avatar emifej avatar willu47 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.