@@ -327,7 +327,7 @@ subroutine li_SGH_solve(domain, err)
327
327
! =============
328
328
! =============
329
329
! =============
330
- do while (timeLeft > 0.0_RKIND)
330
+ timecycling: do while (timeLeft > 0.0_RKIND)
331
331
numSubCycles = numSubCycles + 1
332
332
333
333
@@ -468,6 +468,9 @@ subroutine li_SGH_solve(domain, err)
468
468
! =============
469
469
call check_timestep(domain, timeLeft, err_tmp)
470
470
err = ior(err, err_tmp)
471
+ if (err > 0) then
472
+ exit timecycling
473
+ endif
471
474
472
475
473
476
! =============
@@ -580,7 +583,7 @@ subroutine li_SGH_solve(domain, err)
580
583
! =============
581
584
! =============
582
585
! =============
583
- end do ! while timeLeft>0
586
+ end do timecycling ! while timeLeft>0
584
587
! =============
585
588
! =============
586
589
! =============
@@ -1156,6 +1159,10 @@ subroutine check_timestep(domain, timeLeft, err)
1156
1159
endif
1157
1160
endif
1158
1161
1162
+ if (proposedDt < 1.0E-3_RKIND) then
1163
+ call mpas_log_write("CFL conditions are limiting subglacial hydrology timestep to <1 millisecond.", MPAS_LOG_ERR)
1164
+ err = ior(err, 1)
1165
+ endif
1159
1166
1160
1167
! Don' t exceed the maximum allowed hydro time step
1161
1168
proposedDt = min (proposedDt, maxDt)
@@ -1201,6 +1208,7 @@ subroutine check_timestep(domain, timeLeft, err)
1201
1208
realArgs=(/deltatSGH, deltatSGHdiffuChannel/))
1202
1209
endif
1203
1210
1211
+
1204
1212
!--------------------------------------------------------------------
1205
1213
end subroutine check_timestep
1206
1214
0 commit comments