[FLASH-USERS] Trying to plot in FLASH with jupyter notebook and pyplot

Slavin, Jonathan jslavin at cfa.harvard.edu
Thu Jun 1 09:53:54 EDT 2023


Hi Divyanshu,

I'd suggest using yt (https://yt-project.org/) for reading in the data. For
individual files its as simple as
ds = yt.load(filename). Also, typically you want to read in the plot files
rather than the checkpoint files. That is the files named *_plt_cnt_*.
Those are smaller files and if you've set your parameters correctly should
contain all the data you want to plot.

Once you've read in the data, to plot it you can either use the methods of
yt or get the data into a fixed resolution buffer and plot with matplotlib.
Check out the documentation on the yt site.

Regards,
Jon

On Wed, May 31, 2023 at 6:29 PM <flash-users-request at flash.rochester.edu>
wrote:

> ---------- Forwarded message ----------
> From: "Sharma, Divyanshu Raj" <sharma22 at llnl.gov>
> To: "flash-users at flash.rochester.edu" <flash-users at flash.rochester.edu>
> Cc:
> Bcc:
> Date: Wed, 31 May 2023 22:29:27 +0000
> Subject: [FLASH-USERS] Trying to plot in FLASH with jupyter notebook and
> pyplot
>
> Hi,
>
>
>
> I am trying to plot in python in the jupyter notebook by taking the Sedov
> files from my run (specifically the sedov_hdf5_chk_0000 to 0005) but there
> is no easy way to do it so far, the best way I found was using this code I
> found online, but I am getting low fidelity model. I want to get a model
> like when I use visit. I have attached the visit visualization and my code
> and my visualization below. I head ‘yt’ could be imported from a thread,
> but that thread ended with no progress as seen here.
> https://flash.rochester.edu/pipermail/flash-users/2021-June/003555.html
>
>
>
> Visit:
>
>
>
> Python code and visualization:
>
>
>
>
> _______________________________________________
> flash-users mailing list
> flash-users at flash.rochester.edu
> https://flash.rochester.edu/mailman/listinfo/flash-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230601/4ed36175/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 178959 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230601/4ed36175/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 179625 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230601/4ed36175/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 35039 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230601/4ed36175/attachment-0002.png>


More information about the flash-users mailing list