Skip to content

Commit

Permalink
Merge pull request #257 from OPENDAP/hyrax-1427
Browse files Browse the repository at this point in the history
Hyrax 1427
  • Loading branch information
kyang2014 authored Sep 10, 2024
2 parents 66a1540 + d295819 commit b739827
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,17 @@ bool Array::is_dap2_grid() {
throw InternalErr(__FILE__, __LINE__, string("Could not get the root group for ").append(this->name()));
D4Maps *d4_maps = this->maps();
is_grid = d4_maps->size(); // It can't be a grid if there are no maps...

// We also need to check if the number of maps is the same as the number of dimensions. If not, this is not a
// dap2 grid.
if (d4_maps->size() != ((int)dimensions()))
is_grid = false;
if (is_grid) {
DBG(cerr << __func__ << "() - Array '" << name() << "' has D4Maps." << endl);
// hmmm this might be a DAP2 Grid...
D4Maps::D4MapsIter i = d4_maps->map_begin();
D4Maps::D4MapsIter e = d4_maps->map_end();

while (i != e) {
DBG(cerr << __func__ << "() - Map '" << (*i)->array()->name() << " has " << (*i)->array()->_shape.size()
<< " dimension(s)." << endl);
Expand Down

0 comments on commit b739827

Please sign in to comment.