Skip to content

Commit

Permalink
Merge pull request #43 from orichters/cm_postTargetIncreaseMerge
Browse files Browse the repository at this point in the history
Cm post target increase merge
  • Loading branch information
Renato-Rodrigues authored Feb 27, 2024
2 parents fbb46e9 + 25dad2f commit 3d0f814
Show file tree
Hide file tree
Showing 862 changed files with 4,282 additions and 2,878 deletions.
16 changes: 16 additions & 0 deletions .github/GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mode: ContinuousDelivery
assembly-versioning-format: '{Major}.{Minor}.{Patch}.dev{CommitsSinceVersionSource}'
branches:
develop:
regex: ^dev(elop)?(ment)?$
mode: ContinuousDeployment
tag: dev
increment: None
prevent-increment-of-merged-branch-version: false
track-merge-target: true
source-branches: []
tracks-release-branches: true
is-release-branch: false
is-mainline: false
pre-release-weight: 0

45 changes: 45 additions & 0 deletions .github/workflows/auto-dev-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
pull_request_target:
branches:
- develop
types: [ closed ]
name: auto-dev-version

jobs:
auto-dev-version:
if: github.repository == 'remindmodel/remind' && github.event.pull_request.merged == true
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AUTO_DEV_VERSION_REMIND }}

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.15
with:
versionSpec: '5.x'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.15
with:
useConfigFile: true
configFilePath: .github/GitVersion.yml

