OPM/opm-parser — pull request #73 by joakim-hove (2013-12-16 20:16:57+00:00)
Title: Apply units

This PR will apply units to the DeckDoubleItems - *if* the corresponding ParserDoubleItem has unit(s) specified. *If* the Parser/Deck item has units specified the method getSIDoble() can be used to get properly scaled data; if no dimension has been set getSIDouble() will throw. The alterantive method getRawDouble() can always be called safely.

The unit code works by applying (i.e. pushing) units to the onto the DeckItems as a final step after the parsing has completed - this is not pretty. The advantage of doing it like this is that

1. No special casing to detect the "METRIC / FIELD / PVT-M / LAB" keywords determining the unit system is necessary.
2. At the moment the units are applied we know for sure whether the default has been used in the Deck (i.e. it should have Metric units) or if the units specified in the deck should be applied.

Most keywords still do not have dimensions applied; only those used in the Schedule parsing.