Commit 75ee4e9f authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gridFromNCfile: check grid_dims

parent b82471b1
2010-07-13 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* gridFromNCfile: check grid_dims
* seldate: open output file only when time steps found (bug fix) [report: Hannes Reuter]
2010-07-12 Cedrick Ansorge <Cedrick.Ansorge@zmaw.de>
......
......@@ -92,6 +92,7 @@ int gridFromNCfile(const char *gridfile)
if ( grid_rank == 1 )
{
grid.type = GRID_CELL;
if ( (size_t)grid_dims[0] != grid_size ) return(gridID);
}
else
{
......@@ -101,6 +102,7 @@ int gridFromNCfile(const char *gridfile)
grid.xsize = grid_dims[0];
grid.ysize = grid_dims[1];
if ( (size_t)grid_dims[0]*grid_dims[1] != grid_size ) return(gridID);
}
/* allocate grid coordinates and read data */
......
Supports Markdown
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