Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
71e29ecc
Commit
71e29ecc
authored
Jan 08, 2014
by
Uwe Schulzweida
Browse files
streamInqGinfo: added support for GRIB files > 2GB
parent
a05b2fa2
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
71e29ecc
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)
...
...
doc/tex/c_quick_ref.tex
View file @
71e29ecc
This diff is collapsed.
Click to expand it.
doc/tex/f_quick_ref.tex
View file @
71e29ecc
This diff is collapsed.
Click to expand it.
src/cdi.h
View file @
71e29ecc
...
...
@@ -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 */
...
...
src/cdi.inc
View file @
71e29ecc
...
...
@@ -4,7 +4,7 @@
!
!
Author
:
!
-------
!
Uwe
Schulzweida
,
MPI
-
MET
,
Hamburg
,
November
201
3
!
Uwe
Schulzweida
,
MPI
-
MET
,
Hamburg
,
January
201
4
!
INTEGER
CDI_MAX_NAME
...
...
@@ -662,12 +662,6 @@
!
INTEGER
streamIDsrc
)
EXTERNAL
streamCopyRecord
!
streamInqGinfo
!
(
INTEGER
streamID
,
!
INTEGER
intnum
,
!
REAL
fltnum
)
EXTERNAL
streamInqGinfo
!
!
VLIST
routines
!
...
...
src/cdiFortran.c
View file @
71e29ecc
...
...
@@ -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 */
...
...
src/cgribex.h
View file @
71e29ecc
...
...
@@ -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
);
...
...
src/cgribexlib.c
View file @
71e29ecc
/* Automatically generated by m214003 at 201
3-10
-0
9
, do not edit */
/* Automatically generated by m214003 at 201
4-01
-0
8
, 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
;
in
t
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
);
int
num
[
0
]
=
dpos
;
if
(
bms
)
int
num
[
1
]
=
bpos
;
else
int
num
[
1
]
=
-
999
;
intnum
[
2
]
=
BDS_NumBits
;
big
num
[
0
]
=
dpos
;
if
(
bms
)
big
num
[
1
]
=
bpos
;
else
big
num
[
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
201
3
"" ""1
1:03:55
"
;
static
const
char
grb_libvers
[]
=
"1.6.
3
"
" of ""
Jan
8
201
4
"" ""1
9:55:18
"
;
const
char
*
cgribexLibraryVersion
(
void
)
{
...
...
src/mo_cdi.f90
View file @
71e29ecc
...
...
@@ -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
...
...
src/stream_grb.c
View file @
71e29ecc
...
...
@@ -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
);
}
}
/*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment