Code Monkey home page Code Monkey logo

Comments (28)

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024 1

@AlexanderJuestel

I think that is what I need but looking into previous tutorials I realized that the fault was infinite hence the interpolation goes beyond the points defined on the fault surfaces. Now the along strike is resolved, the other issue has to do with down-dip.

I will look into the fault relations again and see if I can figure out somthing!

from gemgis.

github-actions avatar github-actions commented on September 27, 2024

Hello and welcome! Thanks for posting your first issue in the GemGIS project! Someone from our developers will get back to you. If your question is support related, we may transfer it to the Discussions.

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

orientations.csv
interfaces.csv

@vincent1990-adongo,
thanks for opening this discussion.

Please find the input data attached. Maybe this will solve the problem already.

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

Thanks so much Alexander. It was the input data just as you rightly indicated. I have been able to resolve that with your new data. I would like to plot only the finite fault without the original extent of the fault previously plotted in gray. Could you enlighten me on that?

I also tried to repeat the 'clip_fault_of _gempy_model' function to plot finite Fault 2,

mesh = gg.postprocessing.clip_fault_of_gempy_model(geo_model, fault='Fault2',
which='both',
buffer_first=0,
buffer_last=0)
mesh
[output]

{'Fault2': [PolyData (0x22a44b0cc40)
N Cells: 0
N Points: 0
N Strips: 0
X Bounds: 1.000e+299, -1.000e+299
Y Bounds: 1.000e+299, -1.000e+299
Z Bounds: 1.000e+299, -1.000e+299
N Arrays: 1,
'#527682']}
This was the ouput of the input data needed to create the finite fault2. It looks like it has 0 cells and points, and that the mesh cannot be plotted with input 0.

##I had the following error.
ValueError: Empty meshes cannot be plotted. Input mesh has zero points.

However, I do not see the difference between Fault1 and Fault2 apart from their orientation?

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

Any comments or suggestion @AlexanderJuestel

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

@vincent1990-adongo It may take a while to answer as we are also following regular jobs. So, a little patience would be appreciated.

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

Thank you very much. I hope you have understood what I am trying to point out @AlexanderJuestel ?

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

@vincent1990-adongo I can reproduce your error. I will have a look at what is going on!

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel Alright! It is important because to produce a complex geometry, different fault segments must be finite so they can be linked with each other. The finite fault concept must be applicable to all fault segments present.

I will be happy if you can help

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

@vincent1990-adongo , there is nothing wrong with the code. Depending on the direction of the fault, you may have to use the invert option. The following returns the correct mesh

mesh = clip_fault_of_gempy_model(geo_model,fault='Fault2', 
                                                   which='both', 
                                                   buffer_first=0, 
                                                   buffer_last=0,
                                                    invert_first=False,
                                                     invert_last=True)
mesh

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel. Thanks a lot for your response yesterday. The above code worked for the Fault2. I managed to plot both on the same plot figure.

gis_plot2

I was trying to plot the finite fault only without the initial fault surfaces during the preprocessing phase. It looks like the finite fault is plotted on the infinite fault.
I am seeking to plot only the finite faults with the horizontal surfaces.

#Also, the fault is finite along the strike only. Is there any possibility of making the fault down the dip finite as well?
That is, there should be a user-controled fault length down the direction of dip.

You may kindly review this when you are free.

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

Hello @vincent1990-adongo,

just do not plot the original fault, see the code snipped below ;)

p = pv.Plotter(notebook=True)

p.add_mesh(mesh['Fault1'][0], color='red', opacity=0.5)
p.add_mesh(mesh1['Fault1'][0], color=mesh1['Fault1'][1])  #<-- plotting command for the original fault, not needed actually 

p.add_mesh(fault_polydata, color='red', point_size=40, render_points_as_spheres=True)

p.set_background('white')
p.set_scale(1,1,1)
p.show_bounds(color='black', font_size=12)

p.show()

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel Thanks a lot!

Any suggestions on plotting the finite fault and the horizon surfaces in one plot view. A truncation along the dip where the two segments intersect.

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

You can extract the meshes from the GemPy model, see tutorial 18 I believe. Then, plot everything in the same pyvista plot

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel. I tried that and it worked!

I have a little problem with the extension down the dip. I would like to control the fault length along the dip direction.

A common intersection line between the two segments. As shown in the images below.

Please, is there a way around that?

gemgis3
gemgis4

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

You can use fault relations as described on the GemPy documentation page to terminate one fault against the other. Is it that what you need?

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

@vincent1990-adongo

just let me know if you have further questions :)

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel
My gemPy is really messing up and I dont know why I am facing this error when I want to create a model

geo_model = gp.create_model('Graben_Model')
geo_model

IndexError Traceback (most recent call last)
Cell In[4], line 1
----> 1 geo_model = gp.create_model('Graben_Model')
2 geo_model

File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\gempy_api.py:114, in create_model(project_name)
99 def create_model(project_name='default_project') -> Project:
100 """Create a Project object.
101
102 Args:
(...)
112 TODO: Adding saving address
113 """
--> 114 return Project(project_name)

File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\model.py:1628, in Project.init(self, project_name)
1625 def init(self, project_name='default_project'):
1627 self.meta = MetaData(project_name=project_name)
-> 1628 super().init()

File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\model.py:85, in ImplicitCoKriging.init(self)
78 self._rescaling = ScalingSystem(self._surface_points, self._orientations,
79 self._grid)
80 self._additional_data = AdditionalData(self._surface_points,
81 self._orientations, self._grid,
82 self._faults,
83 self._surfaces, self._rescaling)
---> 85 self._interpolator = InterpolatorModel(self._surface_points,
86 self._orientations, self._grid,
87 self._surfaces,
88 self._stack, self._faults,
89 self._additional_data)
91 self.solutions = Solution(self._grid, self._surfaces, self._stack)
93 # Previous values of sfai.

File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\interpolator.py:650, in InterpolatorModel.init(self, surface_points, orientations, grid, surfaces, series, faults, additional_data, **kwargs)
646 def init(self, surface_points: "SurfacePoints", orientations: "Orientations", grid: "Grid",
647 surfaces: "Surfaces", series, faults: "Faults", additional_data: "AdditionalData",
648 **kwargs):
--> 650 super().init(surface_points, orientations, grid, surfaces, series, faults,
651 additional_data, **kwargs)
652 self.len_series_i = np.zeros(1)
653 self.len_series_o = np.zeros(1)

File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\interpolator.py:66, in Interpolator.init(self, surface_points, orientations, grid, surfaces, series, faults, additional_data, **kwargs)
63 self.aesara_graph = self.create_aesara_graph(additional_data, inplace=False)
64 self.aesara_function = None
---> 66 self._compute_len_series()

File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\interpolator.py:822, in InterpolatorModel.compute_len_series(self)
817 self.len_series_f = np.atleast_1d(len_series_f
.astype(
818 'int32')) # [:self.additional_data.get_additional_data()['values']['Structure', 'number series']]
820 self._old_len_series = self.len_series_i
--> 822 self.len_series_i = self.len_series_i[non_zero]
823 self.len_series_o = self.len_series_o[non_zero]
824 # self.len_series_f = self.len_series_f[non_zero]

IndexError: invalid index to scalar variable.

I have spent the whole day trying to figure this out. It is really disturbing as i have reinstalled GemPy and install severally..

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel

When I used the current version of numpy numpy==1.26.1 I run into an error
when i use the lower version mumpy==1.23.5, I get into another error.

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

@vincent1990-adongo what is your pandas version? There has been a bug since pandas 2.0.2,so it is recommended to use pandas 2.0.1

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel I have to check and get back to you tomorrow. I left the lab a while ago. I will appreciate if we could arrange for a meeting via zoom to talk extensively anytime you are less busy. ..

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

Next week may work for a call

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel
Thanks a lot. I appreciate your time and effort. I will be happy to have a chat next week.

I resolved the issue with the numPy error by installing numpy==1.24.1

I am still struggling with the fault intersection along the dip incase you have any suggestions?

I will let you know of anything else!!

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel

Checking up on you and trying to know if you have anytime within the week for the short discussion.

I hope to hear from you soon

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

This week will not work. Maybe next week

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

@vincent1990-adongo,

how does the week of the 13th of November look for you in terms of a meeting?

from gemgis.

vincent1990-adongo avatar vincent1990-adongo commented on September 27, 2024

@AlexanderJuestel. That will be great! I will appreciate a specific date. I will have my RSP meeting on 16th November and 17th is not bad at all.

I hope to hear from you soon.

from gemgis.

AlexanderJuestel avatar AlexanderJuestel commented on September 27, 2024

Please send a message to [email protected] to talk further.

from gemgis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.