Skip to content

Commit

Permalink
[MAGP-1361] : Add more support dor synop plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvielamythepaut committed Aug 2, 2023
1 parent e77d55b commit fd67672
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/decoders/ObsDecoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ BufrIdentifiers::BufrIdentifiers(int centre) : centre_(centre) {
// Open the default template for 98!
// and send a big warning!
in = fopen(deffile.str().c_str(), "r");
MagLog::warning() << "No definition file for [" << centre << "]: We use ECMWF definitions " << endl;
MagLog::warning() << "No local definition file for [" << centre << "]: We use ECMWF definitions " << endl;

if (MagicsGlobal::strict()) {
throw CannotOpenFile(deffile.str());
Expand Down Expand Up @@ -293,8 +293,6 @@ class BufrAccessor {
BufrAccessor(const string& descriptor) : descriptor_(descriptor) {
init();
auto token = translator_.find(descriptor_);
if (token == translator_.end())
MagLog::warning() << "Could not find eccodes key for " << descriptor_ << endl;
eccodes_ = (token == translator_.end()) ? descriptor_ : token->second;
}
virtual ~BufrAccessor(){};
Expand Down Expand Up @@ -461,7 +459,7 @@ class BufrMultiLevelAccessor : public BufrAccessor {
void operator()(const ObsDecoder& decoder, MvObs& obs, double& val) const {
const BufrIdentifiers& table = BufrIdentTable::get(obs.originatingCentre());
int type = obs.messageType();

map<int, bool>::const_iterator multilevel = multilevels_.find(type);
if (multilevel == multilevels_.end()) {
MagLog::warning() << "BufrMultiLevelAccessor> Unknown observation type [" << val << "]\n";
Expand All @@ -470,6 +468,10 @@ class BufrMultiLevelAccessor : public BufrAccessor {
if (type == 0 || type == 1) {
// surface data
val = obs.value(surface_);
if ( val == kBufrMissingValue ) {
// Trying the descriptor for multilevel: some centres are using it for surface.
val = obs.value(altitude_);
}
}
else {
// MagLog::dev()<< " look for --->" << table.ident(altitude_) << " at " << decoder.getLevel();
Expand Down

0 comments on commit fd67672

Please sign in to comment.