We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 940cbff commit d03d756Copy full SHA for d03d756
src/multio/action/encode/GribEncoder.cc
@@ -819,7 +819,9 @@ void GribEncoder::setOceanMetadata(message::Metadata& md) {
819
setValue(glossary().paramId, paramInt + 4000);
820
}
821
else {
822
- setValue(glossary().paramId, paramInt + ops_to_code.at(md.get<std::string>(glossary().operation)));
+ const auto operation = md.getOpt<std::string>(glossary().operation);
823
+ const auto paramIdIncrement = operation ? ops_to_code.at(*operation) : 0;
824
+ setValue(glossary().paramId, paramInt + paramIdIncrement);
825
826
827
const auto& typeOfLevel = md.get<std::string>(glossary().typeOfLevel);
0 commit comments