      SUBROUTINE DATCHK(LINE,NERR,LE,WC,NREC,LSTDEP)
C
C -- ROUTINE TO CHECK IEH FORMAT DETAIL RECORDS FOR ERRORS.
C
      CHARACTER LINE*128
      INTEGER NERR,LE,NREC,LSTDEP
      LOGICAL WC(3)
C
      INTEGER IDUM,JDUM,ICD,NERSAV
      REAL FDUM
      CHARACTER PREC*1,A*1
      LOGICAL QOK,EMBED
C
      EXTERNAL EMBED
C
      CHARACTER RERR*13,BED*31,OOR*14
      PARAMETER (RERR=' READ ERR IN ',OOR=' OUT OF RANGE.')
      PARAMETER (BED=' EMBEDDED OR TRAILING BLANK IN ')
C
      QOK(A) = A .EQ. ' ' .OR. A .EQ. '6' .OR. A .EQ. '8'
C
C
      NERSAV = NERR
C
C -- DEPTH.
C
      IF(LINE(1:5) .EQ. '     ') THEN
          WRITE(LE,*)' MISSING DEPTH.'
          NERR = NERR + 1
      ELSE
          READ(LINE(1:5),'(I5)',IOSTAT=ICD) IDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*) RERR,'DEPTH.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(1:5),5)) THEN
              WRITE(LE,*)BED,'DEPTH.'
              NERR = NERR + 1
          ELSE IF(IDUM .LT. 0 .OR. IDUM .GT. 17000) THEN
              WRITE(LE,*)' DEPTH',OOR
              NERR = NERR + 1
          ELSE IF(IDUM .LE. LSTDEP) THEN
              WRITE(LE,*)' DEPTH SEQUENCING PROBLEM.'
              NERR = NERR + 1
          ELSE
              LSTDEP = IDUM
          ENDIF
      ENDIF
C
C --TEMPERATURE.
C
      IF(LINE(13:13) .EQ. '9') THEN
          IF(LINE(7:11) .NE. '     ') THEN
              WRITE(LE,2010) 'TEMP:'
 2010 FORMAT(1X,A10,' QUAL INDICATES MISSING, BUT VALUE IS NOT',
     *       ' BLANK.')
              NERR = NERR + 1
          ELSE IF( LINE(12:12) .NE. ' ') THEN
              WRITE(LE,*)' TEMP: QUAL INDICATES MISSING, BUT',
     *                   ' PRECISION IS NOT BLANK.'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(7:11) .EQ. '     ') THEN
          WRITE(LE,2030) 'TEMP:'
 2030 FORMAT(1X,A10,' VALUE IS MISSING, BUT QUAL CODE .NE. 9.')
          NERR = NERR + 1
      ELSE IF(QOK(LINE(13:13))) THEN
          PREC = LINE(12:12)
          READ(LINE(7:11),'(F5.3)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'TEMP.'
              NERR = NERR + 1
          ELSE IF(PREC .EQ. '3') THEN
              IF(EMBED(LINE(7:11),5)) THEN
                  WRITE(LE,*)BED,'TEMP.'
                  NERR = NERR + 1
              ENDIF
          ELSE IF(PREC .EQ. '2') THEN
              IF(EMBED(LINE(7:10),4)) THEN
                  WRITE(LE,*)BED,'TEMP.'
                  NERR = NERR + 1
              ELSE IF(LINE(11:11) .NE. ' ') THEN
                  WRITE(LE,*)' TEMP: PREC. NEEDS 1 TRAILING BLANK.'
                  NERR = NERR + 1
              ENDIF
          ELSE IF(PREC .EQ. '1') THEN
              IF(EMBED(LINE(7:9),3)) THEN
                  WRITE(LE,*)BED,'TEMP.'
                  NERR = NERR + 1
              ELSE IF(LINE(10:11) .NE. '  ') THEN
                  WRITE(LE,*)' TEMP: PREC. NEEDS 2 TRAILING BLANKS,'
                  NERR = NERR + 1
              ENDIF
          ELSE
              WRITE(LE,2050) 'TEMP:'
 2050 FORMAT(1X,A10,' INVALID PRECISION.')
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'TEMP:'
 2060 FORMAT(1X,A10,' INVALID QUAL. CODE.  VALUE NOT CHECKED.')
          NERR = NERR + 1
      ENDIF
C
C -- SALINITY.
C
      IF(LINE(20:20) .EQ. '9') THEN
          IF(LINE(14:18) .NE. '     ') THEN
              WRITE(LE,2010) 'SAL:'
              NERR = NERR + 1
          ELSE IF(LINE(19:19) .NE. ' ') THEN
              WRITE(LE,*)' SAL: QUAL INDICATES MISSING, BUT',
     *                   ' PRECISION IS NOT BLANK.'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(14:18) .EQ. '     ') THEN
          WRITE(LE,2030) 'SAL:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(20:20))) THEN
          PREC = LINE(19:19)
          READ(LINE(14:18),'(F5.3)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'SAL.'
              NERR = NERR + 1
          ELSE IF(PREC .EQ. '3') THEN
              IF(EMBED(LINE(14:18),5)) THEN
                  WRITE(LE,*)BED,'SAL.'
                  NERR = NERR + 1
              ENDIF
          ELSE IF(PREC .EQ. '2') THEN
              IF(EMBED(LINE(14:17),4)) THEN
                  WRITE(LE,*)BED,'SAL.'
                  NERR = NERR + 1
              ELSE IF(LINE(18:18) .NE. ' ') THEN
                  WRITE(LE,*)' SAL: PREC. NEEDS 1 TRAILING BLANK.'
                  NERR = NERR + 1
              ENDIF
          ELSE IF(PREC .EQ. '1') THEN
              IF(EMBED(LINE(14:16),3)) THEN
                  WRITE(LE,*)BED,'SAL.'
                  NERR = NERR + 1
              ELSE IF(LINE(17:18) .NE. '  ') THEN
                  WRITE(LE,*)' SAL: PREC. NEEDS 2 TRAILING BLANKS.'
                  NERR = NERR + 1
              ENDIF
          ELSE
              WRITE(LE,2050) 'SAL:'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'SAL:'
          NERR = NERR + 1
      ENDIF
C
C -- PRESSURE.
C
      IF(LINE(27:27) .EQ. '9') THEN
          IF(LINE(21:26) .NE. '      ') THEN
              WRITE(LE,2010)' PRESS:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(21:26) .EQ. '      ') THEN
          WRITE(LE,2030) 'PRESS:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(27:27))) THEN
          READ(LINE(21:26),'(F6.1)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'PRESS.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(21:26),6)) THEN
              WRITE(LE,*)BED,'PRESS.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060)'PRESS:'
          NERR = NERR + 1
      ENDIF
C
C -- OXYGEN
C
      IF(LINE(32:32) .EQ. '9') THEN
          IF(LINE(28:31) .NE. '    ') THEN
              WRITE(LE,2010) 'OXY:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(28:31) .EQ. '    ') THEN
          WRITE(LE,2030) 'OXY:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(32:32))) THEN
          READ(LINE(28:31),'(F4.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'OXY.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(28:31),4)) THEN
              WRITE(LE,*)BED,'OXY.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'OXY:'
          NERR = NERR + 1
      ENDIF
C
C -- PHOSPHATE (PO4).
C
      IF(LINE(37:37) .EQ. '9') THEN
          IF(LINE(33:36) .NE. '    ') THEN
              WRITE(LE,2010) 'PO4:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(33:36) .EQ. '    ') THEN
          WRITE(LE,2030) 'PO4:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(37:37))) THEN
          READ(LINE(33:36),'(F4.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'PO4.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(33:36),4)) THEN
              WRITE(LE,*)BED,'PO4.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'PO4:'
          NERR = NERR + 1
      ENDIF
C
C -- SILICATE (SIO3).
C
      IF(LINE(42:42) .EQ. '9') THEN
          IF(LINE(38:41) .NE. '    ') THEN
              WRITE(LE,2010) 'SIO3:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(38:41) .EQ. '    ') THEN
          WRITE(LE,2030) 'SIO3:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(42:42))) THEN
          READ(LINE(38:41),'(F4.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'SIO3.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(38:41),4)) THEN
              WRITE(LE,*)BED,'SIO3.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'SIO3:'
          NERR = NERR + 1
      ENDIF
C
C -- NITRITE (NO2)
C
      IF(LINE(47:47) .EQ. '9') THEN
          IF(LINE(43:46) .NE. '    ') THEN
              WRITE(LE,2010) 'NO2:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(43:46) .EQ. '    ') THEN
          WRITE(LE,2030) 'NO2:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(47:47))) THEN
          READ(LINE(43:46),'(F4.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'NO2.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(43:46),4)) THEN
              WRITE(LE,*)BED,'NO2.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'NO2:'
          NERR = NERR + 1
      ENDIF
