I'm attempting to open MERRA-2 files using xarray, as my title suggests. The specific error I am encountering occurs when I attempt to view the values in a certain variable using a print statement. The error is as follows:
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 5:
#000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
major: Attribute
minor: Can't open object
#001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
major: Virtual Object Layer
minor: Can't open object
#002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
major: Virtual Object Layer
minor: Can't open object
#003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
major: Attribute
minor: Can't open object
#004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
major: Attribute
minor: Unable to initialize object
#005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
major: Attribute
minor: Can't open object
#006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
major: Attribute
minor: Object not found
I believe that this error (warning?) is thrown for every file I attempt to open. If I wait long enough, the command I ran does actually go through, albeit much longer than it should take.
So, my code is below.
import xarray as xr
data = xr.open_mfdataset('/path/to/my/data/*.nc')
print(data.OMEGA.values)
This should print a matrix containing several submatrices (my dimensions are time, lat, lon, level), printing the value at every coordinate. Again, it does eventually do this, but not before giving me the above warning for every single file in my directory.
I've looked at plenty of stackoverflow, HDFforum, and github posts, and none of their solutions have worked/been applicable to my problem.