Hello: as of now I have merged: https://github.com/OPM/opm-parser/pull/527 and all the accompanying PR's. The gist of this PR is adding a simple class ParseMode which essentially consists of a list of flags which regulate how the parser should behave when encountering errors and inconsistencies in the input, the flags regulate both the initial parsing: "inputfile -> Deck" and the EclipseState(deck) construction.
The current list of flags is here https://github.com/OPM/opm-parser/blob/master/opm/parser/eclipse/Parser/ParseMode.hpp - the intention is that it should be simple to add new flags, and when implementing (input related) things which can go wrong you are encouraged to add a flag here and handle the error situation accordingly. The intention when doing this work was not to change the current behavior in any way - just to add knobs which can be used to regulate the behavior, however as a side effect I found out that the parser was actually surprisingly relaxed when it comes to random text in the input file: VALID 1 2 3 / 4 5 6 / / And then some completely random text; not even close to resemble a valid keyword. KEYWORD '*' 1 2 3 / / Previously the parser would silently ignore the piece of ill formatted random text between the two valid keywords. The parser will now detect this random text, and consult the ParserMode::randomText setting to determine what to do. As a special case of random text like this is an extra dangling '/', these quite often occur at the end of a keyword which is not slash terminated. For instance the TSTEP keyword should have exactly one record, and not be slash terminated: TSTEP 10 10 10 / -- The one record is terminated with '/' -- The keyword as a whole is not terminated with a '/' However many occurrences of TSTEP e.g. in our test data was like: TSTEP 10 10 10 / / This extra '/' is then detected as 'randomText' - since this has been so common a special setting 'ParserMode::randomSlash was introduced. The default settings for all the ParserMode flags is strict: https://github.com/OPM/opm-parser/blob/master/opm/parser/eclipse/Parser/ParseMode.cpp - however the whole point of this exercise is that downstream consumers can regulate this themselves; for flow the ParserMode::randomSlash setting has been set to InputError::IGNORE. Except the Norne deck, which requires a relaxed setting of ParserMode::randomSlash - all testdata has been updated to validate at the strictest settings. In addition to adding more settings I guess we should at some stage add convenience functions to set a group of settings to a common value, and also it should be possible to manipulate the ParseMode attributes using the property system in flow - so that one can write something like: "flow --relaxed-schedule-section DECK.DATA" Joakim RDI project with IT elements -> Contact R&D Toolbox<https://statoil.service-now.com/selfservice/catalog_item_detail.do?sysparm_document_key=sc_cat_item,78bfbbce6fb455001f6446916e3ee453> ------------------------------------------------------------------- The information contained in this message may be CONFIDENTIAL and is intended for the addressee only. Any unauthorised use, dissemination of the information or copying of this message is prohibited. If you are not the addressee, please notify the sender immediately by return e-mail and delete this message. Thank you
_______________________________________________ Opm mailing list [email protected] http://www.opm-project.org/mailman/listinfo/opm
