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

.his files created with pynoddy cannot be read with noddy GUI or CLI #29

Closed
LSgeo opened this issue Apr 28, 2020 · 10 comments
Closed

.his files created with pynoddy cannot be read with noddy GUI or CLI #29

LSgeo opened this issue Apr 28, 2020 · 10 comments
Assignees

Comments

@LSgeo
Copy link
Contributor

LSgeo commented Apr 28, 2020

I've been following the tutorial here: https://pynoddy.readthedocs.io/en/latest/notebooks/5-Geophysical-Potential-Fields.html

I downloaded the history available here: http://tectonique.net/asg/ch3/ch3_5/his/fold_thrust.his

In the tutorial, an updated history is created from a copy of this history:

his = pynoddy.history.NoddyHistory(url = "http://tectonique.net/asg/ch3/ch3_5/his/fold_thrust.his")
his.determine_model_stratigraphy()
his.change_cube_size(50)
history_name = "fold_thrust_edit.his"
his.write_history(history_name)

This is saved to a new file. Attempting to load the new history file in either the GUI or the command line causes noddy to crash with no error message. Attempting to load the original history file, as downloaded from the above link, works.

I looked at the contents of each file, and there are a few minor differences. I am on Windows, and have tested a few of the precompiled executables with no success.

Is this expected behaviour? Should I try compiling noddy myself?

Cheers

@flohorovicic
Copy link
Collaborator

Thanks for the detailed message and error description! This reinforces my motivation to (finally) write a better wrapper for the call of the executable (see #17 ).

However, I think in your case, this could actually be a bug in the write_history. Is the length of both files equal? Do you mind dropping them here (maybe in a zip)?

@LSgeo
Copy link
Contributor Author

LSgeo commented Apr 28, 2020

issue_29.zip

I've also made a code changes in my fork to fix a few things I think are bugs. I'm by no means a python expert, but I think they are real fixes. I'll make a pull request collating them when I work through it a little more.

@flohorovicic
Copy link
Collaborator

Thanks a lot, very happy for any contribution - pull request would be perfect.

@flohorovicic
Copy link
Collaborator

Quick reply:

The only difference I could see (with a quick check) is that there is one extra empty line in fold_thrust_edit.his. Can you try removing this line and see if it works, then?

Anyway, even with this extra empty line, on my system (Mac with the compiled version of Noddy), both history files work. Just to make sure: you tried running noddy also on the command line? I.e. something like

noddy.exe fold_thrust_edit.his fold_thrust_out BLOCK

@flohorovicic flohorovicic self-assigned this Apr 28, 2020
@markjessell
Copy link
Collaborator

markjessell commented Apr 29, 2020 via email

@LSgeo
Copy link
Contributor Author

LSgeo commented Apr 29, 2020

It looks like changing the version number has worked for me in both the gui and in pynoddy. I edited history.py to print Version = 7.03 to .his files, which I imagine reverts a change you've made in the past - is this only an issue on my installation?

Thanks Mark and Florian!

flohorovicic added a commit that referenced this issue Apr 29, 2020
@flohorovicic
Copy link
Collaborator

flohorovicic commented Apr 29, 2020

Thanks a lot for jumping in, in the middle of a zoom meeting, @markjessell! (Actually, difficult to do something outside of zoom meetings, at the moment - as they seem to be continuously present...).

I completely missed the version number! Is there a problem changing it back to 7.03 in the template, @markjessell (would it affect topology calculation, or other new implementations)?

@markjessell
Copy link
Collaborator

markjessell commented Apr 29, 2020 via email

@flohorovicic
Copy link
Collaborator

:-D Of course, what could possibly go wrong? Thanks again, I adjusted the version number. @LSgeo, can you check if it works now (after updating with the newest version from the repo)?

@LSgeo
Copy link
Contributor Author

LSgeo commented Apr 29, 2020

Yes, it's working post-update. Cheers again.

@LSgeo LSgeo closed this as completed Apr 29, 2020
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