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
905fbe94
Commit
905fbe94
authored
Mar 11, 2015
by
Uwe Schulzweida
Browse files
added some HAVE_LIBGRIB_API directives
parent
1cf053d9
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/gribapi_utilities.c
View file @
905fbe94
#ifdef HAVE_LIBGRIB_API
#include "gribapi_utilities.h"
#include "cdi.h"
...
...
@@ -699,3 +701,4 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
grid
->
yvals
=
NULL
;
grid
->
type
=
gridtype
;
}
#endif
src/gribapi_utilities.h
View file @
905fbe94
#ifndef INCLUDE_GUARD_CDI_GRIBAPI_UTILITIES_H
#define INCLUDE_GUARD_CDI_GRIBAPI_UTILITIES_H
#ifdef HAVE_LIBGRIB_API
#include "grid.h"
#include <grib_api.h>
...
...
@@ -31,3 +33,5 @@ int gribapiGetGridType(grib_handle *gh);
void
gribapiGetGrid
(
grib_handle
*
gh
,
grid_t
*
grid
);
#endif
#endif
src/iterator_grib.c
View file @
905fbe94
#ifdef HAVE_LIBGRIB_API
#include "iterator_grib.h"
#include "cdi_int.h"
...
...
@@ -806,3 +808,5 @@ double cdiGribIterator_inqDoubleDefaultValue(CdiGribIterator* me, const char* ke
{
return
gribGetDoubleDefault
(
me
->
gribHandle
,
key
,
defaultValue
);
}
#endif
src/iterator_grib.h
View file @
905fbe94
...
...
@@ -10,7 +10,9 @@
#include "iterator.h"
#include "input_file.h"
#ifdef HAVE_LIBGRIB_API
#include <grib_api.h>
#endif
typedef
struct
recordList
recordList
;
typedef
struct
CdiGribIterator
{
...
...
@@ -20,7 +22,9 @@ typedef struct CdiGribIterator {
off_t
fileOffset
;
unsigned
char
*
gribBuffer
;
size_t
bufferSize
,
curRecordSize
;
#ifdef HAVE_LIBGRIB_API
grib_handle
*
gribHandle
;
#endif
}
CdiGribIterator
;
CdiIterator
*
cdiGribIterator_new
(
const
char
*
path
,
int
filetype
);
...
...
src/stream_gribapi.c
View file @
905fbe94
...
...
@@ -714,6 +714,8 @@ static void ensureBufferSize(size_t requiredSize, size_t* curSize, unsigned char
}
}
#if defined (HAVE_LIBGRIB_API)
static
grib_handle
*
gribapiGetDiskRepresentation
(
long
recsize
,
size_t
*
buffersize
,
unsigned
char
**
gribbuffer
,
int
*
outDatatype
,
int
*
outCompressionType
,
long
*
outUnzipsize
)
{
int
lieee
=
FALSE
;
...
...
@@ -763,6 +765,7 @@ grib_handle* gribapiGetDiskRepresentation(long recsize, size_t* buffersize, unsi
}
return
gh
;
}
#endif
typedef
enum
{
CHECKTIME_OK
,
CHECKTIME_SKIP
,
CHECKTIME_STOP
,
CHECKTIME_INCONSISTENT
}
checkTimeResult
;
static
checkTimeResult
checkTime
(
stream_t
*
streamptr
,
compvar2_t
compVar
,
const
DateTime
*
verificationTime
,
const
DateTime
*
expectedVTime
)
{
...
...
src/stream_gribapi.h
View file @
905fbe94
...
...
@@ -3,8 +3,6 @@
#include "cdi_int.h"
#include <grib_api.h>
int
gribapiScanTimestep1
(
stream_t
*
streamptr
);
int
gribapiScanTimestep2
(
stream_t
*
streamptr
);
int
gribapiScanTimestep
(
stream_t
*
streamptr
);
...
...
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