SUBROUTINE readsat (isat, cdate, rlat, rlon, swh, ws, flagged,eofd)
IMPLICIT NONE

INTEGER  , INTENT(IN) :: isat
CHARACTER, INTENT(OUT):: cdate * 12
REAL     , INTENT(OUT):: rlat, rlon, swh, ws
LOGICAL  , INTENT(OUT):: flagged, eofd
INTEGER :: iquality

eofd = .FALSE.
! --- READ DATE OF MEASUREMENT, LAT,LON, WAVE HEIGHT,WIND SPEED,QUALITY
READ(isat, *, END = 4000) cdate, rlon, rlat, swh, ws, iquality
! --- IF IQUALITY = 0 DATA CAN BE USED
flagged = .TRUE.
IF( iquality .EQ. 0 ) flagged = .FALSE.
RETURN

4000 CONTINUE
eofd = .TRUE.

RETURN
END SUBROUTINE readsat
