Commit 71e29ecc authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

streamInqGinfo: added support for GRIB files > 2GB

parent a05b2fa2
2014-01-08 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* streamInqGinfo: added support for GRIB files > 2GB
2014-01-03 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* streamOpenA, streamOpen: parameter recordBufIsToBeCreated missing in call to cdiStreamOpenDefaultDelegate() (bug fix)
......
This diff is collapsed.
This diff is collapsed.
......@@ -345,7 +345,7 @@ void streamWriteRecord(int streamID, const double *data_vec, int nmiss);
void streamWriteRecordF(int streamID, const float *data_vec, int nmiss);
void streamCopyRecord(int streamIDdest, int streamIDsrc);
void streamInqGinfo(int streamID, int *intnum, float *fltnum);
void streamInqGinfo(int streamID, int *intnum, float *fltnum, off_t *bignum);
/* VLIST routines */
......
......@@ -4,7 +4,7 @@
!
! Author:
! -------
! Uwe Schulzweida, MPI-MET, Hamburg, November 2013
! Uwe Schulzweida, MPI-MET, Hamburg, January 2014
!
INTEGER CDI_MAX_NAME
......@@ -662,12 +662,6 @@
! INTEGER streamIDsrc)
EXTERNAL streamCopyRecord
! streamInqGinfo
! (INTEGER streamID,
! INTEGER intnum,
! REAL fltnum)
EXTERNAL streamInqGinfo
!
! VLIST routines
!
......
......@@ -141,7 +141,6 @@ FCALLSCSUB3 (streamReadRecord, STREAMREADRECORD, streamreadrecord, INT, PDOUBLE,
FCALLSCSUB3 (streamWriteRecord, STREAMWRITERECORD, streamwriterecord, INT, PDOUBLE, INT)
FCALLSCSUB3 (streamWriteRecordF, STREAMWRITERECORDF, streamwriterecordf, INT, PFLOAT, INT)
FCALLSCSUB2 (streamCopyRecord, STREAMCOPYRECORD, streamcopyrecord, INT, INT)
FCALLSCSUB3 (streamInqGinfo, STREAMINQGINFO, streaminqginfo, INT, PINT, PFLOAT)
/* VLIST routines */
......
......@@ -246,7 +246,7 @@ int gribFileSeek(int fileID, long *offset);
int gribReadSize(int fileID);
int gribVersion(unsigned char *buffer, size_t buffersize);
int gribGinfo(long recpos, long recsize, unsigned char *gribbuffer, int *intnum, float *fltnum);
int gribGinfo(off_t recpos, long recsize, unsigned char *gribbuffer, int *intnum, float *fltnum, off_t *bignum);
double calculate_pfactor(const double* spectralField, long fieldTruncation, long subsetTruncation);
......
/* Automatically generated by m214003 at 2013-10-09, do not edit */
/* Automatically generated by m214003 at 2014-01-08, do not edit */
/* CGRIBEXLIB_VERSION="1.6.2" */
/* CGRIBEXLIB_VERSION="1.6.3" */
#ifdef _ARCH_PWR6
#pragma options nostrict
......@@ -9547,14 +9547,14 @@ int grib2Sections(unsigned char *gribbuffer, long bufsize, unsigned char **idsp,
}
int gribGinfo(long recpos, long recsize, unsigned char *gribbuffer,
int *intnum, float *fltnum)
int gribGinfo(off_t recpos, long recsize, unsigned char *gribbuffer,
int *intnum, float *fltnum, off_t *bignum)
{
unsigned char *pds, *gds, *bms, *bds;
unsigned char *bufpointer, *is, *section;
int gribversion, grib1offset;
long gribsize = 0;
int dpos, bpos = 0;
off_t dpos, bpos = 0;
int bdslen;
float bsf;
......@@ -9631,10 +9631,10 @@ int gribGinfo(long recpos, long recsize, unsigned char *gribbuffer,
if ( bsf > 32767 ) bsf = 32768-bsf;
bsf = pow(2.0,(double)bsf);
intnum[0] = dpos;
if ( bms ) intnum[1] = bpos;
else intnum[1] = -999;
intnum[2] = BDS_NumBits;
bignum[0] = dpos;
if ( bms ) bignum[1] = bpos;
else bignum[1] = -999;
intnum[0] = BDS_NumBits;
/* fltnum[0] = 1.0; */
fltnum[0] = pow(10.0, (double)PDS_DecimalScale);
......@@ -10839,7 +10839,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return (gribLen);
}
static const char grb_libvers[] = "1.6.2" " of ""Oct 9 2013"" ""11:03:55";
static const char grb_libvers[] = "1.6.3" " of ""Jan 8 2014"" ""19:55:18";
const char *
cgribexLibraryVersion(void)
{
......
......@@ -577,15 +577,6 @@ module mo_cdi
end subroutine streamCopyRecord
end interface
interface
subroutine streamInqGinfo(streamID,intnum,fltnum) bind(c,name='streamInqGinfo')
import :: c_int,c_float
integer(c_int), value :: streamID
integer(c_int), intent(out) :: intnum
real(c_float), intent(out) :: fltnum
end subroutine streamInqGinfo
end interface
interface
integer(c_int) function vlistCreate() bind(c,name='vlistCreate')
import :: c_int
......@@ -3135,7 +3126,6 @@ module mo_cdi
public :: streamWriteRecord
public :: streamWriteRecordF
public :: streamCopyRecord
public :: streamInqGinfo
public :: vlistCreate
public :: vlistDestroy
public :: vlistDuplicate
......
......@@ -728,7 +728,7 @@ int grb_write_record(stream_t * streamptr, int memtype, const void *data, int nm
}
void streamInqGinfo(int streamID, int *intnum, float *fltnum)
void streamInqGinfo(int streamID, int *intnum, float *fltnum, off_t *bignum)
{
int recID, vrecID, tsID;
int filetype;
......@@ -758,7 +758,7 @@ void streamInqGinfo(int streamID, int *intnum, float *fltnum)
if ( zip > 0 )
Error("Compressed GRIB records unsupported!");
else
gribGinfo(recpos, gribbuffersize, (unsigned char *) gribbuffer, intnum, fltnum);
gribGinfo(recpos, gribbuffersize, (unsigned char *) gribbuffer, intnum, fltnum, bignum);
}
}
/*
......
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