compdat

This module extracts COMPDAT, WELSEGS and COMPSEGS from a .DATA file.

Additionally, it will parse WELOPEN statements and emit new COMPDAT statements from the actions in WELOPEN.

from res2df import compdat, ResdataFiles

resdatafiles = ResdataFiles("MYDATADECK.DATA")
dframe = compdat.df(resdatafiles)
Example COMPDAT table

WELL

I

J

K1

K2

OP/SH

SATN

TRAN

WBDIA

KH

SKIN

DFACT

DIR

PEQVR

DATE

K

ZONE

OP_1

29

28

1

1

OPEN

0

176.9808

0.311

17180.93

0.0

Z

28.21965

2000-02-01

1

UpperReek

OP_2

20

15

1

1

OPEN

0

25.76939

0.311

2495.092

0.0

Z

27.83813

2000-02-01

1

UpperReek

OP_3

28

46

1

1

OPEN

0

0.283

0.311

27.74475

0.0

Z

29.57231

2000-02-01

1

UpperReek

WI_1

15

36

1

1

OPEN

0

0.0183

0.311

1.811187

0.0

Z

31.1408

2000-02-01

1

UpperReek

WI_2

31

11

1

1

OPEN

0

24.27392

0.311

2335.728

0.0

Z

26.95727

2000-06-01

1

UpperReek

OP_4

19

28

1

1

OPEN

0

86.50625

0.311

8538.829

0.0

Z

30.79442

2001-01-01

1

UpperReek

OP_5

25

35

1

1

OPEN

0

0.139

0.311

13.17639

0.0

Z

25.36506

2001-01-01

1

UpperReek

WI_3

17

8

1

1

OPEN

0

0.187

0.311

17.92673

0.0

X

26.80462

2001-03-01

1

UpperReek

OP_1

29

28

2

2

OPEN

0

140.7899

0.311

13633.68

0.0

Z

27.85778

2000-02-01

2

UpperReek

OP_2

20

15

2

2

OPEN

0

10.1185

0.311

984.0146

0.0

Z

28.47951

2000-02-01

2

UpperReek

OP_2

19

15

2

2

OPEN

0

14.37509

0.311

1386.013

0.0

Z

27.23884

2000-02-01

2

UpperReek

OP_3

28

46

2

2

OPEN

0

0.554

0.311

54.1335

0.0

Z

29.32342

2000-02-01

2

UpperReek

WI_1

15

36

2

2

OPEN

0

0.0563

0.311

5.551739

0.0

Z

30.65951

2000-02-01

2

UpperReek

WI_2

31

11

2

2

OPEN

0

31.9081

0.311

3066.631

0.0

Z

26.79096

2000-06-01

2

UpperReek

OP_4

19

28

2

2

OPEN

0

87.32273

0.311

8614.509

0.0

Z

30.70174

2001-01-01

2

UpperReek

If you need access to WELSEGS, COMPSEGS, WSEGSICD, WSEGAICD or WSEGVALV, you must use the deck2dfs() function which will return a dict with dataframes for each of COMPDAT, and the segmentation keywords.

Warning

When WELOPEN is in use, the dataframe can differ from Eclipse behaviour in certain circumstances. The dataframe representation from compdat does not separate from a “shut” well and the open-ness of its connections. So in a .DATA file it is possible to shut a well, and then reopen it, and get back the original open/shut state of individual connections prior to well shut. The dataframe format will display all connections as open if a well is opened with defaulted indices.

Adding INIT data

Additional information from the grid for each connection (based on i, j, k) can be added to the returned data through the option --initvectors:

res2csv compdat --verbose MYDATADECK.DATA --initvectors FIPNUM PERMX
# (put the .DATA file first, if not it will be interpreted as a vector)