-
Notifications
You must be signed in to change notification settings - Fork 34
Description
The model I use outputs 3d variables at each output time, in HDF5 format. However, since HDF5 does not support named dimensions, the netCDF engine used to open it adds dimensions in the form "phony_dim_[0,1,2...]". The files also do not have a"time" variable, as the timestamp is recorded as the file name.
I'd like to use NCDatasets.jl to open the files as a multi-file dataset (similar to xarray's mfdataset in Python). Using xarray, I was able to specify concat_dim="time" when opening an mfdataset. While that dimension/variable did not exist in the data, xarray would create it and then concat each data file along that axis.
Is this possible in NCDatasets? I've tried poking around a bit but can't seem to find anything that works. The docs specify that the dimension in theaggdim argument needs to exist or the files will be assumed constant.
Is the functionality I'm describing possible, or implementable? I'm relatively new to Julia but I would be willing to help implement it if it's not possible in the current version.
To Reproduce
I uploaded some small datasets uploaded here (on x/y/z = 16/16/256 grid). Using NCDatasets:
ds = Dataset(["control-A-2019-07-02-000000-g1.h5", "control-A-2019-07-02-000500-g1.h5", "control-A-2019-07-02-001000-g1.h5"]; aggdim="time")
Expected behavior
Expected dataset with added dimension along new time axis
Environment
- operating system: Fedora 33/Ubuntu 18.04.4 LTS
- Julia version: 1.5.3
- NCDatasets version: 0.11.3
Thank you!