the installation of netcdf and roms

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
pengjia
Posts: 10
Joined: Thu Aug 21, 2008 4:24 pm
Location: UMCP

the installation of netcdf and roms

#1 Unread post by pengjia »

during the installation of NETCDF (./configure--->make check--->make install), there was no error...
but after I finished the seventh step in the tutorial, I compiled ROMS, just as:

(7) Modify makefile and compiler file
(8 ) Compile ROMS

there were errors as follows:

$ make clean
rm -f -r core *.ipo Build Compilers/make_macros.mk

$ make
makefile:230: INCLUDING FILE Compilers/make_macros.mk WHICH CONTAINS APPLICAT
-DEPENDENT MAKE DEFINITIONS
which: no g95 in (/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Pro
m Files/Microsoft Visual Studio/Common/Tools:/cygdrive/c/Program Files/Micros
Visual Studio/Common/Msdev98/BIN:/cygdrive/c/Program Files/Microsoft Visual
dio/DF98/BIN:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/BIN:/cygd
e/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/c
rive/c/Program Files/Common Files/Roxio Shared/DLLShared)
cp -f /usr/local/include/netcdf.mod Build
cp: cannot stat `/usr/local/include/netcdf.mod': No such file or directory
make: *** No rule to make target `Build/MakeDepend', needed by `all'. Stop.


Then I tried the method listed at WikiROMS.
After Customizing the Build Script and Compile ROMS, I input ./build.bash.
Errors came again:

$ ./build.bash
rm -f -r core *.ipo /home/pengjia/roms/projects/upwelling/Build Compilers/make_m
acros.mk
makefile:230: INCLUDING FILE Compilers/make_macros.mk WHICH CONTAINS APPLICATION
-DEPENDENT MAKE DEFINITIONS
which: no g95 in (/opt/g95soft/openmpi/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11
R6/bin:/cygdrive/c/Program Files/Microsoft Visual Studio/Common/Tools:/cygdrive/
c/Program Files/Microsoft Visual Studio/Common/Msdev98/BIN:/cygdrive/c/Program F
iles/Microsoft Visual Studio/DF98/BIN:/cygdrive/c/Program Files/Microsoft Visual
Studio/VC98/BIN:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WI
NDOWS/System32/Wbem:/cygdrive/c/Program Files/Common Files/Roxio Shared/DLLShare
d)
cp -f /usr/local/include/netcdf.mod /home/pengjia/roms/projects/upwelling/Build
cp: cannot stat `/usr/local/include/netcdf.mod': No such file or directory
make: *** No rule to make target `/home/pengjia/roms/projects/upwelling/Build/Ma
keDepend', needed by `all'. Stop.


Please help me~~!!!!

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: the installation of netcdf and roms

#2 Unread post by robertson »

Question:
  1. Which Fortran compiler (if any) do you have on your system? You have told ROMS to build with g95 but g95 is not in your path (which: no g95...). If you don't have a Fortran 90 compiler in your path it is more than likely that your NetCDF library was built without the Fortran 90 interface that ROMS requires and that is why you see the cp: cannot stat `/usr/local/include/netcdf.mod': No such file or directory error. netcdf.mod only exists if you have successfully built NetCDF with the Fortran 90 interface.
Make sure you have a Fortran 90 compiler in your path (i.e. which g95 returns a path and not an error). Then try re-compiling NetCDF and ROMS. You may need to ask your system administrator the location of your Fortran 90 compiler.

pengjia
Posts: 10
Joined: Thu Aug 21, 2008 4:24 pm
Location: UMCP

Re: the installation of netcdf and roms

#3 Unread post by pengjia »

It works~~~!!! :lol: thanks~~!!

fereshteh
Posts: 79
Joined: Sun Dec 30, 2012 2:58 pm
Location: inio:Iranian National Institute for Oceanography

Re: the installation of netcdf and roms

#4 Unread post by fereshteh »

hi dear
my system is linux fedore16. i have installed netcdf4.2.1.1 with zlib and HDF5 in following way:
1-
Cd /home/fkomijani/zlib 1.2.7
./configure --prefix=/home/fkomijani/NETCD4.2.1.1
make check install
2-
cd /home/fkomijani/HDF5 1.8.9
./configure --with-zlib=/home/fkomijani/NETCD4.2.1.1 -- prefix=//home/fkomijani/NETCD4.2.1.1
make check install
3-
cd /home/fkomijani/netcdf4.2.1.1
CPPFLAGS=-I/home/fkomijani/NETCD4.2.1.1/ include LDFLAGS=L/home/fkomijani/NETCD4.2.1.1 /lib ./configure --prefix=/home/fkomijani/NETCD4.2.1.1
make check install

therefore i think taht nectcdf's compiler is gfortran.(i becom so grateful that you tell me, my installation way is correct or not? :? ) after running roms (with choosing
FORT=gfortran , use-my-libs=on
export NC_CONFIG=/home/fkomijani/NETCD4.2.1.1/bin/nc-config
export NETCDF_INCDIR=/home/fkomijani/NETCD4.2.1.1/include
i get following problem:
rm -f -r core *.ipo /home/fkomijani/projects/upwelling6/Build /home/fkomijani/make_macros.mk
makefile:238: INCLUDING FILE /home/fkomijani/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
cp -f /home/fkomijani/NETCD4.2.1.1/include/netcdf.mod /home/fkomijani/projects/upwelling6/Build
cp: cannot stat `/home/fkomijani/NETCD4.2.1.1/include/netcdf.mod': No such file or directory
make: *** No rule to make target `/home/fkomijani/projects/upwelling6/Build/netcdf.mod', needed by `/home/fkomijani/projects/upwelling6/Build/MakeDepend'. Stop.

what is my mistake? :?: i have checked include directory of netcdf4.2.1.1, it doen bot have netcdf.mod file but it has sveral H5.. .h files,netcdf.h and hdf5.h files.
please help me.
fereshte

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: the installation of netcdf and roms

#5 Unread post by kate »

There is now a separate package called Netcdf-Fortran. You need to download and install it. It should provide you with that netcdf.mod file.

fereshteh
Posts: 79
Joined: Sun Dec 30, 2012 2:58 pm
Location: inio:Iranian National Institute for Oceanography

Re: the installation of netcdf and roms

#6 Unread post by fereshteh »

hi dear
i am really appreciate for your reply
finally,my problem soleved by downloading and installing netcdf4.2-fortran lib, and ocean.G is built. :D
thanks again
sinserely yours :wink:
fereshte

Post Reply