Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
9f1da458
Commit
9f1da458
authored
Jan 04, 2011
by
Uwe Schulzweida
Browse files
change grib_api key typeOfPacking to packingType
parent
927e3a04
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_gribapi.c
View file @
9f1da458
...
...
@@ -507,8 +507,8 @@ void gribapiAddRecord(int streamID, int param, grib_handle *gh,
{
size_t
len
=
256
;
char
typeOfPacking
[
256
];
GRIB_CHECK
(
grib_get_string
(
gh
,
"
typeOfP
acking"
,
typeOfPacking
,
&
len
),
0
);
// fprintf(stderr, "
typeOfP
acking %d %s\n", len, typeOfPacking);
GRIB_CHECK
(
grib_get_string
(
gh
,
"
p
acking
Type
"
,
typeOfPacking
,
&
len
),
0
);
// fprintf(stderr, "
p
acking
Type
%d %s\n", len, typeOfPacking);
grid
.
lcomplex
=
0
;
if
(
strncmp
(
typeOfPacking
,
"spectral_complex"
,
len
)
==
0
)
grid
.
lcomplex
=
1
;
...
...
@@ -808,10 +808,10 @@ int gribapiScanTimestep1(int streamID)
size_t
len
=
256
;
char
typeOfPacking
[
256
];
status
=
grib_get_string
(
gh
,
"
typeOfP
acking"
,
typeOfPacking
,
&
len
);
status
=
grib_get_string
(
gh
,
"
p
acking
Type
"
,
typeOfPacking
,
&
len
);
if
(
status
==
0
)
{
// fprintf(stderr, "
typeOfP
acking %d %s\n", len, typeOfPacking);
// fprintf(stderr, "
p
acking
Type
%d %s\n", len, typeOfPacking);
if
(
strncmp
(
typeOfPacking
,
"grid_jpeg"
,
len
)
==
0
)
ztype
=
COMPRESS_JPEG
;
}
...
...
@@ -2081,12 +2081,12 @@ void gribapiDefGrid(grib_handle *gh, int gridID, int ljpeg)
if
(
ljpeg
)
{
mesg
=
"grid_jpeg"
;
len
=
strlen
(
mesg
);
GRIB_CHECK
(
grib_set_string
(
gh
,
"
typeOfP
acking"
,
mesg
,
&
len
),
0
);
GRIB_CHECK
(
grib_set_string
(
gh
,
"
p
acking
Type
"
,
mesg
,
&
len
),
0
);
}
else
{
mesg
=
"grid_simple"
;
len
=
strlen
(
mesg
);
GRIB_CHECK
(
grib_set_string
(
gh
,
"
typeOfP
acking"
,
mesg
,
&
len
),
0
);
GRIB_CHECK
(
grib_set_string
(
gh
,
"
p
acking
Type
"
,
mesg
,
&
len
),
0
);
}
break
;
...
...
@@ -2143,10 +2143,11 @@ void gribapiDefGrid(grib_handle *gh, int gridID, int ljpeg)
lwarncomplex
=
0
;
}
mesg
=
"spectral_simple"
;
len
=
strlen
(
mesg
);
GRIB_CHECK
(
grib_set_string
(
gh
,
"
typeOfP
acking"
,
mesg
,
&
len
),
0
);
GRIB_CHECK
(
grib_set_string
(
gh
,
"
p
acking
Type
"
,
mesg
,
&
len
),
0
);
/*
mesg = "spectral_complex"; len = strlen(mesg);
GRIB_CHECK(grib_set_string(gh, "typeOfPacking", mesg, &len), 0);
GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
GRIB_CHECK(grib_set_long(gh, "JS", 20), 0);
GRIB_CHECK(grib_set_long(gh, "KS", 20), 0);
GRIB_CHECK(grib_set_long(gh, "MS", 20), 0);
...
...
@@ -2155,7 +2156,7 @@ void gribapiDefGrid(grib_handle *gh, int gridID, int ljpeg)
else
{
mesg
=
"spectral_simple"
;
len
=
strlen
(
mesg
);
GRIB_CHECK
(
grib_set_string
(
gh
,
"
typeOfP
acking"
,
mesg
,
&
len
),
0
);
GRIB_CHECK
(
grib_set_string
(
gh
,
"
p
acking
Type
"
,
mesg
,
&
len
),
0
);
}
break
;
...
...
Write
Preview
Markdown
is supported
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