Skip to content

Commit 5ccd032

Browse files
committedSep 20, 2024
allow manual vsh_gr in hc correction and rename notebooks
1 parent 25039e8 commit 5ccd032

6 files changed

+26
-22
lines changed
 

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ notebooks/data/02_intermediate/*
111111
notebooks/data/03_processed/*
112112
notebooks/data/04_project/*
113113
notebooks/local/*
114-
notebooks/03_qpp_ssc_single_*
114+
notebooks/03_qpp__*
File renamed without changes.

‎notebooks/03b_qpp_carb_single.ipynb ‎notebooks/03_qpp_carb_single.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -105,27 +105,27 @@
105105
" SWT=1\n",
106106
" ),\n",
107107
"}\n",
108+
"vsh_gr = estimate_vsh_gr(well_data['GR'], min_gr=0, max_gr=50)\n",
108109
"carb_model = Carbonate(**args)\n",
109110
"vclw, vcalc, vdolo = carb_model.estimate_lithology(\n",
110-
" well_data['NPHI'], well_data['RHOB'], gr=well_data['GR'], pef=well_data['PEF'],\n",
111+
" well_data['NPHI'], well_data['RHOB'], gr=well_data['GR'], vsh_gr=vsh_gr, # pef=well_data['PEF'],\n",
111112
" model=model, method=method, normalize= True, carbonate_type=carbonate_type\n",
112113
")\n",
113114
"args.update(carb_model.__dict__)\n",
114115
"well.update_config(args) # Save lithology model to well\n",
115116
"\n",
116117
"# Implement hydrocarbon correction\n",
117118
"nphihc, rhobhc, hc_flag = neu_den_xplot_hc_correction(\n",
118-
" well_data['NPHI'], well_data['RHOB'], gr=well_data['GR'],\n",
119+
" well_data['NPHI'], well_data['RHOB'], gr=well_data['GR'], vsh_gr=vsh_gr,\n",
119120
" dry_sand_point=args['dry_sand_point'],\n",
120121
" dry_clay_point=args['dry_clay_point'],\n",
121122
" corr_angle=args['hc_corr_angle'], buffer=args['hc_buffer']\n",
122123
")\n",
123124
"\n",
124125
"# Estimate lithology\n",
125-
"vsh_gr = estimate_vsh_gr(well_data['GR'], min_gr=0, max_gr=110)\n",
126126
"carb_model = Carbonate(**args)\n",
127127
"vclw, vcalc, vdolo = carb_model.estimate_lithology(\n",
128-
" nphihc, rhobhc, gr=well_data['GR'], pef=well_data['PEF'], vsh_gr=vsh_gr,\n",
128+
" nphihc, rhobhc, gr=well_data['GR'], vsh_gr=vsh_gr, # pef=well_data['PEF'], \n",
129129
" model=model, method=method, normalize= True, carbonate_type=carbonate_type\n",
130130
")\n",
131131
"\n",
@@ -168,7 +168,7 @@
168168
"from quick_pp.rock_type import estimate_vsh_gr\n",
169169
"\n",
170170
"vsh_gr = estimate_vsh_gr(well_data['GR'], alpha=0.1)\n",
171-
"vsh_gr2 = estimate_vsh_gr(well_data['GR'], min_gr=0, max_gr=110)\n",
171+
"vsh_gr2 = estimate_vsh_gr(well_data['GR'], min_gr=0, max_gr=50)\n",
172172
"\n",
173173
"fig, axs = plt.subplots(2, 1, figsize=(20, 3), sharex=True)\n",
174174
"\n",

‎notebooks/03_qpp_ssc_single.ipynb

+17-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": null,
5+
"execution_count": 1,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -22,15 +22,15 @@
2222
"from quick_pp.objects import Project\n",
2323
"\n",
2424
"# Load well from saved file\n",
25-
"project = \"MOCK\"\n",
25+
"project = \"MOCK_clastic\"\n",
2626
"project_path = rf\"data\\04_project\\{project}.qppp\"\n",
2727
"project = Project().load(project_path)\n",
2828
"project.get_well_names()"
2929
]
3030
},
3131
{
3232
"cell_type": "code",
33-
"execution_count": 71,
33+
"execution_count": 4,
3434
"metadata": {},
3535
"outputs": [],
3636
"source": [
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "code",
53-
"execution_count": 72,
53+
"execution_count": 5,
5454
"metadata": {},
5555
"outputs": [],
5656
"source": [
@@ -75,7 +75,7 @@
7575
},
7676
{
7777
"cell_type": "code",
78-
"execution_count": 73,
78+
"execution_count": 6,
7979
"metadata": {},
8080
"outputs": [],
8181
"source": [
@@ -179,9 +179,12 @@
179179
"source": [
180180
"from quick_pp.rock_type import estimate_vsh_gr\n",
181181
"vsh_gr = estimate_vsh_gr(well_data['GR'], alpha=0.1)\n",
182+
"vsh_gr_2 = estimate_vsh_gr(well_data['GR'], min_gr=10, max_gr=135)\n",
183+
"\n",
182184
"fig, axs = plt.subplots(2, 1, figsize=(20, 3), sharex=True)\n",
183185
"\n",
184186
"axs[0].plot(well_data.DEPTH, vsh_gr, label='vsh_gr')\n",
187+
"axs[0].plot(well_data.DEPTH, vsh_gr_2, label='vsh_gr_2')\n",
185188
"axs[0].legend()\n",
186189
"\n",
187190
"axs[1].plot(well_data.DEPTH, well_data['GR'], label='GR')\n",
@@ -190,7 +193,7 @@
190193
},
191194
{
192195
"cell_type": "code",
193-
"execution_count": 78,
196+
"execution_count": 11,
194197
"metadata": {},
195198
"outputs": [],
196199
"source": [
@@ -235,7 +238,7 @@
235238
},
236239
{
237240
"cell_type": "code",
238-
"execution_count": 80,
241+
"execution_count": 13,
239242
"metadata": {},
240243
"outputs": [],
241244
"source": [
@@ -247,6 +250,9 @@
247250
" dry_clay_point=args['dry_clay_point'],\n",
248251
")\n",
249252
"\n",
253+
"rho_ma = rho_matrix(vsand, vsilt, vcld)\n",
254+
"phid = density_porosity(rhob_corr, rho_ma)\n",
255+
"\n",
250256
"# Normalize lithology\n",
251257
"vsand, vsilt, vcld = normalize_volumetric(vsand, vsilt, vcld, phit)\n",
252258
"\n",
@@ -255,8 +261,6 @@
255261
"vclb = vcld * clay_phit\n",
256262
"vclw = vcld + vclb\n",
257263
"\n",
258-
"rho_ma = rho_matrix(vsand, vsilt, vcld)\n",
259-
"phid = density_porosity(rhob_corr, rho_ma)\n",
260264
"phie = phit - vclb\n",
261265
"\n",
262266
"# Estimate rock types\n",
@@ -405,7 +409,7 @@
405409
},
406410
{
407411
"cell_type": "code",
408-
"execution_count": 85,
412+
"execution_count": 18,
409413
"metadata": {},
410414
"outputs": [],
411415
"source": [
@@ -438,7 +442,7 @@
438442
},
439443
{
440444
"cell_type": "code",
441-
"execution_count": 86,
445+
"execution_count": 19,
442446
"metadata": {},
443447
"outputs": [],
444448
"source": [
@@ -482,7 +486,7 @@
482486
},
483487
{
484488
"cell_type": "code",
485-
"execution_count": 89,
489+
"execution_count": 22,
486490
"metadata": {},
487491
"outputs": [],
488492
"source": [
@@ -494,7 +498,7 @@
494498
},
495499
{
496500
"cell_type": "code",
497-
"execution_count": 90,
501+
"execution_count": 23,
498502
"metadata": {},
499503
"outputs": [],
500504
"source": [

‎notebooks/shf-examples.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"metadata": {},
9191
"outputs": [],
9292
"source": [
93-
"core_df = pd.read_csv(r\"C:\\Users\\imran\\OneDrive\\Desktop\\Petrophysics\\Data\\Core\\M1_M3_RAW_SCAL.csv\")\n",
93+
"core_df = pd.read_csv(r\"xxx\")\n",
9494
"core_df = core_df[core_df.WELL_NAME == well_name].sort_values('DEPTH')"
9595
]
9696
},

‎quick_pp/qaqc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def porosity_correction_averaging(nphi, dphi, method='weighted'):
160160

161161

162162
def neu_den_xplot_hc_correction(
163-
nphi, rhob, gr=None,
163+
nphi, rhob, gr=None, vsh_gr=None,
164164
dry_sand_point: tuple = None,
165165
dry_clay_point: tuple = None,
166166
fluid_point: tuple = (1.0, 1.0),
@@ -185,7 +185,7 @@ def neu_den_xplot_hc_correction(
185185
D = fluid_point
186186
rocklithofrac = length_a_b(A, C)
187187

188-
frac_vsh_gr = estimate_vsh_gr(gr)
188+
frac_vsh_gr = vsh_gr if vsh_gr is not None else estimate_vsh_gr(gr)
189189
nphi_corrected = np.empty(0)
190190
rhob_corrected = np.empty(0)
191191
hc_flag = np.empty(0)

0 commit comments

Comments
 (0)
Please sign in to comment.