Showing posts with label SWMM4. Show all posts
Showing posts with label SWMM4. Show all posts

Sunday, July 2, 2017

How Calibration Plots were made in #SWMM4 and #SWMM3

How Calibration Plots were made in #SWMM4 and #SWMM3 - I remember these being very useful in SWMM classes with Wayne Huber at UF.

      SUBROUTINE GRAPH
C     GRAPH BLOCK
C=======================================================================
C     THIS ROUTINE PREPARES SIMULATED AND MEASURED HYDROGRAPHS,
C     POLLUTOGRAPHS  AND LOADOGRAPHS FOR PLOTTING BY SUBROUTINE CURVE.
C     SIMULATED AND/OR MEASURED DATA MAY BE PLOTTED.  IT IS NO LONGER
C     POSSIBLE TO PLOT MORE THAN ONE LOCATION ON ONE GRAPH.
C     THIS ROUTINE LAST UPDATED BY W. HUBER, AUGUST 1993.
C     SCRATCH FILE 1 NOT USED.  DON'T OPEN.  WCH, 4/18/94.
C     Change NQP to NQPP to avoid confusion cim 9/9/00
C     Add error message for E3 lines, WCH, 9/14/00.
C     Fix metric conversion error.  Inflows on interface file from
C       all blocks will be in cms if metric is used.  WCH, 9/14/00.
C     Uses nscrat(8) for MFILE input file, added features for FREE 
c     formatted input - RED, 9/15/00
C     Add more error messages, WCH, 9/16/00.
C=======================================================================
      INCLUDE 'TAPES.INC'
      INCLUDE 'INTER.INC'
      INCLUDE 'LAB.INC'
C=======================================================================
C#### WCH (CDM), 8/93. REMOVE NEWFIL*60
      CHARACTER KPRED(20)*10,KMEAS(20)*10,JMEAS(20)*10
      CHARACTER PNDUM*8,PUDUM*8,VER1*10,VER2*10,VER3*10,VER4*10,
     +          PRIN(3)*14,FIRMAT*80,DEFMT*16,HORIZG(2)*30,
     +          VERM(4)*10,USE*4,PPNAME*8,PPUNIT*8,ZX(2)*20,BMJ*4
      DIMENSION X(401,2),Y(401,2),NPT(2),JPLOT(20),
     1          YT(401,6),ITAB(20),IPLOT(20),MTAB(20),KPLOT(20),
     2          TIMX(16),YVAL(16),QQT(200),PPT(10,200),IPOLX(11),
     3          NNDIM(MQUAL),PPNAME(MQUAL),PPUNIT(MQUAL),NLOAD(11)
      LOGICAL NOTEND
C=======================================================================
      DATA PRIN/'HYDROGRAPH   ','POLLUTOGRAPH ','LOADOGRAPH '/
      DATA HORIZG/'      TIME OF DAY IN HOURS    ',
     +            ' PREDICTED = *    MEASURED = +'/
      DATA VER1/'   FLOW   '/,VER2/'    IN    '/,
     +     VER3/'    CFS   '/,VER4/' CU M/SEC '/
      DATA VERM/'  POUNDS  ','   PER   ','  SECOND  ','MILLIGRAMS'/
      DATA DEFMT/'(2X,F8.0,7F10.0)'/,BMJ/'    '/
      DATA ZX/'  PLOT CONCENTRATION','  PLOT LOADOGRAPH'/
C=======================================================================
C#### WCH, 8/5/93.  ADD NO-QUOTE OPTION.
C=======================================================================
      IF(NOQ.EQ.0) THEN
                   WRITE(*,10)
                   WRITE(N6,10)
                   ELSE
                   WRITE(*,12)
                   WRITE(N6,12)
                   ENDIF
C#######################################################################
C WCH, 8/5/93. INCREMENT THE JIN/JOUT COUNTERS.
C=======================================================================
      INCNT  = INCNT + 1
      IOUTCT = IOUTCT + 1
C=======================================================================
C     Open all input/output files for the Graph Block.
C=======================================================================
      IF(JIN(INCNT).GT.0.AND.(FFNAME(INCNT).EQ.'JOT.UF'.OR.
     +      FFNAME(INCNT).EQ.'JIN.UF'))
     +      OPEN(JIN(INCNT),FORM='UNFORMATTED',STATUS='SCRATCH')
      IF(JIN(INCNT).GT.0.AND.FFNAME(INCNT).NE.'JOT.UF'.AND.
     +      FFNAME(INCNT).NE.'JIN.UF')
     +      OPEN(JIN(INCNT),FILE=FFNAME(INCNT),FORM='UNFORMATTED',
     +      STATUS='UNKNOWN')
C=======================================================================
C     DON'T NEED JOUT BUT OPEN OUT OF HABIT IF JOUT > 0.
C=======================================================================
      IF(JOUT(IOUTCT).GT.0.AND.(FFNAME(25+IOUTCT).EQ.'JOT.UF'.OR.
     +      FFNAME(25+IOUTCT).EQ.'JIN.UF'))
     +      OPEN(JOUT(IOUTCT),FORM='UNFORMATTED',STATUS='SCRATCH')
      IF(JOUT(IOUTCT).GT.0.AND.FFNAME(25+IOUTCT).NE.'JOT.UF'.AND.
     +      FFNAME(25+IOUTCT).NE.'JIN.UF')
     +      OPEN(JOUT(IOUTCT),FILE=FFNAME(25+IOUTCT),FORM='UNFORMATTED',
     +      STATUS='UNKNOWN')
C=======================================================================
C=======================================================================
C#### WCH, 4/18/94.  DON'T OPEN THIS IF DON'T USE IT.
C#### (DON'T) OPEN FORMATTED SCRATCH FILE
C##=====================================================================
Cred     need this file for measured data on an external file - 9/14/00
cred     change to nscrat(8) because the first scratch file is used by 
cred     runoff and transport - 9/15/00
         IF(NSCRAT(8).GT.0.AND.FFNAME(58).NE.'SCRT1.UF') OPEN(NSCRAT(8),
     +             FILE=FFNAME(58),FORM='FORMATTED',STATUS='UNKNOWN')
C##      IF(NSCRAT(1).GT.0.AND.FFNAME(51).EQ.'SCRT1.UF') OPEN(NSCRAT(1),
C##     +             FORM='FORMATTED',STATUS='SCRATCH')
C##                    NOUT = NSCRAT(1)
C##      IF(NOUT.GT.0) REWIND NOUT
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP A1 <<<<<<<<<<<<
C=======================================================================
      READ(N5,*,ERR=888) CC,NTAPE,NPLOT,MEAS,
     +                       MFILE,MPLOT,NQPP,METRIC,MCTH
      NLP    = NQPP+1
      IF(MFILE.LE.0) MFILE = N5
      WRITE(N6,30) NTAPE,METRIC,NQPP,NPLOT,MEAS,MFILE,MPLOT,MCTH
      METRIC = METRIC + 1
      IF(METRIC.EQ.1) THEN
                      CFACT1 = 28.31605/453592.0
                      CFACT2 = 28.31605
                      ELSE
                      CFACT1 = 1000.0 / 1.0E06
                      CFACT2 = 1000.0
                      ENDIF
      IF(NPLOT.EQ.0.AND.MEAS.EQ.0) RETURN
                    NUNIT = N5
cold  IF(MEAS.EQ.2) NUNIT = MFILE
      IF(MEAS.EQ.2) THEN
Cwch, 9/16/00.  Add error check for MFILE = NSCRAT8
 IF(MFILE.NE.NSCRAT(8)) THEN
WRITE(*,3800) MFILE,NSCRAT(8)
WRITE(N6,3810)MFILE,NSCRAT(8)
IF(NSCRAT(8).GT.0) THEN
MFILE = NSCRAT(8)
ELSE
STOP ' MUST HAVE E3 INPUT ON NSCRAT(8). RUN ST
     1OPPED FROM GRAPH.'
                   ENDIF
                ENDIF
                    NUNIT = MFILE
                    REWIND NUNIT
                    ENDIF
      IF(NPLOT.LT.1.OR.NTAPE.LT.1) GO TO 4000
C=======================================================================
C     INTERFACING MECHANISM FOR QUANTITY AND QUALITY OF RUNOFF
C=======================================================================
C#### WCH, 8/5/93.  ADD ERROR MESSAGE.
      IF(NTAPE.NE.JIN(INCNT)) THEN
         WRITE(N6,9500) NTAPE, JIN(INCNT), INCNT
         WRITE(*,9500)  NTAPE, JIN(INCNT), INCNT
         STOP
         ENDIF
      CALL INFACE(1,NTAPE)
      IF(NQUAL.GT.0) THEN
                     DO 110 K  = 1,NQUAL
                     PPNAME(K) = PNAME(K)
                     PPUNIT(K) = PUNIT(K)
                     NNDIM(K)  = NDIM(K)
  110                CONTINUE
                     ENDIF
