netcdf.mod : No such file or directory

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
alexbindersg
Posts: 1
Joined: Wed Aug 03, 2016 6:06 pm
Location: National University of Singapore

netcdf.mod : No such file or directory

#1 Unread post by alexbindersg »

Hello

I have got the following error message when compiling Upwelling case. I am using Ubuntu 16.04

Alex@al:~/Projects/upwelling$ ./build.bash
rm -f -r core *.ipo /home/la/Projects/upwelling/Build /home/al/make_macros.mk
makefile:239: INCLUDING FILE /home/al/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
cp -f /usr/local/include/netcdf.mod /home/al/Projects/upwelling/Build
cp: cannot stat '/usr/local/include/netcdf.mod': No such file or directory
make: *** No rule to make target '/home/al/Projects/upwelling/Build/netcdf.mod', needed by '/home/al/Projects/upwelling/Build/MakeDepend'. Stop.

I thought I installed NetCDF lib and NetCDF fortran. But I am not sure If I did it correctly. Here is what I installed them using command sudo apt-apt install <name of package> on Ubuntu:

- netcdf-bin version (1:4.4.0-2)
- libnetcdf-dev version (1:4.4.0-2).
- libhdf5-dev version (1.8.16+docs-4ubuntu1)
- gfortran version (4:5.3.1-1ubuntu1)

I also installed Perl

perl --version

This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)

Copyright 1987-2015, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

What do I miss or did wrongly?
Any help would be appreciated.

Many thanks in advance.

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

Re: netcdf.mod : No such file or directory

#2 Unread post by fereshteh »

hi
one a simple way is to install netcdf with following command in Ubuntu:
apt-get install *netcdf*
it will set netcdf.mod, netcdf.h and nc-config in you system automatically.
i hope it be useful for u.
cheers
fereshte

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: netcdf.mod : No such file or directory

#3 Unread post by wilkin »

You may have installed netcdf in a directory that ROMS is not finding.

Read in the comments in the build script ...
# If the USE_MY_LIBS is activated above, the path of the libraries
# required by ROMS can be set here using environmental variables
# which take precedence to the values specified in the make macro
# definitions file (Compilers/*.mk). For most applications, only
# the location of the NetCDF library is needed during compilation.
For your set of compiler and MPI options you need to ensure that NETCDF_INCDIR and NETCDF_LIBDIR point to the correct path.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

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

Re: netcdf.mod : No such file or directory

#4 Unread post by kate »

Is anyone still using NETCDF_INCDIR and NETCDF_LIBDIR? I would instead use USE_NETCDF4 and check to see what you get from "nc-config --flibs" or "nf-config --flibs". On Ubuntu, the latter can be more useful than the former and one therefore needs to modify the Compilers file.

Post Reply