-
Notifications
You must be signed in to change notification settings - Fork 46
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
plotting issues in Ch4 and Ch2/3 #11
Comments
Hi @DEKOHG, thanks a lot for reporting! This sounds similar to #10. Can you look there and see if perhaps the same thing is happened to you as well? If not, I'll try to reproduce. Can you let me know your Python version, as well as attach the output file from tsunami that you're passing to the Python script? |
Hi, I an working on a Windows operating system so that I used Intel's Fortran compiler from their oneAPI. I am using python Python 3.8.8 [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 |
I'm seeing the same problem using a fresh install of ifort and IPython. It has been too long since I did much with python. |
Well, maybe not cards, but they do insert \n in the output at about 80 characters to make it 'human readable'. The fix is to supply the compile flag --no-wrap-margin in Linux and /wrap-margin- in Windows (note the trailing '-'). Hi @milancurcic, |
Thanks @jpc2, the UTF-16 setting was introduced in #13 specifically for compatibility with Windows. I really don't know Windows and don't know better one way or another, but happy to revert if that change was actually adverse. Is there any official Windows doc specifying which Unicode formats are supported by which OS versions? |
@milancurcic if there is an official Windows doc that gives real specifics I've not found it. The closest I've found is https://docs.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page. |
Hi,
After I ran my Fortran code and saved the result to a txt, it gave an error when feeding into the python script:
plot_water_height.py:26: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
h = np.array([[float(x) for x in line[1:]] for line in data])
Traceback (most recent call last):
File "plot_water_height.py", line 27, in
x = np.arange(1, h.shape[1]+1)
IndexError: tuple index out of range
I am not sure how to fix the python script. Thanks.
The text was updated successfully, but these errors were encountered: