From 8dee6ab653cc41d89eb4efd7ec54bd42094aaaf9 Mon Sep 17 00:00:00 2001 From: Gabriel Soares <70075435+soaressgabriel@users.noreply.github.com> Date: Tue, 29 Jun 2021 17:28:22 -0300 Subject: [PATCH 1/2] Remove unnecessarry variables --- rubem.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/rubem.py b/rubem.py index a6011fa..87059c8 100644 --- a/rubem.py +++ b/rubem.py @@ -364,9 +364,7 @@ def dynamic(self): 'Lf' : self.TssFileLf.sample, 'Rec' : self.TssFileRec.sample, 'Ssat' : self.TssFileSsat.sample, - 'Runoff' : self.TssFileRun.sample, - 'auxQtot' : self.TssFileAuxQtot.sample, - 'auxRec' : self.TssFileAuxRec.sample + 'Runoff' : self.TssFileRun.sample } # Variable dictionary to export according to filename @@ -378,9 +376,7 @@ def dynamic(self): 'Lf' : self.LF, 'Rec' : self.REC, 'Ssat' : self.TUr, - 'Runoff' : self.runoff, - 'auxQtot' : self.Qtot, - 'auxRec' : self.REC + 'Runoff' : self.runoff } for fileName, isSelected in genFilesDic.items(): @@ -433,7 +429,7 @@ def dynamic(self): os.mkdir(str(config.get('FILES', 'output'))) # Store which variables have or have not been selected for export - genFilesList = ['Int', 'Bflow', 'SfRun', 'Etp', 'Lf', 'Rec', 'Ssat', 'Runoff', 'auxQtot', 'auxRec'] + genFilesList = ['Int', 'Bflow', 'SfRun', 'Etp', 'Lf', 'Rec', 'Ssat', 'Runoff'] genFilesDic = {} for file in genFilesList: genFilesDic[file] = config.getboolean('GENERATE_FILE', file) From 9bd16b5e37caaaae002db543f4314e9c8c5562ab Mon Sep 17 00:00:00 2001 From: Gabriel Soares <70075435+soaressgabriel@users.noreply.github.com> Date: Tue, 29 Jun 2021 17:33:12 -0300 Subject: [PATCH 2/2] Remove unnecessary variables and function calls --- rubem.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rubem.py b/rubem.py index 87059c8..2434ecd 100644 --- a/rubem.py +++ b/rubem.py @@ -113,8 +113,6 @@ def __init__(self): self.OutTssLf = 'outLf' self.OutTssRec = 'outRec' self.OutTssSsat = 'outSsat' - self.OutTssAuxQtot = 'outAuxQtot' - self.OutTssAuxRec = 'outAuxRec' # Report file # name @@ -152,9 +150,7 @@ def initial(self): self.TssFileEtp = pcrfw.TimeoutputTimeseries(self.OutTssEtp, self, self.sampleLocs, noHeader=True) self.TssFileLf = pcrfw.TimeoutputTimeseries(self.OutTssLf, self, self.sampleLocs, noHeader=True) self.TssFileRec = pcrfw.TimeoutputTimeseries(self.OutTssRec, self, self.sampleLocs, noHeader=True) - self.TssFileSsat = pcrfw.TimeoutputTimeseries(self.OutTssSsat, self, self.sampleLocs, noHeader=True) - self.TssFileAuxQtot = pcrfw.TimeoutputTimeseries(self.OutTssAuxQtot, self, self.sampleLocs, noHeader=True) - self.TssFileAuxRec = pcrfw.TimeoutputTimeseries(self.OutTssAuxRec, self, self.sampleLocs, noHeader=True) + self.TssFileSsat = pcrfw.TimeoutputTimeseries(self.OutTssSsat, self, self.sampleLocs, noHeader=True) # Read min and max ndvi self.ndvi_min = pcrfw.scalar(pcrfw.readmap(self.ndviMinFile))