C=======================================================================
C     INPUT INFORMATION FOR QUALITY PARAMETERS.
C=======================================================================
 4000 IF(NQPP.LE.0) GO TO 4200
      WRITE (N6,4090)
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP B1 <<<<<<<<<<<<
C=======================================================================
      DO 4140 K = 1,NQPP
      READ(N5,*,ERR=888) CC,KPOL,NLOAD(K+1),PNDUM,PUDUM,NDUM
C=======================================================================
C     HERE, USER INPUT DEFINES POLLUTANTS.
C=======================================================================
      K1        = K + 1
      IF(KPOL.EQ.0.OR.NPLOT.EQ.0) THEN
                                  IPOLX(K1) = K1
                                  NDIM(K1)  = NDUM
                                  PNAME(K1) = PNDUM
                                  PUNIT(K1) = PUDUM
                                  ELSE
                                  IPOLX(K1) = KPOL
                                  NDIM(K1)  = NNDIM(KPOL)
                                  PNAME(K1) = PPNAME(KPOL)
                                  PUNIT(K1) = PPUNIT(KPOL)
                                  ENDIF
      KK1 = NLOAD(K1) + 1
      WRITE(N6,4150) K,PNAME(K1),PUNIT(K1),NDIM(K1),KPOL,ZX(KK1)
 4140 CONTINUE
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP C1 <<<<<<<<<<<<
C=======================================================================
 4200 IF(NPLOT.GT.0) THEN
                     IF(JCE.EQ.0) THEN
                         READ(N5,*,ERR=888) CC,(IPLOT(N),N=1,NPLOT)
                         WRITE(N6,40) NPLOT,(IPLOT(N),N=1,NPLOT)
                         ELSE
                         READ(N5,*,ERR=888) CC,(KPRED(N),N=1,NPLOT)
                         WRITE(N6,41) NPLOT,(KPRED(N),N=1,NPLOT)
                         ENDIF
                     ENDIF
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP C2 <<<<<<<<<<<<
C=======================================================================
      IF(MPLOT.GT.0) THEN
                     IF(JCE.EQ.0) THEN
                        READ(N5,*,ERR=888) CC,(KPLOT(N),N=1,MPLOT)
                        WRITE(N6,55) MPLOT,(KPLOT(N),N=1,MPLOT)
                        ELSE
                        READ(N5,*,ERR=888) CC,(KMEAS(N),N=1,MPLOT)
                        WRITE(N6,56) MPLOT,(KMEAS(N),N=1,MPLOT)
                        ENDIF
                     ENDIF
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP D1 <<<<<<<<<<<<
C=======================================================================
      READ(N5,*,ERR=888) CC,TITLE(1)
      HTITLE(1) = TITLE(1)
      HTITLE(2) = BMJ
      DO 100 J  = 1,20
  100 MTAB(J)   = 0
      HORIZ(1)  = HORIZG(1)
      HORIZ(2)  = HORIZG(2)
      NNN       = 0
C=======================================================================
C     ITAB = SUBSCRIPT OF LOCATION OF MEASURED GRAPH WHEN MEASURED
C            LOCATION MATCHES DESIRED PLOT LOCATION.
C=======================================================================
      IF(MPLOT.GT.0) THEN
                     DO 180 M  = 1,MPLOT
                     NNN       = NNN + 1
                     DO 160 J  = 1,LOCATS
                     IF(JCE.EQ.0.AND.KPLOT(M).EQ.NLOC(J)) GO TO 170
                     IF(JCE.EQ.1.AND.KMEAS(M).EQ.KAN(J))  GO TO 170
  160                CONTINUE
                     ITAB(M) = 0
                     MTAB(M) = M
                     GO TO 180
  170                ITAB(M) = J
                     MTAB(M) = M
  180                CONTINUE
                     ENDIF
C=======================================================================
C     CHECK FOR MATCHING LOCATIONS TO BE PLOTTED FROM SWMM FILE.
C     MTAB EQ 0, NO MATCH BETWEEN IPLOT AND KPLOT.
C     MTAB NE 0, MTAB = SUBSCRIPT OF IPLOT.
C=======================================================================
      IF(NPLOT.GT.0) THEN
                     DO 210 J = 1,NPLOT
                     IF(MPLOT.EQ.0) GO TO 201
                     DO 200 M = 1,MPLOT
                     IF(JCE.EQ.0) JPLOT(M) = KPLOT(M)
                     IF(JCE.EQ.1) JMEAS(M) = KMEAS(M)
                     IF(JCE.EQ.0.AND.IPLOT(J).EQ.KPLOT(M)) GO TO 205
                     IF(JCE.EQ.1.AND.KPRED(J).EQ.KMEAS(M)) GO TO 205
  200                CONTINUE
  201                DO 206 N  = 1,LOCATS
                     IF(JCE.EQ.0.AND.IPLOT(J).EQ.NLOC(N)) GO TO 203
                     IF(JCE.EQ.1.AND.KPRED(J).EQ.KAN(N))  GO TO 203
  206                CONTINUE
                     IF(JCE.EQ.0) WRITE(N6,9020) IPLOT(J)
                     IF(JCE.EQ.1) WRITE(N6,9021) KPRED(J)
                     STOP
  203                NNN        = NNN + 1
                     IF(JCE.EQ.0) JPLOT(NNN) = IPLOT(J)
                     IF(JCE.EQ.1) JMEAS(NNN) = KPRED(J)
                     ITAB(NNN)  = N
                     MTAB(NNN)  = 0
                     GO TO 210
  205                MTAB(M)   = M
  210                CONTINUE
                     END IF
C=======================================================================
C     FROM PREDICTED OUTPUT, STORE EVERY MCTH DATA POINT
C     PROGRAM THEN INTERPOLATES TO PLOT 100 POINTS AT MOST.
C     FIRST PLOTTED POINT IS ALWAYS ZERO AT TZERO.
C=======================================================================
      IF(MCTH.LE.0) MCTH = 1
      WRITE(*,34)   NNN
      DO 800 MT = 1,NNN
      IBACK     = 0
      NOTEND    = .FALSE.
      WRITE(*,35) MT
      IF(NPLOT.EQ.0)                    GO TO 7000
      IF(MT.LE.MPLOT.AND.ITAB(MT).EQ.0) GO TO 7000
C=======================================================================
C     READ INTERFACE FILE HEADERS
C=======================================================================
      CALL INFACE(0,NTAPE)
      TTME     = TZERO
      N        = 0
 5000 DO 250 K = 1,100000,MCTH
      N        = N+1
      DO 230 J = 1,MCTH
C=======================================================================
C     READ TIME STEP VALUES FROM INTERFACE FILE.
C     STORE IN TEMPORARY FILE AND PULL OUT DESIRED VALUES.
C=======================================================================
      IF(NQUAL.EQ.0) THEN
               READ(NTAPE,END=251) JDAY,TMDAY,DELTA,(QQT(I),I=1,LOCATS)
               ELSE
               READ(NTAPE,END=251) JDAY,TMDAY,DELTA,(QQT(I),
     +                             (PPT(L,I),L=1,NQUAL),I=1,LOCATS)
              END IF
      TTME   = TTME + DELTA
  230 CONTINUE
      X(N,1) = TTME/3600.0
      ITB      = ITAB(MT)
      DO 240 J = 1,NLP
      IF(J.EQ.1) THEN
                 YT(N,J) = QQT(ITB)
                 ELSE
                 KP = IPOLX(J)
                 IF(KP.GT.0) THEN
                             YT(N,J) = PPT(KP,ITB)
                             ELSE
                             YT(N,J) = 0.0
                             ENDIF
                 ENDIF
  240 CONTINUE
      IF(N.GE.401) THEN
                   IBACK = IBACK + 1
                   GO TO 252
                   ENDIF
  250 CONTINUE
  251 NOTEND = .FALSE.
      N      = N - 1
      IBACK  = IBACK + 1
      IF(N.LE.0) GO TO 800
      GO TO 253
  252 NOTEND = .TRUE.
  253 NPT(1) = N
C=======================================================================
C     OUTER LOOP ON HYDROGRAPH PLUS NUMBER OF POLLUTANTS.
C     ONLY READ MEASURED DATA FOR FIRST 200 PREDICTED DATA POINTS.
C=======================================================================
 7000 DO 820 J  = 1,NLP
      IF(IBACK.GT.1) GO TO 6000
             IF(J.EQ.1) THEN
                        VERT1 = VER1
                        VERT2 = VER2
                        IF(METRIC.EQ.1) VERT3 = VER3
                        IF(METRIC.EQ.2) VERT3 = VER4
                        ELSE IF(NLOAD(J).EQ.0) THEN
                             JJ        = IPOLX(J)
                             HTITLE(1) = TITLE(1)
                             VERT1     = PNAME(JJ)
                             VERT2     = VER2
                             VERT3     = PUNIT(JJ)
                             ELSE
                             JJ        = IPOLX(J)
                             HTITLE(1) = PNAME(JJ)
                             VERT2     = VERM(2)
                             VERT3     = VERM(3)
                             IF(METRIC.EQ.1) VERT1 = VERM(1)
                             IF(METRIC.EQ.2) VERT1 = VERM(4)
                             ENDIF
             IF(NPLOT.GT.0) THEN
                            IF(NLOAD(J).EQ.1) GO TO 6000
                            IF(MTAB(MT).EQ.0) GO TO 6000
                            IF(MPLOT.EQ.0)    GO TO 6000
                            ENDIF
             KK = 0
