ecl_sum.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'ecl_sum.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ERT_ECL_SUM_H
20#define ERT_ECL_SUM_H
21
22#include <stdlib.h>
23#include <stdbool.h>
24#include <time.h>
25
27#include <ert/util/time_t_vector.hpp>
28#include <ert/util/double_vector.hpp>
29
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38 typedef struct {
39 char * locale;
40 const char * sep;
41 const char * newline;
42 const char * value_fmt;
43 const char * date_fmt;
44 const char * days_fmt;
45 const char * header_fmt;
48 const char * date_header;
49 const char * date_dash;
50 const char * value_dash;
52
53
54 /*****************************************************************/
55 /* This is a forward declaration. */
56typedef struct ecl_sum_vector_struct ecl_sum_vector_type;
57
58typedef struct ecl_sum_struct ecl_sum_type;
59
61 double ecl_sum_get_from_sim_time( const ecl_sum_type * ecl_sum , time_t sim_time , const ecl::smspec_node * node);
62 double ecl_sum_get_from_sim_days( const ecl_sum_type * ecl_sum , double sim_days , const ecl::smspec_node * node);
63 double ecl_sum_time2days( const ecl_sum_type * ecl_sum , time_t sim_time);
64
65 void ecl_sum_set_unified( ecl_sum_type * ecl_sum , bool unified );
66 void ecl_sum_set_fmt_case( ecl_sum_type * ecl_sum , bool fmt_case );
67
68 int ecl_sum_get_report_step_from_time( const ecl_sum_type * sum , time_t sim_time);
69 int ecl_sum_get_report_step_from_days( const ecl_sum_type * sum , double sim_days);
70 bool ecl_sum_check_sim_time( const ecl_sum_type * sum , time_t sim_time);
71 bool ecl_sum_check_sim_days( const ecl_sum_type * sum , double sim_days);
72 const char * ecl_sum_get_keyword( const ecl_sum_type * sum , const char * gen_key );
73 const char * ecl_sum_get_wgname( const ecl_sum_type * sum , const char * gen_key );
74 const char * ecl_sum_get_unit( const ecl_sum_type * sum , const char * gen_key );
75 int ecl_sum_get_num( const ecl_sum_type * sum , const char * gen_key );
76
77 double ecl_sum_iget( const ecl_sum_type * ecl_sum , int time_index , int param_index);
78 int ecl_sum_iget_num( const ecl_sum_type * sum , int param_index );
79 const char * ecl_sum_iget_wgname( const ecl_sum_type * sum , int param_index );
80 const char * ecl_sum_iget_keyword( const ecl_sum_type * sum , int param_index );
81 int ecl_sum_get_data_length( const ecl_sum_type * ecl_sum );
82 double ecl_sum_iget_from_sim_time( const ecl_sum_type * ecl_sum , time_t sim_time , int param_index);
83 double ecl_sum_iget_from_sim_days( const ecl_sum_type * ecl_sum , double sim_days , int param_index );
84
85
86
87 void ecl_sum_summarize( const ecl_sum_type * ecl_sum , FILE * stream );
88 bool ecl_sum_general_is_total(const ecl_sum_type * ecl_sum , const char * gen_key);
90 void ecl_sum_free__(void * );
92 ecl_sum_type * ecl_sum_fread_alloc(const char * , const stringlist_type * data_files, const char * key_join_string, bool include_restart, bool lazy_load, int file_options);
93 ecl_sum_type * ecl_sum_fread_alloc_case(const char * , const char * key_join_string);
94 ecl_sum_type * ecl_sum_fread_alloc_case__(const char * input_file , const char * key_join_string , bool include_restart);
95 ecl_sum_type * ecl_sum_fread_alloc_case2__(const char * , const char * key_join_string , bool include_restart, bool lazy_load, int file_options);
96 ecl_sum_type * ecl_sum_alloc_resample(const ecl_sum_type * ecl_sum, const char * ecl_case, const time_t_vector_type * times, bool lower_extrapolation, bool upper_extrapolation);
97 bool ecl_sum_case_exists( const char * input_file );
98
99 /* Accessor functions : */
100 double ecl_sum_get_well_var(const ecl_sum_type * ecl_sum , int time_index , const char * well , const char *var);
101 bool ecl_sum_has_well_var(const ecl_sum_type * ecl_sum , const char * well , const char *var);
102 double ecl_sum_get_well_var_from_sim_days( const ecl_sum_type * ecl_sum , double sim_days , const char * well , const char * var);
103 double ecl_sum_get_well_var_from_sim_time( const ecl_sum_type * ecl_sum , time_t sim_time , const char * well , const char * var);
104
105 double ecl_sum_get_group_var(const ecl_sum_type * ecl_sum , int time_index , const char * group , const char *var);
106 bool ecl_sum_has_group_var(const ecl_sum_type * ecl_sum , const char * group , const char *var);
107
108 double ecl_sum_get_field_var(const ecl_sum_type * ecl_sum , int time_index , const char *var);
109 bool ecl_sum_has_field_var(const ecl_sum_type * ecl_sum , const char *var);
110 double ecl_sum_get_field_var_from_sim_days( const ecl_sum_type * ecl_sum , double sim_days , const char * var);
111 double ecl_sum_get_field_var_from_sim_time( const ecl_sum_type * ecl_sum , time_t sim_time , const char * var);
112
113 double ecl_sum_get_block_var(const ecl_sum_type * ecl_sum , int time_index , const char * block_var , int block_nr);
114 int ecl_sum_get_block_var_index(const ecl_sum_type * ecl_sum , const char * block_var , int block_nr);
115 bool ecl_sum_has_block_var(const ecl_sum_type * ecl_sum , const char * block_var , int block_nr);
116 double ecl_sum_get_block_var_ijk(const ecl_sum_type * ecl_sum , int time_index , const char * block_var , int i , int j , int k);
117 int ecl_sum_get_block_var_index_ijk(const ecl_sum_type * ecl_sum , const char * block_var , int i , int j , int k);
118 bool ecl_sum_has_block_var_ijk(const ecl_sum_type * ecl_sum , const char * block_var , int i , int j , int k);
119
120 double ecl_sum_get_region_var(const ecl_sum_type * ecl_sum , int time_index , const char *var , int region_nr);
121 bool ecl_sum_has_region_var(const ecl_sum_type * ecl_sum , const char *var , int region_nr);
122
123 double ecl_sum_get_misc_var(const ecl_sum_type * ecl_sum , int time_index , const char *var);
124 int ecl_sum_get_misc_var_index(const ecl_sum_type * ecl_sum , const char *var);
125 bool ecl_sum_has_misc_var(const ecl_sum_type * ecl_sum , const char *var);
126
127 double ecl_sum_get_well_completion_var(const ecl_sum_type * ecl_sum , int time_index , const char * well , const char *var, int cell_nr);
128 int ecl_sum_get_well_completion_var_index(const ecl_sum_type * ecl_sum , const char * well , const char *var, int cell_nr);
129 bool ecl_sum_has_well_completion_var(const ecl_sum_type * ecl_sum , const char * well , const char *var, int cell_nr);
130
131 double ecl_sum_get_general_var(const ecl_sum_type * ecl_sum , int time_index , const char * lookup_kw);
132 int ecl_sum_get_general_var_params_index(const ecl_sum_type * ecl_sum , const char * lookup_kw);
133 const ecl::smspec_node * ecl_sum_get_general_var_node(const ecl_sum_type * ecl_sum , const char * lookup_kw);
134 bool ecl_sum_has_general_var(const ecl_sum_type * ecl_sum , const char * lookup_kw);
135 bool ecl_sum_has_key(const ecl_sum_type * ecl_sum , const char * lookup_kw);
136 double ecl_sum_get_general_var_from_sim_days( const ecl_sum_type * ecl_sum , double sim_days , const char * var);
137 double ecl_sum_get_general_var_from_sim_time( const ecl_sum_type * ecl_sum , time_t sim_time , const char * var);
138 const char * ecl_sum_get_general_var_unit( const ecl_sum_type * ecl_sum , const char * var);
140
141 /***************/
142 void ecl_sum_fprintf(const ecl_sum_type * , FILE * , const stringlist_type * , bool report_only , const ecl_sum_fmt_type * fmt);
143
144
145
146
147 /* Time related functions */
149 int ecl_sum_get_first_gt( const ecl_sum_type * ecl_sum , int param_index , double limit);
150 int ecl_sum_get_first_lt( const ecl_sum_type * ecl_sum , int param_index , double limit);
153 bool ecl_sum_has_report_step(const ecl_sum_type * ecl_sum , int report_step );
154 time_t ecl_sum_get_report_time( const ecl_sum_type * ecl_sum , int report_step );
155 time_t ecl_sum_iget_sim_time( const ecl_sum_type * ecl_sum , int index );
156 double ecl_sum_iget_sim_days( const ecl_sum_type * ecl_sum , int time_index);
157 int ecl_sum_iget_report_step( const ecl_sum_type * ecl_sum , int internal_index );
158 double ecl_sum_iget_general_var(const ecl_sum_type * ecl_sum , int internal_index , const char * lookup_kw);
159
160
161 double_vector_type * ecl_sum_alloc_data_vector( const ecl_sum_type * ecl_sum , int data_index , bool report_only);
162 time_t_vector_type * ecl_sum_alloc_time_vector( const ecl_sum_type * ecl_sum , bool report_only);
163 time_t ecl_sum_get_data_start( const ecl_sum_type * ecl_sum );
164 time_t ecl_sum_get_end_time( const ecl_sum_type * ecl_sum);
166
167 const char * ecl_sum_get_base(const ecl_sum_type * ecl_sum );
168 const char * ecl_sum_get_path(const ecl_sum_type * ecl_sum );
169 const char * ecl_sum_get_abs_path(const ecl_sum_type * ecl_sum );
171 const char * ecl_sum_get_case(const ecl_sum_type * );
172 bool ecl_sum_same_case( const ecl_sum_type * ecl_sum , const char * input_file );
173
175 const double_vector_type * sim_days ,
176 double_vector_type * value ,
177 const char * gen_key);
179 const time_t_vector_type * sim_time ,
180 double_vector_type * value ,
181 const char * gen_key);
182 time_t ecl_sum_time_from_days( const ecl_sum_type * ecl_sum , double sim_days );
183 double ecl_sum_days_from_time( const ecl_sum_type * ecl_sum , time_t sim_time );
184 double ecl_sum_get_sim_length( const ecl_sum_type * ecl_sum ) ;
185 double ecl_sum_get_first_day( const ecl_sum_type * ecl_sum );
186
187 /*****************************************************************/
188 stringlist_type * ecl_sum_alloc_well_list( const ecl_sum_type * ecl_sum , const char * pattern);
189 stringlist_type * ecl_sum_alloc_group_list( const ecl_sum_type * ecl_sum , const char * pattern);
192 void ecl_sum_select_matching_general_var_list( const ecl_sum_type * ecl_sum , const char * pattern , stringlist_type * keys);
195 ecl_smspec_var_type ecl_sum_get_var_type( const ecl_sum_type * ecl_sum , const char * gen_key);
196 bool ecl_sum_var_is_rate( const ecl_sum_type * ecl_sum , const char * gen_key);
197 bool ecl_sum_var_is_total( const ecl_sum_type * ecl_sum , const char * gen_key);
198
199 int ecl_sum_iget_report_end( const ecl_sum_type * ecl_sum , int report_step );
201 const char * restart_case,
202 int restart_step,
203 bool fmt_output,
204 bool unified,
205 const char * key_join_string,
206 time_t sim_start,
207 bool time_in_days,
208 int nx,
209 int ny,
210 int nz);
211 void ecl_sum_set_case( ecl_sum_type * ecl_sum , const char * input_arg);
212
214 const char * restart_case ,
215 bool fmt_output ,
216 bool unified ,
217 const char * key_join_string ,
218 time_t sim_start ,
219 bool time_in_days ,
220 int nx ,
221 int ny ,
222 int nz);
223 ecl_sum_type * ecl_sum_alloc_writer(const char * ecl_case ,
224 bool fmt_output ,
225 bool unified ,
226 const char * key_join_string ,
227 time_t sim_start ,
228 bool time_in_days ,
229 int nx , int ny , int nz);
230 void ecl_sum_fwrite( const ecl_sum_type * ecl_sum );
231 bool ecl_sum_can_write( const ecl_sum_type * ecl_sum );
232 void ecl_sum_fwrite_smspec( const ecl_sum_type * ecl_sum );
235 const char * keyword ,
236 const char * wgname ,
237 int num ,
238 const char * unit ,
239 float default_value);
240 ecl_sum_tstep_type * ecl_sum_add_tstep( ecl_sum_type * ecl_sum , int report_step , double sim_seconds);
241
242 bool ecl_sum_is_oil_producer( const ecl_sum_type * ecl_sum , const char * well);
243 char * ecl_sum_alloc_well_key( const ecl_sum_type * ecl_sum , const char * keyword , const char * wgname);
244 bool ecl_sum_report_step_equal( const ecl_sum_type * ecl_sum1 , const ecl_sum_type * ecl_sum2);
245 bool ecl_sum_report_step_compatible( const ecl_sum_type * ecl_sum1 , const ecl_sum_type * ecl_sum2);
246 void ecl_sum_export_csv(const ecl_sum_type * ecl_sum ,
247 const char * filename ,
248 const stringlist_type * var_list ,
249 const char * date_format ,
250 const char * sep);
251
252
253 double_vector_type * ecl_sum_alloc_seconds_solution( const ecl_sum_type * ecl_sum , const char * gen_key , double cmp_value , bool rates_clamp_lower);
254 double_vector_type * ecl_sum_alloc_days_solution( const ecl_sum_type * ecl_sum , const char * gen_key , double cmp_value , bool rates_clamp_lower);
255 time_t_vector_type * ecl_sum_alloc_time_solution( const ecl_sum_type * ecl_sum , const char * gen_key , double cmp_value , bool rates_clamp_lower);
256
257 double ecl_sum_iget_last_value(const ecl_sum_type * ecl_sum, int param_index);
258 double ecl_sum_get_last_value_gen_key(const ecl_sum_type * ecl_sum, const char * gen_key);
259 double ecl_sum_get_last_value_node(const ecl_sum_type * ecl_sum, const ecl::smspec_node *node);
260 double ecl_sum_iget_first_value(const ecl_sum_type * ecl_sum, int param_index);
261 double ecl_sum_get_first_value_gen_key(const ecl_sum_type * ecl_sum, const char * gen_key);
262 double ecl_sum_get_first_value_node(const ecl_sum_type * ecl_sum, const ecl::smspec_node *node);
263
264 void ecl_sum_init_datetime64_vector(const ecl_sum_type * ecl_sum, int64_t * data, int multiplier);
265 void ecl_sum_init_double_vector_interp(const ecl_sum_type * ecl_sum, const char * gen_key, const time_t_vector_type * time_points, double * data);
266 void ecl_sum_init_double_vector(const ecl_sum_type * ecl_sum, const char * gen_key, double * data);
267 void ecl_sum_init_double_frame(const ecl_sum_type * ecl_sum, const ecl_sum_vector_type * keywords, double * data);
268 void ecl_sum_init_double_frame_interp(const ecl_sum_type * ecl_sum, const ecl_sum_vector_type * keywords, const time_t_vector_type * time_points, double * data);
270
271#ifdef __cplusplus
272}
273#endif
274#endif
int index
Definition: cJSON.h:168
int cJSON_bool fmt
Definition: cJSON.h:158
Definition: smspec_node.hpp:36
struct ecl_smspec_struct ecl_smspec_type
Definition: ecl_smspec.hpp:32
const char * ecl_sum_get_keyword(const ecl_sum_type *sum, const char *gen_key)
double ecl_sum_get_field_var_from_sim_time(const ecl_sum_type *ecl_sum, time_t sim_time, const char *var)
time_t ecl_sum_iget_sim_time(const ecl_sum_type *ecl_sum, int index)
void ecl_sum_resample_from_sim_days(const ecl_sum_type *ecl_sum, const double_vector_type *sim_days, double_vector_type *value, const char *gen_key)
void ecl_sum_summarize(const ecl_sum_type *ecl_sum, FILE *stream)
int ecl_sum_get_first_report_step(const ecl_sum_type *ecl_sum)
time_t_vector_type * ecl_sum_alloc_time_vector(const ecl_sum_type *ecl_sum, bool report_only)
double_vector_type * ecl_sum_alloc_days_solution(const ecl_sum_type *ecl_sum, const char *gen_key, double cmp_value, bool rates_clamp_lower)
stringlist_type * ecl_sum_alloc_well_var_list(const ecl_sum_type *ecl_sum)
ecl_sum_type * ecl_sum_alloc_writer(const char *ecl_case, bool fmt_output, bool unified, const char *key_join_string, time_t sim_start, bool time_in_days, int nx, int ny, int nz)
double ecl_sum_get_from_sim_time(const ecl_sum_type *ecl_sum, time_t sim_time, const ecl::smspec_node *node)
time_t ecl_sum_get_start_time(const ecl_sum_type *)
void ecl_sum_init_double_vector_interp(const ecl_sum_type *ecl_sum, const char *gen_key, const time_t_vector_type *time_points, double *data)
double ecl_sum_iget_first_value(const ecl_sum_type *ecl_sum, int param_index)
bool ecl_sum_can_write(const ecl_sum_type *ecl_sum)
bool ecl_sum_report_step_compatible(const ecl_sum_type *ecl_sum1, const ecl_sum_type *ecl_sum2)
const char * ecl_sum_get_unit(const ecl_sum_type *sum, const char *gen_key)
double_vector_type * ecl_sum_alloc_data_vector(const ecl_sum_type *ecl_sum, int data_index, bool report_only)
struct ecl_sum_vector_struct ecl_sum_vector_type
Definition: ecl_sum.hpp:56
bool ecl_sum_has_group_var(const ecl_sum_type *ecl_sum, const char *group, const char *var)
void ecl_sum_set_case(ecl_sum_type *ecl_sum, const char *input_arg)
time_t ecl_sum_get_report_time(const ecl_sum_type *ecl_sum, int report_step)
double ecl_sum_time2days(const ecl_sum_type *ecl_sum, time_t sim_time)
bool ecl_sum_is_oil_producer(const ecl_sum_type *ecl_sum, const char *well)
UTIL_IS_INSTANCE_HEADER(ecl_sum)
int ecl_sum_get_data_length(const ecl_sum_type *ecl_sum)
int ecl_sum_get_general_var_params_index(const ecl_sum_type *ecl_sum, const char *lookup_kw)
void ecl_sum_export_csv(const ecl_sum_type *ecl_sum, const char *filename, const stringlist_type *var_list, const char *date_format, const char *sep)
double ecl_sum_get_well_var_from_sim_days(const ecl_sum_type *ecl_sum, double sim_days, const char *well, const char *var)
int ecl_sum_iget_num(const ecl_sum_type *sum, int param_index)
ecl_smspec_type * ecl_sum_get_smspec(const ecl_sum_type *ecl_sum)
void ecl_sum_init_double_frame(const ecl_sum_type *ecl_sum, const ecl_sum_vector_type *keywords, double *data)
double ecl_sum_get_block_var(const ecl_sum_type *ecl_sum, int time_index, const char *block_var, int block_nr)
const ecl::smspec_node * ecl_sum_get_general_var_node(const ecl_sum_type *ecl_sum, const char *lookup_kw)
bool ecl_sum_has_field_var(const ecl_sum_type *ecl_sum, const char *var)
void ecl_sum_fwrite_smspec(const ecl_sum_type *ecl_sum)
void ecl_sum_free(ecl_sum_type *)
const char * ecl_sum_get_case(const ecl_sum_type *)
const char * ecl_sum_get_base(const ecl_sum_type *ecl_sum)
int ecl_sum_iget_report_step(const ecl_sum_type *ecl_sum, int internal_index)
bool ecl_sum_has_key(const ecl_sum_type *ecl_sum, const char *lookup_kw)
void ecl_sum_resample_from_sim_time(const ecl_sum_type *ecl_sum, const time_t_vector_type *sim_time, double_vector_type *value, const char *gen_key)
int ecl_sum_get_block_var_index(const ecl_sum_type *ecl_sum, const char *block_var, int block_nr)
time_t_vector_type * ecl_sum_alloc_time_solution(const ecl_sum_type *ecl_sum, const char *gen_key, double cmp_value, bool rates_clamp_lower)
int ecl_sum_get_last_report_step(const ecl_sum_type *ecl_sum)
double ecl_sum_iget_from_sim_time(const ecl_sum_type *ecl_sum, time_t sim_time, int param_index)
double ecl_sum_get_field_var_from_sim_days(const ecl_sum_type *ecl_sum, double sim_days, const char *var)
ecl_sum_type * ecl_sum_fread_alloc(const char *, const stringlist_type *data_files, const char *key_join_string, bool include_restart, bool lazy_load, int file_options)
double ecl_sum_get_block_var_ijk(const ecl_sum_type *ecl_sum, int time_index, const char *block_var, int i, int j, int k)
ecl_smspec_var_type ecl_sum_get_var_type(const ecl_sum_type *ecl_sum, const char *gen_key)
void ecl_sum_set_fmt_case(ecl_sum_type *ecl_sum, bool fmt_case)
int ecl_sum_get_report_step_from_time(const ecl_sum_type *sum, time_t sim_time)
double ecl_sum_iget_last_value(const ecl_sum_type *ecl_sum, int param_index)
double_vector_type * ecl_sum_alloc_seconds_solution(const ecl_sum_type *ecl_sum, const char *gen_key, double cmp_value, bool rates_clamp_lower)
bool ecl_sum_has_block_var(const ecl_sum_type *ecl_sum, const char *block_var, int block_nr)
void ecl_sum_fmt_init_summary_x(const ecl_sum_type *ecl_sum, ecl_sum_fmt_type *fmt)
int ecl_sum_get_restart_step(const ecl_sum_type *ecl_sum)
void ecl_sum_init_datetime64_vector(const ecl_sum_type *ecl_sum, int64_t *data, int multiplier)
bool ecl_sum_has_block_var_ijk(const ecl_sum_type *ecl_sum, const char *block_var, int i, int j, int k)
int ecl_sum_get_report_step_from_days(const ecl_sum_type *sum, double sim_days)
const char * ecl_sum_get_wgname(const ecl_sum_type *sum, const char *gen_key)
bool ecl_sum_var_is_total(const ecl_sum_type *ecl_sum, const char *gen_key)
double ecl_sum_get_first_value_node(const ecl_sum_type *ecl_sum, const ecl::smspec_node *node)
ecl_sum_type * ecl_sum_fread_alloc_case(const char *, const char *key_join_string)
double ecl_sum_get_general_var(const ecl_sum_type *ecl_sum, int time_index, const char *lookup_kw)
stringlist_type * ecl_sum_alloc_group_list(const ecl_sum_type *ecl_sum, const char *pattern)
bool ecl_sum_has_misc_var(const ecl_sum_type *ecl_sum, const char *var)
stringlist_type * ecl_sum_alloc_matching_general_var_list(const ecl_sum_type *ecl_sum, const char *pattern)
ecl_smspec_var_type ecl_sum_identify_var_type(const char *var)
double ecl_sum_days_from_time(const ecl_sum_type *ecl_sum, time_t sim_time)
int ecl_sum_get_first_lt(const ecl_sum_type *ecl_sum, int param_index, double limit)
const char * ecl_sum_get_abs_path(const ecl_sum_type *ecl_sum)
const ecl_sum_type * ecl_sum_get_restart_case(const ecl_sum_type *ecl_sum)
ecl_sum_type * ecl_sum_fread_alloc_case2__(const char *, const char *key_join_string, bool include_restart, bool lazy_load, int file_options)
int ecl_sum_get_num(const ecl_sum_type *sum, const char *gen_key)
void ecl_sum_fwrite(const ecl_sum_type *ecl_sum)
bool ecl_sum_has_report_step(const ecl_sum_type *ecl_sum, int report_step)
bool ecl_sum_check_sim_time(const ecl_sum_type *sum, time_t sim_time)
const char * ecl_sum_iget_keyword(const ecl_sum_type *sum, int param_index)
const char * ecl_sum_get_general_var_unit(const ecl_sum_type *ecl_sum, const char *var)
double ecl_sum_get_sim_length(const ecl_sum_type *ecl_sum)
bool ecl_sum_var_is_rate(const ecl_sum_type *ecl_sum, const char *gen_key)
double ecl_sum_get_field_var(const ecl_sum_type *ecl_sum, int time_index, const char *var)
bool ecl_sum_has_general_var(const ecl_sum_type *ecl_sum, const char *lookup_kw)
ecl_sum_type * ecl_sum_fread_alloc_case__(const char *input_file, const char *key_join_string, bool include_restart)
int ecl_sum_get_first_gt(const ecl_sum_type *ecl_sum, int param_index, double limit)
double ecl_sum_get_from_sim_days(const ecl_sum_type *ecl_sum, double sim_days, const ecl::smspec_node *node)
void ecl_sum_select_matching_general_var_list(const ecl_sum_type *ecl_sum, const char *pattern, stringlist_type *keys)
void ecl_sum_fprintf(const ecl_sum_type *, FILE *, const stringlist_type *, bool report_only, const ecl_sum_fmt_type *fmt)
double ecl_sum_get_last_value_gen_key(const ecl_sum_type *ecl_sum, const char *gen_key)
ecl_sum_type * ecl_sum_alloc_resample(const ecl_sum_type *ecl_sum, const char *ecl_case, const time_t_vector_type *times, bool lower_extrapolation, bool upper_extrapolation)
time_t ecl_sum_time_from_days(const ecl_sum_type *ecl_sum, double sim_days)
double ecl_sum_get_last_value_node(const ecl_sum_type *ecl_sum, const ecl::smspec_node *node)
char * ecl_sum_alloc_well_key(const ecl_sum_type *ecl_sum, const char *keyword, const char *wgname)
ecl_sum_type * ecl_sum_alloc_restart_writer2(const char *ecl_case, const char *restart_case, int restart_step, bool fmt_output, bool unified, const char *key_join_string, time_t sim_start, bool time_in_days, int nx, int ny, int nz)
double ecl_sum_get_general_var_from_sim_days(const ecl_sum_type *ecl_sum, double sim_days, const char *var)
bool ecl_sum_has_region_var(const ecl_sum_type *ecl_sum, const char *var, int region_nr)
void ecl_sum_free_data(ecl_sum_type *)
double ecl_sum_get_first_day(const ecl_sum_type *ecl_sum)
bool ecl_sum_has_well_completion_var(const ecl_sum_type *ecl_sum, const char *well, const char *var, int cell_nr)
const ecl::smspec_node * ecl_sum_add_var(ecl_sum_type *ecl_sum, const char *keyword, const char *wgname, int num, const char *unit, float default_value)
double ecl_sum_iget_from_sim_days(const ecl_sum_type *ecl_sum, double sim_days, int param_index)
double ecl_sum_iget(const ecl_sum_type *ecl_sum, int time_index, int param_index)
time_t ecl_sum_get_end_time(const ecl_sum_type *ecl_sum)
double ecl_sum_iget_sim_days(const ecl_sum_type *ecl_sum, int time_index)
double ecl_sum_get_general_var_from_sim_time(const ecl_sum_type *ecl_sum, time_t sim_time, const char *var)
int ecl_sum_get_well_completion_var_index(const ecl_sum_type *ecl_sum, const char *well, const char *var, int cell_nr)
double ecl_sum_get_well_var(const ecl_sum_type *ecl_sum, int time_index, const char *well, const char *var)
void ecl_sum_init_double_vector(const ecl_sum_type *ecl_sum, const char *gen_key, double *data)
ecl_sum_tstep_type * ecl_sum_add_tstep(ecl_sum_type *ecl_sum, int report_step, double sim_seconds)
const ecl::smspec_node * ecl_sum_add_smspec_node(ecl_sum_type *ecl_sum, const ecl::smspec_node *node)
bool ecl_sum_report_step_equal(const ecl_sum_type *ecl_sum1, const ecl_sum_type *ecl_sum2)
bool ecl_sum_check_sim_days(const ecl_sum_type *sum, double sim_days)
bool ecl_sum_general_is_total(const ecl_sum_type *ecl_sum, const char *gen_key)
double ecl_sum_get_region_var(const ecl_sum_type *ecl_sum, int time_index, const char *var, int region_nr)
const char * ecl_sum_get_path(const ecl_sum_type *ecl_sum)
stringlist_type * ecl_sum_alloc_well_list(const ecl_sum_type *ecl_sum, const char *pattern)
int ecl_sum_iget_report_end(const ecl_sum_type *ecl_sum, int report_step)
double ecl_sum_get_misc_var(const ecl_sum_type *ecl_sum, int time_index, const char *var)
const char * ecl_sum_iget_wgname(const ecl_sum_type *sum, int param_index)
bool ecl_sum_has_well_var(const ecl_sum_type *ecl_sum, const char *well, const char *var)
int ecl_sum_get_misc_var_index(const ecl_sum_type *ecl_sum, const char *var)
double ecl_sum_get_well_completion_var(const ecl_sum_type *ecl_sum, int time_index, const char *well, const char *var, int cell_nr)
double ecl_sum_iget_general_var(const ecl_sum_type *ecl_sum, int internal_index, const char *lookup_kw)
ecl_sum_type * ecl_sum_alloc_restart_writer(const char *ecl_case, const char *restart_case, bool fmt_output, bool unified, const char *key_join_string, time_t sim_start, bool time_in_days, int nx, int ny, int nz)
ert_ecl_unit_enum ecl_sum_get_unit_system(const ecl_sum_type *ecl_sum)
double ecl_sum_get_group_var(const ecl_sum_type *ecl_sum, int time_index, const char *group, const char *var)
void ecl_sum_free__(void *)
double ecl_sum_get_well_var_from_sim_time(const ecl_sum_type *ecl_sum, time_t sim_time, const char *well, const char *var)
int ecl_sum_get_block_var_index_ijk(const ecl_sum_type *ecl_sum, const char *block_var, int i, int j, int k)
time_t ecl_sum_get_data_start(const ecl_sum_type *ecl_sum)
bool ecl_sum_same_case(const ecl_sum_type *ecl_sum, const char *input_file)
struct ecl_sum_struct ecl_sum_type
Definition: ecl_sum.hpp:58
void ecl_sum_set_unified(ecl_sum_type *ecl_sum, bool unified)
bool ecl_sum_case_exists(const char *input_file)
void ecl_sum_init_double_frame_interp(const ecl_sum_type *ecl_sum, const ecl_sum_vector_type *keywords, const time_t_vector_type *time_points, double *data)
double ecl_sum_get_first_value_gen_key(const ecl_sum_type *ecl_sum, const char *gen_key)
struct ecl_sum_tstep_struct ecl_sum_tstep_type
Definition: ecl_sum_tstep.hpp:31
ert_ecl_unit_enum
Definition: ecl_util.hpp:99
UDAKeyword keyword(UDAControl control)
T value(details::expression_node< T > *n)
Definition: exprtk.hpp:12955
static std::string data()
Definition: exprtk.hpp:40022
ecl_smspec_var_type
Definition: smspec_node.h:28
struct stringlist_struct stringlist_type
Definition: stringlist.hpp:34
Definition: ecl_sum.hpp:38
const char * date_header
Definition: ecl_sum.hpp:48
const char * value_fmt
Definition: ecl_sum.hpp:42
const char * newline
Definition: ecl_sum.hpp:41
const char * value_dash
Definition: ecl_sum.hpp:50
bool print_header
Definition: ecl_sum.hpp:46
const char * sep
Definition: ecl_sum.hpp:40
const char * date_dash
Definition: ecl_sum.hpp:49
bool print_dash
Definition: ecl_sum.hpp:47
const char * date_fmt
Definition: ecl_sum.hpp:43
const char * header_fmt
Definition: ecl_sum.hpp:45
const char * days_fmt
Definition: ecl_sum.hpp:44
char * locale
Definition: ecl_sum.hpp:39