Skip to content

Commit

Permalink
MIR-661 Grid projection handling covering the poles: account for "exc…
Browse files Browse the repository at this point in the history
…essive" bounds
  • Loading branch information
pmaciel committed May 3, 2024
1 parent 50d74cf commit 26a076a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mir/repres/regular/RegularGrid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ RegularGrid::RegularGrid(const param::MIRParametrisation& param, const RegularGr
auto bbox = projection.lonlatBoundingBox(range);
ASSERT(bbox);

bbox_ = {bbox.north(), bbox.west(), bbox.south(), bbox.east()};
// MIR-661 Grid projection handling covering the poles: account for "excessive" bounds
Longitude west(bbox.west());
auto east = bbox.east() - bbox.west() >= Longitude::GLOBE.value() ? west + Longitude::GLOBE : bbox.east();

bbox_ = {bbox.north(), west, bbox.south(), east};
}


Expand Down

0 comments on commit 26a076a

Please sign in to comment.