C=======================================================================
C     LOOP ON NUMBER OF MEASURED LOCATIONS TO BE PLOTTED.
C=======================================================================
C     READ PARAMETERS FOR MEASURED INPUT FOR EACH LOCATION FOR EACH
C        MEASURED HYDROGRAPH AND POLLUTOGRAPH.
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP E1 <<<<<<<<<<<<
C=======================================================================
      READ(N5,*,ERR=888) CC,MDATA,LCARD,MTIME,
     +                   MUNIT,TMZERO,TQUIT,DTMHR
      WRITE(N6,310) PRIN(1),KPLOT(MT),
     +              MDATA,LCARD,MTIME,MUNIT,TMZERO,TQUIT,DTMHR
      IF(MDATA.EQ.0) GO TO 6000
C=======================================================================
C     READ IN VARIABLE FORMAT FOR EACH MEASURED DATA INPUT.
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP E2 <<<<<<<<<<<<
C=======================================================================
      READ(N5,*,ERR=888) CC,FIRMAT
      IF(FIRMAT.EQ.' ')     FIRMAT = DEFMT
      WRITE(N6,360) FIRMAT
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP E3 <<<<<<<<<<<<
C=======================================================================
C                    MUNIT = 0  TIME IS IN MINUTES.
C                    MUNIT = 1  TIME IS IN HOURS.MINUTES.
C                    MUNIT = 2  TIME IS IN HOURS.
C=======================================================================
      IF(MTIME.EQ.0) THEN
                     KSTOP = 0
                     KK    = 0
Cwch 9/14/00  Add error message.
cred                 rearrange the next few lines - 9/14/00
370                  continue
cold370              READ(NUNIT,FIRMAT) (TIMX(LL),YVAL(LL),LL=1,LCARD)
cred                 allow for a free formatted file - 9/14/00
                     if(FIRMAT.EQ.'FREE') then
                        READ(NUNIT,*,end=510,err=385) 
     +                   (TIMX(LL),YVAL(LL),LL=1,LCARD)
                        else
                        READ(NUNIT,FIRMAT,END=510,ERR=385) 
     1                   (TIMX(LL),YVAL(LL),LL=1,LCARD)
                        endif
cred                 end of 9/14/00 change
                     DO 380 LL = 1,LCARD
                     IF(TIMX(LL).GE.TQUIT) THEN
                                           KKX   = LL-1
                                           KSTOP = 1
                                           GO TO 390
                                           END IF
  380                CONTINUE
                     KKX = LCARD
Cwch, 9/14/00
  GO TO 390
  385   WRITE(N6,3885) (KK+1)/LCARD
                     STOP ' ERROR READING E3 LINES. SEE OUTPUT FILE. RUN
     1 STOPPED FROM GRAPH.'
  390                IF(KKX.LE.0) GO TO 500
                     DO 490 LL = 1,KKX
                     LX        = KK+LL
                     IF(MUNIT-1.LT.0) THEN
                                X(LX,2) = TIMX(LL)/60.+TMZERO
                                ELSE
                                IF(MUNIT-1.EQ.0) THEN
                                   TIM     = IFIX(TIMX(LL))
                                   X(LX,2) = TIM+(TIMX(LL)-TIM)/0.6+
     +                                            TMZERO
                                   ELSE
                                   X(LX,2)  = TIMX(LL)+TMZERO
                                   ENDIF
                                ENDIF
  490                Y(LX,2) = YVAL(LL)
  500                KK      = KK+KKX
                     IF(KK.LT.401.AND.KSTOP.EQ.0) GO TO 370
Cred                 get out of this loop, use the END statement - 9/15/00
  510                IF(KK.GT.401) KK = 401
cold                 IF(KK.GT.201) KK = 201
                     NPT(2) = KK
                     WRITE(N6,505) KK
                     ENDIF
C=======================================================================
C     HERE, COMPUTE TIME USING CONSTANT TIME INCREMENT, DTMHR, IN HOURS.
C=======================================================================
C>>>>>>>>>>>> READ DATA GROUP E3 <<<<<<<<<<<<
C=======================================================================
      IF(MTIME.GT.0)      THEN
         IF(MTIME.GT.401) THEN
                             WRITE(N6,520) MTIME
                             MTIME = 401
                             ENDIF
         IF(MTIME.GT.0)   THEN
cold                      READ(N5,FIRMAT) (Y(LL,2),LL=1,MTIME)
cred                      allow for a free formatted file - 9/14/00
Cwch, 9/16/00. Put read in DO-loop since documentation says read
C     LCARD values per line. 
DO JJ = 1,MTIME,LCARD
LLSTOP = LCARD
                       IF(MTIME-JJ+1.LT.LCARD) LLSTOP=MTIME-JJ+1
                       KL = JJ
                          if(FIRMAT.EQ.'FREE') then
                            READ(N5,*,ERR=545) (Y(LL,2),LL=KL,LLSTOP)
                             else
                          READ(N5,FIRMAT,ERR=545) (Y(LL,2),LL=KL,LLSTOP)
                             endif
                   END DO
Cwch, 9/16/00.  Include error message here too.
GO TO 547
  545   WRITE(N6,3885) JJ
                     STOP ' ERROR READING E3 LINES. SEE OUTPUT FILE. RUN
     1 STOPPED FROM GRAPH.'
  547                     DO 550 LX  = 1,MTIME
  550                     X(LX,2)    = TMZERO+FLOAT(LX-1)*DTMHR
                          NPT(2)     = MTIME
                          ENDIF
                          ENDIF
C=======================================================================
C     CONVERT PREDICTED FLOWS TO APPROPRIATE UNITS
C=======================================================================
                     NN = NPT(1)
      IF(NPLOT.EQ.0) NN = NPT(2)
      DO 630 N = 2,NN
      IF(J.EQ.1) THEN
Cwch, 9/14/00.  Interface file flows already metric, from Runoff & Transp.
C                 Y(N,1) = YT(N,J)/CMET(1,METRIC)**3.0
                 Y(N,1) = YT(N,J)
                 GO TO 630
                 ENDIF
C=======================================================================
C     CONVERT PREDICTED AND MEASURED
C             POLLUTOGRAPHS TO CONCENTRATION FROM CFS*CONC.
C=======================================================================
      IF(NLOAD(J).EQ.0) THEN
                  IF(YT(N,1).GT.0.0) Y(N,1) = YT(N,J)/YT(N,1)
                  ELSE
                  IF(NDIM(J).EQ.0) THEN
                                   Y(N,1) = YT(N,J)*CFACT1
                                   Y(N,2) =  Y(N,2)*CFACT1
                                   ELSE
                                   Y(N,1) = YT(N,J)*CFACT2
                                   Y(N,2) =  Y(N,2)*CFACT2
                                   ENDIF
                  ENDIF
  630 CONTINUE
      CALL CURVE(X,Y,NPT,2,KPLOT(MT),KMEAS(MT))
      IF(J.EQ.1) THEN
                 USE = 'FLOW'
                 ELSE
                 IF(NLOAD(J).EQ.0) USE = 'CONC'
                 IF(NLOAD(J).EQ.1) USE = 'LOAD'
                 ENDIF
      KP = IPOLX(J)
      IF(KP.EQ.0) KP = 1
      CALL HYSTAT(X,Y,NPT,2,KPLOT(MT),KMEAS(MT),TRIBA,METRIC,
     +                                USE,PUNIT(KP),PNAME(KP))
C=======================================================================
C     PLOT PREDICTED GRAPHS ONLY.
C     CONVERT PREDICTED POLLUTOGRAPHS TO CONCENTRATION FROM CFS*CONC.
C=======================================================================
      IF(ITAB(MT).EQ.0) GO TO 820
 6000 IF(MTAB(MT).EQ.0.OR.(J.GT.1.AND.NLOAD(J).GT.0)) THEN
                        IF(J.EQ.1) THEN
                                   USE = 'FLOW'
                                   ELSE
                                   IF(NLOAD(J).EQ.0) USE = 'CONC'
                                   IF(NLOAD(J).EQ.1) USE = 'LOAD'
                                   ENDIF
                        NN       = NPT(1)
                        SUMFLW   = 0.0
                        DO 930 N = 1,NN
                        IF(J.EQ.1) THEN
