0e25d6f
The builtin output formats for wgrib are
0e25d6f
0e25d6f
      binary: single precision CPU native format
0e25d6f
      ieee:   single precision big-endian IEEE (32 bits)
0e25d6f
      grib:
0e25d6f
      text:
0e25d6f
0e25d6f
Someone had the need to produce double precision output.  One
0e25d6f
may question their wisdom because probably all GRIB data have 
0e25d6f
less precision than the single precision floating point
0e25d6f
format.  Nevertheless it was easy to modify wgrib to output 
0e25d6f
double precision floating point numbers as the standard binary
0e25d6f
format. (Writing dp ieee is much more difficult.)
0e25d6f
0e25d6f
0e25d6f
0e25d6f
Kludge number 102:
0e25d6f
0e25d6f
Edit the file wgrib.c by changing all occurances of float
0e25d6f
to double.  Change the line
0e25d6f
0e25d6f
    #include <double.h>
0e25d6f
0e25d6f
back to 
0e25d6f
0e25d6f
    #include <float.h>
0e25d6f
0e25d6f
Remember that you must change ALL occurances of "float" and 
0e25d6f
that word may occur more than once on a line.
0e25d6f
0e25d6f
Compile normally and if all goes well, the "-bin" option
0e25d6f
will now produce double precision floating output.  Don't
0e25d6f
forget the default format is "-bin".
0e25d6f
0e25d6f
Note:  The kludge looks good but hasn't been examined with
0e25d6f
a fine-tooth comb.  I should probably change "float" to
0e25d6f
FLOAT and use a typedef.  However, this change is really
0e25d6f
low priority.
0e25d6f
0e25d6f
0e25d6f
END OF KLUDGE NUMBER 102
0e25d6f