Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Tue Nov 21, 2017 12:43 am




Post new topic Reply to topic  [ 5 posts ] 

All times are UTC

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

Joined: Wed Aug 03, 2016 6:06 pm
Posts: 1
Location: National University of Singapore
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.


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

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


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

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 421
Location: Rutgers University
You may have installed netcdf in a directory that ROMS is not finding.

Read in the comments in the build script ...

Quote:
# 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


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

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3251
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 14, 2017 11:02 pm 
Offline

Joined: Fri Mar 10, 2017 11:22 pm
Posts: 17
Location: Universidade Federal do Maranhão, Brazil
It's happening to me too. Can anyone help?


Makefile: 239: INCLUDING FILE /home/adilson/make_macros.mk THAT CONTAINS APPLICATION -DEPENDENT TO MAKE DEFINITIONS
Cp -f /usr/local/include/netcdf.mod Compilation
Cp: unable to get status of '/usr/local/include/netcdf.mod': File /
Make: *** No rule to target 'Build / netcdf.mod', needed by 'Build / MakeDepend'. Stop it.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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