Commit 3c0965e9 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added environment variable CDI_GRIBAPI_GRIB1 to set GRIB1 decoder/encoder to GRIBAPI.

parent 1785865f
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
* using EXSE library version 1.4.1 * using EXSE library version 1.4.1
* Version 1.9.6 released * Version 1.9.6 released
2018-10-31 Uwe Schulzweida
* Added environment variable CDI_GRIBAPI_GRIB1 to set GRIB1 decoder/encoder to GRIBAPI
2018-10-11 Uwe Schulzweida 2018-10-11 Uwe Schulzweida
* cdf_read: removed limitation of nmiss_ to INT_MAX [Bug #8691] * cdf_read: removed limitation of nmiss_ to INT_MAX [Bug #8691]
......
...@@ -290,6 +290,19 @@ void cdiSetChunk(const char *chunkAlgo) ...@@ -290,6 +290,19 @@ void cdiSetChunk(const char *chunkAlgo)
} }
void cdiSetGribapiGrib1(bool value)
{
#ifndef HAVE_LIBGRIB_API
if (value)
{
Warning("%s: GRIB_API support not compiled in, used CGRIBEX to decode GRIB1 record!", __func__);
value = false;
}
#endif
CDI_gribapi_grib1 = value;
}
void cdiInitialize(void) void cdiInitialize(void)
{ {
static bool Init_CDI = false; static bool Init_CDI = false;
...@@ -312,7 +325,7 @@ void cdiInitialize(void) ...@@ -312,7 +325,7 @@ void cdiInitialize(void)
if ( value >= 0 ) CDI_gribapi_debug = (bool) value; if ( value >= 0 ) CDI_gribapi_debug = (bool) value;
value = cdiGetenvInt("CDI_GRIBAPI_GRIB1"); value = cdiGetenvInt("CDI_GRIBAPI_GRIB1");
if ( value >= 0 ) CDI_gribapi_grib1 = (bool) value; if ( value >= 0 ) cdiSetGribapiGrib1((bool) value);
value = cdiGetenvInt("CDI_READ_CELL_CORNERS"); value = cdiGetenvInt("CDI_READ_CELL_CORNERS");
if ( value >= 0 ) CDI_read_cell_corners = (int) value; if ( value >= 0 ) CDI_read_cell_corners = (int) value;
...@@ -437,21 +450,21 @@ const char *strfiletype(int filetype) ...@@ -437,21 +450,21 @@ const char *strfiletype(int filetype)
} }
void cdiDefGlobal(const char *string, int val) void cdiDefGlobal(const char *string, int value)
{ {
// clang-format off // clang-format off
if (strcmp(string, "REGULARGRID") == 0) cdiDataUnreduced = val; if (strcmp(string, "REGULARGRID") == 0) cdiDataUnreduced = value;
else if (strcmp(string, "GRIBAPI_DEBUG") == 0) CDI_gribapi_debug = (bool) val; else if (strcmp(string, "GRIBAPI_DEBUG") == 0) CDI_gribapi_debug = (bool) value;
else if (strcmp(string, "GRIBAPI_GRIB1") == 0) CDI_gribapi_grib1 = (bool) val; else if (strcmp(string, "GRIBAPI_GRIB1") == 0) cdiSetGribapiGrib1((bool) value);
else if (strcmp(string, "SORTNAME") == 0) cdiSortName = val; else if (strcmp(string, "SORTNAME") == 0) cdiSortName = value;
else if (strcmp(string, "SORTPARAM") == 0) cdiSortParam = val; else if (strcmp(string, "SORTPARAM") == 0) cdiSortParam = value;
else if (strcmp(string, "HAVE_MISSVAL") == 0) cdiHaveMissval = val; else if (strcmp(string, "HAVE_MISSVAL") == 0) cdiHaveMissval = value;
else if (strcmp(string, "NC_CHUNKSIZEHINT") == 0) cdiNcChunksizehint = val; else if (strcmp(string, "NC_CHUNKSIZEHINT") == 0) cdiNcChunksizehint = value;
else if (strcmp(string, "READ_CELL_CORNERS") == 0) CDI_read_cell_corners = val; else if (strcmp(string, "READ_CELL_CORNERS") == 0) CDI_read_cell_corners = value;
else if (strcmp(string, "CMOR_MODE") == 0) CDI_cmor_mode = val; else if (strcmp(string, "CMOR_MODE") == 0) CDI_cmor_mode = value;
else if (strcmp(string, "REDUCE_DIM") == 0) CDI_reduce_dim = val; else if (strcmp(string, "REDUCE_DIM") == 0) CDI_reduce_dim = value;
else if (strcmp(string, "NETCDF_HDR_PAD") == 0) CDI_netcdf_hdr_pad = (size_t) val; else if (strcmp(string, "NETCDF_HDR_PAD") == 0) CDI_netcdf_hdr_pad = (size_t) value;
else if (strcmp(string, "NETCDF_LAZY_GRID_LOAD") == 0) CDI_netcdf_lazy_grid_load = (bool) val; else if (strcmp(string, "NETCDF_LAZY_GRID_LOAD") == 0) CDI_netcdf_lazy_grid_load = (bool) value;
else Warning("Unsupported global key: %s", string); else Warning("Unsupported global key: %s", string);
// clang-format on // clang-format on
} }
......
...@@ -21,7 +21,7 @@ int grbDecode(int filetype, int memtype, void *cgribexp, void *gribbuffer, size_ ...@@ -21,7 +21,7 @@ int grbDecode(int filetype, int memtype, void *cgribexp, void *gribbuffer, size_
int status = 0; int status = 0;
#ifdef HAVE_LIBCGRIBEX #ifdef HAVE_LIBCGRIBEX
if ( filetype == CDI_FILETYPE_GRB ) if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 )
{ {
#ifdef HAVE_LIBGRIB_API #ifdef HAVE_LIBGRIB_API
extern int cdiNAdditionalGRIBKeys; extern int cdiNAdditionalGRIBKeys;
......
...@@ -25,7 +25,7 @@ size_t grbEncode(int filetype, int memtype, int varID, int levelID, int vlistID, ...@@ -25,7 +25,7 @@ size_t grbEncode(int filetype, int memtype, int varID, int levelID, int vlistID,
size_t nbytes = 0; size_t nbytes = 0;
#ifdef HAVE_LIBCGRIBEX #ifdef HAVE_LIBCGRIBEX
if ( filetype == CDI_FILETYPE_GRB ) if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 )
{ {
size_t gribbuffersize = datasize*4+3000; size_t gribbuffersize = datasize*4+3000;
*gribbuffer = Malloc(gribbuffersize); *gribbuffer = Malloc(gribbuffersize);
...@@ -116,23 +116,37 @@ void grbCopyRecord(stream_t * streamptr2, stream_t * streamptr1) ...@@ -116,23 +116,37 @@ void grbCopyRecord(stream_t * streamptr2, stream_t * streamptr1)
size_t nbytes = recsize; size_t nbytes = recsize;
if ( filetype == CDI_FILETYPE_GRB ) #ifdef HAVE_LIBCGRIBEX
if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 )
{ {
if ( cdiGribChangeParameterID.active ) if ( cdiGribChangeParameterID.active )
{ {
// Even if you are stream-copy records you might need to change a bit of grib-header ! // Even if you are stream-copy records you might need to change a bit of grib-header !
#if defined HAVE_LIBCGRIBEX
void *gh = cgribex_handle_new_from_meassage((void*) gribbuffer, recsize); void *gh = cgribex_handle_new_from_meassage((void*) gribbuffer, recsize);
cgribexChangeParameterIdentification(gh, cdiGribChangeParameterID.code, cdiGribChangeParameterID.ltype, cdiGribChangeParameterID.lev); cgribexChangeParameterIdentification(gh, cdiGribChangeParameterID.code, cdiGribChangeParameterID.ltype, cdiGribChangeParameterID.lev);
cgribex_handle_delete(gh); cgribex_handle_delete(gh);
#elif defined HAVE_LIBGRIB_API cdiGribChangeParameterID.active = false; // after grib attributes have been changed turn it off again
}
}
else
#endif
#ifdef HAVE_LIBGRIB_API
{
if ( cdiGribChangeParameterID.active )
{
// Even if you are stream-copy records you might need to change a bit of grib-header !
void *gh = (void*)grib_handle_new_from_message(NULL, (void*) gribbuffer, recsize); void *gh = (void*)grib_handle_new_from_message(NULL, (void*) gribbuffer, recsize);
gribapiChangeParameterIdentification(gh, cdiGribChangeParameterID.code, cdiGribChangeParameterID.ltype, cdiGribChangeParameterID.lev); gribapiChangeParameterIdentification(gh, cdiGribChangeParameterID.code, cdiGribChangeParameterID.ltype, cdiGribChangeParameterID.lev);
grib_handle_delete(gh); grib_handle_delete(gh);
#endif
cdiGribChangeParameterID.active = false; // after grib attributes have been changed turn it off again cdiGribChangeParameterID.active = false; // after grib attributes have been changed turn it off again
} }
} }
#else
{
(void)vlistID; (void)varID;
Error("GRIB_API support not compiled in!");
}
#endif
#ifdef HIRLAM_EXTENSIONS #ifdef HIRLAM_EXTENSIONS
// Even if you are stream-copy records you might need to change a bit of grib-header ! // Even if you are stream-copy records you might need to change a bit of grib-header !
...@@ -240,7 +254,7 @@ void grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp ...@@ -240,7 +254,7 @@ void grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp
size_t datasize = gridInqSize(gridID); size_t datasize = gridInqSize(gridID);
#ifdef HAVE_LIBCGRIBEX #ifdef HAVE_LIBCGRIBEX
if ( filetype == CDI_FILETYPE_GRB ) if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 )
{ {
} }
else else
...@@ -257,7 +271,7 @@ void grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp ...@@ -257,7 +271,7 @@ void grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp
if ( comptype != CDI_COMPRESS_JPEG && comptype != CDI_COMPRESS_SZIP && comptype != CDI_COMPRESS_AEC ) comptype = CDI_COMPRESS_NONE; if ( comptype != CDI_COMPRESS_JPEG && comptype != CDI_COMPRESS_SZIP && comptype != CDI_COMPRESS_AEC ) comptype = CDI_COMPRESS_NONE;
if ( filetype == CDI_FILETYPE_GRB && comptype == CDI_COMPRESS_JPEG ) if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 && comptype == CDI_COMPRESS_JPEG )
{ {
static int ljpeg_warn = 1; static int ljpeg_warn = 1;
if ( ljpeg_warn ) Warning("JPEG compression of GRIB1 records not available!"); if ( ljpeg_warn ) Warning("JPEG compression of GRIB1 records not available!");
......
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" #include "config.h"
#endif #endif
#ifdef HAVE_LIBGRIB_API #ifdef HAVE_LIBGRIB_API
# include <grib_api.h> #include <grib_api.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
...@@ -56,7 +56,7 @@ void gribContainersNew(stream_t * streamptr) ...@@ -56,7 +56,7 @@ void gribContainersNew(stream_t * streamptr)
int editionNumber = (streamptr->filetype == CDI_FILETYPE_GRB) ? 1 : 2; int editionNumber = (streamptr->filetype == CDI_FILETYPE_GRB) ? 1 : 2;
#ifdef HAVE_LIBCGRIBEX #ifdef HAVE_LIBCGRIBEX
if ( editionNumber == 1 ) if ( editionNumber == 1 && !CDI_gribapi_grib1 )
{ {
} }
else else
......
...@@ -64,7 +64,7 @@ int streamGrbInqDataScanningMode(void) ...@@ -64,7 +64,7 @@ int streamGrbInqDataScanningMode(void)
int grib1ltypeToZaxisType(int grib_ltype) int grib1ltypeToZaxisType(int grib_ltype)
{ {
int zaxistype = ZAXIS_GENERIC; int zaxistype = ZAXIS_GENERIC;
// clang-format off
switch ( grib_ltype ) switch ( grib_ltype )
{ {
case GRIB1_LTYPE_SURFACE: zaxistype = ZAXIS_SURFACE; break; case GRIB1_LTYPE_SURFACE: zaxistype = ZAXIS_SURFACE; break;
...@@ -94,7 +94,7 @@ int grib1ltypeToZaxisType(int grib_ltype) ...@@ -94,7 +94,7 @@ int grib1ltypeToZaxisType(int grib_ltype)
case GRIB1_LTYPE_SEDIMENT_BOTTOM_TW: zaxistype = ZAXIS_SEDIMENT_BOTTOM_TW; break; case GRIB1_LTYPE_SEDIMENT_BOTTOM_TW: zaxistype = ZAXIS_SEDIMENT_BOTTOM_TW; break;
case GRIB1_LTYPE_MIX_LAYER: zaxistype = ZAXIS_MIX_LAYER; break; case GRIB1_LTYPE_MIX_LAYER: zaxistype = ZAXIS_MIX_LAYER; break;
} }
// clang-format on
return zaxistype; return zaxistype;
} }
...@@ -102,7 +102,7 @@ int grib1ltypeToZaxisType(int grib_ltype) ...@@ -102,7 +102,7 @@ int grib1ltypeToZaxisType(int grib_ltype)
int grib2ltypeToZaxisType(int grib_ltype) int grib2ltypeToZaxisType(int grib_ltype)
{ {
int zaxistype = ZAXIS_GENERIC; int zaxistype = ZAXIS_GENERIC;
// clang-format off
switch ( grib_ltype ) switch ( grib_ltype )
{ {
case GRIB2_LTYPE_SURFACE: zaxistype = ZAXIS_SURFACE; break; case GRIB2_LTYPE_SURFACE: zaxistype = ZAXIS_SURFACE; break;
...@@ -131,7 +131,7 @@ int grib2ltypeToZaxisType(int grib_ltype) ...@@ -131,7 +131,7 @@ int grib2ltypeToZaxisType(int grib_ltype)
case GRIB2_LTYPE_MIX_LAYER: zaxistype = ZAXIS_MIX_LAYER; break; case GRIB2_LTYPE_MIX_LAYER: zaxistype = ZAXIS_MIX_LAYER; break;
case GRIB2_LTYPE_REFERENCE: zaxistype = ZAXIS_REFERENCE; break; case GRIB2_LTYPE_REFERENCE: zaxistype = ZAXIS_REFERENCE; break;
} }
// clang-format on
return zaxistype; return zaxistype;
} }
...@@ -139,7 +139,7 @@ int grib2ltypeToZaxisType(int grib_ltype) ...@@ -139,7 +139,7 @@ int grib2ltypeToZaxisType(int grib_ltype)
int zaxisTypeToGrib1ltype(int zaxistype) int zaxisTypeToGrib1ltype(int zaxistype)
{ {
int grib_ltype = -1; int grib_ltype = -1;
// clang-format off
switch (zaxistype) switch (zaxistype)
{ {
case ZAXIS_SURFACE: grib_ltype = GRIB1_LTYPE_SURFACE; break; case ZAXIS_SURFACE: grib_ltype = GRIB1_LTYPE_SURFACE; break;
...@@ -169,7 +169,7 @@ int zaxisTypeToGrib1ltype(int zaxistype) ...@@ -169,7 +169,7 @@ int zaxisTypeToGrib1ltype(int zaxistype)
case ZAXIS_MIX_LAYER: grib_ltype = GRIB1_LTYPE_MIX_LAYER; break; case ZAXIS_MIX_LAYER: grib_ltype = GRIB1_LTYPE_MIX_LAYER; break;
case ZAXIS_REFERENCE: grib_ltype = -1; break; case ZAXIS_REFERENCE: grib_ltype = -1; break;
} }
// clang-format on
return grib_ltype; return grib_ltype;
} }
...@@ -177,7 +177,7 @@ int zaxisTypeToGrib1ltype(int zaxistype) ...@@ -177,7 +177,7 @@ int zaxisTypeToGrib1ltype(int zaxistype)
int zaxisTypeToGrib2ltype(int zaxistype) int zaxisTypeToGrib2ltype(int zaxistype)
{ {
int grib_ltype = -1; int grib_ltype = -1;
// clang-format off
switch (zaxistype) switch (zaxistype)
{ {
case ZAXIS_SURFACE: grib_ltype = GRIB2_LTYPE_SURFACE; break; case ZAXIS_SURFACE: grib_ltype = GRIB2_LTYPE_SURFACE; break;
...@@ -207,7 +207,7 @@ int zaxisTypeToGrib2ltype(int zaxistype) ...@@ -207,7 +207,7 @@ int zaxisTypeToGrib2ltype(int zaxistype)
case ZAXIS_MIX_LAYER: grib_ltype = GRIB2_LTYPE_MIX_LAYER; break; case ZAXIS_MIX_LAYER: grib_ltype = GRIB2_LTYPE_MIX_LAYER; break;
case ZAXIS_REFERENCE: grib_ltype = GRIB2_LTYPE_REFERENCE; break; case ZAXIS_REFERENCE: grib_ltype = GRIB2_LTYPE_REFERENCE; break;
} }
// clang-format on
return grib_ltype; return grib_ltype;
} }
...@@ -257,14 +257,14 @@ int grbScanTimestep1(stream_t * streamptr) ...@@ -257,14 +257,14 @@ int grbScanTimestep1(stream_t * streamptr)
#ifdef HAVE_LIBCGRIBEX #ifdef HAVE_LIBCGRIBEX
int filetype = streamptr->filetype; int filetype = streamptr->filetype;
if ( filetype == CDI_FILETYPE_GRB ) if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 )
status = cgribexScanTimestep1(streamptr); status = cgribexScanTimestep1(streamptr);
#endif
#if defined(HAVE_LIBCGRIBEX) && defined (HAVE_LIBGRIB_API)
else else
#endif #endif
#ifdef HAVE_LIBGRIB_API #ifdef HAVE_LIBGRIB_API
status = gribapiScanTimestep1(streamptr); status = gribapiScanTimestep1(streamptr);
#else
Error("Sufficient GRIB support unavailable!");
#endif #endif
return status; return status;
...@@ -278,14 +278,14 @@ int grbScanTimestep2(stream_t * streamptr) ...@@ -278,14 +278,14 @@ int grbScanTimestep2(stream_t * streamptr)
#ifdef HAVE_LIBCGRIBEX #ifdef HAVE_LIBCGRIBEX
int filetype = streamptr->filetype; int filetype = streamptr->filetype;
if ( filetype == CDI_FILETYPE_GRB ) if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 )
status = cgribexScanTimestep2(streamptr); status = cgribexScanTimestep2(streamptr);
#endif
#if defined(HAVE_LIBCGRIBEX) && defined (HAVE_LIBGRIB_API)
else else
#endif #endif
#ifdef HAVE_LIBGRIB_API #ifdef HAVE_LIBGRIB_API
status = gribapiScanTimestep2(streamptr); status = gribapiScanTimestep2(streamptr);
#else
Error("Sufficient GRIB support unavailable!");
#endif #endif
return status; return status;
...@@ -299,7 +299,7 @@ int grbScanTimestep(stream_t * streamptr) ...@@ -299,7 +299,7 @@ int grbScanTimestep(stream_t * streamptr)
#ifdef HAVE_LIBCGRIBEX #ifdef HAVE_LIBCGRIBEX
int filetype = streamptr->filetype; int filetype = streamptr->filetype;
if ( filetype == CDI_FILETYPE_GRB ) if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 )
status = cgribexScanTimestep(streamptr); status = cgribexScanTimestep(streamptr);
else else
#endif #endif
...@@ -369,7 +369,8 @@ void streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignum) ...@@ -369,7 +369,8 @@ void streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignum)
int filetype = streamptr->filetype; int filetype = streamptr->filetype;
if ( filetype == CDI_FILETYPE_GRB ) #ifdef HAVE_LIBCGRIBEX
if ( filetype == CDI_FILETYPE_GRB && !CDI_gribapi_grib1 )
{ {
int tsID = streamptr->curTsID; int tsID = streamptr->curTsID;
int vrecID = streamptr->tsteps[tsID].curRecID; int vrecID = streamptr->tsteps[tsID].curRecID;
...@@ -385,6 +386,13 @@ void streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignum) ...@@ -385,6 +386,13 @@ void streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignum)
else else
grib_info_for_grads(recpos, (long)gribbuffersize, (unsigned char *) gribbuffer, intnum, fltnum, bignum); grib_info_for_grads(recpos, (long)gribbuffersize, (unsigned char *) gribbuffer, intnum, fltnum, bignum);
} }
else if (CDI_gribapi_grib1)
{
Error("CGRIBEX support deactivated!");
}
#else
Error("CGRIBEX support not compiled in!");
#endif
} }
......
...@@ -32,7 +32,7 @@ int cdiStreamReadVar(int streamID, int varID, int memtype, void *data, size_t *n ...@@ -32,7 +32,7 @@ int cdiStreamReadVar(int streamID, int varID, int memtype, void *data, size_t *n
switch (filetype) switch (filetype)
{ {
#if defined (HAVE_LIBGRIB) #ifdef HAVE_LIBGRIB
case CDI_FILETYPE_GRB: case CDI_FILETYPE_GRB:
case CDI_FILETYPE_GRB2: case CDI_FILETYPE_GRB2:
{ {
...@@ -159,7 +159,7 @@ int cdiStreamReadVarSlice(int streamID, int varID, int levelID, int memtype, voi ...@@ -159,7 +159,7 @@ int cdiStreamReadVarSlice(int streamID, int varID, int levelID, int memtype, voi
switch (filetype) switch (filetype)
{ {
#if defined (HAVE_LIBGRIB) #ifdef HAVE_LIBGRIB
case CDI_FILETYPE_GRB: case CDI_FILETYPE_GRB:
case CDI_FILETYPE_GRB2: case CDI_FILETYPE_GRB2:
{ {
...@@ -289,7 +289,7 @@ int stream_read_record(int streamID, int memtype, void *data, size_t *nmiss) ...@@ -289,7 +289,7 @@ int stream_read_record(int streamID, int memtype, void *data, size_t *nmiss)
switch (streamptr->filetype) switch (streamptr->filetype)
{ {
#if defined (HAVE_LIBGRIB) #ifdef HAVE_LIBGRIB
case CDI_FILETYPE_GRB: case CDI_FILETYPE_GRB:
case CDI_FILETYPE_GRB2: case CDI_FILETYPE_GRB2:
grb_read_record(streamptr, memtype, data, nmiss); grb_read_record(streamptr, memtype, data, nmiss);
......
...@@ -182,7 +182,7 @@ void streamDefRecord(int streamID, int varID, int levelID) ...@@ -182,7 +182,7 @@ void streamDefRecord(int streamID, int varID, int levelID)
switch (streamptr->filetype) switch (streamptr->filetype)
{ {
#if defined (HAVE_LIBGRIB) #ifdef HAVE_LIBGRIB
case CDI_FILETYPE_GRB: case CDI_FILETYPE_GRB:
case CDI_FILETYPE_GRB2: case CDI_FILETYPE_GRB2:
grbDefRecord(streamptr); grbDefRecord(streamptr);
...@@ -258,7 +258,7 @@ void streamCopyRecord(int streamID2, int streamID1) ...@@ -258,7 +258,7 @@ void streamCopyRecord(int streamID2, int streamID1)
switch (filetype) switch (filetype)
{ {
#if defined (HAVE_LIBGRIB) #ifdef HAVE_LIBGRIB
case CDI_FILETYPE_GRB: case CDI_FILETYPE_GRB:
case CDI_FILETYPE_GRB2: case CDI_FILETYPE_GRB2:
grbCopyRecord(streamptr2, streamptr1); grbCopyRecord(streamptr2, streamptr1);
......
...@@ -35,7 +35,7 @@ int cdiStreamWriteVar_(int streamID, int varID, int memtype, const void *data, s ...@@ -35,7 +35,7 @@ int cdiStreamWriteVar_(int streamID, int varID, int memtype, const void *data, s
switch (filetype) switch (filetype)
{ {
#if defined (HAVE_LIBGRIB) #ifdef HAVE_LIBGRIB
case CDI_FILETYPE_GRB: case CDI_FILETYPE_GRB:
case CDI_FILETYPE_GRB2: case CDI_FILETYPE_GRB2:
{ {
...@@ -172,7 +172,7 @@ int cdiStreamWriteVarSlice(int streamID, int varID, int levelID, int memtype, co ...@@ -172,7 +172,7 @@ int cdiStreamWriteVarSlice(int streamID, int varID, int levelID, int memtype, co
switch (filetype) switch (filetype)
{ {
#if defined (HAVE_LIBGRIB) #ifdef HAVE_LIBGRIB
case CDI_FILETYPE_GRB: case CDI_FILETYPE_GRB:
case CDI_FILETYPE_GRB2: case CDI_FILETYPE_GRB2:
{ {
...@@ -348,7 +348,7 @@ int stream_write_record(int streamID, int memtype, const void *data, size_t nmis ...@@ -348,7 +348,7 @@ int stream_write_record(int streamID, int memtype, const void *data, size_t nmis
switch (streamptr->filetype) switch (streamptr->filetype)
{ {
#if defined (HAVE_LIBGRIB) #ifdef HAVE_LIBGRIB
case CDI_FILETYPE_GRB: case CDI_FILETYPE_GRB:
case CDI_FILETYPE_GRB2: case CDI_FILETYPE_GRB2:
grb_write_record(streamptr, memtype, data, nmiss); grb_write_record(streamptr, memtype, data, nmiss);
......
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