Commit f2f31fd5 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Use bool for two-state variable.

parent 88fc2411
......@@ -712,7 +712,12 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
}
if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION || gridtype == GRID_LCC )
GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &grid->uvRelativeToGrid), 0);
{
long temp;
GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &temp), 0);
assert(temp == 0 || temp == 1);
grid->uvRelativeToGrid = (bool)temp;
}
grid->type = gridtype;
grid->projtype = projtype;
......
......@@ -3941,7 +3941,7 @@ void gridDefUvRelativeToGrid(int gridID, int uvRelativeToGrid)
if ( gridptr->uvRelativeToGrid != uvRelativeToGrid )
{
gridMark4Update(gridID);
gridptr->uvRelativeToGrid = uvRelativeToGrid;
gridptr->uvRelativeToGrid = (bool)uvRelativeToGrid;
}
}
......
......@@ -104,7 +104,8 @@ struct grid_t {
int np; /* number of parallels between a pole and the equator */
bool lcomplex;
bool hasdims;
long uvRelativeToGrid; /* Some models deliver wind U,V relative to the grid-cell */
/* Some models deliver wind U,V relative to the grid-cell */
bool uvRelativeToGrid;
struct gridaxis_t x;
struct gridaxis_t y;
const struct gridVirtTable *vtable;
......
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