Skip to content

Commit

Permalink
cf_layout_manager check for bad extents
Browse files Browse the repository at this point in the history
  • Loading branch information
burlen committed May 6, 2021
1 parent 088c08c commit 419b20f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions io/teca_cf_layout_manager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ int teca_cf_layout_manager::define(const teca_metadata &md_in,
for (int i = 0; i < 4; ++i)
this->dims[i] = 0;

// check for bad bounds request on dataset with y axis in descending order.
if (extent[2] > extent[3])
{
TECA_ERROR("Bad y-axis extent [" << extent[2] << ", " << extent[3] << "]")
return -1;
}

// the cf reader always creates 4D data, but some other tools choke
// on it, notably ParView. All dimensions of 1 are safe to skip, unless
// we are writing a variable with 1 value.
Expand Down

0 comments on commit 419b20f

Please sign in to comment.