Commit 4dbb68f2 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gridCompare: check only UUID of unstructured grids if coordinates are missing

parent d8a1dfbe
......@@ -2,6 +2,10 @@
* Version 1.7.0 released
2015-09-15 Uwe Schulzweida
* gridCompare: check only UUID of unstructured grids if coordinates are missing
2015-09-10 Uwe Schulzweida
* GRIB rotated grids: invert angle of rotation (north to south pole) (bug fix)
......
......@@ -1699,7 +1699,7 @@ double gridInqAngle(int gridID)
@Parameter
@Item Grid identifier
@EndFunction
@EndFunction<
*/
void gridDefAngle(int gridID, double angle)
{
......@@ -2052,7 +2052,7 @@ int compareXYvals2(int gridID, int gridsize, double *xvals, double *yvals)
differ = 1;
}
return (differ);
return differ;
}
......@@ -2184,21 +2184,26 @@ int gridCompare(int gridID, const grid_t *grid)
if ( !differ && memcmp(uuidOfHGrid, grid->uuid, CDI_UUID_SIZE) != 0 ) differ = 1;
if ( !differ && grid->nvertex != gridInqNvertex(gridID) ) differ = 1;
if ( !differ && grid->number != gridInqNumber(gridID) ) differ = 1;
if ( !differ && grid->position != gridInqPosition(gridID) ) differ = 1;
if ( !differ && grid->nvertex != gridInqNvertex(gridID) ) differ = 1;
if ( !differ && grid->number != gridInqNumber(gridID) ) differ = 1;
if ( !differ && grid->number > 0 && grid->position != gridInqPosition(gridID) ) differ = 1;
if ( !differ )
differ = compareXYvals2(gridID, grid->size, grid->xvals, grid->yvals);
}
if ( !differ && uuidOfHGrid[0] &&
((grid->nvertex == 0 && gridInqNvertex(gridID) != 0) || (grid->nvertex != 0 && gridInqNvertex(gridID) == 0)) &&
((grid->number == 0 && gridInqNumber(gridID) != 0) || (grid->number != 0 && gridInqNumber(gridID) == 0)) &&
((grid->xvals == NULL && gridInqXvalsPtr(gridID) != NULL) || (grid->xvals != NULL && gridInqXvalsPtr(gridID) == NULL)) &&
((grid->yvals == NULL && gridInqYvalsPtr(gridID) != NULL) || (grid->yvals != NULL && gridInqYvalsPtr(gridID) == NULL)) )
{
}
else
{
if ( !differ && grid->nvertex != gridInqNvertex(gridID) ) differ = 1;
if ( !differ && grid->number != gridInqNumber(gridID) ) differ = 1;
if ( !differ && grid->number > 0 && grid->position != gridInqPosition(gridID) ) differ = 1;
if ( !differ )
differ = compareXYvals2(gridID, grid->size, grid->xvals, grid->yvals);
}
}
}
}
return (differ);
return differ;
}
......
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