dedalus icon indicating copy to clipboard operation
dedalus copied to clipboard

KelvinHelmholtzInstability.ipynb broken

Open tbenthompson opened this issue 3 years ago • 2 comments

Just a heads up that I ran into an error when running the KelvinHelmholtzInstability.ipynb notebook. Given that the notebook seems to have been either moved or removed in the d3 branch, maybe this isn't worth the effort, but I figured I'd mention it!

See cell 13:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/folders/mt/cmys2v_143q1kpcrdt5wcdyr0000gn/T/ipykernel_17379/1618609085.py in <module>
     15     if solver.iteration % 10 == 0:
     16         # Update plot of scalar field
---> 17         p.set_array(np.ravel(S['g'][:-1,:-1].T))
     18         display.clear_output()
     19         display.display(plt.gcf())

~/.mambaforge/envs/dedalus/lib/python3.8/site-packages/matplotlib/collections.py in set_array(self, A)
   2071 
   2072             if faulty_data:
-> 2073                 raise TypeError(
   2074                     f"Dimensions of A {A.shape} are incompatible with "
   2075                     f"X ({width}) and/or Y ({height})")

TypeError: Dimensions of A (41041,) are incompatible with X (289) and/or Y (145)

tbenthompson avatar Dec 16 '21 13:12 tbenthompson

Thanks, Ben. Just to clarify -- are you trying to run this on the d3 branch, or just with the regular (v2) code? Not planning to support this for v3, but happy to fix any issues for v2.

kburns avatar Dec 16 '21 13:12 kburns

I was running with the v2 master branch. I installed via the recommended conda_install.sh script and I'm on version 2.2006.

tbenthompson avatar Dec 16 '21 15:12 tbenthompson

Looks like it was just out of date since pcolormesh's behavior has changed. Anyways should be fixed in c6ad99e3fbb026d6d60149cf42db0ea4bc10f40a.

kburns avatar Aug 30 '22 17:08 kburns