<div dir="ltr"><div>Hi Jesse,</div><div><br></div><div>1. I think this is more appropriately for the yt community slack or their other help platforms, since your question isn't really FLASH specific.</div><div>2. Both snippets are technically valid; you will lose information if you set up a covering grid at a lower resolution than your simulation (but sometimes that's intentional which is fine). So probably you want your snippet 2. Although I think you'd have an issue if you're running in 2D. Also note that yt is 0-based whereas FLASH's refinement is 1-based.</div><div><br></div><div>Best wishes,</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">--------<div>Ryan</div></div></div></div></div></div></div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Mar 29, 2025 at 8:32 PM Jesse Chen <<a href="mailto:cxxgc@msn.com">cxxgc@msn.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg3044078703733441907">
<div lang="EN-GB" style="overflow-wrap: break-word;">
<div class="m_3044078703733441907WordSection1">
<p class="MsoNormal"><span lang="EN-US">Dear Flash engineers and users, <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Hope this email finds you well. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I am using yt package of python for processing data from hdf5 files generated with FLASH. I have a question concerning the refinement level. In dealing with hdf5 files, do I need to fix the refinement level or use the
highest one? i.e. Which one of the python snippets below is correct for 2D heatmap plotting and data extraction?
<br>
<br>
Snippet I. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">refinement_level = 2 # 2 only for example<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">domain_left_edge = <a href="http://ds.domain_left_edge.to" target="_blank">ds.domain_left_edge.to</a>("cm")<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">domain_right_edge= <a href="http://ds.domain_right_edge.to" target="_blank">ds.domain_right_edge.to</a>("cm")<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">domain_dimensions= ds.domain_dimensions<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">cg = ds.covering_grid(<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> level = refinement_level,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> left_edge=domain_left_edge,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> dims = domain_dimensions * 2**refinement_level,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Snippet II. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">max_level = ds.max_level<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">base_dims = ds.domain_dimensions<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">highres_dims = base_dims * 2**max_level<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">domain_left_edge = <a href="http://ds.domain_left_edge.to" target="_blank">ds.domain_left_edge.to</a>("cm")<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">domain_right_edge = <a href="http://ds.domain_right_edge.to" target="_blank">ds.domain_right_edge.to</a>("cm")<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">cg = ds.covering_grid(<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> level = max_level,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> left_edge = domain_left_edge,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> dims = highres_dims,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">And for your reference, in the par file, my settings are
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">lrefine_max = 4 <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">lrefine_min = 1<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance for your advice. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Cheers, <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Jesse<br>
<br>
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://flash.rochester.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">https://flash.rochester.edu/mailman/listinfo/flash-users</a><br>
</div></blockquote></div>