diff --git a/elmerice/Solvers/GlaDSCoupledSolver.F90 b/elmerice/Solvers/GlaDSCoupledSolver.F90 index c5d074ffba..11545fd9f9 100644 --- a/elmerice/Solvers/GlaDSCoupledSolver.F90 +++ b/elmerice/Solvers/GlaDSCoupledSolver.F90 @@ -102,7 +102,7 @@ RECURSIVE SUBROUTINE GlaDSCoupledsolver( Model,Solver,Timestep,TransientSimulati CHARACTER(LEN=MAX_NAME_LEN) :: methodSheet, methodChannels LOGICAL :: Found, FluxBC, Channels, Storage, FirstTime = .TRUE., & - AllocationsDone = .FALSE., SubroutineVisited = .FALSE., & + AllocationsDone = .FALSE., & meltChannels = .TRUE., NeglectH = .TRUE., Calving = .FALSE., & CycleElement=.FALSE., MABool = .FALSE., MaxHBool = .FALSE., LimitEffPres=.FALSE., & MinHBool=.FALSE., CycleNode=.FALSE. @@ -1227,19 +1227,6 @@ RECURSIVE SUBROUTINE GlaDSCoupledsolver( Model,Solver,Timestep,TransientSimulati CYCLE END IF - IF(MaxHBool) THEN - IF (ThickSolution(k)>MaxH) THEN - ThickSolution(k) = MaxH - !ThickPrev(k,1) = 0.0 - END IF - END IF - - IF(MinHBool) THEN - IF (ThickSolution(k) hr2(j)) THEN @@ -1265,6 +1252,20 @@ RECURSIVE SUBROUTINE GlaDSCoupledsolver( Model,Solver,Timestep,TransientSimulati ! Update Vvar Vvar(j) = Vvar(j) * ThickSolution(k) + IF(MaxHBool) THEN + IF (ThickSolution(k)>MaxH) THEN + ThickSolution(k) = MaxH + !ThickPrev(k,1) = 0.0 + END IF + END IF + + IF(MinHBool) THEN + IF (ThickSolution(k) VariableGet(Mesh % Variables, 'Sheet Thickness',ThisOnly=.TRUE.)