C
C SUBROUTINE 'STR_ADDI'
C =====================
C
C ADD AN INTEGER VALUE STRING 'NB' SPACES AFTER THE LAST NON-BLANK CHARACTER
C OF ANOTHER CHARACTER STRING, GIVEN THE INTEGER VALUE
C
      SUBROUTINE STR_ADDI (STR, IVAL, NB)
C
C PARAMETERS
C
C      STR   (I/O)    CHARACTER STRING TO WHICH THE INTEGER STRING IS
C                     TO BE APPENDED
C      IVAL  (I)      THE INTEGER VALUE
C      NB    (I)      THE NUMBER OF BLANKS REQUIRED AFTER THE LAST NON-BLANK
C                     CHARACTER OF THE STRING BEFORE ADDING THE INTEGER
C                     (MAY BE 0)
C
C SPECIFICATION STATEMENTS
C ------------------------
C
      CHARACTER*(*) STR
      CHARACTER*25 NUMSTR
C
C ADD STRING
C ----------
C
      LL = LEN(STR) 
      DO 100 L=LL,1,-1
         IF (STR(L:L).NE.' ') THEN
            LSTR = L
            GO TO 200
         END IF
100   CONTINUE
      LSTR = 0
200   WRITE (NUMSTR,'(I25)') IVAL
      L = LSTR + NB
      DO 300 I=1,25
         IF (NUMSTR(I:I).EQ.' ') GO TO 300
         L = L+1
         IF (L.GT.LL) RETURN
         STR(L:L) = NUMSTR(I:I)
300   CONTINUE
      RETURN
      END
