OPM/opm-parser — pull request #274 by atgeirr (2014-08-07 10:55:06+00:00)
Title: Correctly handle defaulted well reference depths

The current code will unconditionally read the reference depth from WELSPECS, even if it has beem defaulted, and use it to construct the Well object. This depth has no default, but defaulted fields will be accepted, and a value of 0 will be used for the default. The correct thing to do if defaulted is to set the depth to the depth of the first perforation. This is done in the WellsManager class of opm-core, but that code path is never taken.

With this patch, a new field is added to the Well class to store the defaulted status of the reference depth, and it is properly set from the Schedule. Tests are updated due to the extra constructor argument, and the WELSPECS test has been augmented to test for defaulted depth. The data file for that test has been changed as well, to make one of the wells use a default.

A companion PR in opm-core will be added to properly use the new information.