[FLASH-USERS] Loading FLASH2.5 files problem with yt
John Zuhone
jzuhone at gmail.com
Wed Aug 14 13:24:35 EDT 2024
Another option is that if you do not care at all about the particle data in this or other files we could find a way to ignore them.
> On Aug 14, 2024, at 1:23 PM, John Zuhone <jzuhone at gmail.com> wrote:
>
> Hi Jordi,
>
> The problem here is that the particle structure in the HDF5 file for versions of FLASH less than 3 is very different than versions >= 3.
>
> The structure in FLASH3 and later is much simpler, it’s a simple 2D real array of number of particles x number of particle attributes. But in FLASH2 it’s a compound data structure. We never got around to supporting that in yt.
>
> You could file an issue on the yt Github page with this error message and with the description I gave here so we don’t forget, not sure when we’d get a chance to address it. If we did address it, we’d need a copy of the file so that we could formulate the fix and test it.
>
> Alternatively, we could reconstruct a FLASH3-like particle structure for you, but if you have a lot of files this may not be ideal.
>
> Best,
>
> John ZuHone
>
>> On Aug 14, 2024, at 1:17 PM, Casanova, Jordi <jcasanova at regis.edu> wrote:
>>
>>
>> Hello flash users!
>>
>> I am using yt to analyze simulations performed with the latest version of FLASH4.7, and everything works fine. However, I would like to check out some old files performed with FLASH2.5. I am not able to load these FLASH2.5 files with yt. Below I am attaching the traceback with the error. Does anyone know what the problem might be? Thank you!
>>
>>
>> yt : [INFO ] 2024-08-14 11:03:29,105 Particle file found: test_hdf5_chk_2396
>>
>>
>> ---------------------------------------------------------------------------
>>
>> TypeError Traceback (most recent call last)
>>
>> Cell In[1], line 2
>> 1 import yt
>> ----> 2 ds=yt.load("/Users/novita/Desktop/test_hdf5_chk_2396")
>>
>>
>> File ~/Library/Python/3.12/lib/python/site-packages/yt/_maintenance/deprecation.py:69, in future_positional_only.<locals>.outer.<locals>.inner(*args, **kwargs)
>> 60 value = kwargs[name]
>> 61 issue_deprecation_warning(
>> 62 f"Using the {name!r} argument as keyword (on position {no}) "
>> 63 "is deprecated. "
>> (...)
>> 67 **depr_kwargs,
>> 68 )
>> ---> 69 return func(*args, **kwargs)
>>
>>
>> File ~/Library/Python/3.12/lib/python/site-packages/yt/loaders.py:144, in load(fn, hint, *args, **kwargs)
>> 136 if missing := cls._missing_load_requirements():
>> 137 warnings.warn(
>> 138 f"This dataset appears to be of type {cls.__name__}, "
>> 139 "but the following requirements are currently missing: "
>> (...)
>> 142 stacklevel=3,
>> 143 )
>> --> 144 return cls(fn, *args, **kwargs)
>> 146 if len(candidates) > 1:
>> 147 raise YTAmbiguousDataType(_input_fn, candidates)
>>
>>
>> File ~/Library/Python/3.12/lib/python/site-packages/yt/frontends/flash/data_structures.py:206, in FLASHDataset.__init__(self, filename, dataset_type, storage_filename, particle_filename, units_override, unit_system, default_species_fields)
>> 204 # Check if the particle file has the same time
>> 205 if self._particle_handle != self._handle:
>> --> 206 part_time = self._particle_handle.handle.get("real scalars")[0][1]
>> 207 plot_time = self._handle.handle.get("real scalars")[0][1]
>> 208 if not np.isclose(part_time, plot_time):
>>
>>
>> TypeError: 'NoneType' object is not subscriptable
>> _______________________________________________
>> flash-users mailing list
>> flash-users at flash.rochester.edu <mailto:flash-users at flash.rochester.edu>
>>
>> For list info, including unsubscribe:
>> https://flash.rochester.edu/mailman/listinfo/flash-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240814/b63dfd6f/attachment.htm>
More information about the flash-users
mailing list