Hi, maybe someone can help me getting ROMS (Upwelling example) to compile. I think it's a problem with netcdf. I've been following the tutorial on the roms site (Tutorial: Installing ROMS on a Macintosh). Here's the error I get trying to compile:
mod_netcdf.f90:19.16:
USE netcdf
1
Fatal Error: Wrong module version '4' (expected '5') for file 'netcdf.mod' opened at (1)
I've also tried netcdf-4.1.1, with the HDF5 turned off. I make it past the error above, but I run into problems later in the compile, with and error that says:
Undefined symbols:
(then it lists a page or so of stuff referencing libnetcdf.a)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Does anyone have advice?
Thanks.
-Nick
Compiling problems (netcdf?)
Re: Compiling problems (netcdf?)
A first guess is that netcdf was compiled with another version/compiler than you are currently using to compile ROMS (first problem).
For the second problem, you aren't giving us (or perhaps the linker) enough information about where the new library got installed. On the link line, do you see it pointing to the directory where you installed netcdf? Or do you need to add a -lnetcdff?
OK, I updated this: https://www.myroms.org/wiki/index.php/F ... _link_time
For the second problem, you aren't giving us (or perhaps the linker) enough information about where the new library got installed. On the link line, do you see it pointing to the directory where you installed netcdf? Or do you need to add a -lnetcdff?
OK, I updated this: https://www.myroms.org/wiki/index.php/F ... _link_time
Re: Compiling problems (netcdf?)
Thanks for the response Kate. I'll be digging into this again today, and hopefully I'll make some progress.
On the second error, this was the preceding line:
/usr/local/bin/gfortran -frepack-arrays -O3 -ffast-math /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/esmf_roms.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/master.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/ocean_control.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/ocean_coupler.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/propagator.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/roms_export.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/roms_import.o -o /Users/nickrecord/Work/ROMS/Projects/Upwelling/oceanS /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libNLM.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libNLM_bio.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libNLM_sed.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libANA.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libUTIL.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libMODS.a -L/opt/gfortran/serial/netcdf4/lib -lnetcdf
On the second error, this was the preceding line:
/usr/local/bin/gfortran -frepack-arrays -O3 -ffast-math /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/esmf_roms.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/master.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/ocean_control.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/ocean_coupler.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/propagator.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/roms_export.o /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/roms_import.o -o /Users/nickrecord/Work/ROMS/Projects/Upwelling/oceanS /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libNLM.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libNLM_bio.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libNLM_sed.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libANA.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libUTIL.a /Users/nickrecord/Work/ROMS/Projects/Upwelling/Build/libMODS.a -L/opt/gfortran/serial/netcdf4/lib -lnetcdf
Re: Compiling problems (netcdf?)
Hi again Kate,
Just to update... I think your first instinct was right. I'm not sure exactly where the crossed lines were, but ROMS has compiled and is running.
Thanks again.
-Nick
Just to update... I think your first instinct was right. I'm not sure exactly where the crossed lines were, but ROMS has compiled and is running.
Thanks again.
-Nick