Open platipodium opened 3 years ago
In NEMS, NETCDF vars are only used in one place
src/conf/configure.nems:NETCDF_INC = -I$(NETCDF_INCDIR)
src/conf/configure.nems:NETCDF_LIB = -L$(NETCDF_LIBDIR) -lnetcdf
src/conf/configure.nems: $(NETCDF_LIB) \
src/conf/configure.nems: $(NETCDF_LIB) \
opening up the possibility to manipulate NETCDF_INCDIR
and NETCDF_LIBDIR` to include the fortran parts.
A generic workaround is then something like the following:
export NETCDF_INCDIR="$(nc-config --includedir) -I$(nf-config --includedir)"
export NETCDF_LIBDIR="$(nc-config --prefix)/lib $(nf-config --flibs)"
The current build infrastructure considers only unified C/Fortran netcdf paths
On many systems, these are located, however in different directories, such that we would need NETCDF_C_XXXX and NETCDF_FORTRAN_XXXX variables. This currently prevents deploying the system via simple modifications to modulefiles/env_module* to system having a separate C/Fortran netcdf interface.