From 3f674cc8ff9833f1698b674ad6af1ef2690fa420 Mon Sep 17 00:00:00 2001
From: Johannes Koch <jokoch@pik-potsdam.de>
Date: Fri, 24 Jan 2020 15:26:28 +0100
Subject: [PATCH] Move some declarations from the core to the modules

vm_effGr and vm_damageFactor are declared in the modules 20_growth and 50_damages respectively.
---
 core/declarations.gms                         |  2 --
 modules/20_growth/exogenous/declarations.gms  | 11 +++++++++++
 modules/20_growth/spillover/declarations.gms  |  1 +
 modules/50_damages/BurkeLike/declarations.gms |  7 ++++++-
 modules/50_damages/DiceLike/declarations.gms  |  6 ++++++
 modules/50_damages/off/declarations.gms       | 11 +++++++++++
 6 files changed, 35 insertions(+), 3 deletions(-)
 create mode 100644 modules/20_growth/exogenous/declarations.gms
 create mode 100644 modules/50_damages/off/declarations.gms

diff --git a/core/declarations.gms b/core/declarations.gms
index e560f50..95f9e99 100644
--- a/core/declarations.gms
+++ b/core/declarations.gms
@@ -261,9 +261,7 @@ vm_emiFgas(tall,all_regi,all_enty)                   "F-gas emissions by single
 positive variables
 ***----------------------------------------------------------------------------------------
 ***-------------------------------------------------MACRO module---------------------------
-vm_effGr(ttot,all_regi,all_in)                       "growth of factor efficiency"
 vm_enerSerAdj(tall,all_regi,all_in)                  "adjustment costs for energy service transformations"
-vm_damageFactor(ttot,all_regi)                       "damage factor reducing GDP"
 vm_esCapInv(ttot,all_regi,all_teEs)                   "investment for energy end-use capital at the energy service level"
 ***----------------------------------------------------------------------------------------
 *-----------------------------------------------ESM module---------------------------------
diff --git a/modules/20_growth/exogenous/declarations.gms b/modules/20_growth/exogenous/declarations.gms
new file mode 100644
index 0000000..ef1c82f
--- /dev/null
+++ b/modules/20_growth/exogenous/declarations.gms
@@ -0,0 +1,11 @@
+*** |  (C) 2006-2019 Potsdam Institute for Climate Impact Research (PIK)
+*** |  authors, and contributors see CITATION.cff file. This file is part
+*** |  of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of
+*** |  AGPL-3.0, you are granted additional permissions described in the
+*** |  REMIND License Exception, version 1.0 (see LICENSE file).
+*** |  Contact: remind@pik-potsdam.de
+*** SOF ./modules/20_growth/exogenous/declarations.gms
+positive variables
+vm_effGr(ttot,all_regi,all_in)            "growth of factor efficiency"
+;
+*** EOF ./modules/20_growth/exogenous/declarations.gms
diff --git a/modules/20_growth/spillover/declarations.gms b/modules/20_growth/spillover/declarations.gms
index d861ca2..6333cba 100644
--- a/modules/20_growth/spillover/declarations.gms
+++ b/modules/20_growth/spillover/declarations.gms
@@ -24,6 +24,7 @@ Parameters
 
 *mlb*  vm_invInno and  vm_invImi and pm_cumEff shifted to the core folder
 Positive variables
+ vm_effGr(ttot,all_regi,all_in)            "growth of factor efficiency"
  v20_effInno(ttot,all_regi,all_in)         "efficiency improvement by innovation"
  v20_effImi(ttot,all_regi,all_in)          "efficiency improvement by imitation"
 ;
diff --git a/modules/50_damages/BurkeLike/declarations.gms b/modules/50_damages/BurkeLike/declarations.gms
index 2091c96..8d886c3 100644
--- a/modules/50_damages/BurkeLike/declarations.gms
+++ b/modules/50_damages/BurkeLike/declarations.gms
@@ -4,8 +4,13 @@
 *** |  AGPL-3.0, you are granted additional permissions described in the
 *** |  REMIND License Exception, version 1.0 (see LICENSE file).
 *** |  Contact: remind@pik-potsdam.de
-
+*** SOF ./modules/50_damages/BurkeLike/declarations.gms
 parameters
 p50_damageFuncCoef1     "coef1 of damamge function",
 p50_damageFuncCoef2     "coef2 of damamge function"
 ;
+
+positive variable
+vm_damageFactor(ttot,all_regi)      "damage factor reducing GDP"
+;
+*** EOF ./modules/50_damages/BurkeLike/declarations.gms
diff --git a/modules/50_damages/DiceLike/declarations.gms b/modules/50_damages/DiceLike/declarations.gms
index a3e8cc1..d03b467 100644
--- a/modules/50_damages/DiceLike/declarations.gms
+++ b/modules/50_damages/DiceLike/declarations.gms
@@ -4,7 +4,13 @@
 *** |  AGPL-3.0, you are granted additional permissions described in the
 *** |  REMIND License Exception, version 1.0 (see LICENSE file).
 *** |  Contact: remind@pik-potsdam.de
+*** SOF ./modules/50_damages/DiceLike/declarations.gms
 parameters
 p50_damageFuncCoef1			"damage function coefficient, linear in temperature"
 p50_damageFuncCoef2 			"damage function coefficient, quadratic in temperture"
 ;
+
+positive variable
+vm_damageFactor(ttot,all_regi)      "damage factor reducing GDP"
+;
+*** EOF ./modules/50_damages/DiceLike/declarations.gms
diff --git a/modules/50_damages/off/declarations.gms b/modules/50_damages/off/declarations.gms
new file mode 100644
index 0000000..dea6d75
--- /dev/null
+++ b/modules/50_damages/off/declarations.gms
@@ -0,0 +1,11 @@
+*** |  (C) 2006-2019 Potsdam Institute for Climate Impact Research (PIK)
+*** |  authors, and contributors see CITATION.cff file. This file is part
+*** |  of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of
+*** |  AGPL-3.0, you are granted additional permissions described in the
+*** |  REMIND License Exception, version 1.0 (see LICENSE file).
+*** |  Contact: remind@pik-potsdam.de
+*** SOF ./modules/50_damages/off/declarations.gms
+positive variable
+vm_damageFactor(ttot,all_regi)      "damage factor reducing GDP"
+;
+*** EOF ./modules/50_damages/off/declarations.gms
-- 
GitLab