<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 1:24 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, May 11, 2015 at 1:19 PM, Joshua Wall <span dir="ltr"><<a href="mailto:joshua.e.wall@gmail.com" target="_blank">joshua.e.wall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Dear users,<br><br></div>    Since I'm already 0 for 1 today, I thought I'd also ask about this error I've seen. I'm trying to get the time series of momentum density in the x-dir from a simulation in FLASH where I have both the plot and particle files with:<br><br>############################################################<br><br>ts = yt.load("/home/josh/amuse-svn/src/amuse/community/flash/SinkMomTest2/SMT_hdf5_plt_cnt_0??[!0]",<br>             particle_filename='/home/josh/amuse-svn/src/amuse/community/flash/SinkMomTest2/SMT_hdf5_part_0??[!0]')<br><br>times = []<br>Mom_x = []<br>Mom_y = []<br><br>for ds in ts:<br>    <br>    <br>    try:<br>        ds.add_field("total_px", function=_px, units="kg/s/m**2")<br>        ds.add_field("total_py", function=_py, units="kg/s/m**2")<br>    except:<br>        continue<br><br>    dd = ds.all_data()<br><br>    Mom_x.append(dd["total_px"])<br>    Mom_y.append(dd["total_py"])<br>    times.append(ds.current_time.in_units("Myr"))<br><br>###########################################################<br><br></div>But this gives the error:<br><br>---------------------------------------------------------------------------<br>IOError                                   Traceback (most recent call last)<br><ipython-input-3-4be7349ef199> in <module>()<br>      9 Mom_y = []<br>     10 <br>---> 11 for ds in ts:<br>     12 <br>     13 <br><br>/usr/local/lib/python2.7/dist-packages/yt/data_objects/time_series.pyc in __iter__(self)<br>    158         for o in self._pre_outputs:<br>    159             if isinstance(o, types.StringTypes):<br>--> 160                 ds = load(o, **self.kwargs)<br>    161                 self._setup_function(ds)<br>    162                 yield ds<br><br>/usr/local/lib/python2.7/dist-packages/yt/convenience.pyc in load(*args, **kwargs)<br>     78         if c._is_valid(*args, **kwargs): candidates.append(n)<br>     79     if len(candidates) == 1:<br>---> 80         return output_type_registry[candidates[0]](*args, **kwargs)<br>     81     if len(candidates) == 0:<br>     82         if ytcfg.get("yt", "enzo_db") != '' \<br><br>/usr/local/lib/python2.7/dist-packages/yt/frontends/flash/data_structures.pyc in __init__(self, filename, dataset_type, storage_filename, particle_filename, units_override)<br>    206                 self._particle_handle = HDF5FileHandler(self.particle_filename)<br>    207             except:<br>--> 208                 raise IOError(self.particle_filename)<br>    209         # These should be explicitly obtained from the file, but for now that<br>    210         # will wait until a reorganization of the source tree and better<br><br>IOError: /home/josh/amuse-svn/src/amuse/community/flash/SinkMomTest2/SMT_hdf5_part_0??[!0]<br></div></div></div></div></blockquote><div><br></div></div></div><div>Unfortunately the FLASH frontend is gobbling the error h5py is raising here.</div><div><br></div><div>A quick way to get the real error from h5py would be to replace "raise IOError..." on line 208 with just "raise" and then rerun the script.</div></div></div></div></blockquote><div><br></div><div>Ah, but now that I think about it, I don't think the glob pattern should have made it all the way down to the FLASH I/O layer.  Maybe there's a bug in the way we set up time series for FLASH datasets that include particle files?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div dir="ltr"><div><div><div><br>#############################################################<br><br></div>Any ideas?<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Joshua Wall<br></font></span></div><span><font color="#888888">Drexel University<br></font></span></div>
<br></span>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div></div>