Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit ed6ac3c0 authored by Anthony's avatar Anthony
Browse files

Correction of potential infinite loop error

parent bd5ad096
......@@ -2868,6 +2868,10 @@ SUBROUTINE routing_reg_linkup(nbpt, neighbours, nwbas, ijdimmax, inflowmax, basi
DO sp=1,nbpt
!
DO sb=1,basin_count(sp)
IF (debug) THEN
WRITE(numout,*) ""
WRITE(numout,*) "***", sp,sp,"***"
END IF
!
! We only work on this point if it does not flow into the ocean
! or flow to another sub-basin in the same grid box.
......@@ -2888,12 +2892,18 @@ SUBROUTINE routing_reg_linkup(nbpt, neighbours, nwbas, ijdimmax, inflowmax, basi
bop = outflow_basin(sp,sb)
CALL routing_updateflow(sp, sb, sp, bop, nbpt, nwbas, inflowmax, outflow_grid, outflow_basin, &
& inflow_number, inflow_grid, inflow_basin)
IF ( outflow_basin(sp,sb) == bop ) THEN
IF (( outflow_basin(sp,sb) == bop ) .AND. ( outflow_grid(sp,sb) == sp )) THEN
found = 1
solved(sp,1) = solved(sp,1) + 1
IF (debug) WRITE(numout,*) sp, sb, "flows in the same grid !"
ELSE
WRITE(numout,*) sp, sb, "flows in the same grid but has an error !"
! We have to set a outflow_grid to avoid error, we use the
! same grid point
! We also have to change outflow_basin so it is not
! considered as a corrected linkup HTU
outflow_grid(sp,sb) = sp
outflow_basin(sp,sb) = nwbas + 1
ENDIF
!
ELSE IF ( outflow_grid(sp,sb) .EQ. -3 ) THEN
......
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