100 SUBROUTINE CORRE ( YSBEG, YSEND, Q, B2, Y, YS) 



110 C* CORRE recalculates transport rates (Q) due to limited sand 



120 C* volume in front of a seawall and adjusts the shoreline 



130 C* position as necessary. Explicit calculation scheme. 



140 C* 



150 INTEGER YSBEG, YSEND 



160 REAL Q<41> , Y(40) , YSI40) 



170 C* 



180 I=YSBEG 



190 IF(QII) .GT.0) THEN 



200 Y(I-1)=Y(I-1) -B2*(Qd> -Qd-1 > ) 



210 C* 



220 C* Q positive: Calc o-f shoreline Y with correction of Q and Y 



230 C# as necessary. 



240 C* 



250 10 IF(Q(I+1) .GE.0) THEN 



260 Y(I)=Y(I) -B2*<Qd + l> -Q ( I ) ) 



270 IF(Yd) .LT.YSd) ) THEN 



280 DIFF=YS(I)-Y(I) 



290 Q(I+1)=Q(I+1) -DIFF/B2 



300 Y(I)=YS(I) 



310 ENDIF 



320 1=1+1 



330 IFd.EQ. YSEND+1) GOTO 100 



340 GOTO 10 



350 ENDIF 



360 K=I 



370 1=1+1 



380 IFd.EQ. YSEND + 1) THEN 



390 Y(I-1)=Y(I-1) -B2*(Q(I> -9(1-1) ) 



400 GOTO 100 



410 ENDIF 



420 IFd.EQ. YSEND) THEN 



430 1=1+1 



440 GOTO 30 



450 ENDIF 



460 ELSE 



470 K=YSBEG-1 



480 IF (YSBEG. EQ. 1) K=l 



490 ENDIF 



500 C* 



510 C* Q negative: Search -for a minus point. 1+ absent, calc Y 



520 C* -for the right end element. Correct Q as necessary. 



530 C* 



540 20 IF(Q(I+1) .LT.O) THEN 



550 1=1+1 



560 IFd.EQ. YSEND) THEN 



570 IF(Q(I+1) .LE.O) THEN 



580 Y(I)=Y(I) -B2*(Q(I + 1) -Qd) ) 



590 IF(Yd) .LT. YS(I) ) THEN 



600 DIFF=YS(I) -Yd) 



610 Q(I)=Q(I)+DIFF/B2 



620 Y(I)=YS(I) 



630 ENDIF 



640 GOTO 30 



650 ENDIF 



660 ENDIF 



670 GOTO 20 



680 ENDIF 



690 C* 



700 C# Minus point: Corr o-f Q out of the element if shoreline moves 



710 C* behind seawall. 



720 C* 



730 Y(I)=Y(I) -B2*(Q(I+1) -Q ( I ) ) 



740 IF(Yd) .LT. YSd) ) THEN 



A4 



