You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to support HDF5's dimension scales. We've received multiple feature requests relating to those, including in a couple of recent emails. Dimension scales are apparently used quite extensively in NetCDF4 files, to describe how to plot datasets (axes, units, etc.).
In his email, Jean-Christophe describes, for instance, how to create a time-based dimension scale (which could then be "attached" to a dataset - e.g. values.dims[0].attach_scale(time)).
df_modified=pd.to_datetime(df.index.values) -time# Difference of time from a given datedf_modified_str=df_modified.total_seconds().to_numpy()
time_dset=group.create_dataset ('time', data=df_modified_str)
time_dset.attrs["long_name"] ="UTC Time"time_dset.attrs["description"] =ModelHDFLevel4Lumina.TIME.__doc__time_dset.attrs["calendar"] ="standard"time_dset.attrs["units"] =f"seconds since {time.strftime('%Y-%m-%d %H:%M:%S')}"time_dset.make_scale('time')
It would be nice to support HDF5's dimension scales. We've received multiple feature requests relating to those, including in a couple of recent emails. Dimension scales are apparently used quite extensively in NetCDF4 files, to describe how to plot datasets (axes, units, etc.).
In his email, Jean-Christophe describes, for instance, how to create a time-based dimension scale (which could then be "attached" to a dataset - e.g.
values.dims[0].attach_scale(time)
).More reading:
units
attribute above to indicate that a dimension scale dataset contains relative timestamps.)The text was updated successfully, but these errors were encountered: