-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from JGCRI/tethys-change
update to tethys nomenclature
- Loading branch information
Showing
37 changed files
with
97 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
demeter-w | ||
tethys | ||
|
||
BSD 2-Clause - DISCLAIMER | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
demeter-w | ||
tethys | ||
|
||
BSD 2-Clause | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
include demeter_w/reference/dist.csv | ||
include demeter_w/reference/obv_dom.csv | ||
include demeter_w/reference/IEA_9_Countries_Monthly_AvgElectricity_2000_2015.csv | ||
include tethys/reference/dist.csv | ||
include tethys/reference/obv_dom.csv | ||
include tethys/reference/IEA_9_Countries_Monthly_AvgElectricity_2000_2015.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Configuration file for Demeter-W V1.0. | ||
# Configuration file for Tethys V1.0. | ||
# Author: Xinya Li ([email protected]) | ||
# Modified: 09/09/2017 | ||
# License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
|
@@ -26,7 +26,7 @@ PerformTemporal = 1 | |
|
||
[GCAM] | ||
# 2. GCAM database/csv files related | ||
# UseGCAMDatabase: [1] use GCAM raw CSV files; [0] use files already processed in Demeter-W required format | ||
# UseGCAMDatabase: [1] use GCAM raw CSV files; [0] use files already processed in Tethys required format | ||
UseGCAMDatabase = 1 | ||
# The path to the database (basex) folder | ||
GCAM_DBpath = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]); Chris R. Vernon ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
@@ -11,16 +11,16 @@ | |
""" | ||
|
||
import os | ||
from demeter_w.model import DemeterW | ||
from tethys.model import Tethys | ||
|
||
|
||
if __name__ == "__main__": | ||
|
||
# get path to config.ini in the example dir | ||
cfg = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config.ini') | ||
|
||
# run the demeter-w model and save outputs | ||
dmw = DemeterW(config=cfg) | ||
# run the Tethys model and save outputs | ||
dmw = Tethys(config=cfg) | ||
|
||
# if needed, reuse the gridded data or gis data output by the model | ||
grid_outputs = dmw.gridded_data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
demeter_w/DataReader/ConfigSettings.py → tethys/DataReader/ConfigSettings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
''' | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-WD V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
''' | ||
|
||
from demeter_w.Utils.Logging import clearfolder | ||
from tethys.Utils.Logging import clearfolder | ||
import GCAMOutputs | ||
import GCAMutil | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
@@ -11,7 +11,7 @@ | |
import os | ||
import GCAMutil as util | ||
import GCAMSupport as Support | ||
from demeter_w.Utils.DataParser import getContentArray as ArrayCSVReader | ||
from tethys.Utils.DataParser import getContentArray as ArrayCSVReader | ||
from shutil import copyfile | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
@@ -22,8 +22,8 @@ | |
import numpy as np | ||
from scipy import io as spio | ||
#from netCDF4 import Dataset | ||
from demeter_w.Utils.DataParser import GetArrayCSV, GetArrayTXT | ||
from demeter_w.Utils.DataParser import getContentArray as ArrayCSVRead | ||
from tethys.Utils.DataParser import GetArrayCSV, GetArrayTXT | ||
from tethys.Utils.DataParser import getContentArray as ArrayCSVRead | ||
from HistPopIrrData import getPopYearData as GetPopData | ||
from HistPopIrrData import getIrrYearData as GetIrrData | ||
|
||
|
6 changes: 3 additions & 3 deletions
6
demeter_w/DataReader/HistPopIrrData.py → tethys/DataReader/HistPopIrrData.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-WD V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
""" | ||
|
||
import numpy as np | ||
from demeter_w.Utils.DataParser import getTXTContentArray as ArrayTXTRead | ||
from demeter_w.Utils.DataParser import getContentArray as ArrayCSVReader | ||
from tethys.Utils.DataParser import getTXTContentArray as ArrayTXTRead | ||
from tethys.Utils.DataParser import getContentArray as ArrayCSVReader | ||
|
||
def getIrrYearData(settings): | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
demeter_w/DataReader/IniReader.py → tethys/DataReader/IniReader.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
''' | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-WD V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
demeter_w/DataWriter/OUTWriter.py → tethys/DataWriter/OUTWriter.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
@@ -12,7 +12,7 @@ | |
""" | ||
|
||
import numpy as np | ||
from demeter_w.DataWriter.OUTWriter import OUTSettings | ||
from tethys.DataWriter.OUTWriter import OUTSettings | ||
|
||
def compare_downscaled_GCAMinput(Settings, GCAMData, OUT): | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
@@ -14,7 +14,7 @@ | |
""" | ||
import os | ||
import numpy as np | ||
from demeter_w.Utils.DataParser import GetArrayCSV | ||
from tethys.Utils.DataParser import GetArrayCSV | ||
import matplotlib.pyplot as plt | ||
import matplotlib as mpl | ||
from matplotlib.ticker import FormatStrFormatter | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
@@ -19,9 +19,9 @@ | |
""" | ||
|
||
import numpy as np | ||
from demeter_w.Utils.Math import SizeR, SizeC | ||
from demeter_w.Utils.Math import ind2sub | ||
from demeter_w.Utils.Math import sub2ind | ||
from tethys.Utils.Math import SizeR, SizeC | ||
from tethys.Utils.Math import ind2sub | ||
from tethys.Utils.Math import sub2ind | ||
|
||
def Rearranging(mapsize, GISData, rgnmapData): | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ter_w/SpatialDownscaling/TotalWaterUse.py → tethys/SpatialDownscaling/TotalWaterUse.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...er_w/TemporalDownscaling/NeighborBasin.py → tethys/TemporalDownscaling/NeighborBasin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
|
@@ -27,7 +27,7 @@ | |
import scipy.io as spio | ||
import os, calendar | ||
import numpy as np | ||
from demeter_w.Utils.DataParser import getContentArray as ArrayCSVRead | ||
from tethys.Utils.DataParser import getContentArray as ArrayCSVRead | ||
from NeighborBasin import NeighborBasin | ||
|
||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]); Chris R. Vernon ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
This is the DemeterW class of showing how to evaluate the input settings and | ||
This is the Tethys class of showing how to evaluate the input settings and | ||
call the function running water disaggregation | ||
""" | ||
|
||
import os, sys, time | ||
import demeter_w.DataReader.IniReader as IniReader | ||
from demeter_w.Utils.Logging import Logger | ||
from demeter_w.DataWriter.OUTWriter import OutWriter | ||
from demeter_w.run_disaggregation import run_disaggregation as disagg | ||
import os | ||
import sys | ||
import time | ||
import tethys.DataReader.IniReader as IniReader | ||
from tethys.Utils.Logging import Logger | ||
from tethys.DataWriter.OUTWriter import OutWriter | ||
from tethys.run_disaggregation import run_disaggregation as disagg | ||
|
||
|
||
class DemeterW: | ||
class Tethys: | ||
|
||
def __init__(self, config='config.ini'): | ||
|
||
print "Demeter-W starts..." | ||
print "Tethys starts..." | ||
|
||
# instantiate functions | ||
self.Disaggregation = disagg | ||
|
@@ -48,7 +50,7 @@ def __init__(self, config='config.ini'): | |
sys.stdout.log.close() | ||
|
||
sys.stdout = sys.__stdout__ | ||
print "Demeter-W ends." | ||
print "Tethys ends." | ||
|
||
def run_model(self): | ||
""" | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
""" | ||
@Date: 09/09/2017 | ||
@author: Xinya Li ([email protected]) | ||
@Project: Demeter-W V1.0 | ||
@Project: Tethys V1.0 | ||
License: BSD 2-Clause, see LICENSE and DISCLAIMER files | ||
Copyright (c) 2017, Battelle Memorial Institute | ||
""" | ||
|
||
import time | ||
from demeter_w.DataReader.GCAMOutputs import getGCAMData | ||
from demeter_w.DataReader import GISReader | ||
from demeter_w.DataWriter.OUTWriter import OUTSettings | ||
from demeter_w.SpatialDownscaling.ProxyMaps import Rearranging | ||
import demeter_w.SpatialDownscaling.ProxyMaps as ProxyMaps | ||
import demeter_w.SpatialDownscaling.TotalWaterUse as TotalWaterUse | ||
import demeter_w.Diagnostics.Spatial as DiagnosticsSD | ||
import demeter_w.Diagnostics.Temporal as DiagnosticsTD | ||
import demeter_w.TemporalDownscaling.TemporalDownscaling as TemporalDownscaling | ||
from tethys.DataReader.GCAMOutputs import getGCAMData | ||
from tethys.DataReader import GISReader | ||
from tethys.DataWriter.OUTWriter import OUTSettings | ||
from tethys.SpatialDownscaling.ProxyMaps import Rearranging | ||
import tethys.SpatialDownscaling.ProxyMaps as ProxyMaps | ||
import tethys.SpatialDownscaling.TotalWaterUse as TotalWaterUse | ||
import tethys.Diagnostics.Spatial as DiagnosticsSD | ||
import tethys.Diagnostics.Temporal as DiagnosticsTD | ||
import tethys.TemporalDownscaling.TemporalDownscaling as TemporalDownscaling | ||
|
||
|
||
def run_disaggregation(settings): | ||
|
@@ -27,7 +27,7 @@ def run_disaggregation(settings): | |
Module: run_disaggregation | ||
Main Function of Demeter-W: Steps for water disaggregation | ||
Main Function of Tethys Steps for water disaggregation | ||
1. Read in the GCAM Data and Get the number of years | ||
2. Read in the GIS data | ||
3. Rearranging data and map indices | ||
|