        subroutine GEOCK
      include 'SIZE.INC'
      include 'GLOBAL.INC'
      include 'LOCAL.INC'
      include 'UNITS.INC'
      include 'LOCAL1.INC'
      include 'LOCAL2.INC'
        integer J
      KOUNTW = 0.
      KOUNTS = 0.
      do 110 J = 1, KOUNT
         if (TYPEG(J).eq.'B'.or.TYPEG(J).eq.'L'.or.TYPEG(J).eq.'E'.or.
     &      TYPEG(J).eq.'H') go to 100
         write (TTYOUT(MACHNO),5000) TYPEG(J)
         IFLAG = 8
         go to 150
100      continue
         if (TYPEG(J).eq.'B') then
            KOUNTS = KOUNTS+1.0
         else
            KOUNTW = KOUNTW+1.0
         endif
110   continue
      if (KOUNTS.eq.0.0) KOUNTS = 1.0
      if (KOUNTW.eq.0.0) KOUNTW = 1.0
5000  format (1X,'Segment TYPE "',A1,'" unknown.  Please use',' the'/1X,
     &'following nomenclature for segment TYPEs:'/12X,'"L" for Littoral,
     &'/12X,'"E" for Epilimnion,'/12X,'"H" for Hypolimnion, and'/12X,'"B
     &" for Benthic sediment.'/1X,'(Simulation was aborted.)')
      do 140 J = 1, KOUNT
         if (VOLG(J).gt.0..and.AREAG(J).gt.0..and.DEPTHG(J).gt.0) go to
     &      140
         if (AREAG(J).gt.0.) go to 120
         AREAG(J) = LENGG(J)*WIDTHG(J)
         if (AREAG(J).gt.0.) go to 120
         if (VOLG(J).eq.0.) VOLG(J) = LENGG(J)*XSAG(J)
         if (DEPTHG(J).gt.0.) AREAG(J) = VOLG(J)/DEPTHG(J)
         if (AREAG(J).gt.0.) go to 120
         IFLAG = 8
         write (TTYOUT(MACHNO),5010) J
5010  format (' Area of segment ',I4,' cannot be determined.'/1X,'Simula
     &tion aborted.')
         go to 150
120      continue
         if (DEPTHG(J).gt.0.) go to 130
         if (AREAG(J).gt.0.) DEPTHG(J) = VOLG(J)/AREAG(J)
         if (DEPTHG(J).gt.0.) go to 140
         if (WIDTHG(J).gt.0.) DEPTHG(J) = XSAG(J)/WIDTHG(J)
         if (DEPTHG(J).gt.0..or.TYPEG(J).eq.'B') go to 130
         write (TTYOUT(MACHNO),5020) J
         IFLAG = 8
         go to 150
5020  format (' Depth of segment ',I4,' cannot be determined.'/' Simulat
     &ion aborted.')
130      continue
         if (VOLG(J).gt.0) go to 140
         VOLG(J) = AREAG(J)*DEPTHG(J)
         if (VOLG(J).gt.0) go to 140
         VOLG(J) = XSAG(J)*LENGG(J)
         if (VOLG(J).gt.0) go to 140
         IFLAG = 8
         write (TTYOUT(MACHNO),5030) J
         go to 150
5030  format (' Volume of segment ',I4,' cannot be determined.'/' Simula
     &tion aborted.')
140   continue
150   continue
      return
      end
