(self, filename_or_obj, *, drop_variables=None)
| 382 | """Xarray backend targeting Dedalus HDF5 outputs.""" |
| 383 | |
| 384 | def open_dataset(self, filename_or_obj, *, drop_variables=None): |
| 385 | with h5py.File(filename_or_obj, 'r') as file: |
| 386 | data_arrays = {} |
| 387 | for dset in file['tasks'].values(): |
| 388 | name = dset.name.split('/')[-1] |
| 389 | if drop_variables is None or name not in drop_variables: |
| 390 | data_arrays[name] = dedalus_h5_to_xarray(dset) |
| 391 | return xarray.Dataset(data_arrays) |
| 392 |
nothing calls this directly
no test coverage detected