      SUBROUTINE Upcase(String)

! This subroutine converts a string into its Upcase
! version

        IMPLICIT NONE

        integer, parameter :: KINT = kind(1)

        CHARACTER(*), INTENT(INOUT) :: String
        INTEGER(KINT) :: i,ic, length
        length=len_trim(string)
        DO I=1, length
          ic=ICHAR(String(i:i))
          if ((ic.ge.97).and.(ic.le.122)) ic=ic-32
          String(i:i)=ACHAR(ic)
        END DO

        RETURN
      END SUBROUTINE Upcase

