-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
68. Creating finite fault. #310
Comments
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. |
orientations.csv @vincent1990-adongo, Please find the input data attached. Maybe this will solve the problem already. |
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', {'Fault2': [PolyData (0x22a44b0cc40) ##I had the following error. However, I do not see the difference between Fault1 and Fault2 apart from their orientation? |
Any comments or suggestion @AlexanderJuestel |
@vincent1990-adongo It may take a while to answer as we are also following regular jobs. So, a little patience would be appreciated. |
Thank you very much. I hope you have understood what I am trying to point out @AlexanderJuestel ? |
@vincent1990-adongo I can reproduce your error. I will have a look at what is going on! |
@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 |
@vincent1990-adongo , there is nothing wrong with the code. Depending on the direction of the fault, you may have to use the 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 |
@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. 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. #Also, the fault is finite along the strike only. Is there any possibility of making the fault down the dip finite as well? You may kindly review this when you are free. |
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() |
@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. |
You can extract the meshes from the GemPy model, see tutorial 18 I believe. Then, plot everything in the same pyvista plot |
@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? |
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? |
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! |
just let me know if you have further questions :) |
@AlexanderJuestel geo_model = gp.create_model('Graben_Model') IndexError Traceback (most recent call last) File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\gempy_api.py:114, in create_model(project_name) File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\model.py:1628, in Project.init(self, project_name) File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\model.py:85, in ImplicitCoKriging.init(self) 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) 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) File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\interpolator.py:822, in InterpolatorModel.compute_len_series(self) 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.. |
When I used the current version of numpy numpy==1.26.1 I run into an error |
@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 |
@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. .. |
Next week may work for a call |
@AlexanderJuestel 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!! |
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 |
This week will not work. Maybe next week |
how does the week of the 13th of November look for you in terms of a meeting? |
@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. |
Please send a message to [email protected] to talk further. |
I have a problem creating finite fault using example 68. Anytime I try to run this set of code, I get an error. I do not know exactly where this error is coming from.
gp.init_data(geo_model, [0, 1000, -500, 1500, -600, 0], [50,50,50],
surface_points_df=interfaces,
orientations_df=orientations,
default_values=True)
gp.map_stack_to_surfaces(geo_model,
{
'Fault1': ('Fault1'),
'Fault2': ('Fault2'),
'Strata1': ('Layer1', 'Layer2', 'Layer3'),
},
remove_unused_series=True)
geo_model.add_surfaces('Basement')
geo_model.set_is_fault(['Fault1', 'Fault2'])
geo_model.set_topography(source='random')
gp.set_interpolator(geo_model,
compile_theano=True,
theano_optimizer='fast_compile',
verbose=[],
update_kriging=False
)
geo_model.surfaces
###I encounted this kind of error [output]
Active grids: ['regular']
AssertionError Traceback (most recent call last)
Cell In[13], line 1
----> 1 gp.init_data(geo_model, [0, 1000, -500, 1500, -600, 0], [50,50,50],
2 surface_points_df=interfaces,
3 orientations_df=orientations,
4 default_values=True)
6 gp.map_stack_to_surfaces(geo_model,
7 {
8 'Fault1': ('Fault1'),
(...)
11 },
12 remove_unused_series=True)
13 geo_model.add_surfaces('Basement')
File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\gempy_api.py:192, in init_data(geo_model, extent, resolution, **kwargs)
190 kwargs['update_surfaces'] = False
191 if 'orientations_df' in kwargs:
--> 192 geo_model.set_orientations(kwargs['orientations_df'], **kwargs)
194 return geo_model
File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\model.py:1084, in ImplicitCoKriging.set_orientations(self, table, **kwargs)
1081 c = np.array(self._orientations._columns_o_1)
1082 orientations_read = table.assign(
1083 **dict.fromkeys(c[~np.in1d(c, table.columns)], np.nan))
-> 1084 self._orientations.set_orientations(
1085 coord=orientations_read[[coord_x_name, coord_y_name, coord_z_name]],
1086 pole_vector=orientations_read[[g_x_name, g_y_name, g_z_name]].values,
1087 orientation=orientations_read[
1088 [azimuth_name, dip_name, polarity_name]].values,
1089 surface=orientations_read[surface_name])
1091 self.map_geometric_data_df(self._orientations.df)
1092 self._rescaling.rescale_data()
File ~\anaconda3\envs\gempy_tutorial\Lib\site-packages\gempy\core\data_modules\orientations.py:103, in Orientations.set_orientations(self, coord, pole_vector, orientation, surface)
101 # Add nugget effect
102 self.df['smooth'] = 0.01
--> 103 assert ~self.df['surface'].isna().any(), 'Some of the surface passed does not exist in the Formation'
104 'object. %s' % self.df['surface'][self.df['surface'].isna()]
AssertionError: Some of the surface passed does not exist in the Formationobject. 3 NaN
4 NaN
Name: surface, dtype: category
Categories (2, object): ['Layer1', 'Layer2']
How do I resolve this error?
Also, the data 'intersection.csv' and 'orientations.csv' have not been included in your github repository, can have access to that data?
The text was updated successfully, but these errors were encountered: