.his files created with pynoddy cannot be read with noddy GUI or CLI
LSgeo opened this issue · 10 comments
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
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)?
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.
Thanks a lot, very happy for any contribution - pull request would be perfect.
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
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!
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)?
:-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)?
Yes, it's working post-update. Cheers again.