Unable to manipulate GRIB files with CDO
Added by U. Cordier over 2 years ago
Hello,
I am trying to use CDO for an electronic project where I have to select certain types of data from a weather model (AROME HD).
I pretty much managed to install the CDO tool by following this YouTube video. https://www.youtube.com/watch?v=cuB00_xWk-0
I'm on Windows so it complicates things, so I use cygwin.
The install seems to have worked, as I can recognize the .nc files.
On the other hand, I have to manipulate grib files and there it doesn't work.
AzureAD+ordi2113604@PNL-R9131HLL /bin
$ cdo sinfov meteo.grib2
GRIB_API ERROR : Unable to find boot.def. Context path=/usr/local/share/grib_api/definitions
grib_context.c at line 216: assertion failure Assert(0)
Aborted (core dumped)
I took a random .nc file and it seems to work.
AzureAD+ordi2113604@PNL-R9131HLL /bin
$ cdo sinfov meteo.nc
File format : NetCDF4
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name
1 : unknown unknown c instant 1 1 499989 1 I32 : tri
2 : unknown unknown c instant 1 1 89695 2 I16 : MAPSTA
3 : unknown unknown v instant 1 1 89695 2 I16 : dir
4 : unknown unknown v instant 1 1 89695 2 I16 : hs
5 : unknown unknown v instant 1 1 89695 2 I16 : hsts
6 : unknown unknown v instant 1 1 89695 2 I16 : pdir0
7 : unknown unknown v instant 1 1 89695 2 I16 : pdir1
8 : unknown unknown v instant 1 1 89695 2 I16 : pdir2
9 : unknown unknown v instant 1 1 89695 2 I16 : phs0
10 : unknown unknown v instant 1 1 89695 2 I16 : phs1
11 : unknown unknown v instant 1 1 89695 2 I16 : phs2
12 : unknown unknown v instant 1 1 89695 2 I16 : pt0m10
13 : unknown unknown v instant 1 1 89695 2 I16 : pt0m11
14 : unknown unknown v instant 1 1 89695 2 I16 : pt0m12
15 : unknown unknown v instant 1 1 89695 2 I16 : ptp
16 : unknown unknown v instant 1 1 89695 2 I16 : ptp0
17 : unknown unknown v instant 1 1 89695 2 I16 : ptp1
18 : unknown unknown v instant 1 1 89695 2 I16 : ptp2
19 : unknown unknown v instant 1 1 89695 2 I16 : spr
20 : unknown unknown v instant 1 1 89695 2 I16 : t0m1
Grid coordinates :
1 : generic : points=499989 (3x166663)
2 : generic : points=89695
Vertical coordinates :
1 : surface : levels=1
Time coordinate : 54 steps
RefTime = 1990-01-01 00:00:00 Units = days Calendar = standard
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
2022-07-01 01:00:00 2022-07-01 02:00:00 2022-07-01 03:00:00 2022-07-01 04:00:00
2022-07-01 05:00:00 2022-07-01 06:00:00 2022-07-01 07:00:00 2022-07-01 08:00:00
2022-07-01 09:00:00 2022-07-01 10:00:00 2022-07-01 11:00:00 2022-07-01 12:00:00
2022-07-01 13:00:00 2022-07-01 14:00:00 2022-07-01 15:00:00 2022-07-01 16:00:00
2022-07-01 17:00:00 2022-07-01 18:00:00 2022-07-01 19:00:00 2022-07-01 20:00:00
2022-07-01 21:00:00 2022-07-01 22:00:00 2022-07-01 23:00:00 2022-07-02 00:00:00
2022-07-02 01:00:00 2022-07-02 02:00:00 2022-07-02 03:00:00 2022-07-02 04:00:00
2022-07-02 05:00:00 2022-07-02 06:00:00 2022-07-02 07:00:00 2022-07-02 08:00:00
2022-07-02 09:00:00 2022-07-02 10:00:00 2022-07-02 11:00:00 2022-07-02 12:00:00
2022-07-02 13:00:00 2022-07-02 14:00:00 2022-07-02 15:00:00 2022-07-02 16:00:00
2022-07-02 17:00:00 2022-07-02 18:00:00 2022-07-02 21:00:00 2022-07-03 00:00:00
2022-07-03 03:00:00 2022-07-03 06:00:00 2022-07-03 09:00:00 2022-07-03 12:00:00
2022-07-03 15:00:00 2022-07-03 18:00:00 2022-07-03 21:00:00 2022-07-04 00:00:00
2022-07-04 03:00:00 2022-07-04 06:00:00
cdo sinfon: Processed 20 variables [0.06s 12MB]
Can you help me ?
Know that I have never used this kind of tools before and that I am not very comfortable with terminals, so please explain to me so that I understand well.
Replies (7)
RE: Unable to manipulate GRIB files with CDO - Added by Karin Meier-Fleischer over 2 years ago
Can you show us the output of
cdo -V
RE: Unable to manipulate GRIB files with CDO - Added by U. Cordier over 2 years ago
I should have posted it earlier sorry.
Here it is:
$ cdo -V
Climate Data Operators version 1.9.4rc1 (http://mpimet.mpg.de/cdo)
System: x86_64-unknown-cygwin
CXX Compiler: g++ -g -O2 -fopenmp
CXX version : g++ (GCC) 6.4.0
C Compiler: gcc -g -Wall -O2 -DPIC -pie -mwindows -fopenmp
C version : gcc (GCC) 6.4.0
F77 Compiler: gfortran -g -O2
F77 version : GNU Fortran (GCC) 6.4.0
Features: 7GB C++14 Fortran DATA PTHREADS OpenMP45 HDF5 NC4/HDF5/threadsafe OPeNDAP UDUNITS2 PROJ.4 SSE2
Libraries: HDF5/1.8.17 proj/5
Filetypes: srv ext ieg grb1 grb2 nc1 nc4 nc4c nc5
CDI library version : 1.9.3 of Mar 13 2018 15:54:29
CGRIBEX library version : 1.9.0 of Jan 22 2018 09:24:03
GRIB_API library version : 1.16.0
NetCDF library version : 4.4.0 of Jun 21 2016 15:28:18 $
HDF5 library version : 1.8.17 threadsafe
EXSE library version : 1.4.0 of Mar 13 2018 15:54:15
FILE library version : 1.8.3 of Mar 13 2018 15:54:45
RE: Unable to manipulate GRIB files with CDO - Added by Karin Meier-Fleischer over 2 years ago
This is an old version, the current version is 2.0.5. Please install the current version.
RE: Unable to manipulate GRIB files with CDO - Added by U. Cordier over 2 years ago
I deleted the cdo.exe file in the bin folder of cygwin. I added the latest version cdo.exe and cygeccodes.dll .
Then I install cdo by doing ldd ./cdo.exe , it seems to work, no error message.
Yet there is a problem, it does not respond to the instructions:
AzureAD+ordi2113604@PNL-R9131HLL /bin $ cdo -V AzureAD+ordi2113604@PNL-R9131HLL /bin $ cdo sinfon meteo.nc AzureAD+ordi2113604@PNL-R9131HLL /bin $
I don't know where the problem comes from.
RE: Unable to manipulate GRIB files with CDO - Added by Karin Meier-Fleischer over 2 years ago
Sorry, but here we need someone working with Windows 10 and cygwin to weigh in.
RE: Unable to manipulate GRIB files with CDO - Added by Estanislao Gavilan over 2 years ago
Hi,
I have not been able to use remapcon in the windows version. Did you try to set a Linux virtual machine? cdo is more friendly in linux environment
Kind regards,
Estanislao
RE: Unable to manipulate GRIB files with CDO - Added by U. Cordier over 2 years ago
Thanks a lot !
Yes it works after installing an Ubuntu virtual machine.
It's still a pity that there is no functional version of CDO under Windows even though it is the most used OS.