[yt-users] Saving clump data

José Mauricio Utreras jutreras at ug.uchile.cl
Fri Sep 22 06:32:01 PDT 2017


Hello yt users,

I have tried to save a clump dataset but I'm getting the following error:

*Code:*
*...*

*find_clumps(master_clump, cmin, cmax, step)*

*fn=master_clump.save_as_dataset(fields=["cell_mass",
"total","x","y","z","velocity_x","velocity_y","velocity_z"])*
*print(fn)*

*...*

*Error*

*yt : [INFO     ] 2017-09-22 10:34:12,164 Saving field data to yt dataset:
G-0001_clump_0.h5.*
*Traceback (most recent call last):*
*  File "Save_Clumps.py", line 43, in <module>*
*    master_clump.save_as_dataset(fields=["cell_mass",
"total","x","y","z","velocity_x","velocity_y","velocity_z"])*
*  File
"/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/analysis_modules/level_sets/clump_handling.py",
line 365, in save_as_dataset*
*    extra_attrs=extra_attrs)*
*  File
"/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py",
line 149, in save_as_dataset*
*    _yt_array_hdf5(fh[field_type], field_name, data[field])*
*  File
"/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py",
line 208, in _yt_array_hdf5*
*    dataset = fh.create_dataset(str(field), data=data)*
*  File
"/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py",
line 111, in create_dataset*
*    self[name] = dset*
*  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
(/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)*
*  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
(/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)*
*  File
"/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py",
line 276, in __setitem__*
*    h5o.link(obj.id <http://obj.id>, self.id <http://self.id>, name,
lcpl=lcpl, lapl=self._lapl)*
*  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
(/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)*
*  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
(/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)*
*  File "h5py/h5o.pyx", line 202, in h5py.h5o.link
(/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/h5o.c:3901)*
*RuntimeError: Unable to create link (Name already exists)*

A file G-0001_clump_0.h5 is created but when I try to load the data I get
another error

*----> 1 ds_clumps = yt.load('CLUMPS/G-0001_clump_0.h5')*

*~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(*args,
**kwargs)*
*     96                 return output_type_registry[n](fn)*
*     97         mylog.error("Couldn't figure out output type for %s",
args[0])*
*---> 98         raise YTOutputNotIdentified(args, kwargs)*
*     99 *
*    100     mylog.error("Multiple output type candidates for %s:",
args[0])*

*YTOutputNotIdentified: Supplied ('CLUMPS/G-0001_clump_0.h5',) {}, but
could not load!*


Cheers!

José Utreras
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170922/31b5077d/attachment.htm>


More information about the yt-users mailing list