upwellingcase

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
kekejiayu
Posts: 6
Joined: Tue Mar 01, 2016 1:38 am
Location: Nanjing University

upwellingcase

#1 Post by kekejiayu » Mon Aug 08, 2016 12:38 pm

when I run the upwelling case ,I got this :


f951: Fatal Error: Reading module ‘netcdf’ at line 2 column 1: Unexpected EOF
compilation terminated.
ROMS/Utility/Module.mk:15: recipe for target '/home/kekejiayu/Projects/upwelling/Build/distribute.o' failed
make: *** [/home/kekejiayu/Projects/upwelling/Build/distribute.o] Error 1
make: *** Waiting for unfinished jobs....

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

Re: upwellingcase

#2 Post by kate » Tue Aug 09, 2016 11:36 am

There's a problem with your netcdf.mod file. ROMS will copy this file from the NETCDF_INCDIR which you tell it directly or through "nc-config --incdir". This netcdf module file must have been created with the same compiler you are using - and must be complete.

kekejiayu
Posts: 6
Joined: Tue Mar 01, 2016 1:38 am
Location: Nanjing University

Re: upwellingcase

#3 Post by kekejiayu » Tue Aug 16, 2016 1:36 pm

kate wrote:There's a problem with your netcdf.mod file. ROMS will copy this file from the NETCDF_INCDIR which you tell it directly or through "nc-config --incdir". This netcdf module file must have been created with the same compiler you are using - and must be complete.
Dear Kate,
Thank you for your reply.
In my linux,I install the netcdf3.6.3,So I try to change the 'export USE_NETCDF4=on' to 'export USE_NETCDF3=on ',then I got this:
cd /home/kekejiayu/Projects/upwelling/Build; /usr/bin/gfortran -c -frepack-arrays -O3 -ffast-math -ffree-form -ffree-line-length-none mod_parallel.f90
mod_parallel.f90:17: Error: Can't open included file 'mpif.h'
ROMS/Modules/Module.mk:15: recipe for target '/home/kekejiayu/Projects/upwelling/Build/mod_parallel.o' failed
make: *** [/home/kekejiayu/Projects/upwelling/Build/mod_parallel.o] Error 1

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

Re: upwellingcase

#4 Post by kate » Tue Aug 16, 2016 11:46 pm

Try turning on USE_MPIF90. This is often needed with USE_MPI.

kekejiayu
Posts: 6
Joined: Tue Mar 01, 2016 1:38 am
Location: Nanjing University

Re: upwellingcase

#5 Post by kekejiayu » Wed Aug 17, 2016 1:59 pm

kate wrote:Try turning on USE_MPIF90. This is often needed with USE_MPI.
Thank you,kate.
I had solved my problem. There is another problem.When I run'./oceanS < ocean_upwelling.in',I got this:
Model Input Parameters: ROMS/TOMS version 3.7
Wednesday - August 17, 2016 - 9:25:34 PM
-----------------------------------------------------------------------------

MOD_NCPARAM - Unable to open variable information file:
ROMS/External/varinfo.dat
Default file is located in source directory.

And when I run' ./oceanS < ocean_upwelling.in > my_upwelling.log ',I got nothing.

User avatar
shchepet
Posts: 185
Joined: Fri Nov 14, 2003 4:57 pm

Re: upwellingcase

#6 Post by shchepet » Wed Aug 17, 2016 5:15 pm

Most (most likely all) problems of this kind associated with linking to netCDF
library can be avoided if you compile netCDF (including dependencies hdf5, zlib,
etc) libraries yourself using matching compiler and compiler flags (the same as
you use for ROMS) rather than "install" it from your Linux distribution (especially
using netcdf-3.6.3 is kind of odd: it is a very very old version of netCDF lacking
many useful features of modern netCDF).

This may seem too be tedious and prone to various failures, but actually
can be done within a reasonable time (say a half-an-our or so) by almost
copy-paste-execute mouse clicking, while rarely touching keyboard.

Here is a verified step-by-step procedure

http://people.atmos.ucla.edu/alex/techn ... g_sequence

the sources for the newest (sufficiently new) versions of all associated
components can be found in the same web directory

http://people.atmos.ucla.edu/alex/technical/netcdf/

or obtained from the original sources.
Last edited by shchepet on Fri Aug 19, 2016 6:31 am, edited 1 time in total.

User avatar
jivica
Posts: 137
Joined: Mon May 05, 2003 2:41 pm
Location: The University of Western Australia, Perth, Australia

Re: upwellingcase

#7 Post by jivica » Thu Aug 18, 2016 5:16 am

It is exactly telling you what is missing!
In your .in file, at the top, you have line where you define location of varinfo.dat
So, you can put right link or even copy varinfo.dat into the folder where you run your model, but it has to be correct.
example:
my ocean.in file has line with:
! Application title.
TITLE = Adriatic Sea Application, 2km ROMS 3.0
! Input variable information file name. This file needs to be processed
! first so all information arrays can be initialized properly.
MyAppCPP = adria2km
VARNAME = varinfo.dat
And when I start the model it is looking for varinfo.dat in the current folder...

I.

kekejiayu wrote:
kate wrote:Try turning on USE_MPIF90. This is often needed with USE_MPI.
Thank you,kate.
I had solved my problem. There is another problem.When I run'./oceanS < ocean_upwelling.in',I got this:
Model Input Parameters: ROMS/TOMS version 3.7
Wednesday - August 17, 2016 - 9:25:34 PM
-----------------------------------------------------------------------------

MOD_NCPARAM - Unable to open variable information file:
ROMS/External/varinfo.dat
Default file is located in source directory.

And when I run' ./oceanS < ocean_upwelling.in > my_upwelling.log ',I got nothing.

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

Re: upwellingcase

#8 Post by kate » Thu Aug 18, 2016 10:44 am

And when I run' ./oceanS < ocean_upwelling.in > my_upwelling.log ',I got nothing.
Did you look in the my_upwelling.log file? That is where you told the shell to deposit the standard out from running oceanS.

I agree with Sasha - learn enough about your system so that you don't fear installing your own NetCDF and NetCDF-fortran.

lqe2004
Posts: 1
Joined: Wed Jun 22, 2016 4:03 pm
Location: Ocean University of China

Re: upwellingcase

#9 Post by lqe2004 » Fri Mar 03, 2017 1:21 am

jivica wrote:It is exactly telling you what is missing!
In your .in file, at the top, you have line where you define location of varinfo.dat
So, you can put right link or even copy varinfo.dat into the folder where you run your model, but it has to be correct.
example:
my ocean.in file has line with:
! Application title.
TITLE = Adriatic Sea Application, 2km ROMS 3.0
! Input variable information file name. This file needs to be processed
! first so all information arrays can be initialized properly.
MyAppCPP = adria2km
VARNAME = varinfo.dat
And when I start the model it is looking for varinfo.dat in the current folder...

I.

kekejiayu wrote:
kate wrote:Try turning on USE_MPIF90. This is often needed with USE_MPI.
Thank you,kate.
I had solved my problem. There is another problem.When I run'./oceanS < ocean_upwelling.in',I got this:
Model Input Parameters: ROMS/TOMS version 3.7
Wednesday - August 17, 2016 - 9:25:34 PM
-----------------------------------------------------------------------------

MOD_NCPARAM - Unable to open variable information file:
ROMS/External/varinfo.dat
Default file is located in source directory.

And when I run' ./oceanS < ocean_upwelling.in > my_upwelling.log ',I got nothing.

Thanks jivica! Your advice help me solve the problem. I changed the VARNAME = ~/ROMS/upwelling/varinfo.dat to VARNAME = varinfo.dat and then it works well.

Post Reply