CLIMATE-912 Upgrade mccSearch code from Python2 > 3
Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/9a30e195 Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/9a30e195 Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/9a30e195 Branch: refs/heads/master Commit: 9a30e195b66bc16c626e6572a781ad8d2b92da85 Parents: 51d9dce Author: Lewis John McGibbney <lewis.mcgibb...@gmail.com> Authored: Mon Sep 11 07:46:13 2017 -0700 Committer: Lewis John McGibbney <lewis.mcgibb...@gmail.com> Committed: Mon Sep 11 07:46:13 2017 -0700 ---------------------------------------------------------------------- mccsearch/code/mainProg.py | 16 ++++++++-------- mccsearch/code/mainProgTemplate.py | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/9a30e195/mccsearch/code/mainProg.py ---------------------------------------------------------------------- diff --git a/mccsearch/code/mainProg.py b/mccsearch/code/mainProg.py index d341aa6..33210d5 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() http://git-wip-us.apache.org/repos/asf/climate/blob/9a30e195/mccsearch/code/mainProgTemplate.py ---------------------------------------------------------------------- diff --git a/mccsearch/code/mainProgTemplate.py b/mccsearch/code/mainProgTemplate.py index 96da757..b59b5b8 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()