Added missing files for ERT revision a39d4b4a9e597532b2dbf845751a70ffe1de3805

p4#: 20195
This commit is contained in:
Magne Sjaastad
2013-01-18 09:00:23 +01:00
parent 2cf0e32d4b
commit bdfd9c543e
291 changed files with 44697 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
Refcase <-> history source
* Kanskje det er ERT som må sjekka om verdien er sett og så utsetta evt. kjøring?
Copy from case:
* kræsj.

View File

@@ -0,0 +1,3 @@
#define SITE_CONFIG_FILE "@SITE_CONFIG_FILE@"
#define COMPILE_TIME_STAMP "@COMPILE_TIME_STAMP@"
#define SVN_VERSION "@SVN_VERSION@"

View File

@@ -0,0 +1,47 @@
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${libplot_src_path} )
include_directories( ${PLPLOT_HEADER} )
set( SITE_CONFIG_FILE /project/res/etc/ERT/site-config CACHE FILEPATH "Path to global ERT Configuration file")
set( src_list main.c enkf_tui_main.c enkf_tui_fs.c enkf_tui_ranking.c enkf_tui_misc.c enkf_tui_table.c enkf_tui_plot.c enkf_tui_plot_rft.c enkf_tui_plot_util.c
enkf_tui_run.c enkf_tui_util.c enkf_tui_init.c enkf_tui_export.c enkf_tui_analysis.c enkf_tui_QC.c enkf_tui_help.c enkf_tui_simple.c ert_tui_jobs.c)
#exec_program( svnversion ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE SVN_VERSION)
#exec_program( date OUTPUT_VARIABLE COMPILE_TIME_STAMP)
#exec_program( svnversion ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE SVN_VERSION)
#exec_program( date OUTPUT_VARIABLE COMPILE_TIME_STAMP)
#file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/build_timestamp.h "#define SVN_VERSION \"${SVN_VERSION}\"\n#define COMPILE_TIME_STAMP \"${COMPILE_TIME_STAMP}\"\n" )
#add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build_timestamp.h COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/timestamp.cmake )
#add_custom_target( timestamp ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/build_timestep.h )
#set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/build_timestamp.h
# PROPERTIES GENERATED TRUE
# HEADER_FILE_ONLY TRUE)
execute_process(COMMAND date "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE BUILD_TIME )
string(STRIP ${BUILD_TIME} BUILD_TIME)
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/git_commit.sh ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMIT)
string(STRIP ${GIT_COMMIT} GIT_COMMIT)
set_source_files_properties( main.c PROPERTIES COMPILE_DEFINITIONS "COMPILE_TIME_STAMP=\"${BUILD_TIME}\";GIT_COMMIT=\"${GIT_COMMIT}\";SITE_CONFIG_FILE=\"${SITE_CONFIG_FILE}\"")
add_executable( ert ${src_list} )
target_link_libraries( ert enkf sched rms ecl geometry config plot job_queue analysis util )
if (ERT_INSTALL_PREFIX)
set (destination ${CMAKE_INSTALL_PREFIX}/${ERT_INSTALL_PREFIX}/bin)
else()
set (destination ${CMAKE_INSTALL_PREFIX}/bin)
endif()
install(TARGETS ert DESTINATION ${destination})
if (INSTALL_GROUP)
install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/ert)")
install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/ert)")
endif()

View File

