      SUBROUTINE Upcase(String)

! This subroutine converts a string into its Upcase
! version

        integer, parameter :: KINT = kind(1)
        integer, parameter :: KREAL = kind(1.0d0)

        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

