      subroutine PRICL(NYR)
      include 'SIZE.INC'
      include 'GLOBAL.INC'
      include 'LOCAL.INC'
      include 'UNITS.INC'
      include 'INPAR.INC'
      include 'LOCAL1.INC'
      real OUT(6), TEST, XHOUR
      integer I,II,INUNIT,J,K,NYR,NSTART,NSTOP,III(3),IV,VRAIL,N1,
     &IMBED
      integer IPULS2,IPULS3,N01,NLAST,NPLS,EOF
      logical PRTEST
      character CCHAR(2)*1, OUTLIN*64, KOUT(2)*2, REQFMT*41
      data CCHAR/'1','0'/
      data REQFMT/'(1X,''Please enter Yes, No, or Quit-> ''  )'/
5000  format (A1,'Exposure Analysis Modeling System -- EXAMS Version ', 
     &   F4.2,', Mode',I2/' Ecosystem: ',50A1)
5010  format (' Load data--  ',50A1)
5020  format (1X,63('-'))
5030  format (' Chemical:',I2,') ',50A1)
      IPULS2 = 1
      III(1) = VRAIL(ECONAM)
      III(3) = VRAIL(LOADNM)
      if (BATCH.ne.0) then
         NDAYS(2) = 28
         if (mod(NYR,4).eq.0) NDAYS(2) = 29
      endif
      if (MODEG.eq.3) then
         NSTART = 1
         NSTOP = 12
      elseif (PRSWG.eq.0) then
         NSTART = 13
         NSTOP = 13
      else
         NSTART = MONTHG
         NSTOP = MONTHG
      endif
      if (MODEG.ne.3) go to 220
      do 210 K = 1, KCHEM
         III(2) = VRAIL(CHEMNA(1,K))
         TEST = 0.0
         do 100 J = 1, KOUNT
            do 100 NDAT = 1, 12
               TEST = STRLDG(J,K,NDAT)+PCPLDG(J,K,NDAT)+SEELDG(J,K,NDAT)
     &            +NPSLDG(J,K,NDAT)+DRFLDG(J,K,NDAT)
               if (TEST.gt.0.0) go to 130
100      continue
         do 110 I = 1, MAXMAS
            if (NDAYS(2).eq.28.and.IMONG(I).eq.2.and.IDAYG(I).eq.29) go
     &         to 110
            if (ICHEMG(I).eq.K) go to 130
            if (ICHEMG(I).eq.0.and.BATCH.eq.0) go to 120
110      continue
120      continue
         go to 210
130      continue
         write (RPTLUN(MACHNO),5000) CCHAR(BATCH+1),VERSN,MODEG,(ECONAM(
     &      IV),IV=1,III(1))
         write (RPTLUN(MACHNO),5030) K,(CHEMNA(IV,K),IV=1,III(2))
         write (RPTLUN(MACHNO),5020)
         write (KOUT(1),5040) K
5040     format (I2)
         if (KOUT(1)(1:1).eq.' ') KOUT(1)(1:1) = '0'
         write (RPTLUN(MACHNO),5050) KOUT(1),NYR
