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
eae2e51d
Commit
eae2e51d
authored
Nov 01, 2019
by
Uwe Schulzweida
Browse files
Added support gpt GRIB2 key typeOfTimeIncrement.
parent
51b038e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
eae2e51d
2019-11-01 Uwe Schulzweida
* Added support gpt GRIB2 key typeOfTimeIncrement
2019-10-29 Uwe Schulzweida
* using CGRIBEX library version 1.9.4
...
...
@@ -9,7 +13,7 @@
2019-10-11 Uwe Schulzweida
* gribapi: use forecast reference time
* gribapi: use forecast reference time
* gribapi: added support for seconds
2019-09-09 Uwe Schulzweida
...
...
src/cdi.h
View file @
eae2e51d
...
...
@@ -804,6 +804,7 @@ size_t gridInqYCvals(int gridID, char *ycvals[]);
#define CDI_KEY_SECTION2PADDING 820 // GRIB2 section2Padding
#define CDI_KEY_UVRELATIVETOGRID 821 // GRIB uvRelativeToGrid
#define CDI_KEY_CONSTITUENTTYPE 822 // GRIB2 constituentType
#define CDI_KEY_TYPEOFTIMEINCREMENT 823 // GRIB2 typeOfTimeIncrement
// cdiDefKeyInt: Define an integer value from a key of a CDI variable
int
cdiDefKeyInt
(
int
cdiID
,
int
varID
,
int
key
,
int
value
);
...
...
src/stream_gribapi.c
View file @
eae2e51d
...
...
@@ -481,6 +481,10 @@ void gribapiGetKeys(grib_handle *gh, int varID)
long
backgroundProcess
=
0
;
if
(
grib_get_long
(
gh
,
"backgroundProcess"
,
&
backgroundProcess
)
==
0
)
varDefKeyInt
(
varID
,
CDI_KEY_BACKGROUNDPROCESS
,
(
int
)
backgroundProcess
);
long
typeOfTimeIncrement
=
0
;
if
(
grib_get_long
(
gh
,
"typeOfTimeIncrement"
,
&
typeOfTimeIncrement
)
==
0
)
varDefKeyInt
(
varID
,
CDI_KEY_TYPEOFTIMEINCREMENT
,
(
int
)
typeOfTimeIncrement
);
/*
long constituentType = 0;
if ( grib_get_long(gh, "constituentType", &constituentType) == 0 )
...
...
@@ -3081,6 +3085,12 @@ size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
gribapiDefTime
((
int
)
editionNumber
,
productDefinitionTemplate
,
typeOfGeneratingProcess
,
gh
,
vdate
,
vtime
,
tsteptype
,
numavg
,
vlistInqTaxis
(
vlistID
),
gc
->
init
);
{
int
typeOfTimeIncrement
=
0
;
int
status
=
cdiInqKeyInt
(
vlistID
,
varID
,
CDI_KEY_TYPEOFTIMEINCREMENT
,
&
typeOfTimeIncrement
);
if
(
status
==
0
)
GRIB_CHECK
(
my_grib_set_long
(
gh
,
"typeOfTimeIncrement"
,
(
long
)
typeOfTimeIncrement
),
0
);
}
{
int
status
,
perturbationNumber
,
numberOfForecastsInEnsemble
,
typeOfEnsembleForecast
;
status
=
cdiInqKeyInt
(
vlistID
,
varID
,
CDI_KEY_TYPEOFENSEMBLEFORECAST
,
&
typeOfEnsembleForecast
);
...
...
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