Commit 05e85e71 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gridCompare: check position parameter of unstructured grids only if gridnumber > 0

parent 392e395d
......@@ -3,6 +3,10 @@
* Version 1.7.0 released
* using CGRIBEX library version 1.7.0
2014-08-15 Uwe Schulzweida
* gridCompare: check position parameter of unstructured grids only if gridnumber > 0
2014-08-13 Uwe Schulzweida
* cgribex: use timerange indicator to identify different variables
......
......@@ -2316,12 +2316,21 @@ int gridCompare(int gridID, grid_t grid)
{
char uuidOfHGrid[17];
gridInqUUID(gridID, uuidOfHGrid);
/*
printf("compare unstructured grids\n");
printf("gridID %d\n", gridID);
printf("gridsize %d\n", grid.size);
if ( uuidOfHGrid[0] != 0 && grid.uuid[0] != 0 && memcmp(grid.uuid, uuidOfHGrid, 16) )
printf("uuidOfHGrid differ\n");
printf("nvertex %d %d\n", grid.nvertex, gridInqNvertex(gridID));
printf("number %d %d\n", grid.number, gridInqNumber(gridID));
printf("position %d %d\n", grid.position, gridInqPosition(gridID));
*/
if ( uuidOfHGrid[0] != 0 && grid.uuid[0] != 0 )
if ( !differ && memcmp(uuidOfHGrid, grid.uuid, 16) != 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.number > 0 && grid.position != gridInqPosition(gridID) ) differ = 1;
if ( !differ )
differ = compareXYvals2(gridID, grid.size, grid.xvals, grid.yvals);
}
......
......@@ -354,12 +354,12 @@ void varAddRecord(int recID, int param, int gridID, int zaxistype, int lbounds,
if ( vartable[varID].gridID != gridID )
{
Message("param = %s gridID = %d", paramstr, gridID);
Error("horizontal grid must not change for same param!");
Error("horizontal grid must not change for same parameter!");
}
if ( vartable[varID].zaxistype != zaxistype )
{
Message("param = %s zaxistype = %d", paramstr, zaxistype);
Error("zaxistype must not change for same param!");
Error("zaxistype must not change for same parameter!");
}
}
......
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