I modified the Compilers/Linux-g95.mk file to create a Darwin-g95.mk file and changed the fortran compiler specification in the ROMS root Makefile. Trying to compile ROMS, I get the following fatal error that I suspect relates to the way I set up the netcdf files ... or is there some fundamental problem with g95?
Removing the profiling -pg option in the fatal last compile does not make a difference.[roaming-188-233:~/test/ROMS] a2% make
makefile:231: INCLUDING FILE Compilers/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
cp -f /usr/local/include//netcdf.mod Build
cp -f /usr/local/include//typesizes.mod Build
./ROMS/Bin/sfmakedepend --cpp --fext=f90 --file=- --objdir=Build -DROMS_HEADER="upwelling.h" -I ROMS/Include -I ROMS/Nonlinear -I ROMS/Utility -I ROMS/Drivers -I ROMS/Functionals -I Master -I Compilers --silent --moddir Build ROMS/Nonlinear/bbl.F ROMS/Nonlinear/bc_2d.F ROMS/Nonlinear/bc_3d.F ROMS/Nonlinear/biology.F ROMS/Nonlinear/bulk_flux.F ROMS/Nonlinear/bvf_mix.F ROMS/Nonlinear/conv_2d.F ROMS/Nonlinear/conv_3d.F ROMS/Nonlinear/diag.F ROMS/Nonlinear/exchange_2d.F ROMS/Nonlinear/exchange_3d.F ROMS/Nonlinear/forcing.F ROMS/Nonlinear/get_data.F
... snip several screens of apparently successful compilations of sub-programs ...
/usr/bin/cpp -P -traditional -DDARWIN -DI386 -DG95 -D'ROOT_DIR="/Users/a2/test/ROMS"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="upwelling.h"' -DNestedGrids=1 -D'ANALYTICAL_DIR="/Users/a2/test/ROMS/ROMS/Functionals"' -D'SVN_REV="237M"' -IROMS/Include -IROMS/Nonlinear -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -IMaster -ICompilers -D'HEADER_DIR="./ROMS/Include"' ROMS/Modules/mod_netcdf.F > Build/mod_netcdf.f90
ROMS/Bin/cpp_clean Build/mod_netcdf.f90
cd Build; /sw/bin/g95 -c -fno-second-underscore -O3 -ffast-math -pg mod_netcdf.f90
Fatal Error: While reading module 'netcdf' found module version 0, expected 6.
make: *** [Build/mod_netcdf.o] Error 1
Any suggestion to this very green ROMS user are most welcome.
andreas