Problem opening a NC file with CDO
Added by Alonso Arriagada over 3 years ago
Hi CDO Community!
I have a problem working with a NetCDF file with CDO.
The file is big (around 10 GB, compressed is 1,33 GB) and it could be downloaded here (File name: CR2MET_v2.0_pr_day_1979_2020): http://www.cr2.cl/datos-productos-grillados/?cp_cr2met=3#
I have use simple functions like info, sinfon, setattribute, etc. to check if anything works, but I got errors, without any advice:
$ cdo sinfon CR2MET_pr_v2.0_day_1979_2020_005deg.nc
cdo sinfon: Open failed on >CR2MET_pr_v2.0_day_1979_2020_005deg.nc<
No such file or directory
$ cdo setattribute,history="test" CR2MET_pr_v2.0_day_1979_2020_005deg.nc test.nc
cdo setattribute: Open failed on >CR2MET_pr_v2.0_day_1979_2020_005deg.nc<
Unknown Error
I have use 'ncdump -h' to check the properties of the file, and it worked.
I have also check the operation of CDO with other NC files, and it has no problems.
Could anyone help me with this issue?
Thank you very much!
Regards,
Alonso A M
Replies (7)
RE: Problem opening a NC file with CDO - Added by Brendan DeTracey over 3 years ago
I think you may have mistyped the file name.
RE: Problem opening a NC file with CDO - Added by Alonso Arriagada over 3 years ago
Hi Brendan!
Thanks for your response.
No I do not mistyped, the entire filename is indeed "CR2MET_pr_v2.0_day_1979_2020_005deg.nc", but in the list of files to download it it says "CR2MET_v2.0_pr_day_1979_2020".
It is weird because with other files of the same web page I have no problems with CDO, like "CR2MET_pr_v2.0_ mon_1979_2019".
Note that I am using Cygwin and various CDO versions (just in case).
Please help!
Regards,
Alonso A M
RE: Problem opening a NC file with CDO - Added by Brendan DeTracey over 3 years ago
- Compile cdo from source under cygwin. (https://code.mpimet.mpg.de/projects/cdo/embedded/index.html#x1-30001.1)
- Install WSL on your windows machine and run cdo from it. (https://code.mpimet.mpg.de/projects/cdo/wiki/Win32)
- Wait for MPIMET to investigate/fix this problem in the cygwin version. (https://code.mpimet.mpg.de/issues/10069)
The issue isthat the cygwin netcdf libraries are not compiled with hdf4 support. In fact there is not cygwin distribution for hdf4. You could use the cygwin version of the NetCDF operators to convert to another netcdf flavor that cdo will not reject.under investigation.
RE: Problem opening a NC file with CDO - Added by Alonso Arriagada over 3 years ago
WOW!! Great!
I'll try to fix it with any of the options you mentioned.
THANKS A LOT!!
Best!
Alonso A M
RE: Problem opening a NC file with CDO - Added by Brendan DeTracey over 3 years ago
Alonso. I have looked for you email here and online, but failed. Please email me at the address in my profile here.
RE: Problem opening a NC file with CDO - Added by Alonso Arriagada over 3 years ago
Hi Brendan!
I have solve the problem installing Ubuntu in Windows 10, and then installing CDO.
Thanks for your concern anyway.
Best.
Alonso.
RE: Problem opening a NC file with CDO - Added by Brendan DeTracey over 3 years ago
Thanks for the reply Alonso. That is the best solution for windows for people who have the admin rights to install WSL1/2.
I have a working cdo version for cygwin, but now you do not need it.