Skip to content
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

Error when try to use gp.create_model('welly_integration') #988

Open
DCCP80 opened this issue Feb 25, 2025 · 4 comments
Open

Error when try to use gp.create_model('welly_integration') #988

DCCP80 opened this issue Feb 25, 2025 · 4 comments

Comments

@DCCP80
Copy link

DCCP80 commented Feb 25, 2025

i'm trying to work through this tutorial:
https://docs.gempy.org/integrations/gempy_striplog.html#sphx-glr-download-integrations-gempy-striplog-py

Is there an updated create model tool? I know there was a similar issue when using
import gempy as gp

but i'm hoping there is a simple answer to this.

Image

This is the versions i'm running:
gempy is 2024.2.0.2

Image

I'm in the latest ArcGIS Pro using their juptyr notebook. Thank you!

Dan Amrine

@javoha
Copy link
Member

javoha commented Feb 26, 2025

Hello @DCCP80,

thanks for your question. Maybe we need a little more information to help: Are you using the most recent gempy version. Gempy had a major update roughly a year ago including many changes.

To my knowledge though, gp.create_model('welly_integration') would never have been a working command on its own as it is missing required arguments.

I would suggest to take a look at our new video tutorial series to get up to speed, if that is the issue:
https://docs.gempy.org/tutorials/z_other_tutorials/video_tutorial_model_1.html#sphx-glr-tutorials-z-other-tutorials-video-tutorial-model-1-py

Otherwise maybe you could specify the exact problem?

Cheers,
Jan

@DCCP80
Copy link
Author

DCCP80 commented Feb 26, 2025

Thank you for the quick reply! I'm following this workflow
https://docs.gempy.org/integrations/gempy_striplog.html#sphx-glr-download-integrations-gempy-striplog-py

The problem is all the previous steps work, until creating the geomodel. Do you have to have orientation points for it to work?

They us this gp.init_data to call the geo_model = gp.create_model('welly_inegration')
is this workflow outdated now? I can't clone or use older versions, i'm limited to the most up to date.

I tried using the example from video but the surface points are in a DataFrame and not a .csv file.

@javoha
Copy link
Member

javoha commented Feb 27, 2025

Hi again,
I took a quick look at the old tutorial notebook you linked (and also saw your post just ow in the discussion).

As you said already this tutorial is very outdated. Assuming that welly and striplog still work the same way you should be able to reproduce the results thought with a bit of coding.

First of all, gempy does not take dataframes as inout anymore, so yes the easiest way would be to export as csv using df.to_csv().
You also noticed that gempy requires orientations. I the old example notebook there was a function that sets default orientations, but I think this doesnt exist anymore. The easiest workaround is to create another .csv file that contains upward facing orientations. A simple example can be found here for this simple model . You would just need to adjust coordinates and the correct element names.

The creating a model works liek this:

# Create a GeoModel instance
geo_model = gp.create_geomodel(
    project_name='horizontal',
    extent=[-100, 300, -100, 200, -150, 0],
    resolution=[60, 60, 60],
    importer_helper=gp.data.ImporterHelper(
        path_to_orientations="here_would_be_your_file_path"
        path_to_surface_points="here_would_be_your_file_path"
    )
)

There might be some other adjustments along the way but this should give you the start.

EDIT: Gempy does always require orientation data. Please check the references provided on the homepage if you are interested in understanding the underlying universal cokriging interpolation.

@DCCP80
Copy link
Author

DCCP80 commented Feb 28, 2025

Awesome, I will make this happen. Thank you for the great response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants