      SUBROUTINE DMS2RAD(IDEG,MIN,SEC,RAD)
C
C     CONVERT DEGREES, MINUTES, SECONDS TO RADIANS
C
C     B. KNAPP, 2000-12-28, 2001-04-24 (i*4)
C
C
C     RCS DATA
C     
C     $Header$
C     
C     $Log$
C
C
      IMPLICIT NONE
      INTEGER*4 IDEG,MIN
      REAL*8 RAD,SEC,PI
      PARAMETER (PI=3.14159265358979324D0)
C
      RAD=(DBLE(ABS(IDEG))+DBLE(ABS(MIN))/60.0D0+ABS(SEC)/3600.0D0)*
     &   PI/180.D0
C
C     HANDLE SIGN
      IF (IDEG.NE.0) THEN
         RAD = SIGN(RAD,DBLE(IDEG))
      ELSE IF (MIN.NE.0) THEN
         RAD = SIGN(RAD,DBLE(MIN))
      ELSE
         RAD = SIGN(RAD,SEC)
      ENDIF
C
      RETURN
      END
