Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
CLIMATE-912 Upgrade mccSearch code from Python2 > 3
Browse files Browse the repository at this point in the history
  • Loading branch information
lewismc committed Sep 11, 2017
1 parent 51d9dce commit 9a30e19
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions mccsearch/code/mainProg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ----------")

Expand All @@ -104,7 +104,7 @@ def main():
# mccSearch.displayPrecip(MCCList)
# mccSearch.plotHistogram(MCCList)
#
print(("-" * 80))
print("-" * 80)


main()
16 changes: 8 additions & 8 deletions mccsearch/code/mainProgTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ----------")

Expand All @@ -109,7 +109,7 @@ def main():
# mccSearch.displayPrecip(MCCList)
# mccSearch.plotHistogram(MCCList)
#
print(("-" * 80))
print("-" * 80)


main()

0 comments on commit 9a30e19

Please sign in to comment.