C
C -- NITRATE (NO3)
C
      IF(LINE(51:51) .EQ. '9') THEN
          IF(LINE(48:50) .NE. '   ') THEN
              WRITE(LE,2010) 'NO3:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(48:50) .EQ. '   ') THEN
          WRITE(LE,2030) 'NO3:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(51:51))) THEN
          READ(LINE(48:50),'(F3.1)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'NO3.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(48:50),3)) THEN
              WRITE(LE,*)BED,'NO3.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'NO3:'
          NERR = NERR + 1
      ENDIF
C
C -- AMMONIA (NH3).
C
      IF(LINE(56:56) .EQ. '9') THEN
          IF(LINE(52:55) .NE. '    ') THEN
              WRITE(LE,2010) 'NH3:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(52:55) .EQ. '    ') THEN
          WRITE(LE,2030) 'NH3:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(56:56))) THEN
          READ(LINE(52:55),'(F4.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'NH3.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(52:55),4)) THEN
              WRITE(LE,*)BED,'NH3.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'NH3:'
          NERR = NERR + 1
      ENDIF
C
C -- CHLOROPHYLL-A.
C
      IF(LINE(61:61) .EQ. '9') THEN
          IF(LINE(57:60) .NE. '    ') THEN
              WRITE(LE,2010) 'CHLOR-A:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(57:60) .EQ. '    ') THEN
          WRITE(LE,2030) 'CHLOR-A:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(61:61))) THEN
          READ(LINE(57:60),'(F4.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'CHLOR-A.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(57:60),4)) THEN
              WRITE(LE,*)BED,'CHLOR-A.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'CHLOR-A:'
          NERR = NERR + 1
      ENDIF
C
C -- CAST NUMBER
C
      IF(LINE(62:63) .NE. '  ') THEN
          READ(LINE(62:63),'(I2)',IOSTAT=ICD) IDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'CAST NUMBER.'
              NERR = NERR + 1
          ELSE IF(LINE(63:63) .EQ. ' ') THEN
              WRITE(LE,*)BED,'CAST NUMBER.'
              NERR = NERR + 1
          ENDIF
      ENDIF
C
C -- PHAEO.
C
      IF(LINE(70:70) .EQ. '9') THEN
          IF(LINE(66:69) .NE. '    ') THEN
              WRITE(LE,2010) 'PHAEO:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(66:69) .EQ. '    ') THEN
          WRITE(LE,2030) 'PHAEO:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(70:70))) THEN
          READ(LINE(66:69),'(F4.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'PHAEO.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(66:69),4)) THEN
              WRITE(LE,*)BED,'PHAEO.'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'PHAEO:'
          NERR = NERR + 1
      ENDIF
C
C -- C14 ASSIM 1.
C
      IF(LINE(77:77) .EQ. '9') THEN
          IF(LINE(71:75) .NE. '     ') THEN
              WRITE(LE,2010) 'UPTAKE 1:'
              NERR = NERR + 1
          ELSE IF(LINE(76:76) .NE. ' ') THEN
              WRITE(LE,*)' UPTAKE 1: QUAL INDICATES MISSING, BUT',
     *                   ' PREC. IS NOT BLANK.'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(71:75) .EQ. '     ') THEN
          WRITE(LE,2030) 'UPTAKE 1:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(77:77))) THEN
          PREC = LINE(76:76)
          READ(LINE(71:75),'(F5.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'UPTAKE 1.'
              NERR = NERR + 1
          ELSE IF(PREC .EQ. '2') THEN
              IF(EMBED(LINE(71:75),5)) THEN
                  WRITE(LE,*)BED,'UPTAKE 1.'
                  NERR = NERR + 1
              ENDIF
          ELSE IF(PREC .EQ. '1') THEN
              IF(EMBED(LINE(71:74),4)) THEN
                  WRITE(LE,*)BED,'UPTAKE 1.'
                  NERR = NERR + 1
              ELSE IF(LINE(75:75) .NE. ' ') THEN
                  WRITE(LE,*)' UPTAKE 1: PREC NEEDS 1 TRAILING BLANK.'
                  NERR = NERR + 1
              ENDIF
          ELSE
              WRITE(LE,2050) 'UPTAKE 1:'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'UPTAKE 1:'
          NERR = NERR + 1
      ENDIF
C
C -- C14 ASSIM 2.
C
      IF(LINE(84:84) .EQ. '9') THEN
          IF(LINE(78:82) .NE. '     ') THEN
              WRITE(LE,2010) 'UPTAKE 2:'
              NERR = NERR + 1
          ELSE IF(LINE(83:83) .NE. ' ') THEN
              WRITE(LE,*)' UPTAKE 2: QUAL INDICATES MISSING, BUT',
     *                   ' PREC. IS NOT BLANK.'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(78:82) .EQ. '     ') THEN
          WRITE(LE,2030) 'UPTAKE 2:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(84:84))) THEN
          PREC = LINE(83:83)
          READ(LINE(78:82),'(F5.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'UPTAKE 2.'
              NERR = NERR + 1
          ELSE IF(PREC .EQ. '2') THEN
              IF(EMBED(LINE(78:82),5)) THEN
                  WRITE(LE,*)BED,'UPTAKE 2.'
                  NERR = NERR + 1
              ENDIF
          ELSE IF(PREC .EQ. '1') THEN
              IF(EMBED(LINE(78:81),4)) THEN
                  WRITE(LE,*)BED,'UPTAKE 2.'
                  NERR = NERR + 1
              ELSE IF(LINE(82:82) .NE. ' ') THEN
                  WRITE(LE,*)' UPTAKE 2: PREC NEEDS 1 TRAILING BLANK.'
                  NERR = NERR + 1
              ENDIF
          ELSE
              WRITE(LE,2050) 'UPTAKE 2:'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'UPTAKE 2:'
          NERR = NERR + 1
      ENDIF
C
C -- C14 DARK.
C
      IF(LINE(89:89) .EQ. '9') THEN
          IF(LINE(85:87) .NE. '    ') THEN
              WRITE(LE,2010) 'DARK UP:'
              NERR = NERR + 1
          ELSE IF(LINE(88:88) .NE. ' ') THEN
              WRITE(LE,*)' DARK UP: QUAL INDICATES MISSING, BUT',
     *                   ' PREC. IS NOT BLANK.'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(85:87) .EQ. '    ') THEN
          WRITE(LE,2030) 'DARK UP:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(89:89))) THEN
          PREC = LINE(88:88)
          READ(LINE(85:87),'(F3.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'DARK UP.'
              NERR = NERR + 1
          ELSE IF(PREC .EQ. '2') THEN
              IF(EMBED(LINE(85:87),3)) THEN
                  WRITE(LE,*)BED,'DARK UP.'
                  NERR = NERR + 1
              ENDIF
          ELSE IF(PREC .EQ. '1') THEN
              IF(LINE(86:86) .EQ. ' ') THEN
                  WRITE(LE,*)BED,'DARK UP.'
                  NERR = NERR + 1
              ELSE IF(LINE(87:87) .NE. ' ') THEN
                  WRITE(LE,*)' DARK UP: PREC NEEDS 1 TRAILING BLANK.'
                  NERR = NERR + 1
              ENDIF
          ELSE
              WRITE(LE,2050) 'DARK UP:'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'DARK UP:'
          NERR = NERR + 1
      ENDIF
C
C -- MEAN UPTAKE. C14 ASSIM.
C
      IF(LINE(96:96) .EQ. '9') THEN
          IF(LINE(90:94) .NE. '     ') THEN
              WRITE(LE,2010) 'MEAN UP:'
              NERR = NERR + 1
          ELSE IF(LINE(95:95) .NE. ' ') THEN
              WRITE(LE,*)' MEAN UP: QUAL INDICATES MISSING, BUT',
     *                   ' PREC. IS NOT BLANK.'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(90:94) .EQ. '     ') THEN
          WRITE(LE,2030) 'MEAN UP:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(96:96))) THEN
          PREC = LINE(95:95)
          READ(LINE(90:94),'(F5.2)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'MEAN UP.'
              NERR = NERR + 1
          ELSE IF(PREC .EQ. '2') THEN
              IF(EMBED(LINE(90:94),5)) THEN
                  WRITE(LE,*)BED,'MEAN UP.'
                  NERR = NERR + 1
              ENDIF
          ELSE IF(PREC .EQ. '1') THEN
              IF(EMBED(LINE(90:93),4)) THEN
                  WRITE(LE,*)BED,'MEAN UP.'
                  NERR = NERR + 1
              ELSE IF(LINE(94:94) .NE. ' ') THEN
                  WRITE(LE,*)' MEAN UP: PREC NEEDS 1 TRAILING BLANK.'
                  NERR = NERR + 1
              ENDIF
          ELSE
              WRITE(LE,2050) 'MEAN UP:'
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'MEAN UP:'
          NERR = NERR + 1
      ENDIF
C
C -- ELAPSED INCUBATION TIME.
C
      IF(LINE(97:100) .NE. '    ') THEN
          READ(LINE(97:100),'(2I2)',IOSTAT=ICD) IDUM,JDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'ELAPSED INCU TIME.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(97:100),4)) THEN
              WRITE(LE,*)BED,'ELAPSED INCU. TIME.'
              NERR = NERR + 1
          ELSE IF(IDUM .LT. 0 .OR. IDUM .GT. 24) THEN
              WRITE(LE,*)' ELAPSED INCU HOURS',OOR
              NERR = NERR + 1
          ELSE IF(JDUM .LT. 0 .OR. JDUM .GT. 59) THEN
              WRITE(LE,*)' ELAPSED INCU MINUTES',OOR
              NERR = NERR + 1
          ENDIF
      ENDIF
C
C -- LIGHT PERCENT
C
      IF(LINE(101:103) .NE. '   ') THEN
          READ(LINE(101:103),'(F3.1)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'LIGHT PERCENT.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(101:103),3)) THEN
              WRITE(LE,*)BED,'LIGHT PERCENT.'
              NERR = NERR + 1
          ELSE IF(FDUM .LT. 0.0) THEN
              WRITE(LE,*)' LIGHT PERCENT',OOR
              NERR = NERR + 1
          ENDIF
      ENDIF
C
C -- WILD COLUMN 1.
C
      IF(LINE(111:111) .EQ. '9') THEN
          IF(LINE(104:110) .NE. '       ') THEN
              WRITE(LE,2010)'WILD 1:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(104:110) .EQ. '       ') THEN
          WRITE(LE,2030) 'WILD 1:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(111:111))) THEN
          READ(LINE(104:110),'(F7.1)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'WILD 1.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(104:110),7)) THEN
              WRITE(LE,*)BED,'WILD 1.'
              NERR = NERR + 1
          ELSE IF(.NOT. WC(1)) THEN
              WRITE(LE,*)' WILD 1: CONTAINS DATA, BUT NO FORMAT IN HDR.'
C             -- SET FLAG TO TRUE SO HIT ONLY ONE ERROR PER STATION.
              WC(1) = .TRUE.
              NERR = NERR + 1
          ENDIF
      ELSE 
          WRITE(LE,2060) 'WILD 1:'
          NERR = NERR + 1
      ENDIF
C
C -- WILD COLUMN 2.
C
      IF(LINE(119:119) .EQ. '9') THEN
          IF(LINE(112:118) .NE. '       ') THEN
              WRITE(LE,2010)'WILD 2:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(112:118) .EQ. '       ') THEN
          WRITE(LE,2030) 'WILD 2:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(119:119))) THEN
          READ(LINE(112:118),'(F7.1)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'WILD 2.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(112:118),7)) THEN
              WRITE(LE,*)BED,'WILD 2.'
              NERR = NERR + 1
          ELSE IF(.NOT. WC(2)) THEN
              WRITE(LE,*)' WILD 2: CONTAINS DATA, BUT NO FORMAT IN HDR.'
C             -- SET FLAG TO TRUE SO HIT ONLY ONE ERROR PER STATION.
              WC(2) = .TRUE.
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'WILD 2:'
          NERR = NERR + 1
      ENDIF
C
C -- WILD COLUMN 3.
C
      IF(LINE(127:127) .EQ. '9') THEN
          IF(LINE(120:126) .NE. '       ') THEN
              WRITE(LE,2010)'WILD 3:'
              NERR = NERR + 1
          ENDIF
      ELSE IF(LINE(120:126) .EQ. '       ') THEN
          WRITE(LE,2030) 'WILD 3:'
          NERR = NERR + 1
      ELSE IF(QOK(LINE(127:127))) THEN
          READ(LINE(120:126),'(F7.1)',IOSTAT=ICD) FDUM
          IF(ICD .NE. 0) THEN
              WRITE(LE,*)RERR,'WILD 3.'
              NERR = NERR + 1
          ELSE IF(EMBED(LINE(120:126),7)) THEN
              WRITE(LE,*)BED,'WILD 3.'
              NERR = NERR + 1
          ELSE IF(.NOT. WC(3)) THEN
              WRITE(LE,*)' WILD 3: CONTAINS DATA, BUT NO FORMAT IN HDR.'
C             -- SET FLAG TO TRUE SO HIT ONLY ONE ERROR PER STATION.
              WC(3) = .TRUE.
              NERR = NERR + 1
          ENDIF
      ELSE
          WRITE(LE,2060) 'WILD 3:'
          NERR = NERR + 1
      ENDIF
C
C -- CHECK FOR ERRORS.
C
      IF(NERR .GT. NERSAV) THEN
          WRITE(LE,*)' ERRS ABOVE ON REC. NO.=',NREC,'  LINE --'
          WRITE(LE,'(1X,A)') LINE
      ENDIF
C
      RETURN
      END
