Skip to content

Commit

Permalink
Max sheet thickness for GlaDS applied after sheet thickness update.
Browse files Browse the repository at this point in the history
  • Loading branch information
RupertGladstone committed Oct 16, 2024
1 parent ee057a9 commit 85ff151
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions elmerice/Solvers/GlaDSCoupledSolver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)<MinH) THEN
ThickSolution(k) = MinH
END IF
END IF

SELECT CASE(methodSheet)
CASE('implicit')
IF (ThickSolution(k) > hr2(j)) THEN
Expand All @@ -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)<MinH) THEN
ThickSolution(k) = MinH
END IF
END IF


END DO
!------------------------------------------------------------------------------
! Update the Channels Area
Expand Down Expand Up @@ -1572,8 +1573,6 @@ RECURSIVE SUBROUTINE GlaDSCoupledsolver( Model,Solver,Timestep,TransientSimulati

END IF

SubroutineVisited = .TRUE.

!CHANGE - to make sure PrevValues for added variables in calving updated
IF(Calving) THEN
SheetThicknessVar => VariableGet(Mesh % Variables, 'Sheet Thickness',ThisOnly=.TRUE.)
Expand Down

0 comments on commit 85ff151

Please sign in to comment.