5050  format (' Table 14.',A2,'.13.','  Total annual allochthonous chemi
     &cal loads and'/' pulses (kg) during year ',I4,'.')
         write (RPTLUN(MACHNO),5020)
         if (BATCH.gt.0) write (RPTLUN(MACHNO),5010) (LOADNM(IV),IV=1,
     &      III(3))
         write (RPTLUN(MACHNO),5150)
         do 200 J = 1, KOUNT
            do 140 I = 1, 6
               OUT(I) = 0.0
140         continue
            do 150 NDAT = 1, 12
               XHOUR = float(24*NDAYS(NDAT))
               OUT(1) = OUT(1)+STRLDG(J,K,NDAT)*XHOUR
               OUT(2) = OUT(2)+PCPLDG(J,K,NDAT)*XHOUR
               OUT(3) = OUT(3)+SEELDG(J,K,NDAT)*XHOUR
               OUT(4) = OUT(4)+NPSLDG(J,K,NDAT)*XHOUR
               OUT(5) = OUT(5)+DRFLDG(J,K,NDAT)*XHOUR
150         continue
            do 160 I = 1, MAXMAS
               if (IMONG(I).eq.0.and.BATCH.eq.0) go to 170
               if (ICHEMG(I).ne.K.or.ISEGG(I).ne.J) go to 160
               if (NDAYS(2).eq.28.and.IDAYG(I).eq.29.and.IMONG(I).eq.2)
     &            go to 160
               OUT(6) = OUT(6)+IMASSG(I)
160         continue
170         continue
            TEST = 0.0
            do 180 I = 1, 6
               TEST = TEST+OUT(I)
180         continue
            if (TEST.eq.0.0) go to 200
            write (OUTLIN,5060) J,(OUT(I),I=1,6)
5060        format (1X,I3,1PG10.3,5G10.3)
            N1 = 1
            do 190 I = 5, 55, 10
               if (OUT(N1).eq.0.0) OUTLIN(I:I+9) = '          '
               N1 = N1+1
190         continue
            write (RPTLUN(MACHNO),5070) OUTLIN
5070        format (A64)
200      continue
         write (RPTLUN(MACHNO),5020)
210   continue
      if (PRSWG.eq.0) go to 460
220   continue
      N01 = 1
      NLAST = 1
      do 430 NDAT = NSTART, NSTOP
         NPLS = 0
         if (MODEG.ne.3.or.N01.gt.MAXMAS.or.BATCH.gt.0) go to 250
         do 230 K = N01, MAXMAS
            if (IMONG(K).ne.NDAT) go to 240
            NPLS = NPLS+1
230      continue
240      continue
         NLAST = N01+NPLS-1
250      continue
         if (BATCH.eq.0.or.NSTART.eq.NSTOP) go to 270
260      continue
         write (TTYOUT(MACHNO),5080) NAMONG(NDAT)
5080     format (/1X,'Do you want to see the ',A4,' chemical loads?')
         REQFMT(39:40) = CRSTOP(MACHNO)
         write (TTYOUT(MACHNO),REQFMT)
         INUNIT = TTYIN(MACHNO)
         call INREC (EOF,INUNIT,INPUT)
         if (EOF.eq.1) go to 460
         START = IMBED(INPUT,0)
         if (START.eq.-999) goto 270
         if (INPUT(START:START).eq.'Q'.or.INPUT(START:START).eq.'q') go
     &      to 460
         if (INPUT(START:START).eq.'N'.or.INPUT(START:START).eq.'n') go
     &      to 430
         if (INPUT(START:START).eq.'Y'.or.INPUT(START:START).eq.'y') go
     &      to 270
         write (TTYOUT(MACHNO),5090)
5090     format (/1X,'Response was not understood; Please try again.')
         go to 260
270      continue
         do 420 K = 1, KCHEM
            III(2) = VRAIL(CHEMNA(1,K))
            PRTEST = .false.
            write (KOUT(1),5040) K
            if (KOUT(1)(1:1).eq.' ') KOUT(1)(1:1) = '0'
            write (RPTLUN(MACHNO),5000) CCHAR(BATCH+1),VERSN,MODEG,
     &         (ECONAM(IV),IV=1,III(1))
            write (RPTLUN(MACHNO),5030) K,(CHEMNA(IV,K),IV=1,III(2))
            write (RPTLUN(MACHNO),5020)
            if (BATCH.gt.0) go to 300
            if (MODEG.gt.1) go to 280
            write (RPTLUN(MACHNO),5100) KOUT(1)
5100  format (' Table 14.',A2,'.  Segment allochthonous chemical loading
     &s (kg/hr).')
            write (RPTLUN(MACHNO),5020)
            write (RPTLUN(MACHNO),5110)
5110  format (1X,'Seg',2X,'Streams',2X,'Rainfall',4X,'Seeps',3X,'NPS Loa
     &ds',3X,'Drift'/1X,3('-'),5(1X,9('-')))
            go to 310
280         continue
            if (MODEG.eq.2) write (RPTLUN(MACHNO),5120) KOUT(1)
5120  format (' Table 14.',A2,'.  Allochthonous loads (kg/hr) and pulses
     & (kg).')
            if (MODEG.lt.3) go to 290
            write (KOUT(2),5040) NDAT
            if (KOUT(2)(1:1).eq.' ') KOUT(2)(1:1) = '0'
            write (RPTLUN(MACHNO),5130) KOUT(1),KOUT(2)
5130  format (' Table 14.',A2,'.',A2,'.',' Allochthonous chemical loads 
     &(kg/hr) and')
            write (RPTLUN(MACHNO),5140) NAMONG(NDAT),NYR
5140        format (1X,'pulses (kg) during ',A4,' of year ',I4,'.')
290         continue
            write (RPTLUN(MACHNO),5020)
            write (RPTLUN(MACHNO),5150)
5150  format (1X,'Seg',2X,'Streams',2X,'Rainfall',4X,'Seeps',3X,'NPS Loa
     &ds',3X,'Drift',4X,'Pulse IC'/1X,3('-'),6(1X,9('-')))
            go to 310
300         continue
            write (RPTLUN(MACHNO),5160) NAMONG(NDAT),NYR
5160  format (1X,A4,' of year',I5,': allochthonous chemical loads (kg/hr
     &).')
            write (RPTLUN(MACHNO),5020)
            write (RPTLUN(MACHNO),5010) (LOADNM(IV),IV=1,III(3))
            write (RPTLUN(MACHNO),5110)
310         continue
            do 410 J = 1, KOUNT
               OUT(1) = STRLDG(J,K,NDAT)
               OUT(2) = PCPLDG(J,K,NDAT)
               OUT(3) = SEELDG(J,K,NDAT)
               OUT(4) = NPSLDG(J,K,NDAT)
               OUT(5) = DRFLDG(J,K,NDAT)
               OUT(6) = 0.0
               if (BATCH.gt.0) go to 390
               go to (390,320,350) MODEG
               go to 440
320            continue
               if (IPULS2.gt.MAXMAS.or.ICHEMG(IPULS2).eq.0) go to 390
               if (ICHEMG(IPULS2)-K) 450, 330, 390
330            continue
               if (ISEGG(IPULS2)-J) 450, 340, 390
340            continue
               OUT(6) = IMASSG(IPULS2)
               IPULS2 = IPULS2+1
               go to 390
350            continue
               if (NPLS.eq.0) go to 370
               do 360 IPULS3 = N01, NLAST
                  if (ICHEMG(IPULS3).ne.K.or.ISEGG(IPULS3).ne.J)
     &                go to 360
                  if (NDAT.eq.2.and.NDAYS(2).eq.28.and.IDAYG(IPULS3)
     &               .eq.29) go to 360
                  OUT(6) = OUT(6)+IMASSG(IPULS3)
360            continue
370            continue
               TEST = 0.0
               do 380 II = 1, 6
                  TEST = TEST+OUT(II)
380            continue
               if (TEST.gt.0.0) go to 390
               if (J.lt.KOUNT.or.PRTEST) go to 410
               write (RPTLUN(MACHNO),5190) NAMONG(NDAT)
               go to 410
390            continue
               PRTEST = .true.
               write (OUTLIN,5060) J,(OUT(I),I=1,6)
               N1 = 1
               do 400 I = 5, 55, 10
                  if (OUT(N1).eq.0.0) OUTLIN(I:I+9) = '          '
                  N1 = N1+1
400            continue
               write (RPTLUN(MACHNO),5070) OUTLIN
410         continue
            write (RPTLUN(MACHNO),5020)
420      continue
         N01 = NLAST+1
430   continue
      go to 460
440   continue
      write (TTYOUT(MACHNO),5170)
5170  format (' Error in Subroutine PRICL--MODE has unknown value.')
      go to 460
450   continue
      write (TTYOUT(MACHNO),5180)
5180  format (' Error in printing Mode 2 loads (PRICL)'/' RUN aborted.')
      IFLAG = 9
5190  format (' No allochthonous loads or pulses for ',A4)
460   continue
      return
      end
