My guess is this is a simple fix that will seem obvious, but I've been unable to resolve it after spending some time and effort at it. Help is very much appreciated!
As the subject indicates, having a hard time getting through the linking stage, although preprocessing and compiling go fine.
I'm new to ROMS, and trying to build on OSX (14.3.1) where I've installed netcdf, netcdf-fortran, hdf5, perl, etc using homebrew.
Trying to compile using cbuild_roms.sh with gfortran compiler. Defined netcdf lib and inc directories as environment variables in .bash_profile, and ROMS_ROOT_DIR in .zshrc.
USE_NETCDF4 and USE_HDF5 are both set to ON. (piecing together lessons from various places in this forum).
A hint occurs early that netcdf will raise issues when cmake / make only end up specifying the netcdf lib. Output from the build script:
Code: Select all
-- netcdf_libs = netcdf
-- netcdf_ldirs = /opt/homebrew/lib
-- netcdf_idir = /opt/homebrew/include
Code: Select all
This 4.6.1 has been built with the following features:
--cc -> clang
--cflags -> -I/opt/homebrew/Cellar/netcdf-fortran/4.6.1/include -g -Wall -Wno-unused-variable -Wno-unused-parameter -O2
--fc -> /opt/homebrew/bin/gfortran
--fflags -> -I/opt/homebrew/Cellar/netcdf-fortran/4.6.1/include -I/opt/homebrew/Cellar/netcdf-fortran/4.6.1/include
--flibs -> -L/opt/homebrew/Cellar/netcdf-fortran/4.6.1/lib -lnetcdff -lnetcdf -lnetcdf
--has-f90 -> TRUE
--has-f03 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--prefix -> /opt/homebrew/Cellar/netcdf-fortran/4.6.1
--includedir-> /opt/homebrew/Cellar/netcdf-fortran/4.6.1/include
--version -> 4.6.1
Again, help is appreciated. Hopefully I've provided enough information to get to an answer easily -- apologies if I've left anything out, and happy to address quickly.
-Stephen