mirror of https://github.com/ecmwf/eccodes.git
ECC-1208: Fix name of macros: CODES_DUMP_FLAG_OCTECT and GRIB_DUMP_FLAG_OCTECT
This commit is contained in:
parent
52db2fb6cb
commit
70147cd99d
|
@ -44,37 +44,37 @@ Log mode for information for processing information
|
|||
|
||||
/* Types */
|
||||
#define CODES_TYPE_UNDEFINED GRIB_TYPE_UNDEFINED
|
||||
#define CODES_TYPE_LONG GRIB_TYPE_LONG
|
||||
#define CODES_TYPE_DOUBLE GRIB_TYPE_DOUBLE
|
||||
#define CODES_TYPE_STRING GRIB_TYPE_STRING
|
||||
#define CODES_TYPE_BYTES GRIB_TYPE_BYTES
|
||||
#define CODES_TYPE_SECTION GRIB_TYPE_SECTION
|
||||
#define CODES_TYPE_LABEL GRIB_TYPE_LABEL
|
||||
#define CODES_TYPE_MISSING GRIB_TYPE_MISSING
|
||||
#define CODES_TYPE_LONG GRIB_TYPE_LONG
|
||||
#define CODES_TYPE_DOUBLE GRIB_TYPE_DOUBLE
|
||||
#define CODES_TYPE_STRING GRIB_TYPE_STRING
|
||||
#define CODES_TYPE_BYTES GRIB_TYPE_BYTES
|
||||
#define CODES_TYPE_SECTION GRIB_TYPE_SECTION
|
||||
#define CODES_TYPE_LABEL GRIB_TYPE_LABEL
|
||||
#define CODES_TYPE_MISSING GRIB_TYPE_MISSING
|
||||
|
||||
/* Missing values */
|
||||
#define CODES_MISSING_LONG GRIB_MISSING_LONG
|
||||
#define CODES_MISSING_LONG GRIB_MISSING_LONG
|
||||
#define CODES_MISSING_DOUBLE GRIB_MISSING_DOUBLE
|
||||
|
||||
/*set spec flags*/
|
||||
#define CODES_UTIL_SET_SPEC_FLAGS_ONLY_PACKING GRIB_UTIL_SET_SPEC_FLAGS_ONLY_PACKING
|
||||
|
||||
/* Dump option flags*/
|
||||
#define CODES_DUMP_FLAG_READ_ONLY GRIB_DUMP_FLAG_READ_ONLY
|
||||
#define CODES_DUMP_FLAG_DUMP_OK GRIB_DUMP_FLAG_DUMP_OK
|
||||
#define CODES_DUMP_FLAG_VALUES GRIB_DUMP_FLAG_VALUES
|
||||
#define CODES_DUMP_FLAG_CODED GRIB_DUMP_FLAG_CODED
|
||||
#define CODES_DUMP_FLAG_OCTECT GRIB_DUMP_FLAG_OCTECT
|
||||
#define CODES_DUMP_FLAG_ALIASES GRIB_DUMP_FLAG_ALIASES
|
||||
#define CODES_DUMP_FLAG_TYPE GRIB_DUMP_FLAG_TYPE
|
||||
#define CODES_DUMP_FLAG_HEXADECIMAL GRIB_DUMP_FLAG_HEXADECIMAL
|
||||
#define CODES_DUMP_FLAG_NO_DATA GRIB_DUMP_FLAG_NO_DATA
|
||||
#define CODES_DUMP_FLAG_ALL_DATA GRIB_DUMP_FLAG_ALL_DATA
|
||||
#define CODES_DUMP_FLAG_READ_ONLY GRIB_DUMP_FLAG_READ_ONLY
|
||||
#define CODES_DUMP_FLAG_DUMP_OK GRIB_DUMP_FLAG_DUMP_OK
|
||||
#define CODES_DUMP_FLAG_VALUES GRIB_DUMP_FLAG_VALUES
|
||||
#define CODES_DUMP_FLAG_CODED GRIB_DUMP_FLAG_CODED
|
||||
#define CODES_DUMP_FLAG_OCTET GRIB_DUMP_FLAG_OCTET
|
||||
#define CODES_DUMP_FLAG_ALIASES GRIB_DUMP_FLAG_ALIASES
|
||||
#define CODES_DUMP_FLAG_TYPE GRIB_DUMP_FLAG_TYPE
|
||||
#define CODES_DUMP_FLAG_HEXADECIMAL GRIB_DUMP_FLAG_HEXADECIMAL
|
||||
#define CODES_DUMP_FLAG_NO_DATA GRIB_DUMP_FLAG_NO_DATA
|
||||
#define CODES_DUMP_FLAG_ALL_DATA GRIB_DUMP_FLAG_ALL_DATA
|
||||
#define CODES_DUMP_FLAG_ALL_ATTRIBUTES GRIB_DUMP_FLAG_ALL_ATTRIBUTES
|
||||
|
||||
/* codes_nearest flags */
|
||||
#define CODES_NEAREST_SAME_GRID GRIB_NEAREST_SAME_GRID
|
||||
#define CODES_NEAREST_SAME_DATA GRIB_NEAREST_SAME_DATA
|
||||
#define CODES_NEAREST_SAME_GRID GRIB_NEAREST_SAME_GRID
|
||||
#define CODES_NEAREST_SAME_DATA GRIB_NEAREST_SAME_DATA
|
||||
#define CODES_NEAREST_SAME_POINT GRIB_NEAREST_SAME_POINT
|
||||
|
||||
/*! Iteration is carried out on all the keys available in the message
|
||||
|
|
|
@ -104,7 +104,7 @@ Log mode for information for processing information
|
|||
#define GRIB_DUMP_FLAG_DUMP_OK (1 << 1)
|
||||
#define GRIB_DUMP_FLAG_VALUES (1 << 2)
|
||||
#define GRIB_DUMP_FLAG_CODED (1 << 3)
|
||||
#define GRIB_DUMP_FLAG_OCTECT (1 << 4)
|
||||
#define GRIB_DUMP_FLAG_OCTET (1 << 4)
|
||||
#define GRIB_DUMP_FLAG_ALIASES (1 << 5)
|
||||
#define GRIB_DUMP_FLAG_TYPE (1 << 6)
|
||||
#define GRIB_DUMP_FLAG_HEXADECIMAL (1 << 7)
|
||||
|
@ -700,9 +700,9 @@ int grib_nearest_find(grib_nearest* nearest, const grib_handle* h, double inlat,
|
|||
double* values, double* distances, int* indexes, size_t* len);
|
||||
|
||||
/**
|
||||
* Frees an nearest from memory
|
||||
* Frees a nearest neighbour object from memory
|
||||
*
|
||||
* @param nearest : the nearest
|
||||
* @param nearest : the nearest
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_nearest_delete(grib_nearest* nearest);
|
||||
|
@ -766,7 +766,7 @@ int grib_get_size(const grib_handle* h, const char* key, size_t* size);
|
|||
*
|
||||
* @param h : the handle to get the offset from
|
||||
* @param key : the key to be searched
|
||||
* @param length : the address of a size_t where the length will be set
|
||||
* @param length : the address of a size_t where the length will be set
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_length(const grib_handle* h, const char* key, size_t* length);
|
||||
|
|
|
@ -511,7 +511,7 @@ static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accesso
|
|||
static void set_begin_end(grib_dumper* d, grib_accessor* a)
|
||||
{
|
||||
grib_dumper_debug* self = (grib_dumper_debug*)d;
|
||||
if ((d->option_flags & GRIB_DUMP_FLAG_OCTECT) != 0) {
|
||||
if ((d->option_flags & GRIB_DUMP_FLAG_OCTET) != 0) {
|
||||
self->begin = a->offset - self->section_offset + 1;
|
||||
self->theEnd = grib_get_next_position_offset(a) - self->section_offset;
|
||||
}
|
||||
|
|
|
@ -569,7 +569,7 @@ static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accesso
|
|||
static void set_begin_end(grib_dumper* d, grib_accessor* a)
|
||||
{
|
||||
grib_dumper_wmo* self = (grib_dumper_wmo*)d;
|
||||
if ((d->option_flags & GRIB_DUMP_FLAG_OCTECT) != 0) {
|
||||
if ((d->option_flags & GRIB_DUMP_FLAG_OCTET) != 0) {
|
||||
self->begin = a->offset - self->section_offset + 1;
|
||||
self->theEnd = grib_get_next_position_offset(a) - self->section_offset;
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
if (grib_options_on("O")) {
|
||||
options->dump_mode = "wmo";
|
||||
json = 0;
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTECT | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTET | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("p")) {
|
||||
|
|
|
@ -90,7 +90,7 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
|
||||
if (grib_options_on("O")) {
|
||||
options->dump_mode = "wmo";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTECT | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTET | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("D")) {
|
||||
|
|
|
@ -131,21 +131,13 @@ static grib_handle* merge(grib_handle* h1, grib_handle* h2)
|
|||
long Ni1, Nj1, Ni2, Nj2;
|
||||
grib_handle* h = NULL;
|
||||
int err = 0;
|
||||
/*
|
||||
int dump_flags= GRIB_DUMP_FLAG_CODED
|
||||
| GRIB_DUMP_FLAG_OCTECT
|
||||
| GRIB_DUMP_FLAG_VALUES
|
||||
| GRIB_DUMP_FLAG_READ_ONLY;
|
||||
|
||||
*/
|
||||
|
||||
/* same products? */
|
||||
/* Same products? */
|
||||
if (grib_key_equal(h1, h2, md5Key, GRIB_TYPE_STRING, &err) == 0 && err == 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* can we do it?*/
|
||||
|
||||
/* Can we do it? */
|
||||
len2 = sizeof(s2) / sizeof(*s2);
|
||||
err = grib_get_string(h2, "gridType", s2, &len2);
|
||||
if (strcmp(s2, "regular_ll")) {
|
||||
|
@ -187,21 +179,17 @@ static grib_handle* merge(grib_handle* h1, grib_handle* h2)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* yes we can!*/
|
||||
|
||||
/* do we have something to do?*/
|
||||
|
||||
/* Yes we can! Do we have something to do? */
|
||||
if (grib_key_equal(h1, h2, "latitudeOfFirstGridPointInDegrees", GRIB_TYPE_DOUBLE, &err) &&
|
||||
grib_key_equal(h1, h2, "latitudeOfLastGridPointInDegrees", GRIB_TYPE_DOUBLE, &err) &&
|
||||
grib_key_equal(h1, h2, "longitudeOfFirstGridPointInDegrees", GRIB_TYPE_DOUBLE, &err) &&
|
||||
grib_key_equal(h1, h2, "longitudeOfLastGridPointInDegrees", GRIB_TYPE_DOUBLE, &err)) {
|
||||
/* no we don't */
|
||||
/* No we don't */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* yes we do! */
|
||||
|
||||
/* check scanning mode */
|
||||
/* Yes we do! */
|
||||
/* Check scanning mode */
|
||||
grib_get_long(h1, "iScansNegatively", &iscan);
|
||||
if (iscan)
|
||||
grib_set_long(h1, "swapScanningLon", 1);
|
||||
|
@ -258,7 +246,7 @@ static grib_handle* merge(grib_handle* h1, grib_handle* h2)
|
|||
lonLast = 360 - di;
|
||||
}
|
||||
|
||||
/* create new grib for bigger area*/
|
||||
/* Create new grib for bigger area*/
|
||||
h = grib_handle_clone(h1);
|
||||
grib_set_double(h, "latitudeOfFirstGridPointInDegrees", latFirst);
|
||||
grib_set_double(h, "longitudeOfFirstGridPointInDegrees", lonFirst);
|
||||
|
|
|
@ -68,7 +68,7 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
|
||||
if (grib_options_on("O")) {
|
||||
options->dump_mode = "wmo";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTECT | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTET | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("D")) {
|
||||
|
|
|
@ -65,7 +65,7 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
|
||||
if (grib_options_on("O")) {
|
||||
options->dump_mode = "wmo";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTECT | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTET | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("D")) {
|
||||
|
|
|
@ -59,7 +59,7 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
|
||||
if (grib_options_on("O")) {
|
||||
options->dump_mode = "wmo";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTECT | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTET | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("D")) {
|
||||
|
|
Loading…
Reference in New Issue