Commit 8383cdf4 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

using GRIB library version 1.4.1

parent acdf4657
2009-11-25 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.4.1
check max limit of binary scale vaule (bug fix)
2009-11-22 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* change code/tabnum to param
......
/* Automatically generated by m214003 at 2009-10-17, do not edit */
/* Automatically generated by m214003 at 2009-11-25, do not edit */
/* CGRIBEXLIB_VERSION="1.4.0.1" */
/* CGRIBEXLIB_VERSION="1.4.1" */
#if defined (HAVE_CONFIG_H)
# include "config.h"
......@@ -3450,7 +3450,7 @@ int encodeBDS(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *ise
int binscale = 0;
int nbpv;
/* ibits = BitsPerInt; */
/* unsigned int max_nbpv_pow2; */
unsigned int max_nbpv_pow2;
int exponent, mantissa;
int unused_bits = 0;
double factor = 1, fmin, fmax, zref;
......@@ -3586,14 +3586,25 @@ int encodeBDS(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *ise
}
}
max_nbpv_pow2 = (unsigned int) (intpow2(nbpv) - 1);
if ( binscale != 0 )
{
if ( binscale < 0 )
{
if ( (unsigned int)(range*intpow2(-binscale)+0.5) > max_nbpv_pow2 )
binscale++;
}
else
{
if ( (unsigned int)(range/intpow2(binscale)+0.5) > max_nbpv_pow2 )
binscale--;
}
if ( binscale < 0 ) factor = intpow2(-binscale);
else factor = 1.0/intpow2( binscale);
}
/* max_nbpv_pow2 = (unsigned int) (intpow2(nbpv) - 1); */
ref2ibm(&zref, BitsPerInt);
Put3Byte(blockLength); /* 0-2 Length of Block 4 */
......@@ -6367,7 +6378,7 @@ C Fix message for longitude number out of bounds, and routine
C name in title and formats.
C
*/
static char func[] = "qu2reg2";
static char func[] = "qu2reg3";
/* System generated locals */
int i_1, i_2;
......@@ -8878,7 +8889,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return (gribLen);
}
static const char grb_libvers[] = "1.4.0.1" " of ""Oct 17 2009"" ""08:09:19";
static const char grb_libvers[] = "1.4.1" " of ""Nov 25 2009"" ""14:45:48";
const char *
cgribexLibraryVersion(void)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment