mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Hack to be able to read synthetic odb related Eclipse cases
This commit is contained in:
parent
30fcbebc8e
commit
24fb7ac584
@ -73,7 +73,7 @@ void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector<Q
|
|||||||
// Get the number of occurrences of the DOUBHEAD keyword
|
// Get the number of occurrences of the DOUBHEAD keyword
|
||||||
int numDOUBHEAD = ecl_file_get_num_named_kw(ecl_file, DOUBHEAD_KW);
|
int numDOUBHEAD = ecl_file_get_num_named_kw(ecl_file, DOUBHEAD_KW);
|
||||||
|
|
||||||
CVF_ASSERT(numINTEHEAD == numDOUBHEAD);
|
//CVF_ASSERT(numINTEHEAD == numDOUBHEAD);
|
||||||
|
|
||||||
bool hasFractionOfDay = false;
|
bool hasFractionOfDay = false;
|
||||||
bool foundAllDayValues = false;
|
bool foundAllDayValues = false;
|
||||||
|
15
ThirdParty/Ert/devel/libecl/src/ecl_rsthead.c
vendored
15
ThirdParty/Ert/devel/libecl/src/ecl_rsthead.c
vendored
@ -46,8 +46,6 @@ double ecl_rsthead_get_sim_days( const ecl_rsthead_type * header ) {
|
|||||||
ecl_rsthead_type * ecl_rsthead_ialloc( const ecl_file_type * rst_file , int occurence) {
|
ecl_rsthead_type * ecl_rsthead_ialloc( const ecl_file_type * rst_file , int occurence) {
|
||||||
if (ecl_file_get_num_named_kw( rst_file , INTEHEAD_KW) > occurence) {
|
if (ecl_file_get_num_named_kw( rst_file , INTEHEAD_KW) > occurence) {
|
||||||
const ecl_kw_type * intehead_kw = ecl_file_iget_named_kw( rst_file , INTEHEAD_KW , occurence);
|
const ecl_kw_type * intehead_kw = ecl_file_iget_named_kw( rst_file , INTEHEAD_KW , occurence);
|
||||||
const ecl_kw_type * logihead_kw = ecl_file_iget_named_kw( rst_file , LOGIHEAD_KW , occurence);
|
|
||||||
const ecl_kw_type * doubhead_kw = ecl_file_iget_named_kw( rst_file , DOUBHEAD_KW , occurence);
|
|
||||||
|
|
||||||
ecl_rsthead_type * rsthead = util_malloc( sizeof * rsthead );
|
ecl_rsthead_type * rsthead = util_malloc( sizeof * rsthead );
|
||||||
|
|
||||||
@ -81,9 +79,16 @@ ecl_rsthead_type * ecl_rsthead_ialloc( const ecl_file_type * rst_file , int occu
|
|||||||
// The only derived quantity
|
// The only derived quantity
|
||||||
rsthead->sim_time = rsthead_date( rsthead->day , rsthead->month , rsthead->year );
|
rsthead->sim_time = rsthead_date( rsthead->day , rsthead->month , rsthead->year );
|
||||||
}
|
}
|
||||||
rsthead->dualp = ecl_kw_iget_bool( logihead_kw , LOGIHEAD_DUALP_INDEX);
|
|
||||||
rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX );
|
if ( ecl_file_get_num_named_kw(rst_file, LOGIHEAD_KW) > occurence
|
||||||
|
&& ecl_file_get_num_named_kw(rst_file, DOUBHEAD_KW) > occurence){
|
||||||
|
const ecl_kw_type * logihead_kw = ecl_file_iget_named_kw(rst_file, LOGIHEAD_KW, occurence);
|
||||||
|
const ecl_kw_type * doubhead_kw = ecl_file_iget_named_kw(rst_file, DOUBHEAD_KW, occurence);
|
||||||
|
|
||||||
|
rsthead->dualp = ecl_kw_iget_bool(logihead_kw, LOGIHEAD_DUALP_INDEX);
|
||||||
|
rsthead->sim_days = ecl_kw_iget_double(doubhead_kw, DOUBHEAD_DAYS_INDEX);
|
||||||
|
}
|
||||||
|
|
||||||
return rsthead;
|
return rsthead;
|
||||||
} else
|
} else
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user