C$$$ MAIN PROGRAM DOCUMENTATION BLOCK C C MAIN PROGRAM: gributil.x/wgrib INVENTORY, DECODE GRIB FILES C PRGMMR: EBISUZAKI ORG: NP51 DATE: 97-08-19 C C ABSTRACT: The command wgrib both inventories and decodes GRIB-1 C files. There are three types of inventories (regular, short, C and verbose) which can be viewed as a human-readable index file. C The inventories can be manipulated to select the records to C decode. The output formats of wgrib include: text, binary C (system dependent), big endian IEEE and GRIB. In addition C the program can produce a non-inventory description of the GRIB C records. Information includes range of values, grid type, etc. C C The program can be compiled to either use the NCEP operational C GRIB tables or the NCEP/NCAR Reanalysis GRIB table as the default C table in cases of ambiguity. C C The program does not handle spectral files nor files with complex C packing. C C The program is written in standard C and has been compiled on C the CRAY, Alpha, SGI, SUN, HP, Amiga, MS-DOS (gcc) with using C the standard source code. C C PROGRAM HISTORY LOG: C 1997-08-19 EBISUZAKI OPERATIONAL VERSION 1.6.0 C 1998-08-24 EBISUZAKI OPERATIONAL VERSION 1.7.0b, added '-d all', C fixed -H, reanalysis ID code upgrade, C meta data for: rotated lat-lon grid, C Arakawa E-grid, O3TOT (fixed spelling), C fixed bitmap bug when nbits > 24 C 1999-05-13 EBISUZAKI OPERATIONAL VERSION 1.7.3 C Update NCEP opn grib table C Support for NCEP ensembles C Fixed err msg with thinned grids and bitmaps C fixed -H option C change "x12 hours" format to "hr" format C Updated (128,160) and added new (129,130,131,140, C 150,170,180) ECMWF tables C 2001-05-31 EBISUZAKI OPERATIONAL VERSION 1.7.3.6 C Added fractional mb (NCEP files only) C Fixed code for precision greater than 31 bits C Check for missing grib file (error message) C Polar stereo, Lambert: print direction increments (-V) C Undefined direction increments set to zero (-V) C Added new levels C C 2003-06-27 EBISUZAKI Operational version 1.8.0.3j C Brings the operational version up to date. C Adds new tables: ncep 129, 130, 131 C new EC, CPTEC and DWD tables C Fix levels 117, 205, 141 C Decode of simple packed spectral data C decode Scan mode C AIX make file supports 2GB+ data files C C 2004-06-08 EBISUZAKI Operational version 1.8.0.9a C Updates grib tables 129, 130, 131 C adds new time codes 128-135 C fixed scan mode, N/S vs grid wind diagnostic C support for ncep-style ensembles encoding C support for minutes C C 2006-09-15 EBISUZAKI Operational version v1.8.0.12g C Adds more ncep ensemble information, revised level 113 C Updates NCEP grib tables 128, 129, 131 C Adds ECMWF grib table 172, DWD 204, 205 C Adds vertical level 20, and levels for NCEP ocean model C Adds time ranges 6 and 8 C Adds error message for complex packing, truncated grib messages C Bug fix for simple packed spectral files C Updated thinned Gaussian grid information C C 2007-05-01 EBISUZAKI Update to version v1.8.0.12o C Updates to NCEP tables 128 and 129 C Better support for user-defined grib tables C C COMMAND LINE OPTIONS: C Options for stdout (terminal output), mutually exclusive C -s short inventory C -v verbose inventory C -V very verbose file/record description, not an inventory C (none) regular inventory (default) C C Options for stdout (terminal output), mutually exclusive C -ncep_opn use NCEP operational grib table as default C -ncep_rean use NCEP reanalysis grib table as default C -ncep_ens use NCEP-style ensemble information C (none) default grib table determined at compile time C C Options for stdout C -verf print the verification instead of the initial time C -4yr print the four digit year code C -min print the minutes C -PDS print the PDS in hexadecimal C -PDS10 print the PDS in decimal C -GDS print the GDS in hexadecimal C -GDS10 print the GDS in decimal C C Options for decoding, mutually exclusive C -d [record number|all] decode/dump one record C -p [byte position] decode/dump one record C -i decode/dump controlled by stdin (inventory) C (none) do not decode/dump C C Options for decoding, mutually exclusive C -text write as a text file C -bin write as a binary file (default) C -ieee write as a big endian IEEE file C -grib write as a grib file C C Options for decoding, mutually exclusive C -nh no header C -h header (default) C C Options for decoding C -o [file] write to [file], default is "dump" C -append append when writing C -H output will include PDS and GDS (-bin/-ieee only) C C More information can be obtained from C http://www.cpc.ncep.noaa.gov/products/wesley/wgrib.html C C INPUT FILES: C stdin C command line specified GRIB file C environment variable GRIBTAB can point to an optional user-defined grib table C C OUTPUT FILES: C stdout C stderr C "dump" (unless over-ridden by the "-o [file]" option) C C SUBPROGRAMS CALLED: C add_time C BDS_unpack C EC_ext C ensemble C flt2ieee C GDS_grid C GDS_prt_thin_lon C ibm2flt C int_power C k5_comments C leap C levels C missing_points C PDStimes C PDS_date C print_gds C print_pds C read_grib C seek_grib C setup_user_table C verf_time C wrtieee C wrtieee_header C C ATTRIBUTES: C LANGUAGE: ANSI/ISO C, requires 32+ bit integer C requires 64+ integers and pointers for 2GB+ data support C C$$$