Commit 1cc2e835 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

using GRIB library version 1.3.0

parent 6c9c2aed
2009-03-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.3.0
* add support for NaN in DBL_IS_EQUAL
* add support for GRID type LCC2 (LCC PROJ.4 version)
* grbDefTime: define tunit also for absolute time [report: Pruek Pongprueksa]
......@@ -7,7 +8,7 @@
* gridInqXinc: bug fix
* grid_check_cyclic: support for curvilinear grids without bounds
* streamOpenAppen: set ncmode to 2 (bug fix)
* Version 1.3.0 released
* Version 1.3.1 released
2009-01-15 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
......
/* Generated automatically from m214003 on Wed Feb 25 14:24:51 CET 2009 */
/* Automatically generated by m214003 at 2009-03-11, do not edit */
/* GRIBLIB_VERSION="1.2.2" */
/* GRIBLIB_VERSION="1.3.0" */
#if defined (HAVE_CONFIG_H)
# include "config.h"
......@@ -3341,6 +3341,8 @@ int encodeBDS(GRIBPACK *lGrib, int *gribLen, int decscale, int *isec2, int *isec
as a guideline).
*/
range = fabs(fmax - fmin);
if ( fabs(fmin) < FLT_MIN ) fmin = 0;
/*
Have to allow tolerance in comparisons on some platforms
(eg vpp700 and linux), such as 0.9999999999999999 = 1.0,
......@@ -8378,7 +8380,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return (gribLen);
}
static const char grb_libvers[] = "1.2.2" " of ""Feb 25 2009"" ""14:24:52";
static const char grb_libvers[] = "1.3.0" " of ""Mar 11 2009"" ""12:04:04";
const char *
gribLibraryVersion(void)
{
......
......@@ -13,7 +13,7 @@ echo "output is ${PROG}"
rm -f ${PROG}
DATE=`date`
DATE=`date +%F`
if test -f config.h ; then
CDILIBVERSION=`grep PACKAGE_VERSION config.h | cut -f3 -d" "`
......@@ -21,7 +21,7 @@ fi
cat > ${PROG} << EOR
/* Generated automatically from $USER on $DATE */
/* Automatically generated by $USER at $DATE, do not edit */
/* CDILIB_VERSION=$CDILIBVERSION */
......
......@@ -3231,6 +3231,7 @@ int cdfWriteVarSliceDP(int streamID, int varID, int levelID, double *data, int n
int dtype;
int vlistID;
STREAM *streamptr;
extern int CDF_Debug;
streamptr = stream_to_pointer(streamID);
......@@ -3314,12 +3315,12 @@ int cdfWriteVarSliceDP(int streamID, int varID, int levelID, double *data, int n
laddoffset = IS_NOT_EQUAL(addoffset, 0);
lscalefactor = IS_NOT_EQUAL(scalefactor, 1);
missval = vlistInqVarMissval(vlistID, varID);
nvals = gridInqSize(gridID);
if ( laddoffset || lscalefactor )
{
missval = vlistInqVarMissval(vlistID, varID);
if ( nmiss > 0 )
{
for ( i = 0; i < nvals; i++ )
......@@ -3346,6 +3347,23 @@ int cdfWriteVarSliceDP(int streamID, int varID, int levelID, double *data, int n
{
for ( i = 0; i < nvals; i++ ) data[i] = NINT(data[i]);
}
if ( CDF_Debug )
{
double fmin, fmax;
fmin = 1.0e200;
fmax = -1.0e200;
for ( i = 1; i < nvals; ++i )
{
if ( !DBL_IS_EQUAL(data[i], missval) )
{
if ( data[i] < fmin ) fmin = data[i];
if ( data[i] > fmax ) fmax = data[i];
}
}
Message(func, "nvals = %d, nmiss = %d, missval = %g, minval = %g, maxval = %g",
nvals, nmiss, missval, fmin, fmax);
}
}
cdf_put_vara_double(fileID, ncvarid, start, count, data);
......
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