Ocean Modeling Discussion


Search for:
It is currently Mon Oct 15, 2018 5:07 pm

Post new topic Reply to topic  [ 4 posts ] 

All times are UTC

Author Message
PostPosted: Sat Aug 06, 2016 10:08 am 

Joined: Wed Aug 03, 2016 6:06 pm
Posts: 1
Location: National University of Singapore

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
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.

Reply with quote  
PostPosted: Sun Aug 07, 2016 6:18 am 

Joined: Sun Dec 30, 2012 2:58 pm
Posts: 77
Location: inio:Iranian National Institute for Oceanography
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.

Reply with quote  
PostPosted: Sun Aug 07, 2016 3:45 pm 
User avatar

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 460
Location: Rutgers University
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: IMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Reply with quote  
PostPosted: Mon Aug 08, 2016 12:11 pm 
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3515
Location: IMS/UAF, USA
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.

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group