Commit 09e8616a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Removed unused CDI function gridDefUvRelativeToGrid.

parent 3bf9a83b
...@@ -1002,9 +1002,6 @@ void gridChangeType(int gridID, int gridtype); ...@@ -1002,9 +1002,6 @@ void gridChangeType(int gridID, int gridtype);
void gridDefComplexPacking(int gridID, int lpack); void gridDefComplexPacking(int gridID, int lpack);
int gridInqComplexPacking(int gridID); int gridInqComplexPacking(int gridID);
void gridDefUvRelativeToGrid(int gridID, int uvRelativeToGrid);
int gridInqUvRelativeToGrid(int gridID);
void gridDefScanningMode(int gridID, int mode); void gridDefScanningMode(int gridID, int mode);
int gridInqScanningMode(int gridID); int gridInqScanningMode(int gridID);
......
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" #include "config.h"
#endif #endif
#ifdef HAVE_LIBGRIB_API #ifdef HAVE_LIBGRIB_API
...@@ -834,7 +834,6 @@ bool gribapiGetGrid(grib_handle *gh, grid_t *grid) ...@@ -834,7 +834,6 @@ bool gribapiGetGrid(grib_handle *gh, grid_t *grid)
long temp; long temp;
GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &temp), 0); GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &temp), 0);
assert(temp == 0 || temp == 1); assert(temp == 0 || temp == 1);
grid->uvRelativeToGrid = (bool)temp;
uvRelativeToGrid = (bool)temp; uvRelativeToGrid = (bool)temp;
} }
......
...@@ -180,7 +180,6 @@ void grid_init(grid_t *gridptr) ...@@ -180,7 +180,6 @@ void grid_init(grid_t *gridptr)
gridptr->vtable = &cdiGridVtable; gridptr->vtable = &cdiGridVtable;
gridptr->atts.nalloc = MAX_ATTRIBUTES; gridptr->atts.nalloc = MAX_ATTRIBUTES;
gridptr->atts.nelems = 0; gridptr->atts.nelems = 0;
gridptr->uvRelativeToGrid = 0; // Some models deliver wind U,V relative to the grid-cell
gridptr->iScansNegatively = 0; gridptr->iScansNegatively = 0;
gridptr->jScansPositively = 1; gridptr->jScansPositively = 1;
gridptr->jPointsAreConsecutive = 0; gridptr->jPointsAreConsecutive = 0;
...@@ -2429,14 +2428,14 @@ bool gridCompare(int gridID, const grid_t *grid, bool coord_compare) ...@@ -2429,14 +2428,14 @@ bool gridCompare(int gridID, const grid_t *grid, bool coord_compare)
} }
} }
if ( (grid->scanningMode != gridInqScanningMode(gridID)) || (grid->uvRelativeToGrid != gridInqUvRelativeToGrid(gridID)) ) if ( (grid->scanningMode != gridInqScanningMode(gridID)) )
{ {
// often grid definition may differ in UV-relativeToGrid // often grid definition may differ in UV-relativeToGrid
differ = 1; differ = 1;
#ifdef HIRLAM_EXTENSIONS #ifdef HIRLAM_EXTENSIONS
if ( cdiDebugExt>=200 ) if ( cdiDebugExt>=200 )
printf("gridCompare(gridID=%d): Differs: grid.scanningMode [%d] != gridInqScanningMode(gridID) [%d] or grid.uvRelativeToGrid [%d] != gridInqUvRelativeToGrid(gridID) [%d]\n", printf("gridCompare(gridID=%d): Differs: grid.scanningMode [%d] != gridInqScanningMode(gridID) [%d]\n",
gridID, grid->scanningMode, gridInqScanningMode(gridID), grid->uvRelativeToGrid, gridInqUvRelativeToGrid(gridID) ); gridID, grid->scanningMode, gridInqScanningMode(gridID));
#endif // HIRLAM_EXTENSIONS #endif // HIRLAM_EXTENSIONS
} }
...@@ -2490,7 +2489,6 @@ int gridCompareP(void *gridptr1, void *gridptr2) ...@@ -2490,7 +2489,6 @@ int gridCompareP(void *gridptr1, void *gridptr2)
if ( IS_NOT_EQUAL(g1->y.last , g2->y.last) ) return differ; if ( IS_NOT_EQUAL(g1->y.last , g2->y.last) ) return differ;
if ( IS_NOT_EQUAL(g1->x.inc , g2->x.inc) ) return differ; if ( IS_NOT_EQUAL(g1->x.inc , g2->x.inc) ) return differ;
if ( IS_NOT_EQUAL(g1->y.inc , g2->y.inc) ) return differ; if ( IS_NOT_EQUAL(g1->y.inc , g2->y.inc) ) return differ;
if ( IS_NOT_EQUAL(g1->uvRelativeToGrid , g2->uvRelativeToGrid) ) return differ;
if ( IS_NOT_EQUAL(g1->scanningMode , g2->scanningMode) ) return differ; if ( IS_NOT_EQUAL(g1->scanningMode , g2->scanningMode) ) return differ;
const double *restrict g1_xvals = g1->vtable->inqXValsPtr(g1), const double *restrict g1_xvals = g1->vtable->inqXValsPtr(g1),
...@@ -2808,7 +2806,6 @@ int gridGenerate(const grid_t *grid) ...@@ -2808,7 +2806,6 @@ int gridGenerate(const grid_t *grid)
gridDefArea(gridID, grid->area); gridDefArea(gridID, grid->area);
gridptr->number = grid->number; gridptr->number = grid->number;
gridptr->position = grid->position; gridptr->position = grid->position;
gridptr->uvRelativeToGrid = grid->uvRelativeToGrid;
gridptr->scanningMode = grid->scanningMode; gridptr->scanningMode = grid->scanningMode;
gridptr->iScansNegatively = grid->iScansNegatively; gridptr->iScansNegatively = grid->iScansNegatively;
gridptr->jScansPositively = grid->jScansPositively; gridptr->jScansPositively = grid->jScansPositively;
...@@ -4382,25 +4379,6 @@ void gridInqUUID(int gridID, unsigned char uuid[CDI_UUID_SIZE]) ...@@ -4382,25 +4379,6 @@ void gridInqUUID(int gridID, unsigned char uuid[CDI_UUID_SIZE])
} }
void gridDefUvRelativeToGrid(int gridID, int uvRelativeToGrid)
{
grid_t *gridptr = grid_to_pointer(gridID);
if ( gridptr->uvRelativeToGrid != uvRelativeToGrid )
{
gridMark4Update(gridID);
gridptr->uvRelativeToGrid = (bool)uvRelativeToGrid;
}
}
int gridInqUvRelativeToGrid(int gridID)
{
grid_t *gridptr = grid_to_pointer(gridID);
return gridptr->uvRelativeToGrid;
}
void gridDefScanningMode(int gridID, int mode) void gridDefScanningMode(int gridID, int mode)
{ {
grid_t *gridptr = grid_to_pointer(gridID); grid_t *gridptr = grid_to_pointer(gridID);
...@@ -4461,7 +4439,6 @@ enum { ...@@ -4461,7 +4439,6 @@ enum {
GRID_PACK_INT_IDX_MEMBERMASK, GRID_PACK_INT_IDX_MEMBERMASK,
GRID_PACK_INT_IDX_XTSTDNNAME, GRID_PACK_INT_IDX_XTSTDNNAME,
GRID_PACK_INT_IDX_YTSTDNNAME, GRID_PACK_INT_IDX_YTSTDNNAME,
GRID_PACK_INT_IDX_UVRELATIVETOGRID,
GRID_PACK_INT_IDX_ISCANSNEGATIVELY, GRID_PACK_INT_IDX_ISCANSNEGATIVELY,
GRID_PACK_INT_IDX_JSCANSPOSITIVELY, GRID_PACK_INT_IDX_JSCANSPOSITIVELY,
GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE, GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE,
...@@ -4669,7 +4646,6 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize, ...@@ -4669,7 +4646,6 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
xystdname_tab[intBuffer[GRID_PACK_INT_IDX_XTSTDNNAME]][0]; xystdname_tab[intBuffer[GRID_PACK_INT_IDX_XTSTDNNAME]][0];
gridP->y.stdname = gridP->y.stdname =
xystdname_tab[intBuffer[GRID_PACK_INT_IDX_YTSTDNNAME]][1]; xystdname_tab[intBuffer[GRID_PACK_INT_IDX_YTSTDNNAME]][1];
gridP->uvRelativeToGrid = intBuffer[GRID_PACK_INT_IDX_UVRELATIVETOGRID];
gridP->iScansNegatively = (bool)intBuffer[GRID_PACK_INT_IDX_ISCANSNEGATIVELY]; gridP->iScansNegatively = (bool)intBuffer[GRID_PACK_INT_IDX_ISCANSNEGATIVELY];
gridP->jScansPositively = (bool)intBuffer[GRID_PACK_INT_IDX_JSCANSPOSITIVELY]; gridP->jScansPositively = (bool)intBuffer[GRID_PACK_INT_IDX_JSCANSPOSITIVELY];
gridP->jPointsAreConsecutive = (bool)intBuffer[GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE]; gridP->jPointsAreConsecutive = (bool)intBuffer[GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE];
...@@ -4858,7 +4834,6 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize, ...@@ -4858,7 +4834,6 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
(int)((const char (*)[2][24])gridP->y.stdname (int)((const char (*)[2][24])gridP->y.stdname
- (const char (*)[2][24])xystdname_tab[0][1]); - (const char (*)[2][24])xystdname_tab[0][1]);
intBuffer[GRID_PACK_INT_IDX_UVRELATIVETOGRID] = gridP->uvRelativeToGrid;
intBuffer[GRID_PACK_INT_IDX_ISCANSNEGATIVELY] = gridP->iScansNegatively; intBuffer[GRID_PACK_INT_IDX_ISCANSNEGATIVELY] = gridP->iScansNegatively;
intBuffer[GRID_PACK_INT_IDX_JSCANSPOSITIVELY] = gridP->jScansPositively; intBuffer[GRID_PACK_INT_IDX_JSCANSPOSITIVELY] = gridP->jScansPositively;
intBuffer[GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE] = gridP->jPointsAreConsecutive; intBuffer[GRID_PACK_INT_IDX_JPOINTSARECONSECUTIVE] = gridP->jPointsAreConsecutive;
......
...@@ -108,7 +108,6 @@ struct grid_t { ...@@ -108,7 +108,6 @@ struct grid_t {
*/ */
bool lcomplex; bool lcomplex;
bool hasdims; bool hasdims;
bool uvRelativeToGrid; /* Some models deliver wind U,V relative to the grid-cell */
struct gridaxis_t x; struct gridaxis_t x;
struct gridaxis_t y; struct gridaxis_t y;
const struct gridVirtTable *vtable; const struct gridVirtTable *vtable;
......
...@@ -442,8 +442,6 @@ bool cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i ...@@ -442,8 +442,6 @@ bool cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
grid->type = gridtype; grid->type = gridtype;
grid->projtype = projtype; grid->projtype = projtype;
if ( uvRelativeToGrid ) grid->uvRelativeToGrid = 1;
return uvRelativeToGrid; return uvRelativeToGrid;
} }
......
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