[compdat] Relax the ERROR conditions of ecl2csv compdat module
- Dominant language
- Python
- Stars
- 37
- Forks
- 38
- Avg merge
- 1h 45m
- Merged PRs (30d)
- 1
Description
**Problem**
Requesting to shut inexistent connections are ignored by eclipse but not by the `compdat` module. This might be presented in a few cases where someone might be trying to hard-code a correction for a well that ended up completed in a wrong region for particular realizations, making the `ECLIPSE100` forward model successful but not the `ECL2CSV` forward model in an ERT config case.
I attached [test_ecl2csv_compdat.tar.gz](https://github.com/equinor/ecl2df/files/9599437/test_ecl2csv_compdat.tar.gz) with two simplified eclipse cases:
1. `API_INJ.DATA` - to serve as a baseline
2. `API_INJ_SHUT.DATA` - where you can reproduce the error
To obtain the same error message, just run `ecl2csv compdat -o "compdat_shut.csv" -- API_INJ_SHUT.DATA` to obtain the following error message:
```bash
Traceback (most recent call last):
File "/prog/res/komodo/2022.08.02-py38-rhel7/root/bin/ecl2csv", line 8, in
sys.exit(main())
File "/prog/res/komodo/2022.08.02-py38-rhel7/root/lib/python3.8/site-packages/ecl2df/ecl2csv.py", line 299, in main
args.func(args)
File "/prog/res/komodo/2022.08.02-py38-rhel7/root/lib/python3.8/site-packages/ecl2df/ecl2csv.py", line 290, in run_subparser_main
main_func(args)
File "/prog/res/komodo/2022.08.02-py38-rhel7/root/lib/python3.8/site-packages/ecl2df/compdat.py", line 977, in compdat_main
compdat_df = df(eclfiles, initvectors=args.initvectors)
File "/prog/res/komodo/2022.08.02-py38-rhel7/root/lib/python3.8/site-packages/ecl2df/compdat.py", line 990, in df
compdat_df = deck2dfs(eclfiles.get_ecldeck())["COMPDAT"]
File "/prog/res/komodo/2022.08.02-py38-rhel7/root/lib/python3.8/site-packages/ecl2df/compdat.py", line 249, in deck2dfs
expand_welopen(welopen_df, compdat_df),
File "/prog/res/komodo/2022.08.02-py38-rhel7/root/lib/python3.8/site-packages/ecl2df/compdat.py", line 298, in expand_welopen
return expand_welopen_defaults(exp_welopen_df, compdat_df)
File "/prog/res/komodo/2022.08.02-py38-rhel7/root/lib/python3.8/site-packages/ecl2df/compdat.py", line 361, in expand_welopen_defaults
raise ValueError(
ValueError: No connections are matching WELOPEN keyword with defaulted coordinates:
WELL P
STATUS SHUT
I 0.0
J 0.0
K 1.0
C1 None
C2 None
DATE 1988-01-01
KEYWORD_IDX 63
Name: 0, dtype: object
```
**Suggestion**
One simple suggestion would be to relax the error conditions in `compdat` script to ignore cases where there is a request to shut a completion that does not exist, and instead of raising an `error`, raise a `warning`.
Contributor guide
Assessment
This issue has not been assessed yet.