From ae16979e8d23ddbb0e6e54cad051b4174b0d47f0 Mon Sep 17 00:00:00 2001 From: Anthony <anthony.schrapffer@polytechnique.fr> Date: Wed, 15 Apr 2020 13:53:02 +0200 Subject: [PATCH] Get the number of operation in the run.def file --- RoutingPreProc.py | 3 ++- tests/Iberia_n48/run.def | 6 +++++- tests/Iberia_n48_regular/run.def | 6 +++++- tests/Mallorca/run.def | 4 ++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/RoutingPreProc.py b/RoutingPreProc.py index 849f7f1..385ea9c 100644 --- a/RoutingPreProc.py +++ b/RoutingPreProc.py @@ -20,6 +20,7 @@ config=configparser.ConfigParser({'SaveWeights':'true', "DiagLon":"0.0, 0.0", "D config.read("run.def") saveweights=config.get("OverAll", "SaveWeights") nbasmax=int(config.getfloat("OverAll", "nbasmax")) +numop=int(config.getfloat("OverAll", "numop")) OutGraphFile=config.get("OverAll","GraphFile") lonint=np.array(config.get("OverAll", "DiagLon").split(","),dtype=float) latint=np.array(config.get("OverAll", "DiagLat").split(","),dtype=float) @@ -207,7 +208,7 @@ comm.Barrier() hsuper.dumpnetcdf(OutGraphFile.replace(".nc","_HydroSuper.nc"), gg, modelgrid, part) print("Rank : {0} - Basin_count Before Truncate : ".format(part.rank), hsuper.basin_count) -hs = TR(hsuper, part, comm, modelgrid, numop = 200) +hs = TR(hsuper, part, comm, modelgrid, numop = numop) print("Rank : {0} - Basin_count After Truncate : ".format(part.rank), hsuper.basin_count) hgraph = IF.HydroGraph(nbasmax, hsuper, part, modelgrid) diff --git a/tests/Iberia_n48/run.def b/tests/Iberia_n48/run.def index e252d30..6cafae4 100644 --- a/tests/Iberia_n48/run.def +++ b/tests/Iberia_n48/run.def @@ -15,7 +15,11 @@ Documentation = true # # Configuration for the graph to be generated # -nbasmax = 100 +nbasmax = 80 +# +# Number of operation of simplification performed together +# +numop = 200 # # Output # diff --git a/tests/Iberia_n48_regular/run.def b/tests/Iberia_n48_regular/run.def index 7011ae3..b0afac7 100644 --- a/tests/Iberia_n48_regular/run.def +++ b/tests/Iberia_n48_regular/run.def @@ -15,7 +15,11 @@ Documentation = true # # Configuration for the graph to be generated # -nbasmax = 50 +nbasmax = 35 +# +# Number of operation of simplification performed together +# +numop = 100 # # Output # diff --git a/tests/Mallorca/run.def b/tests/Mallorca/run.def index 7ddf7f6..981458b 100644 --- a/tests/Mallorca/run.def +++ b/tests/Mallorca/run.def @@ -17,6 +17,10 @@ Documentation = true # nbasmax = 35 # +# Number of operation of simplification performed together +# +numop = 200 +# # Output # GraphFile = MEDCORDEX_test_graph.nc -- GitLab