|
25 | 25 | # Let's start by downloading the dataset and inspecting its content.
|
26 | 26 |
|
27 | 27 | # %%
|
| 28 | +# sphinx_gallery_thumbnail_number = -1 |
| 29 | + |
28 | 30 | # List of relative paths used during the workshop
|
29 | 31 | import numpy as np
|
30 | 32 | import pandas as pd
|
|
39 | 41 | import subsurface as ss
|
40 | 42 | from subsurface.modules.visualization import to_pyvista_points, pv_plot, to_pyvista_line, init_plotter
|
41 | 43 |
|
42 |
| -path_to_well_png = '../../common/basics/data/boreholes_concept.png' |
43 |
| -path_to_checkpoint_1 = '../../common/basics/checkpoints/checkpoint1.pickle' |
44 |
| -path_to_checkpoint_2 = '../../common/basics/checkpoints/checkpoint2.pickle' |
45 |
| -upgrade_pickles = False |
46 |
| -# %% |
47 | 44 | # Importing GemPy
|
48 | 45 | import gempy as gp
|
49 | 46 |
|
50 | 47 | # %% md
|
51 | 48 | # We use `pooch` to download the dataset into a temp file:
|
| 49 | + |
52 | 50 | # %%
|
53 | 51 | url = "https://raw.githubusercontent.com/softwareunderground/subsurface/main/tests/data/borehole/kim_ready.csv"
|
54 | 52 | known_hash = "a91445cb960526398e25d8c1d2ab3b3a32f7d35feaf33e18887629b242256ab6"
|
|
76 | 74 | }
|
77 | 75 | )
|
78 | 76 | )
|
| 77 | + |
79 | 78 | # Convert to UnstructuredData
|
80 | 79 | unstruc: ss.UnstructuredData = ss.UnstructuredData.from_array(
|
81 | 80 | vertex=collar_df[["x", "y", "z"]].values,
|
82 | 81 | cells=SpecialCellCase.POINTS
|
83 | 82 | )
|
| 83 | + |
84 | 84 | points = ss.PointSet(data=unstruc)
|
85 | 85 | collars: Collars = Collars(
|
86 | 86 | ids=collar_df.index.to_list(),
|
|
96 | 96 | well_mesh = to_pyvista_points(collars.collar_loc)
|
97 | 97 |
|
98 | 98 | # Plot the collar points
|
99 |
| -pv_plot([well_mesh], image_2d=True) |
| 99 | +pv_plot([well_mesh], image_2d=False) |
100 | 100 |
|
101 | 101 | # %%
|
102 | 102 | # Reading Borehole Survey Data
|
|
388 | 388 | #
|
389 | 389 |
|
390 | 390 | # %% md
|
391 |
| -# Surfaces |
392 |
| -# """""""" |
393 | 391 | # Adding Surfaces and Formations
|
394 | 392 | # """""""""""""""""""""""""""""
|
395 | 393 | # In GemPy, surfaces mark the bottom of each geological unit. For our model, we will add the first two formations
|
|
410 | 408 | # %%
|
411 | 409 | g2d.fig
|
412 | 410 | # %% md
|
413 |
| -# ### Minimum Input Data for Interpolation |
414 |
| -# |
| 411 | +# Minimum Input Data for Interpolation |
| 412 | +# """""""""""""""""""""""""""""""""""" |
415 | 413 | # To interpolate the geological layers, GemPy requires at least:
|
416 | 414 | #
|
417 | 415 | # - Two surface points per geological unit
|
|
429 | 427 | )
|
430 | 428 |
|
431 | 429 | # %% md
|
432 |
| -# ## Model Computation |
433 |
| -# |
| 430 | +# Model Computation |
| 431 | +# """"""""""""""""" |
434 | 432 | # Now that we have the necessary surface points and orientations, we can compute the final geological model. The
|
435 | 433 | # `compute_model` function will take all the input data and perform the interpolation to generate the 3D subsurface structure.
|
436 | 434 |
|
|
440 | 438 | gp.compute_model(geo_model)
|
441 | 439 |
|
442 | 440 | # %% md
|
443 |
| -# ### Final 3D Visualization |
444 |
| -# |
| 441 | +# Final 3D Visualization |
| 442 | +# """""""""""""""""""""" |
445 | 443 | # Let's take a look at the final model, combining the borehole data and geological formations in 3D.
|
446 | 444 |
|
447 | 445 | g3d = gpv.plot_3d(geo_model, show_lith=False, show=False)
|
|
450 | 448 |
|
451 | 449 |
|
452 | 450 | # %% md
|
453 |
| -# ----- |
454 |
| -# ## Conclusion |
| 451 | +# Conclusion |
| 452 | +# """""""""" |
455 | 453 | #
|
456 | 454 | # In this tutorial, we have demonstrated how to take borehole data and create a 3D geological model in GemPy. We explored
|
457 | 455 | # how to extract structural elements from borehole data, set up a regular grid for interpolation, and visualize the
|
|
461 | 459 | # integrates seamlessly with borehole data for subsurface geological modeling.
|
462 | 460 | #
|
463 | 461 | # For further reading and resources, check out:
|
464 |
| - |
465 |
| -# |
466 |
| -# #### Extra Resources |
| 462 | +# |
467 | 463 | #
|
| 464 | +# Extra Resources |
| 465 | +# """"""""""""""" |
468 | 466 | # Page:
|
469 | 467 | # https://www.gempy.org/
|
470 | 468 | #
|
|
474 | 472 | # Gitub:
|
475 | 473 | # https://github.com/cgre-aachen/gempy
|
476 | 474 | #
|
477 |
| -# #### Further training and collaborations |
| 475 | +# Further training and collaborations |
| 476 | +# """"""""""""""""""""""""""""""""""" |
478 | 477 | # https://www.terranigma-solutions.com/
|
479 | 478 | #
|
480 |
| -#  |
481 | 479 | #
|
482 | 480 | #
|
0 commit comments