Commit edb64345 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grid_read_data: optimize error message.

parent a8dd0a15
Pipeline #5289 passed with stages
in 16 minutes and 23 seconds
......@@ -157,7 +157,7 @@ grid_read_data(size_t ikv, size_t nkv, KVMap *kvmap, GridDesciption &grid, size_
auto size = (grid.type == GRID_CURVILINEAR || grid.type == GRID_UNSTRUCTURED) ? grid.size : grid.xsize;
if (size == 0) cdoAbort("xsize or gridsize undefined (grid description file: %s)!", dname);
if (size != nvalues)
cdoAbort("xsize=%zu and size of xvals=%zu differ (grid description file: %s)!", nvalues, size, dname);
cdoAbort("Number of xvals=%zu and size of xvals=%zu differ (grid description file: %s)!", nvalues, size, dname);
grid.xvals.resize(size);
for (size_t i = 0; i < size; ++i) grid.xvals[i] = parameter2double(values[i]);
......@@ -167,7 +167,7 @@ grid_read_data(size_t ikv, size_t nkv, KVMap *kvmap, GridDesciption &grid, size_
auto size = (grid.type == GRID_CURVILINEAR || grid.type == GRID_UNSTRUCTURED) ? grid.size : grid.ysize;
if (size == 0) cdoAbort("ysize or gridsize undefined (grid description file: %s)!", dname);
if (size != nvalues)
cdoAbort("ysize=%zu and size of yvals=%zu differ (grid description file: %s)!", nvalues, size, dname);
cdoAbort("Number of yvals=%zu and size of yvals=%zu differ (grid description file: %s)!", nvalues, size, dname);
grid.yvals.resize(size);
for (size_t i = 0; i < size; ++i) grid.yvals[i] = parameter2double(values[i]);
......
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