Skip to content
GitLab
Menu
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
8bb25c8a
Commit
8bb25c8a
authored
Aug 21, 2015
by
Uwe Schulzweida
Browse files
added patch from Nathanael
parent
6585f5f4
Changes
3
Show whitespace changes
Inline
Side-by-side
src/gribapi.h
View file @
8bb25c8a
...
@@ -67,6 +67,30 @@ static inline void *gribHandleNew(int editionNumber)
...
@@ -67,6 +67,30 @@ static inline void *gribHandleNew(int editionNumber)
return
gh
;
return
gh
;
}
}
static
inline
int
my_grib_set_double
(
grib_handle
*
h
,
const
char
*
key
,
double
val
)
{
if
(
cdiGribApiDebug
)
fprintf
(
stderr
,
"grib_set_double(
\t
grib_handle* h,
\"
%s
\"
, %f)
\n
"
,
key
,
val
);
return
grib_set_double
(
h
,
key
,
val
);
}
static
inline
int
my_grib_set_long
(
grib_handle
*
h
,
const
char
*
key
,
long
val
)
{
if
(
cdiGribApiDebug
)
fprintf
(
stderr
,
"grib_set_long(
\t
grib_handle* h,
\"
%s
\"
, %ld)
\n
"
,
key
,
val
);
return
grib_set_long
(
h
,
key
,
val
);
}
static
inline
int
my_grib_set_string
(
grib_handle
*
h
,
const
char
*
key
,
const
char
*
val
,
size_t
*
length
)
{
if
(
cdiGribApiDebug
)
fprintf
(
stderr
,
"grib_set_string(
\t
grib_handle* h,
\"
%s
\"
,
\"
%s
\"
)
\n
"
,
key
,
val
);
return
grib_set_string
(
h
,
key
,
val
,
length
);
}
static
inline
void
gribHandleDelete
(
void
*
gh
)
static
inline
void
gribHandleDelete
(
void
*
gh
)
{
{
grib_handle_delete
((
struct
grib_handle
*
)
gh
);
grib_handle_delete
((
struct
grib_handle
*
)
gh
);
...
...
src/iterator_grib.c
View file @
8bb25c8a
...
@@ -535,6 +535,7 @@ void cdiGribIterator_readField(CdiIterator *super, double *buffer, size_t *nmiss
...
@@ -535,6 +535,7 @@ void cdiGribIterator_readField(CdiIterator *super, double *buffer, size_t *nmiss
{
{
CdiGribIterator
*
me
=
(
CdiGribIterator
*
)
super
;
CdiGribIterator
*
me
=
(
CdiGribIterator
*
)
super
;
GRIB_CHECK
(
my_grib_set_double
((
grib_handle
*
)
me
->
gribHandle
,
"missingValue"
,
cdiDefaultMissval
),
0
);
gribGetDoubleArray
((
grib_handle
*
)
me
->
gribHandle
,
"values"
,
buffer
);
gribGetDoubleArray
((
grib_handle
*
)
me
->
gribHandle
,
"values"
,
buffer
);
long
gridType
=
gribGetLong
((
grib_handle
*
)
me
->
gribHandle
,
"gridDefinitionTemplateNumber"
);
long
gridType
=
gribGetLong
((
grib_handle
*
)
me
->
gribHandle
,
"gridDefinitionTemplateNumber"
);
if
(
nmiss
)
if
(
nmiss
)
...
...
src/stream_gribapi.c
View file @
8bb25c8a
...
@@ -46,33 +46,6 @@ typedef struct {
...
@@ -46,33 +46,6 @@ typedef struct {
#if defined (HAVE_LIBGRIB_API)
#if defined (HAVE_LIBGRIB_API)
static
int
my_grib_set_double
(
grib_handle
*
h
,
const
char
*
key
,
double
val
)
{
if
(
cdiGribApiDebug
)
fprintf
(
stderr
,
"grib_set_double(
\t
grib_handle* h,
\"
%s
\"
, %f)
\n
"
,
key
,
val
);
return
grib_set_double
(
h
,
key
,
val
);
}
static
int
my_grib_set_long
(
grib_handle
*
h
,
const
char
*
key
,
long
val
)
{
if
(
cdiGribApiDebug
)
fprintf
(
stderr
,
"grib_set_long(
\t
grib_handle* h,
\"
%s
\"
, %ld)
\n
"
,
key
,
val
);
return
grib_set_long
(
h
,
key
,
val
);
}
static
int
my_grib_set_string
(
grib_handle
*
h
,
const
char
*
key
,
const
char
*
val
,
size_t
*
length
)
{
if
(
cdiGribApiDebug
)
fprintf
(
stderr
,
"grib_set_string(
\t
grib_handle* h,
\"
%s
\"
,
\"
%s
\"
)
\n
"
,
key
,
val
);
return
grib_set_string
(
h
,
key
,
val
,
length
);
}
static
static
int
gribapiGetZaxisType
(
long
editionNumber
,
int
grib_ltype
)
int
gribapiGetZaxisType
(
long
editionNumber
,
int
grib_ltype
)
{
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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