Skip to content

Commit

Permalink
hotfix/4.14.2
Browse files Browse the repository at this point in the history
Merge in MAG/magics from develop to master

* commit 'ba612c99a681547d111e4088ddc722cfb77b0666':
  Hotfix/4.14.2 : Observation plotting [MAGP-1361]
  [MAGP-1361] : Add more support dor synop plotting
  • Loading branch information
sylvielamythepaut committed Aug 4, 2023
2 parents b71f6bc + ba612c9 commit 4a45cbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.14.1
4.14.2
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 4a45cbe

Please sign in to comment.