/* *********************************
 * *                               *
 * *  IRIS BUFR Table Header File  *
 * *                               *
 * *********************************
 * File: utils/bufr/sigbufr.h
 *
 *                 COPYRIGHT (c) 2002, 2003, 2006 BY
 *            VAISALA INC., WESTFORD MASSACHUSETTS, U.S.A.
 * 
 * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
 * ONLY  IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
 * INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE  OR  ANY OTHER
 * COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
 * OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
 * TRANSFERED.
 */

/* -----------------------------------------------
 * Things related to BUFR format and to the OPERA code.
 * Clarification on number of data levels:  If (for example)
 * data is recorded in 14 levels, then there are a total
 * of 14 level seems sent: 1, followed by a replication count
 * of 13, followed by 13.  These are the bottom levels for
 * the 14 levels.  All data above the 14th level goes into
 * the 14th color.  Based on email from Rosa Dias on 7 Oct 2002.
 */

#define BUFR_LBUFLEN (1000)   /* Max line length supported in rlenc.c */

/* Class type names */
#define BUFR_CLASS_IDENTIFICATION  (1)
#define BUFR_CLASS_INSTRUMENTATION (2)
#define BUFR_CLASS_TIME            (4)
#define BUFR_CLASS_LOCATION1       (5)
#define BUFR_CLASS_LOCATION2       (6)
#define BUFR_CLASS_LOCATION_VERT   (7)
#define BUFR_CLASS_SIGNIFICANCE    (8)
#define BUFR_CLASS_RADAR_DATA     (21)
#define BUFR_CLASS_PROCESSING     (25)
#define BUFR_CLASS_MAP            (29)
#define BUFR_CLASS_IMAGE          (30)
#define BUFR_CLASS_QUALIFIERS     (31)
#define BUFR_CLASS_QUALITY        (33)

/* Z/R conversion, Table 0.25.006 */
#define BUFR_ZH_TO_R          (0)
#define BUFR_ZH_AND_ZDR_TO_R  (1)
#define BUFR_Z_F1_AND_F2_TO_R (2)
#define BUFR_OTHER_TO_R       (6)

/* Projection type, Table 0.29.001 */
#define BUFR_PROJ_GNOMONIC      (0)
#define BUFR_PROJ_POLSTEREO     (1)
#define BUFR_PROJ_LAMBERTS      (2)
#define BUFR_PROJ_MERCATOR      (3)
#define BUFR_PROJ_AZIMUTHAL     (4)

/* Projection type, Local Table 0.29.201 */
/* Use above values, plus: */
#define BUFR_PROJ_LAMBERT_AREA  (5)

/* Coordinate grid type, Table 0.29.002 */
#define BUFR_GRID_CARTESIAN  (0)
#define BUFR_GRID_POLAR      (1)

/* Picture type, Table 0.30.031 */
#define BUFR_PTYPE_PPI       (0)
#define BUFR_PTYPE_COMPOSITE (1)
#define BUFR_PTYPE_CAPPI     (2)
#define BUFR_PTYPE_XSECT     (3)
#define BUFR_PTYPE_OTHER     (14)

/* Quality information, Table 0.33.002 */
#define BUFR_QUALITY2_NOT_SUSPECT      (0)
#define BUFR_QUALITY2_SUSPECT          (1)
#define BUFR_QUALITY2_UNKNOWN          (3)

/* Quality information, Table 0.33.003 */
#define BUFR_QUALITY3_NOT_SUSPECT      (0)
#define BUFR_QUALITY3_SLIGHTLY_SUSPECT (1)
#define BUFR_QUALITY3_HIGHLY_SUSPECT   (2)
#define BUFR_QUALITY3_UNFIT            (3)
#define BUFR_QUALITY3_UNKNOWN          (7)

/* -----------------------------------------------
 * Things related to the IRIS convertor code.
 */

/* Useful structures
 */
#define MAX_CONVERT_SITES (100)


/* Function prototypes 
 */

void ReadBufrTables                    /* File: BufrSubs.C */
( char * tables_dir_a, const struct sig_logging_spec *pLogging_a,
  const char *sec_1_buff_a, size_t sec_1_len_a );


void Lprintf                           /* File: BufrSubs.C */
( const struct sig_logging_spec *pLogging_a,
  const char *sString_a );
/* extra comment */
