CDO-2.2.x remap grid conversion fails with "Invalid dimension ID or name"
Added by Jonas Kock am Brink over 1 year ago
Hello,
When I try to convert a grib file from the DWD opendata repository via remap using CDO-2.2.x, I get the following error:
cdo remap (Abort): NetCDF: Invalid dimension ID or name
Any hints on how to resolve this issue? I compiled CDO-2.2.2 from scratch but got the same issue. However, the issue is not present when using CDO-2.1.x (which is part of debian:bookworm).
Steps to reproduce on a Linux machine with docker installed:
docker run -it debian:trixie
# The following commands are run inside the container
apt update && apt install -y cdo wget tar bzip2 libnetcdf-dev
export ECCODES_DEFINITION_PATH=definitions.edzw-2.28.0-1
DWD_ICON_TARGET="ICON_D2_002_EASY/target_grid_icon_d2_002.txt"
DWD_ICON_WEIGHTS="ICON_D2_002_EASY/weights_icon_d2_002.nc"
if ! [ -e "ICON_D2_002_EASY" ]; then
wget "https://opendata.dwd.de/weather/lib/cdo/ICON_D2_002_EASY.tar.bz2"
tar -xf "ICON_D2_002_EASY.tar.bz2"
fi
if ! [ -e "$ECCODES_DEFINITION_PATH" ]; then
wget "https://opendata.dwd.de/weather/lib/grib/eccodes_${ECCODES_DEFINITION_PATH}.tar.bz2"
tar -xf "eccodes_${ECCODES_DEFINITION_PATH}.tar.bz2"
fi
fn="icon-d2-eps_germany_icosahedral_single-level_$(date +%Y%m%d)00_001_2d_t_2m.grib2"
if ! [ -e "$fn" ]; then
wget https://opendata.dwd.de/weather/nwp/icon-d2-eps/grib/00/t_2m/$fn.bz2
bunzip2 $fn.bz2
fi
cdo -f grb2 -remap,$DWD_ICON_TARGET,$DWD_ICON_WEIGHTS "$fn" remapped.grb2
The following software is being used:
$ cdo --version Climate Data Operators version 2.2.0 (https://mpimet.mpg.de/cdo) System: x86_64-pc-linux-gnu CXX Compiler: g++ -g -O2 -ffile-prefix-map=/build/cdo-Agd1TV/cdo-2.2.0=. -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -pthread CXX version : g++ (Debian 12.2.0-14) 12.2.0 C Compiler: gcc -g -O2 -ffile-prefix-map=/build/cdo-Agd1TV/cdo-2.2.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -fPIC -fopenmp -pthread -pthread C version : gcc (Debian 12.2.0-14) 12.2.0 F77 Compiler: f77 -g -O2 -ffile-prefix-map=/build/cdo-Agd1TV/cdo-2.2.0=. -fstack-protector-strong F77 version : GNU Fortran (Debian 12.2.0-14) 12.2.0 Features: 15GB 4threads c++17 OpenMP45 Fortran pthreads HDF5 NC4/HDF5/threadsafe OPeNDAP sz udunits2 proj magics curl fftw3 hirlam_extensions sse2 Libraries: yac/2.6.1 NetCDF/4.9.0 HDF5/1.10.8 proj/9.1.1 curl/7.88.1 magics/4.13.0 CDI data types: SizeType=size_t CDI file types: srv ext ieg grb1 grb2 nc1 nc2 nc4 nc4c nc5 nczarr CDI library version : 2.2.1 ecCodes library version : 2.28.0 NetCDF library version : 4.9.2 of Jun 13 2023 15:05:29 $ exse library version : 1.5.0 FILE library version : 1.9.1
$ nc-config --all This netCDF 4.9.2 has been built with the following features: --cc -> /usr/bin/cc --cflags -> -I/usr/include -I/usr/include/hdf5/serial --libs -> -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf --static -> -lhdf5_hl -lhdf5 -lcrypto -lcurl -lpthread -lsz -lz -ldl -lm -lxml2 --has-dap -> yes --has-dap2 -> yes --has-dap4 -> yes --has-nc2 -> yes --has-nc4 -> yes --has-hdf5 -> yes --has-hdf4 -> no --has-logging -> no --has-pnetcdf -> no --has-szlib -> no --has-cdf5 -> yes --has-parallel4 -> no --has-parallel -> no --has-nczarr -> yes --has-zstd -> yes --has-benchmarks -> no --has-multifilters -> no --has-stdfilters -> deflate szip bz2 --has-quantize -> no --prefix -> /usr --includedir -> /usr/include --libdir -> /usr/lib/x86_64-linux-gnu --plugindir -> --version -> netCDF 4.9.2
Replies (2)
RE: CDO-2.2.x remap grid conversion fails with "Invalid dimension ID or name" - Added by Uwe Schulzweida over 1 year ago
RE: CDO-2.2.x remap grid conversion fails with "Invalid dimension ID or name" - Added by Jonas Kock am Brink over 1 year ago
Sorry for the duplicate, although I had already skimmed the linked issue beforehand I didn't realize it is the same. I checked with the CDO develop branch and it works now, so thank you.