Cwch, 9/14/00.  Interface file flows already metric, from Runoff & Transp.
C                                  Y(N,1) = YT(N,J)/CMET(1,METRIC)**3.0
                                   Y(N,1) = YT(N,J)
                                   SUMFLW = SUMFLW + Y(N,1)
                                   GO TO 930
                                   ENDIF
                        IF(NLOAD(J).EQ.0) THEN
                           IF(YT(N,1).GT.0.0) Y(N,1) = YT(N,J)/YT(N,1)
                           ELSE
                           IF(NDIM(J).EQ.0) THEN
                                      Y(N,1) = YT(N,J)*CFACT1
                                      Y(N,2) =  Y(N,2)*CFACT1
                                      ELSE
                                      Y(N,1) = YT(N,J)*CFACT2
                                      Y(N,2) =  Y(N,2)*CFACT2
                                      ENDIF
                           ENDIF
  930                   CONTINUE
C=======================================================================
C                       PLOT ONLY THE PREDICTED DATA USING CURVE
C=======================================================================
                        IF(J.EQ.1.AND.SUMFLW.EQ.0.0) THEN
                        IF(JCE.EQ.0) WRITE(N6,9040) JPLOT(MT),NPT(1)
                        IF(JCE.EQ.1) WRITE(N6,9041) JMEAS(MT),NPT(1)
                        ELSE
                        CALL CURVE(X,Y,NPT,1,JPLOT(MT),JMEAS(MT))
                        IF(J.EQ.1) THEN
                                   USE = 'FLOW'
                                   ELSE
                                   IF(NLOAD(J).EQ.0) USE = 'CONC'
                                   IF(NLOAD(J).EQ.1) USE = 'LOAD'
                                   ENDIF
                        KP = IPOLX(J)
                        IF(KP.EQ.0) KP = 1
                        CALL HYSTAT(X,Y,NPT,1,JPLOT(MT),JMEAS(MT),TRIBA,
     +                       METRIC,USE,PUNIT(KP),PNAME(KP))
                        ENDIF
                        ENDIF
  820 CONTINUE
C=======================================================================
C     IF MORE THAN 201 DATA POINTS ARE ON THE INTERFACE FILE
C     RETURN AND CONTINUE PLOTTING THE HYDROGRAPHS AND POLLUTOGRAPHS
C=======================================================================
      IF(IBACK.GE.1.AND.NOTEND) THEN
                                N = 0
                                GO TO 5000
                                ENDIF
  800 CONTINUE
C=======================================================================
   10 FORMAT(/,
     +' ***************************************************',/,
     +' * ENTRY TO GRAPH BLOCK. LAST UPDATED AUGUST 1993. *',/,
     +' * "All art is quite useless."                     *',/,
     +' *                             Oscar Wilde (1891)  *',/,
     +' ***************************************************',/)
