Skip to content

Commit

Permalink
eckit::geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaciel committed Aug 23, 2023
1 parent 0663703 commit 2261835
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/eckit/geometry/grid/Gaussian.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <cmath>
#include <map>

#include "eckit/config/Configuration.h"
#include "eckit/exception/Exceptions.h"
#include "eckit/geometry/Domain.h"
#include "eckit/geometry/util.h"
Expand Down
1 change: 1 addition & 0 deletions src/eckit/geometry/grid/IrregularLatlon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <algorithm>

#include "eckit/config/Configuration.h"
#include "eckit/geometry/area/BoundingBox.h"


Expand Down
12 changes: 7 additions & 5 deletions src/eckit/geometry/grid/ORCA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ ORCA::ORCA(const Configuration& config) :


// TODO
ASSERT(dimensions_.size() == 2);
ASSERT(0 < dimensions_[0]);
ASSERT(0 < dimensions_[1]);

Expand All @@ -124,11 +125,12 @@ ORCA::ORCA(const Configuration& config) :
ASSERT(pivot_[0] >= 0);
ASSERT(pivot_[1] >= 0);

size_t size = dimensions_[0] * dimensions_[1];
ASSERT(0 < size);
ASSERT(longitudes_.size() == size);
ASSERT(latitudes_.size() == size);
ASSERT(flags_.size() == size);
auto n = static_cast<size_t>(dimensions_[0] & dimensions_[1]);
ASSERT(0 < n);

ASSERT(longitudes_.size() == n);
ASSERT(latitudes_.size() == n);
ASSERT(flags_.size() == n);


auto url = config.getString("url_prefix", "") + config.getString("url");
Expand Down
4 changes: 1 addition & 3 deletions src/eckit/geometry/grid/ORCA.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ class ORCA final : public Grid {

const area::BoundingBox& boundingBox() const override;

size_t size() const override {
return ni_ * nj_;
}
size_t size() const override { return ni() * nj(); }

bool includesNorthPole() const override { return true; }
bool includesSouthPole() const override { return true; } // FIXME: not sure this is semanticaly correct
Expand Down
1 change: 1 addition & 0 deletions src/eckit/geometry/grid/ReducedLL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <cmath>
#include <sstream>

#include "eckit/config/Configuration.h"
#include "eckit/geometry/Domain.h"
#include "eckit/geometry/Projection.h"
#include "eckit/types/FloatCompare.h"
Expand Down
1 change: 1 addition & 0 deletions src/eckit/geometry/grid/UnstructuredGrid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "eckit/geometry/grid/UnstructuredGrid.h"

#include "eckit/config/Configuration.h"
#include "eckit/exception/Exceptions.h"
#include "eckit/geometry/iterator/ListI.h"

Expand Down

0 comments on commit 2261835

Please sign in to comment.