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
15336157
Commit
15336157
authored
Feb 10, 2010
by
Uwe Schulzweida
Browse files
added support for complex packing of spektral data in GRIB
parent
8de5ba22
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
15336157
2010-02-10 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added support for complex packing of spektral data in GRIB
2010-02-09 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added function gridInqComplexPacking/gridDefComplexPacking
...
...
app/printinfo.h
View file @
15336157
...
...
@@ -250,10 +250,10 @@ static void printGridInfo(int vlistID)
}
else
if
(
gridtype
==
GRID_SPECTRAL
)
{
fprintf
(
stdout
,
"size : dim = %d truncation = %d spc = %d"
,
fprintf
(
stdout
,
"size : dim = %d truncation = %d spc = %d
\n
"
,
gridsize
,
trunc
,
gridsize
/
2
);
fprintf
(
stdout
,
"
complexPacking = %d"
,
gridInqComplexPacking
(
gridID
)
);
fprintf
(
stdout
,
"
\n
"
);
fprintf
(
stdout
,
"
%*s"
,
nbyte0
,
""
);
fprintf
(
stdout
,
"
complexPacking = %d
\n
"
,
gridInqComplexPacking
(
gridID
)
);
}
else
if
(
gridtype
==
GRID_GME
)
{
...
...
src/stream_cgribex.c
View file @
15336157
...
...
@@ -1668,7 +1668,7 @@ void cgribexDefTime(int *isec1, int vdate, int vtime, int tsteptype, int numavg,
}
static
void
cgribexDefGrid
(
int
*
isec1
,
int
*
isec2
,
int
gridID
)
void
cgribexDefGrid
(
int
*
isec1
,
int
*
isec2
,
int
*
isec4
,
int
gridID
)
{
static
char
func
[]
=
"cgribexDefGrid"
;
int
gridtype
;
...
...
@@ -1832,9 +1832,15 @@ void cgribexDefGrid(int *isec1, int *isec2, int gridID)
ISEC2_PentaM
=
ISEC2_PentaJ
;
ISEC2_RepType
=
1
;
if
(
gridInqComplexPacking
(
gridID
)
)
ISEC2_RepMode
=
2
;
{
ISEC2_RepMode
=
2
;
isec4
[
3
]
=
64
;
}
else
ISEC2_RepMode
=
1
;
{
ISEC2_RepMode
=
1
;
isec4
[
3
]
=
0
;
}
break
;
}
case
GRID_GME
:
...
...
@@ -2122,12 +2128,12 @@ size_t cgribexEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
cgribexDefParam
(
isec1
,
param
);
cgribexDefTime
(
isec1
,
vdate
,
vtime
,
tsteptype
,
numavg
,
vlistInqTaxis
(
vlistID
));
cgribexDefGrid
(
isec1
,
isec2
,
gridID
);
cgribexDefGrid
(
isec1
,
isec2
,
isec4
,
gridID
);
cgribexDefLevel
(
isec1
,
isec2
,
fsec2
,
zaxisID
,
levelID
);
cgribexDefMask
(
isec3
);
ISEC4_NumBits
=
grbBitsPerValue
(
datatype
);
ISEC4_NumValues
=
gridInqSize
(
gridID
);
ISEC4_NumBits
=
grbBitsPerValue
(
datatype
);
if
(
nmiss
>
0
)
{
...
...
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