ROMS COMPILING

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
fdaryabor
Posts: 78
Joined: Wed Jan 02, 2008 3:15 pm
Location: University of Copenhagen

ROMS COMPILING

#1 Unread post by fdaryabor »

Hi
In page 21 of user guide line "ROMS can be compiled by running the UNIX tcsh script ~/Roms_tools/Run/jobcomp. Jobcomp should be able to recognize your system. It has been tested on Linux, IBM, Sun and Compaq systems. On Linux PCs, the default compiler is the GNU g77, but it is possible to uncomment specific lines in jobcomp to use g95 or ifort. The latter is mandatory when using AGRIF and/or OPEN_MP. When changing the compiler you should provide a corresponding NetCDF library. Once the compilation is done, you should obtain a new executable (roms) in the ~/Roms_tools/Run directory. ROMS should be recompiled each time param.h or cppdefs.h are changed." I have several questions:
1- I have two jobcomp in two directory:
a) /root/ROMSTOOLS/Roms_tools/Roms_Agrif/jobcomp
b) /root/ROMSTOOLS/Roms_tools/Run/jobcomp
i) Must I execute jobcomp from first directory or second directory?
when I execute jobcomp of first directory (a) I don't have error but I have the following error when I execute './roms roms.in'
mv a.out roms
[root@localhost Roms_Agrif]# ./roms roms.in

PERU TEST MODEL
720 ntimes Total number of timesteps for 3D equations.
3600.00 dt Timestep [sec] for 3D equations
60 ndtfast Number of 2D timesteps within each 3D step.
1 ninfo Number of timesteps between runtime diagnostics.

7.000E+00 theta_s S-coordinate surface control parameter.
0.000E+00 theta_b S-coordinate bottom control parameter.
5.000E+00 Tcline S-coordinate surface/bottom layer width used in
vertical coordinate stretching, meters.

READ_INP ERROR: Cannot find input file 'roms_grd.nc'.


READ_INP ERROR: A total of 1 configuration errors discovered.

But when I execute jobcomp of second directory (b) I have follow error:
fortcom: Error: main_.f, line 4: Illegal character in statement label field [#]
#if defined
--^
fortcom: Error: main_.f, line 4: Illegal character in statement label field
#if defined
---^
fortcom: Error: main_.f, line 4: Illegal character in statement label field [f]
#if defined
----^
fortcom: Error: main_.f, line 5: Illegal character in statement label field [p]
parameter (LLm0=35, MMm0=42, N=32)
-^
fortcom: Error: main_.f, line 5: Illegal character in statement label field [a]
parameter (LLm0=35, MMm0=42, N=32)
--^
fortcom: Error: main_.f, line 5: Illegal character in statement label field [r]
parameter (LLm0=35, MMm0=42, N=32)
---^
fortcom: Error: main_.f, line 5: Illegal character in statement label field [a]
parameter (LLm0=35, MMm0=42, N=32)
----^
fortcom: Error: main_.f, line 4: Syntax error, found IDENTIFIER 'DETER' when expecting one of: FILE
#if defined
------------^
fortcom: Error: main_.f, line 6: A specification statement cannot appear in the executable section.
parameter (LLm=LLm0, MMm=MMm0)
------^
fortcom: Error: main_.f, line 7: A specification statement cannot appear in the executable section.
integer NSUB_X, NSUB_E, NPP
------^
fortcom: Error: main_.f, line 8: A specification statement cannot appear in the executable section.
parameter (NSUB_X=1, NSUB_E=1, NPP=1)
------^
fortcom: Error: main_.f, line 9: A specification statement cannot appear in the executable section.
integer NT, itemp,
------^
fortcom: Error: main_.f, line 13: A specification statement cannot appear in the executable section.
parameter (itemp=1)
------^
fortcom: Error: main_.f, line 14: A specification statement cannot appear in the executable section.
parameter (ntrc_salt=1)
------^
fortcom: Error: main_.f, line 15: A specification statement cannot appear in the executable section.
parameter (isalt=itemp+1)
------^
fortcom: Error: main_.f, line 16: A specification statement cannot appear in the executable section.
parameter (ntrc_pas=0)
------^
fortcom: Error: main_.f, line 17: A specification statement cannot appear in the executable section.
parameter (ntrc_bio=0)
------^
fortcom: Error: main_.f, line 18: A specification statement cannot appear in the executable section.
parameter (ntrc_sed=0)
------^
fortcom: Error: main_.f, line 19: A specification statement cannot appear in the executable section.
parameter (NT=itemp+ntrc_salt+ntrc_pas+ntrc_bio+ntrc_sed)
------^
fortcom: Error: main_.f, line 20: A specification statement cannot appear in the executable section.
parameter (ntrc_diats=0)
------^
fortcom: Error: main_.f, line 21: A specification statement cannot appear in the executable section.
parameter (ntrc_diauv=0)
------^
fortcom: Error: main_.f, line 22: A specification statement cannot appear in the executable section.
integer stdout, Np, padd_X,padd_E
------^
fortcom: Error: main_.f, line 23: A specification statement cannot appear in the executable section.
parameter (stdout=6, Np=N+1)
------^
fortcom: Error: main_.f, line 24: A specification statement cannot appear in the executable section.
parameter (Lm=LLm, Mm=MMm)
------^
fortcom: Error: main_.f, line 25: A specification statement cannot appear in the executable section.
parameter (padd_X=(Lm+2)/2-(Lm+1)/2)
------^
fortcom: Error: main_.f, line 26: A specification statement cannot appear in the executable section.
parameter (padd_E=(Mm+2)/2-(Mm+1)/2)
------^
fortcom: Error: main_.f, line 27: A specification statement cannot appear in the executable section.
integer NSA, N2d,N3d, size_XI,size_ETA
------^
fortcom: Error: main_.f, line 28: A specification statement cannot appear in the executable section.
integer se,sse, sz,ssz
------^
fortcom: Error: main_.f, line 29: A specification statement cannot appear in the executable section.
parameter (NSA=28)
------^
fortcom: Error: main_.f, line 30: A specification statement cannot appear in the executable section.
parameter (size_XI=7+(Lm+NSUB_X-1)/NSUB_X)
------^
fortcom: Severe: Too many errors, exiting
compilation aborted for main_.f (code 1)
gmake: *** [main.o] Error 1
mv: cannot stat `roms': No such file or directory
[root@localhost Run]#

I read your response already and I checked param.h
that is:

$Id: param.h,v 1.19 2005/10/26 15:18:52 pmarches Exp $
!
! Dimensions of Physical Grid and array dimensions:
! =========== == ======== ==== === ===== ============
! LLm,MMm Number of the internal points of the PHYSICAL grid.
! in the XI- and ETA-directions [physical side boundary
! points and peroodic ghost points (if any) are excluded].
!
! Lm,Mm Number of the internal points [see above] of array
! covering a Message Passing subdomain. In the case when
! no Message Passing partitioning is used, these two are
! the same as LLm,MMm.
!
! N Number of vertical levels.
!
integer LLm,Lm,MMm,Mm,N, LLm0,MMm0
#if defined BASIN
parameter (LLm0=60, MMm0=50, N=10)
#elif defined CANYON_A
parameter (LLm0=65, MMm0=48, N=16)
#elif defined CANYON_B
parameter (LLm0=66, MMm0=48, N=16)
#elif defined GRAV_ADJ
parameter (LLm0=128, MMm0=4, N=10)
#elif defined OVERFLOW
parameter (LLm0=4, MMm0=128, N=10)
#elif defined SEAMOUNT
parameter (LLm0=64, MMm0=64, N=20)
#elif defined SHELFRONT
parameter (LLm0=4, MMm0=40, N=10)
#elif defined SOLITON
parameter (LLm0=96, MMm0=32, N=10)
#elif defined UPWELLING
parameter (LLm0=16, MMm0=64, N=16)
#elif defined INNERSHELF
parameter (LLm0=64, MMm0=3, N=40)
#elif defined RIVER
parameter (LLm0=40, MMm0=80, N=20)
#elif defined VORTEX
! parameter (LLm0=179, MMm0=179, N=10) ! 10 km resolution
parameter (LLm0=59, MMm0=59, N=10) ! 30 km resolution
! parameter (LLm0=69, MMm0=57, N=10) ! 30 km resolution
! parameter (LLm0=35, MMm0=35, N=10) ! 50 km resolution
! parameter (LLm0=24, MMm0=24, N=10) ! 70 km resolution
#elif defined REGIONAL

#if defined BENGUELA
parameter (LLm0=35, MMm0=42, N=32) !<--Southern Bengula Test Model
#else
parameter (LLm0=39, MMm0=32, N=20)
#endif

#ifdef MPI
!
! MPI rlated variables

Please guide me what do I do to solve this problem.

Best Regards
F.Daryabor

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

#2 Unread post by kate »

This isn't the ROMS I use, but I can read your error messages:

Code: Select all

fortcom: Error: main_.f, line 4: Illegal character in statement label field [f]
#if defined
----^
fortcom: Error: main_.f, line 5: Illegal character in statement label field [p]
parameter (LLm0=35, MMm0=42, N=32)
-^ 
The first of these means that you are somehow not invoking the C preprocessor correctly before passing the sources to the Fortran compiler.

The second of these says that your source code is free format while the compiler is expecting fixed format. Check your compiler options for the proper command to get it to expect free format.

Post Reply