Commit 98f59ec8 authored by POLCHER Jan's avatar POLCHER Jan 🚴🏾
Browse files

Make sure that the diagnostic plots are only activated in mono-proc mode.

They are not yet adapted to the parallel processing.
parent 1908158c
......@@ -43,7 +43,7 @@ gg = MG.GlobalGrid()
#
comm = MPI.COMM_WORLD
szhalo=1
nbc=comm.Get_size()
nbcore=comm.Get_size()
rank=comm.Get_rank()
#
# Verify directories
......@@ -56,7 +56,7 @@ comm.Barrier()
#
# Region of grid to be treated
#
part = PA.partition(gg.ni, gg.nj, gg.land, comm, nbc, szhalo, rank)
part = PA.partition(gg.ni, gg.nj, gg.land, comm, nbcore, szhalo, rank)
#
# Weight file to be created
#
......@@ -146,20 +146,22 @@ del sub_lon
del sub_lat
gc.collect()
if lonint[0] != lonint[1] and latint[0] != latint[1] :
DP.MAPPLOT("MapHydroGrid", lonint, latint, hoverlap, hoverlap.hierarchy_bx, modelgrid.polyll, title="Distance to ocean")
if nbcore == 1 :
if lonint[0] != lonint[1] and latint[0] != latint[1] :
DP.MAPPLOT("MapHydroGrid", lonint, latint, hoverlap, hoverlap.hierarchy_bx, modelgrid.polyll, title="Distance to ocean")
hsuper = IF.HydroSuper(nbvmax, hydrodata, hoverlap)
#
# Plot the hydrological supermesh
#
if lonint[0] != lonint[1] and latint[0] != latint[1] :
print("going into SUPERMESHPLOT", lonint, latint)
DP.SUPERMESHPLOT("MapSuperGrid_Beforelinkup", lonint, latint, hoverlap, hsuper, modelgrid.polyll)
if nbcore == 1 :
if lonint[0] != lonint[1] and latint[0] != latint[1] :
DP.SUPERMESHPLOT("MapSuperGrid_Beforelinkup", lonint, latint, hoverlap, hsuper, modelgrid.polyll)
print("=================== LINKUP ====================")
hsuper.linkup(hydrodata)
DP.SUPERMESHPLOT("MapSuperGrid_Afterlinkup", lonint, latint, hoverlap, hsuper, modelgrid.polyll)
if nbcore == 1 :
DP.SUPERMESHPLOT("MapSuperGrid_Afterlinkup", lonint, latint, hoverlap, hsuper, modelgrid.polyll)
#
# Do some memory management and synchronize procs.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment