      SUBROUTINE FIR91 (CARD,B,FATAL)

*** FIRST ENCOUNTER OF CONTROL POINT RECORD

      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      IMPLICIT INTEGER (I-N)
      PARAMETER (MXSSN = 9999)
      CHARACTER*80 CARD
      CHARACTER*30 NAME,NAMES
      CHARACTER*7 ASLA,ASLO
      CHARACTER*6 AGMSL
      CHARACTER*1 ADLA,ADLO
      LOGICAL FATAL,PUTSSN
      LOGICAL LMSL,LSS,LUP
      LOGICAL INSIDE
      DIMENSION B(*)
      COMMON /SSNTBL/ NSSN,ISSISN(MXSSN)
      COMMON /NAMTAB/ NAMES(MXSSN)
      COMMON /OPT/ AX,E2,DMSL,DGH,VM,VP,CTOL,ITMAX,ITMIN,IMODE,
     &             LMSL,LSS,LUP
      COMMON /STRUCT/ NSTA,NAUX,NUNK,IDIM,NSTAS,NOBS,NCON,NZ,NCD

      READ (CARD,1) ISSN,NAME,IDLA,IMLA,ASLA,ADLA,
     &                        IDLO,IMLO,ASLO,ADLO,AGMSL
    1 FORMAT (10X,I4,A30,2I2,A7,A1,
     &                 I3,I2,A7,A1,A6, )
      CALL NBLANK (AGMSL,2,IBLK)
      READ (AGMSL,6) GMSL
  6   FORMAT (F6.2)
      IF (CARD(70:75).EQ.'      ') GMSL = DMSL

      CALL NBLANK (ASLA,5,IBLK)
      CALL NBLANK (ASLO,5,IBLK)
      READ (ASLA,5) ISLA
      READ (ASLO,5) ISLO
    5 FORMAT (I7)

      IF ( .NOT.PUTSSN(ISSN,IDUP) ) THEN
        IF (IDUP.EQ.0) THEN
          CALL LINE (3)
          WRITE (6,2) ISSN
    2     FORMAT ('0',I5,' IS ILLEGAL SSN -- FATAL ERROR',/)
          FATAL = .TRUE.
        ELSE
          CALL LINE (3)
          WRITE (6,3) ISSN,IDUP
    3     FORMAT ('0',I5,' DUPLICATES THE ',I5,
     &            '-TH ENTRY -- FATAL ERROR',/)
          FATAL = .TRUE.
        ENDIF

      ELSE

*** LATITUDES ARE POSITIVE NORTH IN RADIANS
*** LONGITUDES ARE POSITIVE EAST IN RADIANS

        IF (ADLA.EQ.'S') THEN
          GLASGN = -1.D0
        ELSE
          GLASGN = 1.D0
        ENDIF
        IF (ADLO.EQ.'W') THEN
          GLOSGN = -1.D0
        ELSE
          GLOSGN = 1.D0
        ENDIF
        CALL GETRAD (IDLA,IMLA,ISLA,GLASGN,GLA)
        CALL GETRAD (IDLO,IMLO,ISLO,GLOSGN,GLO)

*** CHECK IF THE POSITIONAL COORDINATES ARE INSIDE THE GRID

        CALL GRDCHK (GLO,GLA,INSIDE)
        IF(.NOT. INSIDE) THEN
            WRITE(6,20) CARD
   20       FORMAT("0FATAL ERROR - POSITIONAL COORDINATES ON ",
     1             "*91* RECORD ARE OUTSIDE OF GRID"/1X,A80)
            FATAL = .TRUE.
        ENDIF

*** LOAD CONTROL POINT VALUES AND DEFAULTS

        CALL PUTALA (GLA,NSSN,B)
        CALL PUTALO (GLO,NSSN,B)
        CALL PUTGLA (GLA,NSSN,B)
        CALL PUTGLO (GLO,NSSN,B)
        CALL PUTMSL (GMSL,NSSN,B)
        CALL PUTGH (DGH,NSSN,B)
        NAMES(NSSN) = NAME
      ENDIF

      RETURN
      END
