Skip to content

Commit

Permalink
Adding ert
Browse files Browse the repository at this point in the history
  • Loading branch information
James Bristow committed Feb 8, 2024
1 parent e5c3e72 commit 4c12644
Show file tree
Hide file tree
Showing 117 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ert/poly_example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
simulations
logs
poly_out
.ert_runpath_list
1 change: 1 addition & 0 deletions ert/poly_example/POLY_EVAL
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
EXECUTABLE poly_eval.py
3 changes: 3 additions & 0 deletions ert/poly_example/coeff_priors
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a UNIFORM 0 1
b UNIFORM 0 2
c UNIFORM 0 5
5 changes: 5 additions & 0 deletions ert/poly_example/observations
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
GENERAL_OBSERVATION POLY_OBS {
DATA = POLY_RES;
INDEX_LIST = 0,2,4,6,8;
OBS_FILE = poly_obs_data.txt;
};
15 changes: 15 additions & 0 deletions ert/poly_example/poly.ert
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
NUM_REALIZATIONS 100

QUEUE_SYSTEM LOCAL
QUEUE_OPTION LOCAL MAX_RUNNING 50

RUNPATH poly_out/realization-<IENS>/iter-<ITER>

GEN_KW COEFFS coeff_priors

GEN_DATA POLY_RES RESULT_FILE:poly.out

OBS_CONFIG observations

INSTALL_JOB poly_eval POLY_EVAL
FORWARD_MODEL poly_eval
15 changes: 15 additions & 0 deletions ert/poly_example/poly_eval.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env python

import json

with open("parameters.json", encoding="utf-8") as f:
coeffs = json.load(f)["COEFFS"]


def evaluate(coeffs, x):
return coeffs["a"] * x**2 + coeffs["b"] * x + coeffs["c"]


output = [evaluate(coeffs, x) for x in range(10)]
with open("poly.out", "w", encoding="utf-8") as f:
f.write("\n".join(map(str, output)))
5 changes: 5 additions & 0 deletions ert/poly_example/poly_obs_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2.1457049781272213 0.6
8.769219841380755 1.4
12.388014786122742 3.0
25.600464531354252 5.4
42.35204755970952 8.6
1 change: 1 addition & 0 deletions ert/poly_example/storage/.fs_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"state_map": [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id": "3cdf5147-97f2-4e23-9830-f497d05c2aef", "experiment_id": "3cc18d7c-7a27-496c-9f10-0a9ebe0055c0", "ensemble_size": 100, "iteration": 0, "name": "default_0", "prior_ensemble_id": null, "started_at": "2024-02-08T19:13:40.750380"}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"COEFFS": {"name": "COEFFS", "forward_init": false, "template_file": null, "output_file": null, "transfer_function_definitions": ["a UNIFORM 0 1\n", "b UNIFORM 0 2\n", "c UNIFORM 0 5"], "forward_init_file": null, "template_file_path": null, "_ert_kind": "GenKwConfig"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"POLY_RES": {"name": "POLY_RES", "input_file": "poly.out", "report_steps": null, "_ert_kind": "GenDataConfig"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"random_seed": null, "minimum_required_realizations": 100, "ensemble_size": 100, "stop_long_running": false, "active_realizations": [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true], "target_case": "default_%d", "weights": "4, 2, 1", "restart_run": false, "prior_ensemble": ""}
1 change: 1 addition & 0 deletions ert/poly_example/storage/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version": 4, "migrations": []}
Empty file.
8 changes: 8 additions & 0 deletions ert/poly_example/storage/storage_server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"urls": [
"http://127.0.0.1:51825",
"http://James:51825",
"http://James.localdomain:51825"
],
"authtoken": "d7C6tQai4JWvRnsE"
}

0 comments on commit 4c12644

Please sign in to comment.