NOAA-EMC / NCEPLIBS-external

Third-party libraries required by NCEPLIBS
Other
8 stars 16 forks source link

Build wgrib2 with NetCDF support #44

Closed climbfuji closed 4 years ago

climbfuji commented 4 years ago

wgrib2 is part of the external libraries. For the UFS v1.0.0 release, we had to build wgrib2 without NetCDF support. This is because the wgrib2 build creates its entire software stack based on certain versions of NetCDF (and dependencies in case of NetCDF4), which it also tries to download first (in case of NetCDF4).

There are a few issues related with this approach:

What we need in order to build wgrib2 with NetCDF support and without the overhead/danger of building NetCDF twice is an option to tell the wgrib2 build to use existing dependencies if so provided by the user: jasper, zlib, hdf5, netcdf, ...

There are standard/common variables that are used to indicate where those installations can be found, for example:

ZLIB_ROOT HDF5_ROOT Jasper_ROOT NETCDF NETCDF_FORTRAN (if not installed in NETCDF)

All those ending in _ROOT are following the CMake rules, for NetCDF the community has come up with its own standard before CMake got there.

Users could, for example, indicate to the wgrib2 build system that they do not want to build package A and tell the build system where A can be found.

kgerheiser commented 4 years ago

This is fixed with the CMake build of wgrib2