-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CFA Virtualisation using CMIP6 example data: Unable to aggregate #793
Comments
Hi Dan, short answer (because I'm going home!), try: >>> f = cf.read(files, chunks=None)
>>> cf.write(f, 'cfa.nc', cfa=True) I did this on your data on JASMIN and it worked OK. Long answer and explanations to follow ... |
Tried this exactly as you've stated but I still get the runtime error with netcdf. FYI I'm using |
Interesting. I was using >>> cf.environment(paths=False)
Platform: Linux-3.10.0-1160.114.2.el7.x86_64-x86_64-with-glibc2.17
HDF5 library: 1.12.2
netcdf library: 4.9.3-development
udunits2 library: ~/miniconda3/lib/libudunits2.so.0
esmpy/ESMF: not available
Python: 3.12.2
dask: 2024.7.0
netCDF4: 1.6.5
psutil: 5.9.8
packaging: 23.1
numpy: 1.26.4
scipy: 1.12.0
matplotlib: not available
cftime: 1.6.3
cfunits: 3.3.7
cfplot: not available
cfdm: 1.11.1.0
cf: 3.16.2
>>> |
|
Couple of questions with the above, is the hdf5 library just installed with |
I've backdated netCDF4 to 1.6.5 and also adjusted my scipy and numpy versions to match yours as well. It looked like I was making progress because I had a file that appeared which was about 6MB, but after 4-5 minutes the process exited with the same error as before (Can't write aggregated variable...) and the file disappeared. Note: Immediately rerunning this process only took 10 seconds to reach the same error so I think those 4-5 minutes were fetching the data (if that's even supposed to happen here?) |
Hi Dan, I just defer to netCDF4 to install the correct and consistent netCDF-C and HDF5 libraries, and that has, for many years, just worked .... Strange about your results - the write took ~1 minute for me. Are you using the C libraries installed by the python packages? |
I haven't done any extra steps to install alternative C libraries so I would assume yes, although I wouldn't know how to check. |
My current environment setup for reference
|
Example CMIP6 data (JASMIN)
Attempted to aggregate the first two example files (successful)
Normal
cf.write
functions properly here by creating a combined netCDF file of both files, but using withcfa=True
results in one of the following, depending on if I take the whole of both Fields (116880 time steps):RuntimeError: NetCDF: HDF error
or a subselection of the last 10 from file 1 and the first 10 from file 2 .
g = cf.aggregate([ f[0][-10:], f[1][:10] ])
cf-python 3.16.2 (latest)
cfdm 1.11.1.0 (latest)
The text was updated successfully, but these errors were encountered: