Dear all,
I'm experiencing a problem while coupling ROMS and SWAN.
The inlet test ran fine but I am trying to build a coupling case on my own, I can't build and I get the following
cd /home/guest/app/ROMS-RUTGERS/project_coupling/Build; /usr/bin/mpif90 -c -heap-arrays -fp-model precise -g -check bounds -traceback -check uninit -warn interfaces,nouncalled -gen-interfaces -I/home/guest/local/MCT-ROMS/parallel/include -nofree ocpcre.f90
cd /home/guest/app/ROMS-RUTGERS/project_coupling/Build; /usr/bin/mpif90 -c -heap-arrays -fp-model precise -g -check bounds -traceback -check uninit -warn interfaces,nouncalled -gen-interfaces -I/home/guest/local/MCT-ROMS/parallel/include -nofree swancom3.f90
ifort: command line warning #10212: -fp-model precise evaluates in source precision with Fortran.
ifort: command line warning #10212: -fp-model precise evaluates in source precision with Fortran.
ocpcre.f90(28): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE OCPCOMM1 40.41
----------------------------------------------------------------------------^
ocpcre.f90(29): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE OCPCOMM2 40.41
----------------------------------------------------------------------------^
ocpcre.f90(30): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE OCPCOMM3 40.41
----------------------------------------------------------------------------^
ocpcre.f90(31): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE OCPCOMM4 40.41
----------------------------------------------------------------------------^
ocpcre.f90(104): error #6404: This name does not have a type, and must have an explicit type. [KAR]
KAR = ';'
------^
ocpcre.f90(105): error #6404: This name does not have a type, and must have an explicit type. [KARNR]
KARNR = LINELN + 1 40.00
------^
ocpcre.f90(105): error #6404: This name does not have a type, and must have an explicit type. [LINELN]
KARNR = LINELN + 1 40.00
--------------^
ocpcre.f90(106): error #6404: This name does not have a type, and must have an explicit type. [ELTYPE]
ELTYPE = 'USED'
------^
ocpcre.f90(107): error #6404: This name does not have a type, and must have an explicit type. [BLANK]
BLANK = ' '
------^
compilation aborted for ocpcre.f90 (code 1)
make: *** [/home/guest/app/ROMS-RUTGERS/project_coupling/Build/ocpcre.o] Error 1
make: *** Waiting for unfinished jobs....
swancom3.f90(532): error #5082: Syntax error, found REAL_CONSTANT '40.00' when expecting one of: * <IDENTIFIER>
& ANYWND ,SPCDIR , 40.00
--------------------------------------------------------------------------^
swancom3.f90(533): error #5082: Syntax error, found REAL_CONSTANT '30.70' when expecting one of: <END-OF-STATEMENT> ; <IDENTIFIER>
& UX2 ,UY2 ,SPCSIG ) 30.70
--------------------------------------------------------------------------^
swancom3.f90(537): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE OCPCOMM1 40.41
----------------------------------------------------------------------------^
swancom3.f90(538): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE OCPCOMM2 40.41
----------------------------------------------------------------------------^
swancom3.f90(539): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE OCPCOMM3 40.41
----------------------------------------------------------------------------^
swancom3.f90(540): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE OCPCOMM4 40.41
----------------------------------------------------------------------------^
swancom3.f90(541): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE SWCOMM1 40.41
----------------------------------------------------------------------------^
swancom3.f90(542): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE SWCOMM2 40.41
----------------------------------------------------------------------------^
swancom3.f90(543): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE SWCOMM3 40.41
----------------------------------------------------------------------------^
swancom3.f90(544): error #5082: Syntax error, found '.' when expecting one of: , <END-OF-STATEMENT> ;
USE SWCOMM4 40.41
----------------------------------------------------------------------------^
swancom3.f90(653): error #5082: Syntax error, found REAL_CONSTANT '30.82' when expecting one of: * :: , <END-OF-STATEMENT> ; [ / = => WITH
REAL SPCDIR(MDC,6) 30.82
--------------------------------------------------------------------------^
swancom3.f90(654): error #5082: Syntax error, found REAL_CONSTANT '30.82' when expecting one of: * :: , <END-OF-STATEMENT> ; [ / = => WITH
REAL SPCSIG(MSC) 30.82
--------------------------------------------------------------------------^
swancom3.f90(723): error #5082: Syntax error, found REAL_CONSTANT '.70' when expecting one of: ( * , <END-OF-STATEMENT> ; [ / = =>
INTEGER IDWMIN ,IDWMAX 30.70
----------------------------------------------------------------------------^
swancom3.f90(725): error #5082: Syntax error, found REAL_CONSTANT '30.70' when expecting one of: %FILL <IDENTIFIER>
REAL WIND10 ,THETAW , 30.70
--------------------------------------------------------------------------^
swancom3.f90(726): error #5082: Syntax error, found REAL_CONSTANT '.70' when expecting one of: ( * , <END-OF-STATEMENT> ; [ / = =>
& UFRIC ,FPM ,CDRAG ,SDMEAN 30.70
----------------------------------------------------------------------------^
swancom3.f90(730): error #5082: Syntax error, found REAL_CONSTANT '30.70' when expecting one of: %FILL <IDENTIFIER>
& UX2(MCGRD) , 30.70
--------------------------------------------------------------------------^
swancom3.f90(731): error #5082: Syntax error, found REAL_CONSTANT '30.70' when expecting one of: * :: , <END-OF-STATEMENT> ; [ / = => WITH
& UY2(MCGRD) 30.70
--------------------------------------------------------------------------^
swancom3.f90(735): error #5082: Syntax error, found REAL_CONSTANT '.70' when expecting one of: ( * , <END-OF-STATEMENT> ; [ / = =>
REAL AWX, AWY, RWX, RWY 30.70
----------------------------------------------------------------------------^
swancom3.f90(781): error #5082: Syntax error, found REAL_CONSTANT '30.82' when expecting one of: * ) :: , <END-OF-STATEMENT> ; . (/ + - : ] /) ' ** / // > .LT. < ...
SDMEAN = 0.5 * (SPCDIR(1,1) + SPCDIR(MDC,1)) 30.82
--------------------------------------------------------------------------^
swancom3.f90(785): error #5082: Syntax error, found INTEGER_CONSTANT '30' when expecting one of: <END-OF-STATEMENT> ;
IF ( (THETAW - 0.5 * PI) .LE. SPCDIR(1,1) ) THEN 30.82
--------------------------------------------------------------------------^
swancom3.f90(795): error #5082: Syntax error, found INTEGER_CONSTANT '30' when expecting one of: <END-OF-STATEMENT> ;
IF ( (THETAW + 0.5 * PI) .GE. SPCDIR(MDC,1) ) THEN 30.82
--------------------------------------------------------------------------^
swancom3.f90(796): error #5082: Syntax error, found INTEGER_CONSTANT '30' when expecting one of: <END-OF-STATEMENT> ;
IF ( (THETAW - 1.5 * PI) .LE. SPCDIR(1,1) ) THEN 30.82
--------------------------------------------------------------------------^
swancom3.f90(854): error #5082: Syntax error, found '(' when expecting one of: * ) :: , <END-OF-STATEMENT> ; . (/ + - : ] /) ' ** / // > .LT. < ...
& ((0.8 + 0.065 * 15. ) * 0.001)) 32.06
-------------------------------^
swancom3.f90(854): error #5082: Syntax error, found REAL_CONSTANT '32.06' when expecting one of: ( * ) :: , <END-OF-STATEMENT> ; . % (/ + - [ : ] /) . ' ** / ...
& ((0.8 + 0.065 * 15. ) * 0.001)) 32.06
--------------------------------------------------------------------------^
swancom3.f90(877): error #5082: Syntax error, found REAL_CONSTANT '.21' when expecting one of: ( * ) :: , <END-OF-STATEMENT> ; . % (/ + - [ : ] /) . ** / // ...
WRITE(PRINTF,6050) KCGRD(1), MDC, MCGRD, IWIND 30.21
----------------------------------------------------------------------------^
swancom3.f90(741): error #6385: The highest data type rank permitted is INTEGER(KIND=8). [VARWI]
IF (VARWI) THEN
----------^
swancom3.f90(741): error #6341: A logical data type is required in this context. [VARWI]
IF (VARWI) THEN
----------^
swancom3.f90(791): error #6305: An ELSE statement occurred without a corresponding IF THEN statement.
ELSE
------^
swancom3.f90(793): error #6317: An ENDIF occurred without a corresponding IF THEN or ELSE statement.
END IF
------^
swancom3.f90(2526): catastrophic error: Too many errors, exiting
compilation aborted for swancom3.f90 (code 1)
make: *** [/home/guest/app/ROMS-RUTGERS/project_coupling/Build/swancom3.o] Error 1
I'm using the following build.bash and cpp file.
Does anyone have idea of what went wrong?
Thanks a lot for your help
Christophe
Problem with SWAN
-
- Posts: 4
- Joined: Tue Jan 27, 2015 2:37 pm
- Location: University College Dublin
Problem with SWAN
- Attachments
-
- build.bash
- (18.84 KiB) Downloaded 335 times
-
- rb.h
- (2.48 KiB) Downloaded 338 times
Re: Problem with SWAN
Are you using Rutgers roms with coupling or my COAWST coupled system?
If you are coupling roms+swan, I suggest you use COAWST.
This error is most likely due to the Compilers/Linux-ifort.mk (I am guessing here) does not have the correct flags for the special cases to compile swan. swan files are some in f90 and some f77 and do not have a common line length and line continuation symbols. so you need to add things like:
ifdef USE_SWAN
$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -nofree
$(SCRATCH_DIR)/ocpids.o: FFLAGS += -nofree
$(SCRATCH_DIR)/ocpmix.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom3.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom4.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom5.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanmain.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanout1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanout2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanparll.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanpre1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanpre2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanser.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swmod1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swmod2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/SwanCompdata.o: FFLAGS += -free
$(SCRATCH_DIR)/SwanGriddata.o: FFLAGS += -free
$(SCRATCH_DIR)/m_constants.o: FFLAGS += -free
$(SCRATCH_DIR)/m_fileio.o: FFLAGS += -free
$(SCRATCH_DIR)/mod_xnl4v5.o: FFLAGS += -free
$(SCRATCH_DIR)/serv_xnl4v5.o: FFLAGS += -free
$(SCRATCH_DIR)/nctablemd.o: FFLAGS += -free
$(SCRATCH_DIR)/agioncmd.o: FFLAGS += -free
$(SCRATCH_DIR)/swn_outnc.o: FFLAGS += -free
endif
If you are coupling roms+swan, I suggest you use COAWST.
This error is most likely due to the Compilers/Linux-ifort.mk (I am guessing here) does not have the correct flags for the special cases to compile swan. swan files are some in f90 and some f77 and do not have a common line length and line continuation symbols. so you need to add things like:
ifdef USE_SWAN
$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -nofree
$(SCRATCH_DIR)/ocpids.o: FFLAGS += -nofree
$(SCRATCH_DIR)/ocpmix.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom3.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom4.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom5.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanmain.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanout1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanout2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanparll.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanpre1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanpre2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanser.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swmod1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swmod2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/SwanCompdata.o: FFLAGS += -free
$(SCRATCH_DIR)/SwanGriddata.o: FFLAGS += -free
$(SCRATCH_DIR)/m_constants.o: FFLAGS += -free
$(SCRATCH_DIR)/m_fileio.o: FFLAGS += -free
$(SCRATCH_DIR)/mod_xnl4v5.o: FFLAGS += -free
$(SCRATCH_DIR)/serv_xnl4v5.o: FFLAGS += -free
$(SCRATCH_DIR)/nctablemd.o: FFLAGS += -free
$(SCRATCH_DIR)/agioncmd.o: FFLAGS += -free
$(SCRATCH_DIR)/swn_outnc.o: FFLAGS += -free
endif
-
- Posts: 4
- Joined: Tue Jan 27, 2015 2:37 pm
- Location: University College Dublin
Re: Problem with SWAN
Dear John,
Thanks a lot.
I'm also using COAWST and I am experiencing some another problem,
https://coawstmodel-trac.sourcerepo.com ... ssion/2/27
so I wanted to use an other kind of coupling to see if that problem still exists.
However, I checked the compiler file, it already has those flags.
Thanks a lot.
I'm also using COAWST and I am experiencing some another problem,
https://coawstmodel-trac.sourcerepo.com ... ssion/2/27
so I wanted to use an other kind of coupling to see if that problem still exists.
However, I checked the compiler file, it already has those flags.
Re: Problem with SWAN
well, the problem you posted is exactly the reason we put those extra flags in.
the file ocpcre.F has
USE OCPCOMM1 40.41
and that is the error you are getting. the '40.41' is beyond the 72 char limit, and so you need to tell the compiler
$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -nofree
so you need to check that those flags are in your correct
Compilers/*.mk file.
-j
the file ocpcre.F has
USE OCPCOMM1 40.41
and that is the error you are getting. the '40.41' is beyond the 72 char limit, and so you need to tell the compiler
$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -nofree
so you need to check that those flags are in your correct
Compilers/*.mk file.
-j
-
- Posts: 4
- Joined: Tue Jan 27, 2015 2:37 pm
- Location: University College Dublin
Re: Problem with SWAN
Thanks, I already checked following your first post and it was already there.
As you can see at the beginning of my first post, the files are compiled with the good options
Christophe
As you can see at the beginning of my first post, the files are compiled with the good options
It makes sense that this is a format problem. The command mpif90 should understand -free/-nofree options as I checked in the "help" section of the compiler.christophe.pinck wrote: cd /home/guest/app/ROMS-RUTGERS/project_coupling/Build; /usr/bin/mpif90 -c -heap-arrays -fp-model precise -g -check bounds -traceback -check uninit -warn interfaces,nouncalled -gen-interfaces -I/home/guest/local/MCT-ROMS/parallel/include -nofree ocpcre.f90
cd /home/guest/app/ROMS-RUTGERS/project_coupling/Build; /usr/bin/mpif90 -c -heap-arrays -fp-model precise -g -check bounds -traceback -check uninit -warn interfaces,nouncalled -gen-interfaces -I/home/guest/local/MCT-ROMS/parallel/include -nofree swancom3.f90
Christophe
-
- Posts: 4
- Joined: Tue Jan 27, 2015 2:37 pm
- Location: University College Dublin
Re: Problem with SWAN
Dear all,
Problem solved.
It seems that the debug mode makes things complicated with SWAN. I was able to re-build the model and running just by being in normal mode.
Does anyone have an idea how did it happen?
Problem solved.
It seems that the debug mode makes things complicated with SWAN. I was able to re-build the model and running just by being in normal mode.
Does anyone have an idea how did it happen?
Re: Problem with SWAN
Sorry for the necroposting.
I had exactly the same problem.
The reason was the name of my test case. I named it 'NS' (i.e. North Sea), and it overlapped with a variable inside of the SWAN code with the same name.
I renamed my test case and solved the problem.
I had exactly the same problem.
The reason was the name of my test case. I named it 'NS' (i.e. North Sea), and it overlapped with a variable inside of the SWAN code with the same name.
I renamed my test case and solved the problem.
Evgeny Ivanov
PostDoc,
MAST, University of Liege, Belgium
PostDoc,
MAST, University of Liege, Belgium