NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Steve and Scott, A user was questioning the accuracy of decoded precipitation values from the NAM104 (grbgrd) files. I tacked down the problem to the following: 1) The grib tables use "-0.01" as the missing value for P--M (and other precipitation grids). 2) The grib data uses a bit mask section, so the nagrib.f routine must call GB_GUBD to unpack the data and replace the missing bits with rmsval (which is not -9999.00). 3) The GB_GUBD will return "nbits", the number of bits used in the BDS section possibly modified as follows: - if 1, increase to 2 bits - if rmsval is RMISSD, nbits is increased by one, (so that the maxval will signal the missing value which reading back) Otherwise, nbits is not changed. The problem that occurs is: -0.01 is not in the range specified by the reference value, scale and precision, and the number of bits is not increased as necessary to reepresent the new data range without loss of precision in the subsequent GD_WPGD call. Is there an underlying use of -0.01 in contour plots or something else that would be a problem is 0 were used? I'm assuming that -9999 would be a bad choice since it would prevent the accumulation calculations on the intermediate P--M times, so my inclination is to change the the tables to use 0 as the missing value, rather than change the NAGRIB or GB code. Do you have any thoughts about this? Steve --------------------------------------------------------------------------- Steve Chiswell Unidata User Support