Commit 85b41ffb authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cgribexlib update

parent 09c69651
......@@ -809,6 +809,7 @@ enable_dependency_tracking
with_gnu_ld
with_sysroot
enable_libtool_lock
with_gnu_ld
enable_largefile
with_threads
with_zlib
......@@ -838,16 +839,25 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
CPPFLAGS
FC
FCFLAGS
LDFLAGS
LIBS
FPP
FPPFLAGS
F77
FFLAGS
LDFLAGS
LIBS
CXX
CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC
CXXCPP
CPPFLAGS
FCMODEXT'
 
 
......
/* Automatically generated by m214003 at 2011-08-25, do not edit */
/* Automatically generated by m214003 at 2011-08-27, do not edit */
/* CGRIBEXLIB_VERSION="1.5.1" */
......@@ -5528,57 +5528,85 @@ int gribReadSize(int fileID)
pdssize = gribsize;
fileSetPos(fileID, (off_t) 3, SEEK_CUR);
if ( CGRIBEX_Debug )
Message("pdssize = %d", pdssize);
if ( CGRIBEX_Debug ) Message("pdssize = %d", pdssize);
flag = filePtrGetc(fileptr);
if ( CGRIBEX_Debug )
Message("flag = %d", flag);
if ( CGRIBEX_Debug ) Message("flag = %d", flag);
fileSetPos(fileID, (off_t) pdssize-8, SEEK_CUR);
if ( flag & 128 )
{
b1 = filePtrGetc(fileptr);
b2 = filePtrGetc(fileptr);
b3 = filePtrGetc(fileptr);
b1 = filePtrGetc(fileptr); b2 = filePtrGetc(fileptr); b3 = filePtrGetc(fileptr);
gdssize = (b1 << 16) + (b2 << 8) + b3;
fileSetPos(fileID, (off_t) gdssize-3, SEEK_CUR);
if ( CGRIBEX_Debug ) Message("gdssize = %d", gdssize);
}
if ( CGRIBEX_Debug )
Message("gdssize = %d", gdssize);
if ( flag & 64 )
{
b1 = filePtrGetc(fileptr);
b2 = filePtrGetc(fileptr);
b3 = filePtrGetc(fileptr);
b1 = filePtrGetc(fileptr); b2 = filePtrGetc(fileptr); b3 = filePtrGetc(fileptr);
bmssize = (b1 << 16) + (b2 << 8) + b3;
fileSetPos(fileID, (off_t) bmssize-3, SEEK_CUR);
if ( CGRIBEX_Debug ) Message("bmssize = %d", bmssize);
}
if ( CGRIBEX_Debug )
Message("bmssize = %d", bmssize);
b1 = filePtrGetc(fileptr);
b2 = filePtrGetc(fileptr);
b3 = filePtrGetc(fileptr);
b1 = filePtrGetc(fileptr); b2 = filePtrGetc(fileptr); b3 = filePtrGetc(fileptr);
bdssize = (b1 << 16) + (b2 << 8) + b3;
if ( CGRIBEX_Debug )
Message("bdssize = %d", bdssize);
if ( CGRIBEX_Debug ) Message("bdssize = %d", bdssize);
gribsize = issize + pdssize + gdssize + bmssize + bdssize + essize;
}
else if ( gribversion == 1 )
{
if ( gribsize > JP23SET ) /* Large GRIB record */
{
int pdssize = 0, gdssize = 0, bmssize = 0, bdssize = 0;
int issize = 4, essize = 4;
int flag;
b1 = filePtrGetc(fileptr); b2 = filePtrGetc(fileptr); b3 = filePtrGetc(fileptr);
pdssize = (b1 << 16) + (b2 << 8) + b3;
if ( CGRIBEX_Debug ) Message("pdssize = %d", pdssize);
for ( int i = 0; i < 5; ++i ) flag = filePtrGetc(fileptr);
if ( CGRIBEX_Debug ) Message("flag = %d", flag);
fileSetPos(fileID, (off_t) pdssize-8, SEEK_CUR);
if ( flag & 128 )
{
b1 = filePtrGetc(fileptr); b2 = filePtrGetc(fileptr); b3 = filePtrGetc(fileptr);
gdssize = (b1 << 16) + (b2 << 8) + b3;
fileSetPos(fileID, (off_t) gdssize-3, SEEK_CUR);
if ( CGRIBEX_Debug ) Message("gdssize = %d", gdssize);
}
if ( flag & 64 )
{
b1 = filePtrGetc(fileptr); b2 = filePtrGetc(fileptr); b3 = filePtrGetc(fileptr);
bmssize = (b1 << 16) + (b2 << 8) + b3;
fileSetPos(fileID, (off_t) bmssize-3, SEEK_CUR);
if ( CGRIBEX_Debug ) Message("bmssize = %d", bmssize);
}
b1 = filePtrGetc(fileptr); b2 = filePtrGetc(fileptr); b3 = filePtrGetc(fileptr);
bdssize = (b1 << 16) + (b2 << 8) + b3;
bdssize = correct_bdslen(bdssize, gribsize, issize+pdssize+gdssize+bmssize);
if ( CGRIBEX_Debug ) Message("bdssize = %d", bdssize);
gribsize = issize+pdssize+gdssize+bmssize+bdssize+essize;
}
}
else if ( gribversion == 2 )
{
int i;
/* we set gribsize the following way because it doesn't matter then
whether int is 4 or 8 bytes long - we don't have to care if the size
really fits: if it does not, the record can not be read at all */
gribsize = 0;
for ( i = 0; i < 8; i++ ) gribsize = (gribsize << 8) | filePtrGetc(fileptr);
}
else if ( gribversion != 1 )
else
{
gribsize = 0;
Warning("GRIB version %d unsupported!", gribversion);
......@@ -9142,7 +9170,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return (gribLen);
}
static const char grb_libvers[] = "1.5.1" " of ""Aug 25 2011"" ""09:32:29";
static const char grb_libvers[] = "1.5.1" " of ""Aug 27 2011"" ""08:40:40";
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