I am trying to download CAMS data from CDS and the error in the header is printed. If I understand well a necessary file is missing from my conda environment. (I am working in a cluster with CentOS 7).

nc-config --all

This netCDF 4.8.1 has been built with the following features:

--cc -> x86_64-conda-linux-gnu-cc --cflags -> -I/mnt/..../ditsiaou/0203_385/0203_385/include --libs -> -L/mnt/..../ditsiaou/0203_385/0203_385/lib -lnetcdf --static -> -lmfhdf -ldf -lhdf5_hl -lhdf5 -lm -lcurl -lzip

--has-c++ -> no --cxx ->

--has-c++4 -> no --cxx4 ->

--has-fortran -> yes --fc -> /home/conda/feedstock_root/build_artifacts/netcdf-fortran_1674656969142/_build_env/bin/x86_64-conda-linux-gnu-gfortran --fflags -> -I/mnt/..../ditsiaou/0203_385/0203_385/include -I/..../ditsiaou/0203_385/0203_385/include --flibs -> -L/mnt/..../ditsiaou/0203_385/0203_385/lib -lnetcdff -lnetcdf -lnetcdf --has-f90 -> TRUE --has-f03 -> yes

--has-dap -> yes --has-dap2 -> yes --has-dap4 -> yes --has-nc2 -> yes --has-nc4 -> yes --has-hdf5 -> yes --has-hdf4 -> yes --has-logging -> no --has-pnetcdf -> no --has-szlib -> no --has-cdf5 -> yes --has-parallel4 -> no --has-parallel -> no --has-nczarr -> yes

--prefix -> /mnt/..../ditsiaou/0203_385/0203_385 --includedir -> /mnt/..../ditsiaou/0203_385/0203_385/include --libdir -> /mnt/..../ditsiaou/0203_385/0203_385/lib --version -> netCDF 4.8.1

conda info

 active environment : /mnt/..../ditsiaou/0203_385/0203_385
active env location : /mnt/..../ditsiaou/0203_385/0203_385
        shell level : 1
   user config file : /home/d/ditsiaou/.condarc

populated config files : /home/d/ditsiaou/.condarc conda version : 22.9.0 conda-build version : not installed python version : 3.7.13.final.0 virtual packages : __linux=3.10.0=0 __glibc=2.17=0 __unix=0=0 __archspec=1=x86_64 base environment : /mnt/apps/..../linux-centos7-x86_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims (read only) conda av data dir : /mnt/apps/..../linux-centos7-x86_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /mnt/..../ditsiaou/2609_385_intel/2609_385_intel/.conda/pkgs /mnt/..../ditsiaou/2023/conda_env/2309_385/2309_385/.conda/pkgs /mnt/..../ditsiaou/models/280923v1/2609_385_intel/2609_385_intel/.conda/pkgs /mnt/..../ditsiaou/2609_385_intel/2609_385_intel/.conda/pkgs/ /mnt/..../ditsiaou/0203_385/0203_385/.conda/pkgs /mnt/..../ditsiaou/0203_385/0207_385_gcc730/.conda/pkgs /mnt/..../ditsiaou/gcc_020223_py385/.conda/pkgs /mnt/..../ditsiaou/intel_3101_py385/.conda/pkgs envs directories : /mnt/..../ditsiaou/2609_385_intel/2609_385_intel/.conda/envs /mnt/..../ditsiaou/2023/conda_env/2309_385/2309_385/.conda/envs /mnt/..../ditsiaou/models/280923v1/2609_385_intel/2609_385_intel/.conda/envs /mnt/..../ditsiaou/2609_385_intel/2609_385_intel/.conda/envs/ /mnt/..../ditsiaou/gcc_020223_py385/0203_385/.conda/envs /mnt/..../ditsiaou/gcc_020223_py385/0207_385_gcc730/.conda/envs /mnt/..../ditsiaou/gcc_020223_py385/.conda/envs /home/d/ditsiaou/.conda/envs /mnt/apps/..../linux-centos7-x86_64/gcc-8.2.0/miniconda3-4.6.14-vsbegnyf5k7bjibmedkatrn73vtq4ims/envs platform : linux-64 user-agent : conda/22.9.0 requests/2.28.1 CPython/3.7.13 Linux/3.10.0-1160.105.1.el7.x86_64 centos/7.9.2009 glibc/2.17 UID:GID : 165170:2000 netrc file : None offline mode : False


1 Answer 1


This question will likely be deleted because there's too little information to answer it and it's really more a question for your cluster support/colleagues. In the meantime...

The shared library libnetcdf.so.11 isn't visible in the environment where you're executing the program. This may be because,

  • The cluster doesn't have netcdf installed in the default user environment
  • You don't have netcdf installed in the Conda environment you have active when you run the program (IIRC installing cdsapi doesn't install netcdf as a dependency)
  • You don't have the right Conda environment active when you run your program (people often miss this if they're submitting jobs to a cluster via SLURM, PBS, etc)
  • Your Conda environment contains a mixture of incompatible package versions (this can happen if you've been manually installing/updating individual packages)

It's worth running things like conda info and nc-config --all at the start of your script to diagnose what the shell environment is at run time.

My install of NetCDF v4.8.1 comes with libnetcdf.so.19. As your grib_to_netcdf is looking for libnetcdf.so.11 I suspect that it was compiled against an earlier version of NetCDF, probably something like v4.4. If you've compiled it yourself, you need to make sure the Conda environment is active when you do the the configure step so that it sees the correct version. Even then you may need to tell configure more explicitly where to look for the correct NetCDF libraries.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.