CLAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LFN_GETOBS       **
C**************************
C
CD-Routine: Get Spot from Refinement Observations List - LFN_GETOBS
C This routine is used to get the spot details (indices and position) from
C the current refinement observations list as created using LFN_CLROBS and
C LFN_ADDOBS. The number of observations in the list may be found using the
C routine LFN_NUMOBS.
CD-end
CD-Fortran:
      SUBROUTINE LFN_GETOBS (I, IH, IK, IL, XM, YM, IERR)
CD-end
      INCLUDE 'implicit_none.finc'
C
C Purpose: Get spot from observed refinement spots list
C
C Author:  John W. Campbell, September 1993
C
C Arguments:
C
      INTEGER I
      INTEGER IH
      INTEGER IK
      INTEGER IL
      REAL XM
      REAL YM
      INTEGER IERR
CD-Parameters:
C  I       i (R)   Position of spot in the list
C  IH      i (W)   'h' index
C  IK      i (W)   'k' index
C  IL      i (W)   'l' index
C  XM      r (W)   Observed 'x' position (rasters)
C  YM      r (W)   Observed 'y' position (rasters)
C  IERR    i (W)   Error flag =0 OK, =1 requested number not 
C                  in current list
CD-end
C====== GLOBALS:
C
       INCLUDE 'refine_limits.finc'
       INCLUDE 'refobs_list.finc'
C
C-------------------------------------------------------------------------------
C
      IERR = 0
      IF (I.LT.1.OR.I.GT.NUM_REF_OBS) THEN
         IH = 0
         IK = 0
         IL = 0
         XM = 0
         YM = 0
         IERR = 1
         RETURN
      END IF
      IH = HOBS (I)
      IK = KOBS (I)
      IL = LOBS (I)
      XM = XM_OBS (I)
      YM = YM_OBS (I)
      RETURN
      END