- name: Update CITATION.cff and config/default.cfg with version and date
run: |
sed -i 's/^version:.*$/version: "${{ steps.gitversion.outputs.assemblySemVer }}"/' CITATION.cff
sed -i "s/^date-released:.*$/date-released: $(date --iso)/" CITATION.cff
sed -i 's/^cfg$model_version <-.*$/cfg$model_version <- "${{ steps.gitversion.outputs.assemblySemVer }}"/' config/default.cfg
- name: Commit changes to CITATION.cff
uses: EndBug/add-and-commit@v9
with:
add: '["CITATION.cff", "config/default.cfg"]'
author_name: REMIND Research Software Engineering
author_email: rse@pik-potsdam.de
message: 'Release development version ${{ steps.gitversion.outputs.assemblySemVer }}'
tag: 'v${{ steps.gitversion.outputs.assemblySemVer }}'
pathspec_error_handling: exitImmediately
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ config/gdx-files/*.gdx
plotRuntime*.html
plotRuntimeDependencies/
.Rproj.user
runtime.rds

# main renv.lock should only be commited for releases
/.Rbuildignore
Expand All @@ -74,3 +75,7 @@ plotRuntimeDependencies/

# Main Python virtual environment
.venv/

# ignore slurm logs
slurm-[0-9]*.log
slurm-[0-9]*.out
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-json
Expand Down
28 changes: 0 additions & 28 deletions .snapshot.Rprofile

This file was deleted.

4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "REMIND - REgional Model of INvestments and Development",
"version": "3.1.0",
"version": "3.2.1",
"creators": [
{
"name": "Luderer, Gunnar",
Expand Down Expand Up @@ -249,5 +249,5 @@
"license": {
"id": "AGPL-3.0-or-later"
},
"publication_date": "2023-02-10"
"publication_date": "2023-07-13"
}
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

# Changelog

All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).


## [Unreleased]

### added
- **config** regex tests for many parameters
- **scripts** add script to check fixing of runs to reference run
[[#1410](https://github.com/remindmodel/remind/pull/1410)]
- **testthat** test and compile all config files

### fixed
- fixed weights of energy carriers in `pm_IndstCO2Captured`
[[#1354](https://github.com/remindmodel/remind/pull/1354)]
- switch off MAgPIE emission abatement for 45/NPi realization
[[#1401](https://github.com/remindmodel/remind/pull/1401)]
- let preempted and resumed runs start their subsequent runs
[[#1414](https://github.com/remindmodel/remind/pull/1414)]
- correctly report `Tech|*|Capital Costs|w/ Adj Costs` for t < cm_startyear
[[#1429](https://github.com/remindmodel/remind/pull/1429)]

## [3.2.1] - 2023-07-13 (incomplete)

### changed
- **documentation** MAgPIE coupling, DIETER coupling, input changes
- **config** NGFS_v4, SHAPE
- **scripts** re-enable summation checks for IIASA submission
- **inputs** update of landuse emissions and costs using MAgPIE 4.6.8, mrcommons 1.32.0, input data rev6.543
- **scripts** MAgPIE coupling interface: replace old MAgPIE cost variable
- **scripts** MAgPIE coupling interface: remove filtering of negative LU emissions
- **scripts** `./start.R --gamscompile` now adjust sets and gets input data
- **core** MAgPIE coupling: tolerate negative values for `n2ofertsom` and deactivate its MAC
- **05_initialCap** fix overwriting of investment cost changes from cm_inco0Factor switch
- **core** fix bug that emissions from gas use in transport were not accounted

### added
- **45_carbonprice** added realization `NPi` (National Policies Implemented)
- **47_carbonpriceRegi** now supports BECCS quantity targets
- **MAgPIE coupling** added `qos=auto` mode
- **MAgPIE coupling** added renv support mode

### removed
- **scripts** removed .snapshot.Rprofile and snapshot support, renv now fully supersedes snapshots

[Unreleased]: https://github.com/remindmodel/remind/compare/v3.2.1...HEAD
[3.2.1]: https://github.com/remindmodel/remind/compare/v3.2.0...v3.2.1
5 changes: 3 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ authors:

- family-names: "Klein"
given-names: "David"
orcid: https://orcid.org/0009-0001-7917-8041
affiliation: "Potsdam Institute for Climate Impact Research"

- family-names: "Koch"
Expand Down Expand Up @@ -245,8 +246,8 @@ authors:
affiliation: "Potsdam Institute for Climate Impact Research"

title: REMIND - REgional Model of INvestments and Development
version: "3.1.0"
date-released: 2023-02-10
version: "3.2.1.dev208"
date-released: 2023-10-17
repository-code: https://github.com/remindmodel/remind
keywords:
- energy
Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: remindmodel
Title: REMIND - REgional Model of INvestments and Development
Version: 0.1
Date: 2022-08-31
Date: 2023-07-13
Description: This is not a package yet, the purpose of this file is to
document metadata, notably dependencies.
License: file LICENSE
Expand Down Expand Up @@ -51,15 +51,15 @@ Imports:
nleqslv,
optparse,
piamenv (>= 0.4.0),
piamInterfaces (>= 0.0.37),
piamInterfaces (>= 0.5.0),
plotly,
purrr,
quitte (>= 0.3106.0),
quitte (>= 0.3123.0),
R.utils,
raster,
readr,
readxl,
remind2 (>= 1.104.1),
remind2 (>= 1.112.0),
renv,
reshape2,
reticulate,
Expand All @@ -69,6 +69,7 @@ Imports:
SPEI,
stringr,
terra,
testthat (>= 3.1.10),
tibble,
tidyr,
tidyverse,
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,19 @@ test: ## Test if the model compiles and runs without running a full
@R_PROFILE_USER= Rscript -e 'testthat::test_dir("tests/testthat")'

test-coupled: ## Test if the coupling with MAgPIE works. Takes significantly
## longer than 10 minutes to run and needs slurm and magpie
## longer than 60 minutes to run and needs slurm and magpie
## available
$(info Coupling tests take more than 30 minutes to run, please be patient)
$(info Coupling tests take around 75 minutes to run, please be patient)
@R_PROFILE_USER= TESTTHAT_RUN_SLOW=TRUE Rscript -e 'testthat::test_file("tests/testthat/test_20-coupled.R")'

test-coupled-slurm: ## test-coupled, but on slurm
$(info Coupling tests take around 75 minutes to run. Sent to slurm, find log in test-coupled.log)
@sbatch --qos=priority --wrap="make test-coupled" --job-name=test-coupled --mail-type=END --output=test-coupled.log --comment="test-coupled.log"

test-full: ## Run all tests, including coupling tests and a default
## REMIND scenario. Takes significantly longer than 10 minutes to run.
$(info Full tests take more than an hour to run, please be patient)
@R_PROFILE_USER= TESTTHAT_RUN_SLOW=TRUE Rscript -e 'testthat::test_dir("tests/testthat")'
test-validation: ## Run validation tests, requires a full set of runs in the output folder
$(info Run validation tests, requires a full set of runs in the output folder)
@R_PROFILE_USER= TESTTHAT_RUN_SLOW=TRUE Rscript -e 'testthat::test_dir("tests/testthat/validation")'
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ The macro-economic core of REMIND is a Ramsey-type optimal growth model
in which intertemporal global welfare is optimized subject to equilibrium constraints.

## DOCUMENTATION
The model documentation for version 3.0.0 can be found at https://rse.pik-potsdam.de/doc/remind/3.0.0 .

A model description paper on REMIND 2.1 has been published in Geoscientific Model Development (GMD): https://doi.org/10.5194/gmd-14-6571-2021 .

The model documentation for version 3.2.0 can be found at https://rse.pik-potsdam.de/doc/remind/3.2.0 .

The most recent version of the documentation can also be extracted from the
model source code via the R package goxygen
Expand All @@ -37,7 +40,7 @@ Tutorials can be found in the form of markdown files in the repository:
https://github.com/remindmodel/remind/tree/develop/tutorials

## COPYRIGHT
Copyright 2006-2022 Potsdam Institute for Climate Impact Research (PIK)
Copyright 2006-2023 Potsdam Institute for Climate Impact Research (PIK)

## LICENSE
This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -65,20 +68,17 @@ and memory. Recommended is a machine with Windows, MacOS or Linux, with at least
16GB of memory and a Core i7 CPU or similar.

## HOW TO INSTALL

Please refer to the [installation guide](tutorials/01_GettingREMIND.md).


## HOW TO CONFIGURE
Model run settings are set in `config/default.cfg` and `main.gms` (or another config file of
the same structure). New model scenarios can be created by adding a row to
`config/scenario_config.csv`

## HOW TO RUN
To run the model execute `Rscript start.R` (or `source("start.R")` from within
R) in the main folder of the model.
Make sure that the config file has been set correctly before
starting the model.
Please refer to the tutorials on how to
[use the default settings](tutorials/02_RunningREMIND.md) and how to
[run multiple scenarios](tutorials/03_RunningBundleOfRuns.md).

## HOW TO CONTRIBUTE
We are interested in working with you! Contact us through GitHub
Expand Down Expand Up @@ -155,4 +155,4 @@ to cite the model.
See list of authors in CITATION.cff

## CHANGELOG
See log on GitHub (https://github.com/remindmodel)
See [CHANGELOG.md](CHANGELOG.md) on GitHub.
Loading

0 comments on commit 3d0f814

Please sign in to comment.