C#### WCH, 8/5/93
   12 FORMAT(/,
     +' ***************************************************',/,
     +' * ENTRY TO GRAPH BLOCK. LAST UPDATED AUGUST 1993. *',/,
     +' ***************************************************',/)
   30 FORMAT(/,' INPUT PARAMETER SUMMARY:',//,
     1 ' NUMBER OF OFF-LINE FILE OF PREDICTED DATA(NTAPE)....',I3,/,
     2 ' FLOW ORDINATE IN CFS (=0) OR CU M/S (=1) (METRIC)...',I3,/,
     3 ' NUMBER OF POLLUTOGRAPHS TO BE PLOTTED (NQP).........',I3,/,
     4 ' NUMBER OF LOCATIONS FOR PREDICTED PLOTS(NPLOT)......',I3,/,
     5 ' INDICATING MEASURED DATA AND THEIR STORAGE(MEAS)....',I3,/,
     6 ' FILE NUMBER FOR RETRIEVAL OF MEASURED DATA(MFILE)...',I3,/,
     7 ' NUMBER OF LOCATIONS FOR MEASURED DATA(MPLOT)........',I3,/,
     8 ' SKIP MCTH VALUES ON INTERFACE FILE..................',I3)
   34 FORMAT(/,' PLOTTING ',I5,' LOCATIONS',/,' PLOTTING GRAPH # ',/)
   35 FORMAT('+',I16)
   40 FORMAT(//,' PREDICTED GRAPHS ARE TO BE PLOTTED FOR THE FOLLOWING
     1 ',I4,' LOCATIONS :',//,10I11,/,10I11)
   41 FORMAT(//,' PREDICTED GRAPHS ARE TO BE PLOTTED FOR THE FOLLOWING
     1 ',I4,' LOCATIONS :',//,10A11,/,10A11)
   55 FORMAT(/,' MEASURED GRAPHS ARE TO BE PLOTTED FOR THE FOLLOWING ',
     1I4,' LOCATIONS :',//,10I11,/,10I11)
   56 FORMAT(/,' MEASURED GRAPHS ARE TO BE PLOTTED FOR THE FOLLOWING ',
     1I4,' LOCATIONS :',//,10A11,/,10A11)
  310 FORMAT(//,1X,A14,
     1 ' DATA GROUP E1 INPUT PARAMETERS FOR LOCATION ',I5,' ARE:',/,
     2' MDATA = ',I10,'     LCARD = ',I10,  '    MTIME = ',I10,/,
     2' MUNIT = ',I10,'    TMZERO = ',F10.4,'    TQUIT = ',F10.4,/,
     3' DTMHR = ',F10.4)
  360 FORMAT(/,' INPUT FORMAT FOR THESE DATA IS: ',A80)
  505 FORMAT(I6,' MEASURED DATA POINTS READ IN.')
  520 FORMAT(/,' ===> WARNING! MTIME=',I5,', GT 401. NOT ALLOWED.',
     1 '  MTIME WILL BE SET = 401.')
Cwch, 9/16/00
 3800 FORMAT(' ERROR. MFILE =',I4,' NSCRAT(8) =',I4,'. SHOULD BE EQUAL.'
     1,/,' WILL TRY SETTING MFILE = NSCRAT(8), IF NON-ZERO.',/,
     2   ' OTHERWISE, RUN WILL STOP, BELOW.')
 3810 FORMAT(' ERROR. MFILE =',I4,' NSCRAT(8) =',I4,'. SHOULD BE EQUAL.'
     1,/,' WILL TRY SETTING MFILE = NSCRAT(8), IF NON-ZERO.',/,
     2   ' OTHERWISE, CANNOT READ E3 DATA AND RUN WILL STOP.')
Cwch, 9/14/00.  
 3885 FORMAT(/,' ERROR READING E3 LINES.  RUN STOPPED.',/,
     1 ' OFFENDING E3 LINE IS NUMBER',I6)
 4090 FORMAT(/,
     1' ****************************************',/,
     1' *  QUALITY CONSTITUENTS TO BE GRAPHED  *',/,
     1' ****************************************',//,
     1 '                       TYPE OF   INTERFACE FILE',/,
     3 ' NO.  NAME     UNITS    UNITS   POSITION (IF ANY) PLOT',
     3 ' DESCRIPTION',/,
     4 ' --- -----     -----    -----   ----------------------',
     5 '------------')
 4150 FORMAT(I3,2X,A8,2X,A8,I6,I13,A30)
 9020 FORMAT(/,' ===> ERROR  LOCATION: ',I10,' WAS NOT FOUND ON THE ',
     +                                      'INTERFACE FILE.')
 9021 FORMAT(/,' ===> ERROR  LOCATION: ',A10,' WAS NOT FOUND ON THE ',
     +                                      'INTERFACE FILE.')
 9040 FORMAT(/,' ===> HYDROGRAPH FOR LOCATION ',I10,' WITH ',I5,
     + ' POINTS',/,'      WAS NOT PLOTTED BECAUSE THE FLOW WAS ZERO.')
 9041 FORMAT(/,' ===> HYDROGRAPH FOR LOCATION ',A10,' WITH ',I5,
     + ' POINTS', /,'      WAS NOT PLOTTED BECAUSE THE FLOW WAS ZERO.')
C#### WCH, 8/5/93
 9500 FORMAT(/,' ===> ERROR. FOR NTAPE > 0, NTAPE MUST EQUAL JIN.',/,
     + '     NTAPE =',I5,'  JIN =',I5,'  COUNTER (INCNT) =',I5)
C=======================================================================
      RETURN
  888 CALL IERROR
      END

Friday, June 2, 2017

Extran Hydraulics Master from #Extran3 and #SWMM4 converted to #SWMM5

This is part of the #Inside_#SWMM5 series of blogs and is intended as a visual aid and code developer for the Storm Water Management Model Reference Manuals on https://www.epa.gov/water-research/storm-water-management-model-swmm  I always think images (and some words) are best at explaining the internal working of code.  I do encourage you to read the wonderfully written Storm Water Management Model Reference Manuals.

The following is a combined #Extran3 and #SWMM4 reference manual models in #SWMM5 format.  Examples 1 through 6 were combined together in one #SWMM5 model.

[TITLE]
;;Project Title/Notes
extran_master_swmm34_example_SW5.INP
Extran Hydraulics Master from Extran 3 and SWMM4 converted to SWMMN5

[OPTIONS]
;;Option Value
FLOW_UNITS CFS
INFILTRATION GREEN_AMPT
FLOW_ROUTING DYNWAVE
LINK_OFFSETS ELEVATION
MIN_SLOPE 0
ALLOW_PONDING YES
SKIP_STEADY_STATE NO

START_DATE 01/01/1988
START_TIME 00:00:00
REPORT_START_DATE 01/01/1988
REPORT_START_TIME 00:00:00
END_DATE 01/01/1988
END_TIME 06:00:00
SWEEP_START 01/01
SWEEP_END 12/31
DRY_DAYS 0.0
REPORT_STEP 00:00:10
WET_STEP 00:15:00
DRY_STEP 01:00:00
ROUTING_STEP 0:00:10

INERTIAL_DAMPING NONE
NORMAL_FLOW_LIMITED BOTH
FORCE_MAIN_EQUATION H-W
VARIABLE_STEP 0.00
LENGTHENING_STEP 5
MIN_SURFAREA 12.566
MAX_TRIALS 8
HEAD_TOLERANCE 0.001
SYS_FLOW_TOL 5
LAT_FLOW_TOL 5
MINIMUM_STEP 0
THREADS 1

[EVAPORATION]
;;Data Source Parameters
;;————– —————-
CONSTANT 0.6
DRY_ONLY NO

[JUNCTIONS]
;;Name Elevation MaxDepth InitDepth SurDepth Aponded
;;————– ———- ———- ———- ———- ———-
10309 101.60 9.40 .00 0 0
10309a 101.60 9.40 .00 0 0
10309b 101.60 9.40 .00 0 0
10309c 101.60 9.40 .00 0 0
10309d 101.60 9.40 .00 0 0
10309e 101.60 9.40 .00 0 0
15009 111.50 13.50 .00 0 0
15009a 111.50 13.50 .00 0 0
15009b 111.50 13.50 .00 0 0
15009c 111.50 13.50 .00 0 0
15009d 111.50 13.50 .00 0 0
15009e 121 13.50 .00 0 0
16009 102.00 18.00 .00 0 0
16009a 102.00 18.00 .00 0 0
16009b 102.00 18.00 .00 0 0
16009c 102.00 18.00 .00 0 0
16009d 102.00 18.00 .00 0 0
16009e 102.00 18.00 .00 0 0
16109 102.80 22.20 .00 0 0
16109a 102.80 22.20 .00 0 0
16109b 102.80 22.20 .00 0 0
16109c 102.80 22.20 .00 0 0
16109d 102.80 22.20 .00 0 0
16109e 102.80 22.20 .00 0 0
80408 120 13.40 .00 0 10
80408b 124.60 13.40 .00 0 0
80408c 124.60 13.40 .00 0 0
80408d 124.60 13.40 .00 0 0
80408e 124.60 13.40 .00 0 0
80608 118.30 16.70 .00 0 0
80608a 118.30 16.70 .00 0 0
80608b 118.30 16.70 .00 0 0
80608c 118.30 16.70 .00 0 0
80608d 118.30 16.70 .00 0 0
80608e 118.30 16.70 .00 0 0
81009 128.20 8.80 .00 0 0
81009a 128.20 8.80 .00 0 0
81009b 128.20 8.80 .00 0 0
81009c 128.20 8.80 .00 0 0
81009d 128.20 8.80 .00 0 0
81009e 128.20 8.80 .00 0 0
81309 117.50 12.50 .00 0 0
81309a 117.50 12.50 .00 0 0
81309b 117.50 12.50 .00 0 0
81309c 117.50 12.50 .00 0 0
81309d 117.50 12.50 .00 0 0
81309e 117.50 12.50 .00 0 0
82308d 112.30 42.70 .00 0 0
82309 112.30 42.70 .00 0 0
82309a 112.30 42.70 .00 0 0
82309b 112.30 42.70 .00 0 0
Up 112.30 42.70 .00 0 0
82309e 112.30 21 .00 0 0
80408a 124.60 6 .00 0 0

[OUTFALLS]
;;Name Elevation Type Stage Data Gated Route To
;;————– ———- ———- —————- ——– —————-
;*
10208 89.9 FREE NO
10208b 89.9 FREE NO
10208c 89.9 FREE NO
10208d 89.9 FREE NO
10208e 89.9 FREE NO
10208a 89.9 FIXED 91.0 NO

[STORAGE]
;;Name Elev. MaxDepth InitDepth Shape Curve Name/Params N/A Fevap Psi Ksat IMD
;;————– ——– ———- ———– ———- —————————- ——– ——– ——– ——–
;* STORAGE JUNCTION AT JUNCTION 82309d for the 5th network
82309d 112.3 42.7 0.0 FUNCTIONAL 800.0 0 0 0.0 0

[CONDUITS]
;;Name From Node To Node Length Roughness InOffset OutOffset InitFlow MaxFlow
;;————– —————- —————- ———- ———- ———- ———- ———- ———-
1030e 10309e 10208e 4500.0 0.016 * * 0.0 0
1030 10309 10208 4500.0 .20 * * 0.0 0
1030a 10309a 10208a 4500.0 0.016 * * 0.0 0
1030b 10309b 10208b 4500.0 0.016 * * 0.0 0
1030c 10309c 10208c 4500.0 0.016 * * 0.0 0
1030d 10309d 10208d 4500.0 0.016 * * 0.0 0
1570 15009 16009 5000.0 0.0154 * * 0.0 0
1570a 15009a 16009a 5000.0 0.0154 * * 0.0 0
1570b 15009b 16009b 5000.0 0.0154 * * 0.0 0
1570c 15009c 16009c 100 0.0154 * * 0.0 0
1570d 15009d 16009d 5000.0 0.0154 * * 0.0 0
1570e 15009e 16009e 5000.0 0.0154 * * 0.0 0
1600 16009 16109 500.0 0.015 * * 0.0 0
1600a 16009a 16109a 500.0 0.015 * * 0.0 0
1600b 16009b 16109b 500.0 0.015 * * 0.0 0
1600c 16009c 16109c 500.0 0.015 * * 0.0 0
1600d 16009d 16109d 500.0 0.015 * * 0.0 0
1600e 16009e 16109e 500.0 0.015 * * 0.0 0
1602 82309 16109 5000.0 0.034 * * 0.0 0
1602a 82309a 16109a 5000.0 0.034 * * 0.0 0
1602b 82309b 16109b 5000.0 0.034 * * 0.0 0
1602c Up 16109c 5000.0 0.034 * * 0.0 0
1602d 82309d 16109d 5000.0 0.034 * * 0.0 0
1602e 82309e 16109e 5000.0 0.034 * * 0.0 0
1630 16009 10309 300.0 0.015 * * 0.0 0
1630a 16009a 10309a 300.0 0.015 * * 0.0 0
1630b 16009b 10309b 300.0 0.015 * * 0.0 0
1630c 16009c 10309c 300.0 0.015 * * 0.0 0
1630d 16009d 10309d 300.0 0.015 * * 0.0 0
1630e 16009e 10309e 300.0 0.015 * * 0.0 0
;CONDUIT DATA – base extran example or example 1
8040 80408 80608 1800.0 0.015 * * 0.0 0
;2nd network or extran example 2
8040a 80408a 80608a 1800.0 .03 * * 0.0 0
;3rd network or extran example 3
8040b 80408b 80608b 1800.0 0.015 * * 0.0 0
;4th network or extran example 4
8040c 80408c 80608c 1800.0 0.015 * * 0.0 0
;5th network or extran example 5
8040d 80408d 80608d 1800.0 0.015 * * 0.0 0
;6th network or extran example 7
8040e 80408e 80608e 1800.0 0.015 * * 0.0 0
8060 80608 82309 2075.0 0.015 * 114.500 0.0 0
8060a 80608a 82309a 2075.0 0.015 * 114.500 0.0 0
8060b 80608b 82309b 2075.0 0.015 * 114.500 0.0 0
8060c 80608c Up 2075.0 0.015 * 114.500 0.0 0
8060d 80608d 82309d 2075.0 0.015 * 114.500 0.0 0
8060e 80608e 82309e 2075.0 0.015 * 114.500 0.0 0
8100 81009 81309 5100.0 0.015 * * 0.0 0
8100a 81009a 81309a 5100.0 0.015 * * 0.0 0
8100b 81009b 81309b 5100.0 0.015 * * 0.0 0
8100c 81009c 81309c 5100.0 0.015 * * 0.0 0
8100d 81009d 81309d 5100.0 0.015 * * 0.0 0
8100e 81009e 81309e 5100.0 0.015 * * 0.0 0
8130 81309 15009 3500.0 0.015 * * 0.0 0
8130a 81309a 15009a 3500.0 0.015 * * 0.0 0
8130b 81309b 15009b 3500.0 0.015 * * 0.0 0
8130c 81309c 15009c 3500.0 0.015 * * 0.0 0
8130d 81309d 15009d 3500.0 0.015 * * 0.0 0
8130e 81309e 15009e 3500.0 0.015 * * 0.0 0

[PUMPS]
;;Name From Node To Node Pump Curve Status Sartup Shutoff
;;————– —————- —————- —————- —— ——– ——–
;* IPTYP NJUNC NJUNC PRATE1 – PRATE3 VRATE1 VRATE2 – for example 7
PUMP1@82309e-15009e 82309e 15009e PUMPCURVEforPUMP1@82309e-15009e OFF 0 0

[ORIFICES]
;;Name From Node To Node Type Offset Qcoeff Gated CloseTime
;;————– —————- —————- ———— ———- ———- ——– ———-
;* SIDE-OUTLET ORIFICE AT JUNCTION 82309d for the 5th network
OR1@82309d-82308d 82309d 82308d SIDE 0.0 0.85 NO 0
OR1@82309b-15009b 82309b 15009b BOTTOM 0.0 0.85 NO .50

[WEIRS]
;;Name From Node To Node Type CrestHt Qcoeff Gated EndCon EndCoeff Surcharge RoadWidth RoadSurf
;;————– —————- —————- ———— ———- ———- ——– ——– ———- ———- ———- ———-
One_Weir Up 15009c SIDEFLOW 2.0 3.3 NO 0 0.0 NO

[XSECTIONS]
;;Link Shape Geom1 Geom2 Geom3 Geom4 Barrels Culvert
;;————– ———— —————- ———- ———- ———- ———- ———-
1030e TRIANGULAR 9.0 54.0 0 0 1.0 0
1030 TRIANGULAR 9.0 54.0 0 0 1.0 0
1030a TRIANGULAR 9.0 54.0 0 0 1.0 0
1030b TRIANGULAR 9.0 54.0 0 0 1.0 0
1030c TRIANGULAR 9.0 54.0 0 0 1.0 0
1030d TRIANGULAR 9.0 54.0 0 0 1.0 0
1570 CIRCULAR 5.5 0.0 0.0 0.0 1.0 0
1570a CIRCULAR 5.5 0.0 0.0 0.0 1.0 0
1570b CIRCULAR 5.5 0.0 0.0 0.0 1.0 0
1570c CIRCULAR 5.5 0.0 0.0 0.0 1.0 0
1570d CIRCULAR 5.5 0.0 0.0 0.0 1.0 0
1570e CIRCULAR 5.5 0.0 0.0 0.0 1.0 0
1600 CIRCULAR 6.0 0.0 0.0 0.0 1.0 0
1600a CIRCULAR 6.0 0.0 0.0 0.0 1.0 0
1600b CIRCULAR 6.0 0.0 0.0 0.0 1.0 0
1600c CIRCULAR 6.0 0.0 0.0 0.0 1.0 0
1600d CIRCULAR 6.0 0.0 0.0 0.0 1.0 0
1600e CIRCULAR 6.0 0.0 0.0 0.0 1.0 0
1602 CIRCULAR 5.0 0.0 0.0 0.0 1.0 0
1602a CIRCULAR 5.0 0.0 0.0 0.0 1.0 0
1602b CIRCULAR 5.0 0.0 0.0 0.0 1.0 0
1602c CIRCULAR 5.0 0.0 0.0 0.0 1.0 0
1602d CIRCULAR 5.0 0.0 0.0 0.0 1.0 0
1602e CIRCULAR 5.0 0.0 0.0 0.0 1.0 0
1630 TRIANGULAR 9.0 54.0 0 0 1.0 0
1630a TRIANGULAR 9.0 54.0 0 0 1.0 0
1630b TRIANGULAR 9.0 54.0 0 0 1.0 0
1630c TRIANGULAR 9.0 54.0 0 0 1.0 0
1630d TRIANGULAR 9.0 54.0 0 0 1.0 0
1630e TRIANGULAR 9.0 54.0 0 0 1.0 0
8040 FORCE_MAIN 4.0 122 0 0 1 0
8040a CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8040b CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8040c CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8040d CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8040e CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8060 CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8060a CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8060b CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8060c CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8060d CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8060e CIRCULAR 4.0 0.0 0.0 0.0 1.0 0
8100 FILLED_CIRCULAR 4 2 0 0 1 0
8100a CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8100b CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8100c CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8100d CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8100e CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8130 CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8130a CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8130b CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8130c CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8130d CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
8130e CIRCULAR 4.5 0.0 0.0 0.0 1.0 0
OR1@82309d-82308d CIRCULAR 2 0 0 0
OR1@82309b-15009b CIRCULAR 1 0 0 0
One_Weir RECT_OPEN 1 1 1 1

[LOSSES]
;;Link Kentry Kexit Kavg Flap Gate Seepage
;;————– ———- ———- ———- ———- ———-
1030e 0.0 0.0 0.0 NO 0.0
1030 0.0 0.0 0.0 NO 0.0
1030a 0.0 0.0 0.0 NO 0.0
1030b 0.0 0.0 0.0 NO 0.0
1030c 0.0 0.0 0.0 NO 0.0
1030d 0.0 0.0 0.0 NO 0.0
1570 0.0 0.0 0.0 NO 0.0
1570a 0.0 0.0 0.0 NO 0.0
1570b 0.0 0.0 0.0 NO 0.0
1570c 0.0 0.0 0.0 NO 0.0
1570d 0.0 0.0 0.0 NO 0.0
1570e 0.0 0.0 0.0 NO 0.0
1600 0.0 0.0 0.0 NO 0.0
1600a 0.0 0.0 0.0 NO 0.0
1600b 0.0 0.0 0.0 NO 0.0
1600c 0.0 0.0 0.0 NO 0.0
1600d 0.0 0.0 0.0 NO 0.0
1600e 0.0 0.0 0.0 NO 0.0
1602 0.0 0.0 0.0 NO 0.0
1602a 0.0 0.0 0.0 NO 0.0
1602b 0.0 0.0 0.0 NO 0.0
1602c 0.0 0.0 0.0 NO 0.0
1602d 0.0 0.0 0.0 NO 0.0
1602e 0.0 0.0 0.0 NO 0.0
1630 0.0 0.0 0.0 NO 0.0
1630a 0.0 0.0 0.0 NO 0.0
1630b 0.0 0.0 0.0 NO 0.0
1630c 0.0 0.0 0.0 NO 0.0
1630d 0.0 0.0 0.0 NO 0.0
1630e 0.0 0.0 0.0 NO 0.0
8040 0.0 0.0 0.0 NO 0.0
8040a 0.0 0.0 0.0 NO 0.0
8040b 0.0 0.0 0.0 NO 0.0
8040c 0.0 0.0 0.0 NO 0.0
8040d 0.0 0.0 0.0 NO 0.0
8040e 0.0 0.0 0.0 NO 0.0
8060 0.0 0.0 0.0 NO 0.0
8060a 0.0 0.0 0.0 NO 0.0
8060b 0.0 0.0 0.0 NO 0.0
8060c 0.0 0.0 0.0 NO 0.0
8060d 0.0 0.0 0.0 NO 0.0
8060e 0.0 0.0 0.0 NO 0.0
8100 0.0 0.0 0.0 NO 0.0
8100a 0.0 0.0 0.0 NO 0.0
8100b 0.0 0.0 0.0 NO 0.0
8100c 0.0 0.0 0.0 NO 0.0
8100d 0.0 0.0 0.0 NO 0.0
8100e 0.0 0.0 0.0 NO 0.0
8130 0.0 0.0 0.0 NO 0.0
8130a 0.0 0.0 0.0 NO 0.0
8130b 0.0 0.0 0.0 NO 0.0
8130c 0.0 0.0 0.0 NO 0.0
8130d 0.0 0.0 0.0 NO 0.0
8130e 0.0 0.0 0.0 NO 0.0

[CONTROLS]
RULE Orifice1
IF SIMULATION CLOCKTIME >= 01:00:00
AND SIMULATION CLOCKTIME <= 2:00:00
THEN ORIFICE OR1@82309b-15009b SETTING = 1
ELSE ORIFICE OR1@82309b-15009b SETTING = 0
PRIORITY 1
; Opens up the orifice at hour 1 of the simulation

RULE Orifice2
IF SIMULATION CLOCKTIME >= 00:00:00
THEN ORIFICE OR1@82309b-15009b SETTING = TIMESERIES OpenOrifice
PRIORITY 10

RULE COUNT1
IF SIMULATION TIME > 0.0
THEN PUMP PUMP1@82309e-15009e SETTING = 1.0
PRIORITY 1

RULE COUNT2
IF PUMP PUMP1@82309e-15009e TIMEOPEN >= 2
THEN PUMP PUMP1@82309e-15009e SETTING = 0.0
PRIORITY 5

[INFLOWS]
;;Node Constituent Time Series Type Mfactor Sfactor Baseline Pattern
;;————– —————- —————- ——– ——– ——– ——– ——–
80408 FLOW INFLOW@80408 FLOW 1.0 1.0 1
80408b FLOW INFLOW@80408b FLOW 1.0 1.0 0.0
80408c FLOW INFLOW@80408c FLOW 1.0 1.0 0.0
80408d FLOW INFLOW@80408d FLOW 1.0 1.0 0.0
80408e FLOW INFLOW@80408e FLOW 1.0 0.5 0.0
81009 FLOW INFLOW@81009 FLOW 1.0 1.0 0.0
81009a FLOW INFLOW@81009a FLOW 1.0 1.0 0.0
81009b FLOW INFLOW@81009b FLOW 1.0 1.0 0.0
81009c FLOW INFLOW@81009c FLOW 1.0 1.0 0.0
81009d FLOW INFLOW@81009d FLOW 1.0 1.0 0.0
81009e FLOW INFLOW@81009e FLOW 1.0 1.0 0.0
82309 FLOW INFLOW@82309 FLOW 1.0 1.0 0.0
82309a FLOW INFLOW@82309a FLOW 1.0 1.0 0.0
82309b FLOW INFLOW@82309b FLOW 1.0 1.0 0.0
Up FLOW INFLOW@82309c FLOW 1.0 1.0 0.0
82309e FLOW INFLOW@82309e FLOW 1.0 1.0 0.0
80408a FLOW INFLOW@80408a FLOW 1.0 1.0 0.0
82309d FLOW INFLOW@82309d FLOW 1.0 1.0 0.0

[CURVES]
;;Name Type X-Value Y-Value
;;————– ———- ———- ———-
PUMPCURVEforPUMP1@82309e-15009e PUMP3 6 5
;
SB1 STORAGE 0 0
SB1 1 0
SB1 1.5 0
SB1 2 0
SB1 2.5 340
SB1 3 2483
SB1 3.5 5686
SB1 4 11585
SB1 4.5 51299
SB1 5 278327
SB1 5.5 526214
SB1 6 740422
SB1 6.5 839055
SB1 7 864692
SB1 8 866863
SB1 9 868103
SB1 10 868394
;
SB2 STORAGE 0 0
SB2 1 0
SB2 1.5 7103
SB2 2 31791
SB2 2.5 71923
SB2 3 122585
SB2 3.5 183836
SB2 4 272757
SB2 4.5 460705
SB2 5 751151
SB2 5.5 967995
SB2 6 1095621
SB2 6.5 1101547
SB2 7 1101970
SB2 8 1102600
SB2 9 1103111
SB2 10 1103519
;
SB3 STORAGE 0 0
SB3 1 0
SB3 1.5 0
SB3 2 0
SB3 2.5 0
SB3 3 332
SB3 3.5 23187
SB3 4 127395
SB3 4.5 316178
SB3 5 471158
SB3 5.5 554586
SB3 6 598930
SB3 6.5 615368
SB3 7 619054
SB3 8 623164
SB3 9 626320
SB3 10 628073
;
SB4 STORAGE 0 1565
SB4 1 2261
SB4 1.5 2607
SB4 2 3010
SB4 2.5 3441
SB4 3 3901
SB4 3.5 4388
SB4 4 6141
SB4 4.5 73936
SB4 5 305776
SB4 5.5 477898
SB4 6 581768
SB4 6.5 602558
SB4 7 605744
SB4 8 606120
SB4 9 606441
SB4 10 606768
;
SB5 STORAGE 0 0
SB5 1 0
SB5 1.5 0
SB5 2 0
SB5 2.5 39
SB5 3 7520
SB5 3.5 45065
SB5 4 83112
SB5 4.5 161541
SB5 5 235404
SB5 5.5 295242
SB5 6 322603
SB5 6.5 341396
SB5 7 347583
SB5 8 355460
SB5 9 358876
SB5 10 359746
;
SB6 STORAGE 0 0
SB6 1 28
SB6 1.5 62
SB6 2 111
SB6 2.5 174
SB6 3 671
SB6 3.5 20637
SB6 4 115442
SB6 4.5 280562
SB6 5 438832
SB6 5.5 604771
SB6 6 711883
SB6 6.5 754132
SB6 7 772875
SB6 8 777041
SB6 9 777041
SB6 10 777041
;
SB7 STORAGE 0 0
SB7 1 76
SB7 1.5 161
SB7 2 277
SB7 2.5 425
SB7 3 604
SB7 3.5 814
SB7 4 1094
SB7 4.5 13105
SB7 5 92154
SB7 5.5 244856
SB7 6 425764
SB7 6.5 534327
SB7 7 603342
SB7 8 629626
SB7 9 635380
SB7 10 639804
;
SB8 STORAGE 0 0
SB8 1 0
SB8 1.5 0
SB8 2 0
SB8 2.5 3210
SB8 3 18142
SB8 3.5 39310
SB8 4 66507
SB8 4.5 121586
SB8 5 199685
SB8 5.5 318789
SB8 6 434905
SB8 6.5 529773
SB8 7 610618
SB8 8 692084
SB8 9 742023
SB8 10 766289
;
SB9 STORAGE 0 0
SB9 1 0
SB9 1.5 0
SB9 2 0
SB9 2.5 0
SB9 3 0
SB9 3.5 0
SB9 4 0
SB9 4.5 2
SB9 5 2361
SB9 5.5 49440
SB9 6 264589
SB9 6.5 600759
SB9 7 986301
SB9 8 1176915
SB9 9 1187853
SB9 10 1189988

[TIMESERIES]
;;Name Date Time Value
;;————– ———- ———- ———-
INFLOW@82309 01/01/1988 00:00 0.00000
INFLOW@82309 00:15 40.00000
INFLOW@82309 03:00 40.00000
INFLOW@82309 03:15 0.00000
INFLOW@82309 12:00 0.00000
;
INFLOW@80408 01/01/1988 00:00 0.00000
INFLOW@80408 00:15 45.00000
INFLOW@80408 03:00 45.00000
INFLOW@80408 03:15 0
INFLOW@80408 12:00 0
INFLOW@80408 01/11/1988 0:00 0
;
INFLOW@81009 01/01/1988 00:00 0.00000
INFLOW@81009 00:15 50.00000
INFLOW@81009 03:00 50.00000
INFLOW@81009 03:15 0.00000
INFLOW@81009 12:00 0.00000
;
INFLOW@82309a 01/01/1988 00:00 0.00000
INFLOW@82309a 00:15 40.00000
INFLOW@82309a 03:00 40.00000
INFLOW@82309a 03:15 0.00000
INFLOW@82309a 12:00 0.00000
;
INFLOW@80408a 01/01/1988 00:00 0.00000
INFLOW@80408a 00:15 45.00000
INFLOW@80408a 03:00 45.00000
INFLOW@80408a 03:15 0.00000
INFLOW@80408a 12:00 0.00000
;
INFLOW@81009a 01/01/1988 00:00 0.00000
INFLOW@81009a 00:15 50.00000
INFLOW@81009a 03:00 50.00000
INFLOW@81009a 03:15 0.00000
INFLOW@81009a 12:00 0.00000
;
INFLOW@82309b 01/01/1988 00:00 0.00000
INFLOW@82309b 00:15 40.00000
INFLOW@82309b 03:00 40.00000
INFLOW@82309b 03:15 0.00000
INFLOW@82309b 12:00 0.00000
;
INFLOW@80408b 01/01/1988 00:00 0.00000
INFLOW@80408b 00:15 45.00000
INFLOW@80408b 03:00 45.00000
INFLOW@80408b 03:15 0.00000
INFLOW@80408b 12:00 0.00000
;
INFLOW@81009b 01/01/1988 00:00 0.00000
INFLOW@81009b 00:15 50.00000
INFLOW@81009b 03:00 50.00000
INFLOW@81009b 03:15 0.00000
INFLOW@81009b 12:00 0.00000
;
INFLOW@82309c 01/01/1988 00:00 0.00000
INFLOW@82309c 00:15 40.00000
INFLOW@82309c 03:00 40.00000
INFLOW@82309c 03:15 0.00000
INFLOW@82309c 12:00 0.00000
;
INFLOW@80408c 01/01/1988 00:00 0.00000
INFLOW@80408c 00:15 45.00000
INFLOW@80408c 03:00 45.00000
INFLOW@80408c 03:15 0.00000
INFLOW@80408c 12:00 0.00000
;
INFLOW@81009c 01/01/1988 00:00 0.00000
INFLOW@81009c 00:15 50.00000
INFLOW@81009c 03:00 50.00000
INFLOW@81009c 03:15 0.00000
INFLOW@81009c 12:00 0.00000
;
INFLOW@82309d 01/01/1988 00:00 0.00000
INFLOW@82309d 00:15 40.00000
INFLOW@82309d 03:00 40.00000
INFLOW@82309d 03:15 0.00000
INFLOW@82309d 12:00 0.00000
;
INFLOW@80408d 01/01/1988 00:00 0.00000
INFLOW@80408d 00:15 45.00000
INFLOW@80408d 03:00 45.00000
INFLOW@80408d 03:15 0.00000
INFLOW@80408d 12:00 0.00000
;
INFLOW@81009d 01/01/1988 00:00 0.00000
INFLOW@81009d 00:15 50.00000
INFLOW@81009d 03:00 50.00000
INFLOW@81009d 03:15 0.00000
INFLOW@81009d 12:00 0.00000
;
INFLOW@82309e 01/01/1988 00:00 0.00000
INFLOW@82309e 00:15 40.00000
INFLOW@82309e 03:00 40.00000
INFLOW@82309e 03:15 0.00000
INFLOW@82309e 12:00 0.00000
;
INFLOW@80408e 01/01/1988 00:00 0.00000
INFLOW@80408e 00:15 45.00000
INFLOW@80408e 03:00 45.00000
INFLOW@80408e 03:15 0.00000
INFLOW@80408e 12:00 0.00000
;
INFLOW@81009e 01/01/1988 00:00 0.00000
INFLOW@81009e 00:15 50.00000
INFLOW@81009e 03:00 50.00000
INFLOW@81009e 03:15 0.00000
INFLOW@81009e 12:00 0.00000
;
OpenOrifice 0:00 0
OpenOrifice 1:00 0
OpenOrifice 1:05 0.1
OpenOrifice 1:10 0.2
OpenOrifice 1:15 0.5
OpenOrifice 1:30 1
OpenOrifice 11:00 1
;
SPILL 01/01/1988 00:00 0.00000
SPILL 00:15 1000
SPILL 03:00 1000
SPILL 03:15 0.00000
SPILL 12:00 0.00000


[REPORT]
;;Reporting Options
INPUT YES
CONTROLS YES
SUBCATCHMENTS ALL
NODES ALL
LINKS ALL

[TAGS]
Node 10309 10309
Node 10309a 10309a
Node 10309b 10309b
Node 10309c 10309c
Node 10309d 10309d
Node 10309e 10309e
Node 15009 15009
Node 15009a 15009a
Node 15009b 15009b
Node 15009c 15009c
Node 15009d 15009d
Node 15009e 15009e
Node 16009 16009
Node 16009a 16009a
Node 16009b 16009b
Node 16009c 16009c
Node 16009d 16009d
Node 16009e 16009e
Node 16109 16109
Node 16109a 16109a
Node 16109b 16109b
Node 16109c 16109c
Node 16109d 16109d
Node 16109e 16109e
Node 80408 80408
Node 80408b 80408b
Node 80408c 80408c
Node 80408d 80408d
Node 80408e 80408e
Node 80608 80608
Node 80608a 80608a
Node 80608b 80608b
Node 80608c 80608c
Node 80608d 80608d
Node 80608e 80608e
Node 81009 81009
Node 81009a 81009a
Node 81009b 81009b
Node 81009c 81009c
Node 81009d 81009d
Node 81009e 81009e
Node 81309 81309
Node 81309a 81309a
Node 81309b 81309b
Node 81309c 81309c
Node 81309d 81309d
Node 81309e 81309e
Node 82308d 82308d
Node 82309 82309
Node 82309a 82309a
Node 82309b 82309b
Node Up 82309c
Node 82309e 82309e
Node 80408a 80408a
Node 10208 10208
Node 10208b 10208b
Node 10208c 10208c
Node 10208d 10208d
Node 10208e 10208e
Node 10208a 10208a
Node 82309d 82309d
Link 1030e 1030e
Link 1030 1030
Link 1030a 1030a
Link 1030b 1030b
Link 1030c 1030c
Link 1030d 1030d
Link 1570 1570
Link 1570a 1570a
Link 1570b 1570b
Link 1570c 1570c
Link 1570d 1570d
Link 1570e 1570e
Link 1600 1600
Link 1600a 1600a
Link 1600b 1600b
Link 1600c 1600c
Link 1600d 1600d
Link 1600e 1600e
Link 1602 1602
Link 1602a 1602a
Link 1602b 1602b
Link 1602c 1602c
Link 1602d 1602d
Link 1602e 1602e
Link 1630 1630
Link 1630a 1630a
Link 1630b 1630b
Link 1630c 1630c
Link 1630d 1630d
Link 1630e 1630e
Link 8040 8040
Link 8040a 8040a
Link 8040b 8040b
Link 8040c 8040c
Link 8040d 8040d
Link 8040e 8040e
Link 8060 8060
Link 8060a 8060a
Link 8060b 8060b
Link 8060c 8060c
Link 8060d 8060d
Link 8060e 8060e
Link 8100 8100
Link 8100a 8100a
Link 8100b 8100b
Link 8100c 8100c
Link 8100d 8100d
Link 8100e 8100e
Link 8130 8130
Link 8130a 8130a
Link 8130b 8130b
Link 8130c 8130c
Link 8130d 8130d
Link 8130e 8130e

[MAP]
DIMENSIONS -1663.687 1565.261 22200.527 20392.630
Units None

[COORDINATES]
;;Node X-Coord Y-Coord
;;————– —————— ——————
10309 389.470 2421.050
10309a 389.470 8421.050
10309b 389.470 14421.050
10309c 11389.470 14421.050
10309d 11389.470 8421.050
10309e 11389.470 2421.050
15009 4978.950 2421.050
15009a 4978.950 8421.050
15009b 4978.950 14421.050
15009c 15978.950 14421.050
15009d 15978.950 8421.050
15009e 15989.044 2458.354
16009 2494.740 2421.050
16009a 2494.740 8421.050
16009b 2494.740 14421.050
16009c 13494.740 14421.050
16009d 13494.740 8421.050
16009e 13494.740 2421.050
16109 2494.740 7536.840
16109a 2494.740 13536.840
16109b 2494.740 19536.840
16109c 13494.740 19536.840
16109d 13494.740 13536.840
16109e 13494.740 7536.840
80408 10115.790 7536.840
80408b 10115.790 19536.840
80408c 21115.790 19536.840
80408d 21115.790 13536.840
80408e 21115.790 7536.840
80608 7463.160 7536.840
80608a 7463.160 13536.840
80608b 7463.160 19536.840
80608c 18463.160 19536.840
80608d 18463.160 13536.840
80608e 18463.160 7536.840
81009 9989.470 2421.050
81009a 9989.470 8421.050
81009b 9989.470 14421.050
81009c 20989.470 14421.050
81009d 20989.470 8421.050
81009e 20989.470 2421.050
81309 7568.420 2421.050
81309a 7568.420 8421.050
81309b 7568.420 14421.050
81309c 18568.420 14421.050
81309d 18568.420 8421.050
81309e 18568.420 2421.050
82308d 14957.890 13536.840
82309 4957.890 7536.840
82309a 4957.890 13536.840
82309b 4957.890 19536.840
Up 15957.890 19536.840
82309e 15989.044 7551.399
80408a 10115.790 13536.840
10208 -578.950 4947.370
10208b -578.950 16947.370
10208c 10420.950 16947.370
10208d 10420.950 10947.370
10208e 10420.950 4947.370
10208a -578.950 10947.370
82309d 15957.890 13536.840

[VERTICES]
;;Link X-Coord Y-Coord
;;————– —————— ——————

[LABELS]
;;X-Coord Y-Coord Label
7150.770 5209.268 “#1” “” “Arial” 10 0 0
6948.325 11444.569 “#2” “” “Arial” 10 0 0
6664.902 17436.936 “#3” “” “Arial” 10 0 0
18568.658 17679.869 “#4” “” “Arial” 10 0 0
18568.658 11444.569 “#5” “” “Arial” 10 0 0
18690.125 5492.691 “#6” “” “Arial” 10 0 0
7150.770 5209.268 “#1” “” “Arial” 10 0 0
6948.325 11444.569 “#2” “” “Arial” 10 0 0
6664.902 17436.936 “#3” “” “Arial” 10 0 0
18568.658 17679.869 “#4” “” “Arial” 10 0 0
18568.658 11444.569 “#5” “” “Arial” 10 0 0
18690.125 5492.691 “#6” “” “Arial” 10 0 0
[PROFILES]
;;Name Links
;;————– ———-
“profileA ” 8040 8060 1602



Today is day 356 or 97.5 percent of the year 2024

English: Today is day 356 or 97.5 percent of the year 2024 Mandarin Chinese: 今天是2024年的第356天,即97.5% Hindi: आज 2024 का 356वां दिन या 97.5 प्रत...