C Copyright 1981-2007 ECMWF
C 
C Licensed under the GNU Lesser General Public License which
C incorporates the terms and conditions of version 3 of the GNU
C General Public License.
C See LICENSE and gpl-3.0.txt for details.
C

      SUBROUTINE BUERR(KERR)
C**** *BUERR*
C
C
C     PURPOSE.
C     --------
C         PRINT ERROR CODE.
C
C
C**   INTERFACE.
C     ----------
C
C         *CALL* *BUERR(KERR)*
C
C     METHOD.
C     -------
C
C          NONE.
C
C
C     EXTERNALS.
C     ----------
C
C          NONE.
C
C     REFERENCE.
C     ----------
C
C          NONE.
C
C     AUTHOR.
C     -------
C
C          M. DRAGOSAVAC    *ECMWF*       15/02/92.
C
C
C     MODIFICATIONS.
C     --------------
C
C          NONE.
C
C
      IMPLICIT LOGICAL(L,O,G), CHARACTER*8(C,H,Y)
C
#     include "bcomunit.F"
C
      CHARACTER*80 CERROR(100)
C
      DATA CERROR/100*' '/
C
C     ------------------------------------------------------------------
C
C*          1.   INITIALIZE MESSAGES.
C                --------------------
 100  CONTINUE
C
      CERROR( 1)=' START OF BUFR MESSAGE NOT FOUND.'
      CERROR( 2)=' END OF BUFR MESSAGE NOT FOUND.'
      CERROR( 3)=' ARRAY TO RECEIVE BUFR MESSAGE TOO SMALL.'
      CERROR( 4)=' JSEC1 PARAMETER TOO SMAL. LOCAL ADP CENTER'//
     1           ' INFORMATION SKIPPED.'
      CERROR( 5)=' JSEC2 PARAMETER TOO SMALL. LOCAL ADP CENTRE'//
     2           ' INFORMATION SKIPPED.'
      CERROR( 6)=' ERROR DURING READ BUFR TABLE B.'
      CERROR( 7)=' ERROR DURING READ BUFR TABLE C.'
      CERROR( 8)=' ERROR DURING READ BUFR TABLE D.'
      CERROR( 9)=' OPEN ERROR.'
      CERROR(10)=' ERROR DURING CLOSE BUFR TABLE B.'
      CERROR(11)=' ERROR DURING CLOSE BUFR TABLE C.'
      CERROR(12)=' ERROR DURING CLOSE BUFR TABLE D.'
      CERROR(13)=' NUMBER OF BITS TO BE EXTRACTED GREATER THAN'//
     1           ' NUMBER OF BITS PER COMPUTER WORD.'
      CERROR(14)=' ARGUMENT KVALS TOO SMALL.'
      CERROR(15)=' INCREMENT VALUE FOR COMPRESSED DATA TOO BIG.'
      CERROR(16)=' JSUBS PARAMETER TOO SMALL.'
      CERROR(17)=' JWORK PARAMETER TOO SMALL.'
      CERROR(18)=' REPLICATION FACTOR EQUAL TO ZERO.'
      CERROR(19)=' DELAYED REPLICATION FACTOR TOO BIG.'
      CERROR(20)=' TABLE D REFERENCE NOT FOUND.'
      CERROR(21)=' DATA DESCRIPTOR OPERATOR NOT FOUND.'
      CERROR(22)=' BUFR OPEARTOR NAME NOT FOUND.'
      CERROR(23)=' TABLE B REFERENCE NOT FOUND.'
      CERROR(24)=' AUGMENTED TABLE B REFERENCE NOT FOUND.'
      CERROR(25)=' KELEM ARGUMENT TOO SMALL.'
      CERROR(26)=' WORD POINTER OUT OF RANGE.'
      CERROR(27)=' TOO MANY SUBSETS TO BE PACKED.'
      CERROR(28)=' NUMBER TO BE PACKED TOO BIG.'
      CERROR(29)=' NUMBER OF DESCRIPTORS KTDLEN TOO BIG.'
      CERROR(30)=' NUMBER OF ELEMENTS GREATER THAN JELEM.'
      CERROR(31)=' TOO FEW ELEMENTS IN KDATA ARRAY.'
      CERROR(32)=' NUMBER OF SUBSETS EQUAL TO ZERO.'
      CERROR(33)=' NEGATIVE VALUE TO BE PACKED.'
      CERROR(34)=' NUMBER OF BITS TO BE PACKED GREATER THAN'//
     1           ' NUMBER OF BITS PER COMPUTER WORD.'
      CERROR(35)=' '
      CERROR(36)=' BAD ORDER OF DATA DESCRIPTORS.'
      CERROR(37)=' WRONG DATA DESCRIPTOR.'
      CERROR(38)=' PARTIAL EXPANSION ON TOTAL MESSAGE NOT SUPPORTED.'
      CERROR(39)=' CAN NOT RECOGNIZE FEEDBACK DATA IN THIS MESSAGE.'
      CERROR(40)=' REQUEST FLAG ILLEGAL.'
      CERROR(41)=' BIT MAP NOT SET.'
      CERROR(42)=' THIS ELEMENT MUST BE DATA PRESENT INDICATOR.'
      CERROR(43)=' TABLE B ELEMENT MUST FOLLOW BIT MAP.'
      CERROR(44)=' REQUESTED SUBSET DOES NOT EXIST.'
      CERROR(45)=' THERE IS NO ONE REQUESTED ELEMENT IN THE DATA.'
      CERROR(46)=' INPUT ARRAY IS TOO SMALL TO RECEIVE INFORMATION.'
      CERROR(47)=' KELEM ARGUMENT IS TOO BIG. MAXIMUM ALLOWED IS 160000'
      CERROR(48)=' '
      CERROR(49)=' TOO MANY DATA FOR BOXING '
      CERROR(50)=' ERROR IN KSEC1(5) FLAG. '//
     1           ' ALLOWED VALUES: ZERO OR 128'
      CERROR(51)=' WRONG USAGE OF 204Y OPERATOR'
      CERROR(56)=' WRONG SECTION 4 SIZE'
C
      IF(KERR.GE.0.AND.KERR.LE.100) THEN
        WRITE(KNTN,'(1H ,A)') CERROR(KERR)
      ELSE
        WRITE(KNTN,'(1H ,A)') ' ERROR NUMBER OUT OF RANGE !'
      END IF
C
      RETURN
      END
