Skip to content

Commit

Permalink
MIR-682 less strict check (this wouldn't work for input Gaussian grid…
Browse files Browse the repository at this point in the history
…s, where the pl is global, and cropped)
  • Loading branch information
pmaciel committed Dec 13, 2024
1 parent 1fbfdd6 commit 91f6189
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mir/input/GribInput.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class ConditionNOT : public Condition {
*/


void wrongly_encoded_grib(const std::string& msg, bool forceThrow = false) {
void wrongly_encoded_grib(const std::string& msg) {
static bool abortIfWronglyEncodedGRIB = eckit::Resource<bool>("$MIR_ABORT_IF_WRONGLY_ENCODED_GRIB", false);

if (abortIfWronglyEncodedGRIB || forceThrow) {
Expand Down Expand Up @@ -735,9 +735,7 @@ data::MIRField GribInput::field() const {

if (auto pl_sum = static_cast<size_t>(std::accumulate(pl.begin(), pl.end(), 0L)); pl_sum != values.size()) {
wrongly_encoded_grib("GribInput: sum of pl array (" + std::to_string(pl_sum) +
") does not match the size of values array (" + std::to_string(values.size()) +
")",
true);
") does not match the size of values array (" + std::to_string(values.size()) + ")");
}

// NOTE: this fix ties with the method get(const std::string &name, std::vector<long> &value)
Expand Down

0 comments on commit 91f6189

Please sign in to comment.