Incomplete import of Restart data from 6X (#5767)

* #5763 Incomplete import of Restart data from 6X

6X simulator can report multiple keywords per time step. These additional keywords do not contain any data possible to import into ResInsight, but must be used when accessing the correct result keyword based on index in file.
This commit is contained in:
Magne Sjaastad
2020-04-06 12:15:28 +02:00
committed by Gaute Lindkvist
parent d26c736042
commit 42b0c1c357
10 changed files with 68 additions and 9 deletions

View File

@@ -122,7 +122,8 @@ void getDayMonthYear( const ecl_kw_type* intehead_kw, int* day, int* month, int*
//--------------------------------------------------------------------------------------------------
void RifEclipseOutputFileTools::timeSteps( const ecl_file_type* ecl_file,
std::vector<QDateTime>* timeSteps,
std::vector<double>* daysSinceSimulationStart )
std::vector<double>* daysSinceSimulationStart,
size_t* perTimeStepHeaderKeywordCount )
{
if ( !ecl_file ) return;
@@ -243,6 +244,16 @@ void RifEclipseOutputFileTools::timeSteps( const ecl_file_type* ecl_file,
daysSinceSimulationStart->push_back( dayDoubleValue );
}
}
if ( perTimeStepHeaderKeywordCount )
{
// 6X simulator can report more then one keyword block per time step. Report the total number of keywords per
// time steps to be able to read data from correct index
//
// See https://github.com/OPM/ResInsight/issues/5763
//
*perTimeStepHeaderKeywordCount = numINTEHEAD / timeSteps->size();
}
}
//--------------------------------------------------------------------------------------------------