Commit 9f1da458 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

change grib_api key typeOfPacking to packingType

parent 927e3a04
......@@ -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, "typeOfPacking", typeOfPacking, &len), 0);
// fprintf(stderr, "typeOfPacking %d %s\n", len, typeOfPacking);
GRIB_CHECK(grib_get_string(gh, "packingType", typeOfPacking, &len), 0);
// fprintf(stderr, "packingType %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, "typeOfPacking", typeOfPacking, &len);
status = grib_get_string(gh, "packingType", typeOfPacking, &len);
if ( status == 0 )
{
// fprintf(stderr, "typeOfPacking %d %s\n", len, typeOfPacking);
// fprintf(stderr, "packingType %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, "typeOfPacking", mesg, &len), 0);
GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
}
else
{
mesg = "grid_simple"; len = strlen(mesg);
GRIB_CHECK(grib_set_string(gh, "typeOfPacking", mesg, &len), 0);
GRIB_CHECK(grib_set_string(gh, "packingType", 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, "typeOfPacking", mesg, &len), 0);
GRIB_CHECK(grib_set_string(gh, "packingType", 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, "typeOfPacking", mesg, &len), 0);
GRIB_CHECK(grib_set_string(gh, "packingType", mesg, &len), 0);
}
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment