      Subroutine HSTR_HCS (Hstr, Hcs)

C     Routine de transformation de l'heure (chaine de caracteres) en 
C     heure en centieme de secondes
C
C ENTREE:
C     HSTR     Heure sous forme de chaine ex: '10325486' pour
C                     10h 32mn 54s 86 centieme
C RETOUR
C     HCS    Integer*4 heure en centieme de secomde

      CHARACTER *(*) Hstr
      INTEGER*4 HCS              !Heure en centieme
      INTEGER*4 IH,IM,IS,ICS

      read(Hstr(1:2),'(i2)',iostat=ier) ih
             if(ier.ne.0) stop 'Error reading start time 1'

      read(Hstr(3:4),'(i2)',iostat=ier) im
             if(ier.ne.0) stop 'Error reading start time 3'

      read(Hstr(5:6),'(i2)',iostat=ier) is
            if(ier.ne.0) stop 'Error reading start time 5'

      read(Hstr(7:8),'(i2)',iostat=ier) ics
            if(ier.ne.0) stop 'Error reading start time 7'

      HCS=ih*360000+im*6000+is*100+ics

      RETURN
      END

c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      Subroutine HCS_HSTR (Hcs, Hstr)

      CHARACTER *(*) Hstr
      INTEGER*4 HCS              !Heure en centieme
      INTEGER*4 IH,IM,IS,ICS
      INTEGER*4 Hint
      CHARACTER*2 Ch,Cm,Cs,Cc

      ICS = MOD (Hcs, 100)
            Hint = Hcs /100
      IS = MOD (Hint, 60)
            Hint = Hint /60
      IM = MOD (Hint, 60)
      IH =  Hint / 60

      ENCODE(2,99,ch)Ih
      ENCODE(2,99,cm)Im
      ENCODE(2,99,cs)Is
      ENCODE(2,99,cc)Ic

      Hstr= Ch//Cm//Cs//Cc

 99   FORMAT(I2.2)

      RETURN

      END
