mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-05 21:53:27 -06:00
Reapplied fix for synthetic Odb files
This commit is contained in:
parent
da76b01611
commit
98683944b7
@ -86,7 +86,8 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ
|
||||
// The only derived quantity
|
||||
rsthead->sim_time = rsthead_date( rsthead->day , rsthead->month , rsthead->year );
|
||||
}
|
||||
rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX );
|
||||
if (doubhead_kw)
|
||||
rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX );
|
||||
if (logihead_kw)
|
||||
rsthead->dualp = ecl_kw_iget_bool( logihead_kw , LOGIHEAD_DUALP_INDEX);
|
||||
|
||||
@ -97,12 +98,16 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ
|
||||
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) {
|
||||
const ecl_kw_type * intehead_kw = ecl_file_iget_named_kw( rst_file , INTEHEAD_KW , occurence);
|
||||
const ecl_kw_type * doubhead_kw = ecl_file_iget_named_kw( rst_file , DOUBHEAD_KW , occurence);
|
||||
const ecl_kw_type * doubhead_kw = NULL;
|
||||
const ecl_kw_type * logihead_kw = NULL;
|
||||
int report_step;
|
||||
if (ecl_file_get_num_named_kw(rst_file, LOGIHEAD_KW) > occurence)
|
||||
logihead_kw = ecl_file_iget_named_kw( rst_file , LOGIHEAD_KW , occurence);
|
||||
|
||||
if (ecl_file_get_num_named_kw(rst_file, DOUBHEAD_KW) > occurence) {
|
||||
doubhead_kw = ecl_file_iget_named_kw(rst_file, DOUBHEAD_KW, occurence);
|
||||
}
|
||||
|
||||
if (ecl_file_get_num_named_kw( rst_file , SEQNUM_KW) > occurence) {
|
||||
const ecl_kw_type * seqnum_kw = ecl_file_iget_named_kw( rst_file , SEQNUM_KW , occurence );
|
||||
report_step = ecl_kw_iget_int( seqnum_kw , 0);
|
||||
|
Loading…
Reference in New Issue
Block a user