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
b7419ce0
Commit
b7419ce0
authored
Mar 07, 2017
by
Uwe Schulzweida
Browse files
Change interface of gribapiChangeParameterIdentification().
parent
69ddc399
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/grb_write.c
View file @
b7419ce0
...
...
@@ -129,7 +129,7 @@ void grbCopyRecord(stream_t * streamptr2, stream_t * streamptr1)
cgribexChangeParameterIdentification
(
gh
,
GribChangeParID_code
,
GribChangeParID_ltype
,
GribChangeParID_lev
);
cgribex_handle_delete
(
gh
);
#elif defined HAVE_LIBGRIB_API
grib_handle
*
gh
=
grib_handle_new_from_message
(
NULL
,
(
void
*
)
gribbuffer
,
recsize
);
void
*
gh
=
(
void
*
)
grib_handle_new_from_message
(
NULL
,
(
void
*
)
gribbuffer
,
recsize
);
gribapiChangeParameterIdentification
(
gh
,
GribChangeParID_code
,
GribChangeParID_ltype
,
GribChangeParID_lev
);
grib_handle_delete
(
gh
);
#endif
...
...
src/stream_gribapi.c
View file @
b7419ce0
...
...
@@ -2693,16 +2693,16 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
}
void
gribapiChangeParameterIdentification
(
grib_handle
*
gh
,
int
code
,
int
ltype
,
int
lev
)
void
gribapiChangeParameterIdentification
(
void
*
gh
,
int
code
,
int
ltype
,
int
lev
)
{
long
indicatorOfParameter
,
indicatorOfTypeOfLevel
,
level
;
// timeRangeIndicator: could be included later
indicatorOfParameter
=
code
;
indicatorOfTypeOfLevel
=
ltype
;
level
=
lev
;
if
(
indicatorOfParameter
!=-
1
)
GRIB_CHECK
(
my_grib_set_long
(
gh
,
"indicatorOfParameter"
,
indicatorOfParameter
),
0
);
if
(
indicatorOfTypeOfLevel
!=-
1
)
GRIB_CHECK
(
my_grib_set_long
(
gh
,
"indicatorOfTypeOfLevel"
,
indicatorOfTypeOfLevel
),
0
);
if
(
level
!=-
1
)
GRIB_CHECK
(
my_grib_set_long
(
gh
,
"level"
,
level
),
0
);
if
(
indicatorOfParameter
!=-
1
)
GRIB_CHECK
(
my_grib_set_long
(
(
grib_handle
*
)
gh
,
"indicatorOfParameter"
,
indicatorOfParameter
),
0
);
if
(
indicatorOfTypeOfLevel
!=-
1
)
GRIB_CHECK
(
my_grib_set_long
(
(
grib_handle
*
)
gh
,
"indicatorOfTypeOfLevel"
,
indicatorOfTypeOfLevel
),
0
);
if
(
level
!=-
1
)
GRIB_CHECK
(
my_grib_set_long
(
(
grib_handle
*
)
gh
,
"level"
,
level
),
0
);
}
#endif
...
...
src/stream_gribapi.h
View file @
b7419ce0
...
...
@@ -15,7 +15,7 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
long
datasize
,
const
double
*
data
,
int
nmiss
,
void
**
gribbuffer
,
size_t
*
gribbuffersize
,
int
ljpeg
,
void
*
gribContainer
);
void
gribapiChangeParameterIdentification
(
grib_handle
*
gh
,
int
code
,
int
ltype
,
int
lev
);
void
gribapiChangeParameterIdentification
(
void
*
gh
,
int
code
,
int
ltype
,
int
lev
);
#endif
/* _STREAM_GRIBAPI_H */
/*
...
...
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