From 9a30e195b66bc16c626e6572a781ad8d2b92da85 Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Mon, 11 Sep 2017 07:46:13 -0700 Subject: [PATCH] CLIMATE-912 Upgrade mccSearch code from Python2 > 3 --- mccsearch/code/mainProg.py | 16 ++++++++-------- mccsearch/code/mainProgTemplate.py | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/mccsearch/code/mainProg.py b/mccsearch/code/mainProg.py index d341aa68..33210d57 100644 --- a/mccsearch/code/mainProg.py +++ b/mccsearch/code/mainProg.py @@ -57,7 +57,7 @@ def main(): # let's go! print("\n -------------- Read MERG Data ----------") mergImgs, timeList = mccSearch.readMergData(CEoriDirName) - print(("-" * 80)) + print("-" * 80) print('in main', len(mergImgs)) # print 'timeList', timeList @@ -68,20 +68,20 @@ def main(): # CEGraph = mccSearch.findCloudElements(mergImgs,timeList) # allCETRMMList=mccSearch.findPrecipRate(TRMMdirName,timeList) # ---------------------------------------------------------------------------------------------- - print(("-" * 80)) + print("-" * 80) print("number of nodes in CEGraph is: ", CEGraph.number_of_nodes()) - print(("-" * 80)) + print("-" * 80) print("\n -------------- TESTING findCloudClusters ----------") prunedGraph = mccSearch.findCloudClusters(CEGraph) - print(("-" * 80)) + print("-" * 80) print("number of nodes in prunedGraph is: ", prunedGraph.number_of_nodes()) - print(("-" * 80)) + print("-" * 80) print("\n -------------- TESTING findMCCs ----------") MCCList, MCSList = mccSearch.findMCC(prunedGraph) - print(("-" * 80)) + print("-" * 80) print("MCC List has been acquired ", len(MCCList)) print("MCS List has been acquired ", len(MCSList)) - print(("-" * 80)) + print("-" * 80) # now ready to perform various calculations/metrics print("\n -------------- TESTING METRICS ----------") @@ -104,7 +104,7 @@ def main(): # mccSearch.displayPrecip(MCCList) # mccSearch.plotHistogram(MCCList) # - print(("-" * 80)) + print("-" * 80) main() diff --git a/mccsearch/code/mainProgTemplate.py b/mccsearch/code/mainProgTemplate.py index 96da7579..b59b5b87 100644 --- a/mccsearch/code/mainProgTemplate.py +++ b/mccsearch/code/mainProgTemplate.py @@ -61,7 +61,7 @@ def main(): # let's go! print("\n -------------- Read MERG Data ----------") mergImgs, timeList = mccSearch.readMergData(CEoriDirName) - print(("-" * 80)) + print("-" * 80) print('in main', len(mergImgs)) # print 'timeList', timeList @@ -72,21 +72,21 @@ def main(): # CEGraph = mccSearch.findCloudElements(mergImgs,timeList) # allCETRMMList=mccSearch.findPrecipRate(TRMMdirName,timeList) # ---------------------------------------------------------------------------------------------- - print(("-" * 80)) + print("-" * 80) print("number of nodes in CEGraph is: ", CEGraph.number_of_nodes()) - print(("-" * 80)) + print("-" * 80) print("\n -------------- TESTING findCloudClusters ----------") prunedGraph = mccSearch.findCloudClusters(CEGraph) - print(("-" * 80)) + print("-" * 80) print("number of nodes in prunedGraph is: ", prunedGraph.number_of_nodes()) - print(("-" * 80)) + print("-" * 80) # sys.exit() print("\n -------------- TESTING findMCCs ----------") MCCList, MCSList = mccSearch.findMCC(prunedGraph) - print(("-" * 80)) + print("-" * 80) print("MCC List has been acquired ", len(MCCList)) print("MCS List has been acquired ", len(MCSList)) - print(("-" * 80)) + print("-" * 80) # now ready to perform various calculations/metrics print("\n -------------- TESTING METRICS ----------") @@ -109,7 +109,7 @@ def main(): # mccSearch.displayPrecip(MCCList) # mccSearch.plotHistogram(MCCList) # - print(("-" * 80)) + print("-" * 80) main()