From d88a1396dd51340664c31f930c641fc0d1b38207 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Sat, 26 Jan 2019 11:35:53 -0200 Subject: [PATCH] COORDINATES: Update toplev only if it was not changed before. If we restart a job from a run with different maximum refinement level, toplev parameter is set from a restart file and coordinate variables are recreated. Setting toplev to maxlev all the time fails in recreating correct coordinate variables and results in crashes. Signed-off-by: Grzegorz Kowal --- src/coordinates.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coordinates.F90 b/src/coordinates.F90 index 1218a8b..4747dc1 100644 --- a/src/coordinates.F90 +++ b/src/coordinates.F90 @@ -59,7 +59,7 @@ module coordinates ! the limits of refinement level ! - integer , save :: minlev = 1, maxlev = 1, toplev = 1 + integer , save :: minlev = 1, maxlev = 1, toplev = -1 ! block indices ! @@ -255,7 +255,7 @@ module coordinates ! set the top level ! - toplev = maxlev + if (toplev == -1) toplev = maxlev ! obtain the domain base division !