From 2862de63a60219ca55e454b06952216fe2594df2 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 8 May 2024 11:17:37 +0200 Subject: [PATCH] Add GRUPTREE and WELSPECS to avoid parser error --- .../ProjectDataModel/RiaOpmParserTools.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/RiaOpmParserTools.cpp b/ApplicationLibCode/ProjectDataModel/RiaOpmParserTools.cpp index a3e9ae0476..36b08bac54 100644 --- a/ApplicationLibCode/ProjectDataModel/RiaOpmParserTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/RiaOpmParserTools.cpp @@ -29,6 +29,7 @@ #include "opm/input/eclipse/Deck/Deck.hpp" #include "opm/input/eclipse/Parser/ParseContext.hpp" #include "opm/input/eclipse/Parser/Parser.hpp" +#include "opm/input/eclipse/Parser/ParserKeywords/G.hpp" #include "opm/input/eclipse/Parser/ParserKeywords/I.hpp" #include "opm/input/eclipse/Parser/ParserKeywords/P.hpp" #include "opm/input/eclipse/Parser/ParserKeywords/T.hpp" @@ -186,12 +187,15 @@ std::pair, std::vector> extract { Opm::Parser parser( false ); - // Required to include the TUNING keyword to avoid parsing error of a Norne DATA file containing the TUNING keyword - // The TUNING keyword is not required nor related to VFP data + // Required to include the some keywords not related or required for VFP data to avoid paring errors causing data to be skipped. + // TUNING caused error in a Norne model + // GRUPTREE, WELSPECS caused error in an unknown models std::vector parserKeywords = { Opm::ParserKeywords::VFPPROD(), Opm::ParserKeywords::VFPINJ(), Opm::ParserKeywords::INCLUDE(), - Opm::ParserKeywords::TUNING() }; + Opm::ParserKeywords::TUNING(), + Opm::ParserKeywords::GRUPTREE(), + Opm::ParserKeywords::WELSPECS() }; for ( const auto& kw : parserKeywords ) { parser.addParserKeyword( kw );