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

Reading Well Data into Subsurface #70

Open
archieskang opened this issue Nov 24, 2023 · 7 comments
Open

Reading Well Data into Subsurface #70

archieskang opened this issue Nov 24, 2023 · 7 comments

Comments

@archieskang
Copy link

I try this Tutorials,and the result is like this.
2023-11-24 233213
need help,plz.

@AlexanderJuestel
Copy link

Hello @archieskang,
which tutorial have you been trying? What have you tried? What is your problem? What alternatives have you tried?

Please elaborate a little more on what your problem is.

Thanks

@archieskang
Copy link
Author

Hello, I have tried the tutorial of how to reading well data into subsurface.
I did not change any code, just follow the tutorial, , after I run:
wts = WellyToSubsurfaceHelper(collar_df=collar, survey_df=survey, lith_df=lith)
as the below screenshot shows, some data failed being processed.
2023-11-25 000649
at the end, the output image also look different compare to the tutorial,
Really appreciate the help, thank you!

@AlexanderJuestel
Copy link

Could you provide us with the dataframes you are using?

@archieskang
Copy link
Author

Yes, here they are:
2023-11-25 110809
2023-11-25 110859
2023-11-25 110922
2023-11-25 110945

@AlexanderJuestel
Copy link

@archieskang, could you provide us with the data? Not just screenshots.

@archieskang
Copy link
Author

sorry,here is the code:
base_url = "https://raw.githubusercontent.com/softwareunderground/subsurface/main/tests/data/borehole/"

data_hash = "a91445cb960526398e25d8c1d2ab3b3a32f7d35feaf33e18887629b242256ab6"
raw_borehole_data_csv = pooch.retrieve(url=base_url + 'kim_ready.csv',
known_hash=data_hash)

reading_collars = ReaderFilesHelper(
file_or_buffer=raw_borehole_data_csv, # Path to file
index_col="name", # Column used as index
usecols=['x', 'y', 'altitude', "name"] # Specific columns for collar
)

We can see the fields from the class easily converting it to a dict

asdict(reading_collars)

collar = read_collar(reading_collars)
collar

survey = read_survey(
ReaderFilesHelper(
file_or_buffer=raw_borehole_data_csv,
index_col="name",
usecols=["name", "md"]
)
)
survey

lith = read_lith(
ReaderFilesHelper(
file_or_buffer=raw_borehole_data_csv,
usecols=['name', 'top', 'base', 'formation'],
columns_map={'top': 'top',
'base': 'base',
'formation': 'component lith',
}
)
)

lith

wts = WellyToSubsurfaceHelper(collar_df=collar, survey_df=survey, lith_df=lith)

@Japhiolite
Copy link
Member

The collar coordinates to not get parsed correctly through the WellyToSubsurfacehelper.
Try adding the coordinates of the borehole collar to the wells in the welly project. So, if we assume that the collar dataframe has BHID, X, Y, Z columns, and the welly uwi = BHID it might work along the lines:

import subsurface as su


wts = su.reader.wells.WellyToSubsurfaceHelper(collar_df=collar, survey_df=survey, lith_df=lith)

for project in wts.p:
    name = project.uwi # get unique borehole name
    collar_coordinates = collar.query('BHID==@name').values
    project.location.position = project.location.position + collar_coordinates

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

3 participants