Missing AWIPS Identifier Line in WMO header should not be treated as an error

This commit is contained in:
Dan Paulat 2025-04-06 23:05:18 -05:00
parent b117d2088a
commit 1bdfdcafad

View file

@ -228,6 +228,7 @@ bool WmoHeader::Parse(std::istream& is)
} }
} }
auto awipsLinePos = is.tellg();
util::getline(is, awipsLine); util::getline(is, awipsLine);
if (is.eof()) if (is.eof())
@ -322,8 +323,12 @@ bool WmoHeader::Parse(std::istream& is)
{ {
if (awipsLine.size() != kAwipsIdentifierLineLength_) if (awipsLine.size() != kAwipsIdentifierLineLength_)
{ {
logger_->warn("AWIPS Identifier Line bad size"); // Older products may be missing an AWIPS Identifier Line
headerValid = false; logger_->trace("AWIPS Identifier Line bad size");
is.seekg(awipsLinePos);
p->productCategory_ = "";
p->productDesignator_ = "";
} }
else else
{ {