Exemple #1
0
void enkf_config_node_update_general_field( enkf_config_node_type * config_node , 
                                            const char * enkf_outfile_fmt        , 
                                            const char * enkf_infile_fmt         , 
                                            const char * init_file_fmt           , 
                                            const char * min_std_file            , 
                                            int truncation                       ,
                                            double value_min                     , 
                                            double value_max                     ,            
                                            const char * init_transform          ,
                                            const char * input_transform         ,
                                            const char * output_transform ) {       

  
  field_file_format_type export_format = field_config_default_export_format( enkf_outfile_fmt ); /* Purely based on extension, recognizes ROFF and GRDECL, the rest will be ecl_kw format. */
  {
    enkf_var_type var_type;
    if (enkf_infile_fmt == NULL)
      var_type = PARAMETER;
    else {
      if (enkf_outfile_fmt == NULL)
        var_type = DYNAMIC_RESULT;   /* Probably not very realistic */
      else
        var_type = DYNAMIC_STATE;
    }
    config_node->var_type = var_type;
  }
  field_config_update_general_field( config_node->data , 
                                     truncation , value_min , value_max ,
                                     export_format , 
                                     init_transform , 
                                     input_transform , 
                                     output_transform );

  enkf_config_node_update( config_node , init_file_fmt , enkf_outfile_fmt , enkf_infile_fmt, min_std_file);
}
Exemple #2
0
void * enkf_main_export_field_JOB(void * self, const stringlist_type * args) {
  const char * file_name = stringlist_iget(args, 1);
  field_file_format_type file_type = field_config_default_export_format(file_name);

  if ((RMS_ROFF_FILE == file_type) || (ECL_GRDECL_FILE == file_type)) {
    enkf_main_type * enkf_main = enkf_main_safe_cast( self );
    enkf_main_jobs_export_field(enkf_main, args, file_type);
  } else
    printf("EXPORT_FIELD filename argument: File extension must be either .roff or .grdecl\n");

  return NULL;
}
Exemple #3
0
void enkf_config_node_update_parameter_field( enkf_config_node_type * config_node , 
                                              const char * enkf_outfile_fmt , 
                                              const char * init_file_fmt , 
                                              const char * min_std_file , 
                                              int truncation , double value_min , double value_max ,
                                              const char * init_transform , 
                                              const char * output_transform ) {

  field_file_format_type export_format = field_config_default_export_format( enkf_outfile_fmt ); /* Purely based on extension, recognizes ROFF and GRDECL, the rest will be ecl_kw format. */
  field_config_update_parameter_field( config_node->data , truncation , value_min , value_max ,
                                       export_format , 
                                       init_transform , 
                                       output_transform );
  config_node->var_type = PARAMETER;
  enkf_config_node_update( config_node , init_file_fmt , enkf_outfile_fmt , NULL , min_std_file);
}