Weiming-Hu / AnalogsEnsemble

The C++ and R packages for parallel ensemble forecasts using Analog Ensemble
https://weiming-hu.github.io/AnalogsEnsemble/
MIT License
18 stars 5 forks source link

Installation problem? #119

Closed lovechang1986 closed 2 years ago

lovechang1986 commented 2 years ago

I just only install the netcdf-c-4.8.1. When type 'cmake -DCMAKE_INSTALL_PREFIX=~/AnalogEnsemble ..' some error occured...

CMake Error at /opt/cmake-3.12.2/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find NetCDF (missing: NETCDF_LIBRARIES NETCDF_INCLUDES
  NetCDF_has_interfaces)
Call Stack (most recent call first):
  /opt/cmake-3.12.2/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  CAnEnIO/cmake/FindNetCDF.cmake:129 (find_package_handle_standard_args)
  cmake/macros.cmake:21 (_find_package)
  CAnEnIO/CMakeLists.txt:46 (find_package

image

The question:

  1. need to install the netcdf-fortran?
  2. How to solve this problem?
Weiming-Hu commented 2 years ago

It looks like indeed you don't have the C++ extension. Its installation is actually a separate process from the C installation.

Try to install the C++ extension from here: https://github.com/Unidata/netcdf-cxx4/releases/tag/v4.3.1

Weiming-Hu commented 2 years ago

I also recommend checking out this issue where it mentions how to install the C++ extension. If you are not installing to the system paths, you might also need to tell CMake where to find it. The issue has examples.

Weiming-Hu commented 2 years ago

Closing because it is related to https://github.com/Weiming-Hu/AnalogsEnsemble/issues/121