I want to install and run SURFEX on Ubuntu 18.04, so I'm following the steps explained here. when I run the
make command in the src directory (compiling the master version of the code), after a while I get an error that says:
configure: error: Could not link to netcdf C library. Please set LDFLAGS; for static builds set LIBS to the results of nc-config --libs.
I tried this solution in the step before "make", i.e.
CFLAGS=$(nc-config --cflags) LDFLAGS=$(nc-config --libs) ./configure
CFLAGS=$(nc-config --cflags) LDFLAGS=$(nc-config --libs) . ../conf/profile_surfex-LXgfortran-SFX-V8-1-1-MPIAUTO-O2-X0
but I couldn't resolve the problem, probably because I don't know what I am doing. Could someone tell me how I set those flags?