      character*(*) function upcase_str(str)
C
C Description:
C
C This function returns the input string with all the lowercase letters
C converted to uppercase letters.
C
C User interface:
C
C Name         in/out type          Structure  Meaning
C
C upcase_str   out    character(*)  scalar     A copy of the input string with 
C                                              lowercase letters converted to
C                                              uppercase
C str          in     character(*)  scalar     The string to be converted to
C                                              uppercase
C
C Errors:
C
C No errors are trapped in this routine
C
C Routines accessed:
C
C is_downcase
C
      implicit none
      logical is_downcase
      integer i,limit
      character*(*) str
      upcase_str=' '
      limit=len(str)
      do i=1,limit
         if (is_downcase(str(i:i))) then
            upcase_str(i:i)=char(ichar(str(i:i))-32)
         else
            upcase_str(i:i)=str(i:i)
         end if
      end do
      return
      end
