clawpack / apps

Repository of applications of Clawpack and related codes
Other
11 stars 39 forks source link

Beach example has buggy initial data #107

Closed cpraveen closed 1 year ago

cpraveen commented 1 year ago

In this notebook

https://github.com/clawpack/apps/blob/master/notebooks/pyclaw/beach.ipynb

default value of

ambient_surface_height  = 1.

leads to negative values of initial water height, so code will not run.

E.g., set

ambient_surface_height  = 1.2

to get good results.

ketch commented 1 year ago

Thanks for reminding me; I noticed this some time ago and had a branch where I fixed it, but I forgot to make a PR until now.

I've fixed it so that you are allowed to have dry areas (the beach doesn't need to be fully submerged). The initial depth will correctly be set to zero in dry areas.

cpraveen commented 1 year ago

Yes, this change works.

But if I suppress output

claw.verbosity = 0

the notebook seems to hang.

cpraveen commented 1 year ago

i.e., claw.run() does not seem to complete.

ketch commented 1 year ago

I can't reproduce that problem. Please try restarting the kernel and running the whole notebook in order.

cpraveen commented 1 year ago

It wont run even after a total restart, even restarting browser. This is the problem when running in browser. It runs fine in vscode.

mandli commented 1 year ago

I also tried to replicate and could not. Have you tried a different browser by chance?

cpraveen commented 1 year ago

Same problem on firefox and safari, I am on mac os sonoma.

mandli commented 1 year ago

I am on Sonoma and used Safari with success. Have you tried emptying the cache to see if that helps?

cpraveen commented 11 months ago

I have tried cleaning everything, starting fresh browser, but I face the same problem, with jupyter-lab and also with jupyter-notebook.

When I do claw.run(), it prints some messages about negative h, after which the notebook seems to hang, does not complete.

It runs fine inside vscode.

Here are the versions I have

$ conda list|grep jupyter
jupyter-contrib-core      0.4.2                    pypi_0    pypi
jupyter-contrib-nbextensions 0.7.0                    pypi_0    pypi
jupyter-highlight-selected-word 0.2.0                    pypi_0    pypi
jupyter-lsp               2.2.1              pyhd8ed1ab_0    conda-forge
jupyter-nbextensions-configurator 0.6.3                    pypi_0    pypi
jupyter_client            8.6.0              pyhd8ed1ab_0    conda-forge
jupyter_core              5.6.0           py311h267d04e_0    conda-forge
jupyter_events            0.9.0              pyhd8ed1ab_0    conda-forge
jupyter_server            2.12.1             pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.5.1              pyhd8ed1ab_0    conda-forge
jupyterlab                4.0.10             pyhd8ed1ab_0    conda-forge
jupyterlab-widgets        3.0.9                    pypi_0    pypi
jupyterlab_pygments       0.3.0              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.25.2             pyhd8ed1ab_0    conda-forge
--------------------------------------------------------------------------------
$ conda list|grep notebook
notebook                  7.0.6                    pypi_0    pypi
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge