mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#9913 Fix import of RFT pressure/depth
This commit is contained in:
parent
4953b6abad
commit
07a4c13dd4
@ -51,7 +51,8 @@ std::pair<std::vector<RigPressureDepthData>, QString> RifPressureDepthTextFileRe
|
||||
QString line = in.readLine();
|
||||
if ( isHeaderLine( line ) )
|
||||
{
|
||||
QStringList headerValues = RifFileParseTools::splitLineAndTrim( line, separator );
|
||||
bool skipEmptyParts = true;
|
||||
QStringList headerValues = RifFileParseTools::splitLineAndTrim( line, separator, skipEmptyParts );
|
||||
RigPressureDepthData data;
|
||||
data.setWellName( headerValues[1].replace( "'", "" ) );
|
||||
items.push_back( data );
|
||||
@ -125,7 +126,8 @@ bool RifPressureDepthTextFileReader::isUnitsLine( const QString& line )
|
||||
std::optional<std::pair<double, double>> RifPressureDepthTextFileReader::parseDataLine( const QString& line )
|
||||
{
|
||||
// Expect two data values separated by one space
|
||||
QStringList values = RifFileParseTools::splitLineAndTrim( line, " " );
|
||||
bool skipEmptyParts = true;
|
||||
QStringList values = RifFileParseTools::splitLineAndTrim( line, " ", skipEmptyParts );
|
||||
if ( values.size() != 2 ) return {};
|
||||
|
||||
// First value is pressure
|
||||
@ -146,7 +148,8 @@ std::optional<std::pair<double, double>> RifPressureDepthTextFileReader::parseDa
|
||||
std::optional<QDateTime> RifPressureDepthTextFileReader::parseDateLine( const QString& line )
|
||||
{
|
||||
// Expect two data values separated by one space
|
||||
QStringList values = RifFileParseTools::splitLineAndTrim( line, " " );
|
||||
bool skipEmptyParts = true;
|
||||
QStringList values = RifFileParseTools::splitLineAndTrim( line, " ", skipEmptyParts );
|
||||
if ( values.size() != 2 ) return {};
|
||||
|
||||
CAF_ASSERT( values[0] == "DATE" );
|
||||
|
@ -6,9 +6,9 @@ DATE 28-DEC-1995
|
||||
PRESSURE DEPTH
|
||||
BARSA METRES
|
||||
418.88 2726.91
|
||||
419.02 2729.36
|
||||
419.02 2729.36
|
||||
419.11 2733.29
|
||||
419.17 2735.26
|
||||
419.17 2735.26
|
||||
--
|
||||
WELLNAME 'G-14'
|
||||
DATE 28-DEC-1996
|
||||
@ -24,7 +24,7 @@ DATE 15-jan-12
|
||||
PRESSURE DEPTH
|
||||
BARSA METRES
|
||||
414.40 2911.029
|
||||
415.92 2929.496
|
||||
415.92 2929.496
|
||||
417.23 2935.801
|
||||
415.76 2934.981
|
||||
414.75 2919.446
|
||||
|
Loading…
Reference in New Issue
Block a user