@@ -0,0 +1,327 @@
/*
Copyright (C) 2012 Statoil ASA, Norway.
The file 'enkf_tui_QC.c' is part of ERT - Ensemble based Reservoir Tool.
ERT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ERT is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
for more details.
*/
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <util.h>
#include <ctype.h>
#include <menu.h>
#include <enkf_tui_run.h>
#include <enkf_tui_export.h>
#include <enkf_tui_plot.h>
#include <enkf_tui_table.h>
#include <enkf_tui_fs.h>
#include <enkf_tui_ranking.h>
#include <enkf_tui_QC.h>
#include <enkf_tui_help.h>
#include <enkf_tui_misc.h>
#include <enkf_main.h>
#include <enkf_sched.h>
void enkf_tui_help_manual_main( void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
const site_config_type * site_config = enkf_main_get_site_config ( enkf_main );
const char * manual_url = site_config_get_manual_url( site_config );
const char * browser = getenv("BROWSER");
if (browser == NULL)
browser = site_config_get_default_browser( site_config );
{
char * cmd = util_alloc_sprintf("%s %s &" , browser , manual_url);
system(cmd);
free( cmd );
}
}
void enkf_tui_help_menu_main(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Main menu" , "Back" , "bB");
menu_add_helptext(menu , "Choose the different options from the main menu to read more about the different options.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_main , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}
void enkf_tui_help_manual_cases( void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
const site_config_type * site_config = enkf_main_get_site_config ( enkf_main );
const char * manual_url = site_config_get_manual_url( site_config );
const char * browser = getenv("BROWSER");
if (browser == NULL)
browser = site_config_get_default_browser( site_config );
{
char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Manage_cases");
system(cmd);
free( cmd );
}
}
void enkf_tui_help_menu_cases(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Manage cases" , "Back" , "bB");
menu_add_helptext(menu , "Use this menu to navgate between cases and to initialize cases. A case has to be initialized before it can be used.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_cases , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}
void enkf_tui_help_manual_run( void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
const site_config_type * site_config = enkf_main_get_site_config ( enkf_main );
const char * manual_url = site_config_get_manual_url( site_config );
const char * browser = getenv("BROWSER");
if (browser == NULL)
browser = site_config_get_default_browser( site_config );
{
char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Run_or_restart_experiment");
system(cmd);
free( cmd );
}
}
void enkf_tui_help_menu_run(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Run menu" , "Back" , "bB");
menu_add_helptext(menu , "This menu is used to do the main work in ERT. The first option, x: Ensemble run: history, will just run the case without any data conditioning. Options r and s will initiate classical enkf runs. The two options i and t invokes the ensemble kalman smoother.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_run , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}
void enkf_tui_help_manual_plot( void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
const site_config_type * site_config = enkf_main_get_site_config ( enkf_main );
const char * manual_url = site_config_get_manual_url( site_config );
const char * browser = getenv("BROWSER");
if (browser == NULL)
browser = site_config_get_default_browser( site_config );
{
char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Plot_Results");
system(cmd);
free( cmd );
}
}
void enkf_tui_help_menu_plot(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Plot results" , "Back" , "bB");
menu_add_helptext(menu , "Use this option to plot results after the case has been run.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_plot , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}
void enkf_tui_help_manual_rank( void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
const site_config_type * site_config = enkf_main_get_site_config ( enkf_main );
const char * manual_url = site_config_get_manual_url( site_config );
const char * browser = getenv("BROWSER");
if (browser == NULL)
browser = site_config_get_default_browser( site_config );
{
char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Rank_Results");
system(cmd);
free( cmd );
}
}
void enkf_tui_help_menu_rank(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Rank results" , "Back" , "bB");
menu_add_helptext(menu , "Use this option to rank results after the case has been run.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_rank , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}
void enkf_tui_help_manual_export( void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
const site_config_type * site_config = enkf_main_get_site_config ( enkf_main );
const char * manual_url = site_config_get_manual_url( site_config );
const char * browser = getenv("BROWSER");
if (browser == NULL)
browser = site_config_get_default_browser( site_config );
{
char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Export_data_to_other_formats");
system(cmd);
free( cmd );
}
}
void enkf_tui_help_menu_export(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Export results" , "Back" , "bB");
menu_add_helptext(menu , "Use this option to export results after the case has been run.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_export , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}
void enkf_tui_help_manual_table( void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
const site_config_type * site_config = enkf_main_get_site_config ( enkf_main );
const char * manual_url = site_config_get_manual_url( site_config );
const char * browser = getenv("BROWSER");
if (browser == NULL)
browser = site_config_get_default_browser( site_config );
{
char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Table_of_results");
system(cmd);
free( cmd );
}
}
void enkf_tui_help_menu_table(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Table of results" , "Back" , "bB");
menu_add_helptext(menu , "This option can generate a table of results after the case has been run.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_table , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}
void enkf_tui_help_manual_misc( void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
const site_config_type * site_config = enkf_main_get_site_config ( enkf_main );
const char * manual_url = site_config_get_manual_url( site_config );
const char * browser = getenv("BROWSER");
if (browser == NULL)
browser = site_config_get_default_browser( site_config );
{
char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Miscellaneous");
system(cmd);
free( cmd );
}
}
void enkf_tui_help_menu_misc(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Miscellanous" , "Back" , "bB");
menu_add_helptext(menu , "This option contains miscellaneous options.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_misc , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}
void enkf_tui_help_menu_simple(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast( arg );
plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
{
const char * plot_path = plot_config_get_path( plot_config );
util_make_path( plot_path );
}
{
menu_type * menu = menu_alloc("Help: Simple menu" , "Back" , "bB");
menu_add_helptext(menu , "The top four options in the simple menu will run eclipse simulations. Option s: Sensitivity run: No data conditioning, will initialize all parameters and run one eclipse simulation for each set of different parameters. e: Assimilation run: EnKF updates, will initialize all parameters and run one eclipse simulation for each set of different parameters. The eclipse simulations will run until the first data time step is encountered and condition on data before continuing. a: Assimilation run: Smoother update, will do one pass of the sensitivity run, then condition the parameters to all the data and rerun all experiments. i: Assimilation run: Iterated smoother [RML-EnKF] will iterate the smoother run several times.");
menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_main , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}
}

View File

@@ -0,0 +1,33 @@
/*
Copyright (C) 2012 Statoil ASA, Norway.
The file 'enkf_tui_QC.h' is part of ERT - Ensemble based Reservoir Tool.
ERT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ERT is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
for more details.
*/
#ifndef __ENKF_TUI_HELP_H__
#define __ENKF_TUI_HELP_H__
void enkf_tui_help_menu_main(void * );
void enkf_tui_help_menu_cases(void * );
void enkf_tui_help_menu_run(void * );
void enkf_tui_help_menu_plot(void * );
void enkf_tui_help_menu_rank(void * );
void enkf_tui_help_menu_export(void * );
void enkf_tui_help_menu_table(void * );
void enkf_tui_help_menu_misc(void * );
void enkf_tui_help_menu_simple(void * );
#endif

View File

@@ -0,0 +1,74 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'enkf_tui_init.c' is part of ERT - Ensemble based Reservoir Tool.
ERT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ERT is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
for more details.
*/
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <util.h>
#include <ctype.h>
#include <menu.h>
#include <enkf_main.h>
#include <enkf_sched.h>
#include <enkf_types.h>
#include <enkf_tui_util.h>
#include <enkf_tui_init.h>
#include <enkf_state.h>
#include <enkf_node.h>
#include <enkf_fs.h>
#include <msg.h>
#include <ensemble_config.h>
#include <enkf_tui_run.h>
#include <enkf_tui_plot.h>
#include <enkf_tui_help.h>
#include <enkf_tui_main.h>
#include <ecl_config.h>
void enkf_tui_simple_menu(void * arg) {
enkf_main_type * enkf_main = enkf_main_safe_cast(arg);
menu_type * menu = menu_alloc("Simple menu" , "Quit" , "qQ");
menu_add_item(menu , "Sensitivity run: No data conditioning" , "sS" , enkf_tui_run_exp , enkf_main , NULL);
const ecl_config_type * ecl_config = enkf_main_get_ecl_config( enkf_main );
const model_config_type * model_config = enkf_main_get_model_config( enkf_main );
menu_item_type * enkf_item = menu_add_item(menu , "Assimilation run: EnKF updates" , "eE" , enkf_tui_run_start , enkf_main , NULL);
menu_item_type * ES_item = menu_add_item(menu , "Assimilation run: Smoother update" , "aA" , enkf_tui_run_smoother , enkf_main , NULL);
menu_item_type * it_ES_item = menu_add_item(menu , "Assimilation run: Iterated smoother [RML-EnKF]" , "iI" , enkf_tui_run_iterated_ES , enkf_main , NULL);
if (!ecl_config_has_schedule( ecl_config )) {
menu_item_disable( enkf_item );
}
if (!model_config_has_history( model_config )) {
menu_item_disable( it_ES_item );
menu_item_disable( ES_item );
}
menu_add_separator( menu );
menu_add_item(menu , "Plot results" , "pP" , enkf_tui_plot_simple_menu , enkf_main , NULL);
{
menu_item_type * menu_item = menu_add_item( menu , "Create pdf reports" , "rR" , enkf_tui_plot_reports , enkf_main , NULL );
ert_report_list_type * report_list = enkf_main_get_report_list( enkf_main );
if (ert_report_list_get_num( report_list ) == 0)
menu_item_disable( menu_item );
}
menu_add_separator(menu);
menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_simple , enkf_main , NULL);
menu_add_item(menu , "Advanced menu" , "dD" , enkf_tui_main_menu , enkf_main , NULL);
menu_run(menu);
menu_free(menu);
}

View File

@@ -0,0 +1,26 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'enkf_tui_main.h' is part of ERT - Ensemble based Reservoir Tool.
ERT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ERT is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
for more details.
*/
#ifndef __ENKF_TUI_SIMPLE_H__
#define __ENKF_TUI_SIMPLE_H__
void enkf_tui_simple_menu(void * );
#endif

View File

@@ -0,0 +1,35 @@
/*
Copyright (C) 2011 Statoil ASA, Norway.
The file 'ert_tui_jobs.c' is part of ERT - Ensemble based Reservoir Tool.
ERT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ERT is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
for more details.
*/
#include <stringlist.h>
#include <enkf_main.h>
#include <enkf_tui_plot.h>
void enkf_tui_plot_all_summary_JOB(void * self , const stringlist_type * args ) {
enkf_main_type * enkf_main = enkf_main_safe_cast( self );
int iens1 , iens2 , step1 , step2;
bool prediction_mode;
iens1 = 0;
iens2 = enkf_main_get_ensemble_size( enkf_main );
step1 = 0;
step2 = 0;
prediction_mode = true;
enkf_tui_plot_all_summary__( enkf_main , iens1 , iens2 , step1 , step2 , prediction_mode );
}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
cd $1
git rev-parse HEAD