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