I am currently trying to compile wrf-hydro on ubuntu and in the process multiple error messages related to netcdf are generated. Here is an example of them. I am also attaching the nc-config and nf-config file. If any additional information is required to determine the possible source of error, please let me know. Thanks for your help!
Error message:
module_hrldas_netcdf_io.f90:(.text+0xaa): undefined reference to
`__netcdf_MOD_nf90_inq_dimid'
module_hrldas_netcdf_io.f90:(.text+0xec): undefined reference to
`__netcdf_MOD_nf90_inq_dimid'
module_hrldas_netcdf_io.f90:(.text+0x12e): undefined reference to
`__netcdf_MOD_nf90_inq_dimid'
module_hrldas_netcdf_io.f90:(.text+0x18c): undefined reference to
`__netcdf_MOD_nf90_inq_dimid'
module_hrldas_netcdf_io.f90:(.text+0x1ef): undefined reference to
`__netcdf_MOD_nf90_inq_dimid'
../IO_code/module_hrldas_netcdf_io.o:module_hrldas_netcdf_io.f90:
(.text+0x24f): more undefined references to `__netcdf_MOD_nf90_inq_dimid'
follow
../IO_code/module_hrldas_netcdf_io.o: In function
`__module_hrldas_netcdf_io_MOD_read_additional':
module_hrldas_netcdf_io.f90:(.text+0xa3e): undefined reference to
`__netcdf_MOD_nf90_open'
module_hrldas_netcdf_io.f90:(.text+0xb42): undefined reference to
`__netcdf_MOD_nf90_inq_varid'
module_hrldas_netcdf_io.f90:(.text+0xe53): undefined reference to
`__netcdf_MOD_nf90_get_var_2d_fourbytereal'
module_hrldas_netcdf_io.f90:(.text+0xee3): undefined reference to
`__netcdf_MOD_nf90_close'
../IO_code/module_hrldas_netcdf_io.o: In function
`__module_hrldas_netcdf_io_MOD_error_handler':
module_hrldas_netcdf_io.f90:(.text+0x1089): undefined reference to
`__netcdf_MOD_nf90_strerror'
../IO_code/module_hrldas_netcdf_io.o: In function
`__module_hrldas_netcdf_io_MOD_get_from_restart_3d':
module_hrldas_netcdf_io.f90:(.text+0x12b3): undefined reference to
`__netcdf_MOD_nf90_open'
module_hrldas_netcdf_io.f90:(.text+0x169b): undefined reference to
`__netcdf_MOD_nf90_inq_varid'
module_hrldas_netcdf_io.f90:(.text+0x18b3): undefined reference to
`__netcdf_MOD_nf90_get_var_3d_fourbytereal'
module_hrldas_netcdf_io.f90:(.text+0x1b0f): undefined reference to
`__netcdf_MOD_nf90_inq_varid'
module_hrldas_netcdf_io.f90:(.text+0x1d12): undefined reference to
`__netcdf_MOD_nf90_get_var_3d_fourbytereal'
module_hrldas_netcdf_io.f90:(.text+0x1e35): undefined reference to
`__netcdf_MOD_nf90_close'
../IO_code/module_hrldas_netcdf_io.o: In function
`__module_hrldas_netcdf_io_MOD_get_from_restart_2d_integer':
module_hrldas_netcdf_io.f90:(.text+0x1f7c): undefined reference to
`__netcdf_MOD_nf90_open'
module_hrldas_netcdf_io.f90:(.text+0x2225): undefined reference to
`__netcdf_MOD_nf90_inq_varid'
nc-config
This netCDF 4.4.1.1 has been built with the following features:
--cc -> gcc
--cflags -> -I/usr/local/include -I/usr/lib/x86_64-linux-gnu hdf5/serial/include
--libs -> -L/usr/local/lib -lnetcdf
--has-c++ -> no
--cxx ->
--has-c++4 -> no
--cxx4 ->
--has-fortran-> yes
--fc -> gfortran
--fflags -> -I/include
--flibs -> -L/lib -lnetcdff -L/usr/local/lib -lnetcdf -lnetcdf
--has-f90 -> no
--has-f03 -> yes
--has-dap -> no
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-logging-> no
--has-pnetcdf-> no
--has-szlib ->
--prefix -> /usr/local
--includedir-> /usr/local/include
--libdir -> /usr/local/lib
--version -> netCDF 4.4.1.1
nf-config
This netCDF-Fortran 4.4.4 has been built with the following features:
--cc -> gcc
--cflags -> -I/include -I/usr/local/include
--fc -> gfortran
--fflags -> -I/include
--flibs -> -L/lib -lnetcdff -L/usr/local/lib -lnetcdf -lnetcdf
--has-f90 -> no
--has-f03 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--prefix ->
--includedir-> /include
--version -> netCDF-Fortran 4.4.4
wrf-hydro
appears to have a somewhat non-standard configuration / build process - can you please [edit] your question to indicate the steps you took up to this point, including the Fortran compiler chosen? – steeldriver Jul 16 '18 at 17:27wrf-hydro
source code location. – N0rbert Jul 17 '18 at 09:31