2017-08-17 13:43:09 +02:00
|
|
|
# sunbeam [](https://travis-ci.org/Statoil/sunbeam)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Prerequisites:
|
|
|
|
|
|
|
|
|
|
Clone and build `ecl` from [Statoil/libecl](https://github.com/Statoil/libecl)
|
2018-08-25 07:24:48 +02:00
|
|
|
and `opm-commonr` from [OPM/opm-common](https://github.com/OPM/opm-common).
|
2017-08-17 13:43:09 +02:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
git clone https://github.com/Statoil/libecl
|
|
|
|
|
git clone https://github.com/OPM/opm-parser
|
|
|
|
|
mkdir libecl/build
|
2018-08-25 07:24:48 +02:00
|
|
|
mkdir opm-common/build
|
2017-08-17 13:43:09 +02:00
|
|
|
pushd libecl/build
|
|
|
|
|
cmake ..
|
|
|
|
|
make install
|
|
|
|
|
popd
|
2018-08-25 07:24:48 +02:00
|
|
|
pushd opm-common/build
|
2017-08-17 13:43:09 +02:00
|
|
|
cmake ..
|
|
|
|
|
make install
|
|
|
|
|
```
|
2016-11-24 10:12:43 +01:00
|
|
|
|
2016-11-25 14:45:52 +01:00
|
|
|
# Quick start (WIP)
|
2018-08-25 07:24:48 +02:00
|
|
|
Assumes you have built (and maybe installed) opm-common
|
2017-02-09 14:46:21 +01:00
|
|
|
|
|
|
|
|
```bash
|
2017-08-17 13:43:09 +02:00
|
|
|
git clone --recursive https://github.com/Statoil/sunbeam
|
|
|
|
|
mkdir sunbeam/build
|
|
|
|
|
pushd sunbeam/build
|
|
|
|
|
cmake ..
|
2016-11-25 14:45:52 +01:00
|
|
|
make
|
2017-02-09 14:46:21 +01:00
|
|
|
ctest # for running unit tests
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Obtaining test data
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
cd ~
|
|
|
|
|
git clone https://github.com/OPM/opm-data
|
|
|
|
|
cd opm-data/norne
|
2016-11-25 14:45:52 +01:00
|
|
|
```
|
2017-02-09 14:46:21 +01:00
|
|
|
|
|
|
|
|
With `opm-data` available, one can test sunbeam on Norne:
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
|
import sunbeam
|
|
|
|
|
es = sunbeam.parse('NORNE_ATW2013.DATA', ('PARSE_RANDOM_SLASH', sunbeam.action.ignore))
|
|
|
|
|
len(es.faults())
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Remember to have `~/sunbeam/build/python` in your `$PYTHONPATH`.
|