Problem with setting up inlet_test
Problem with setting up inlet_test
hi, i am a new comer in ROMS. I have set up upwelling in my Mac but I face problem with setting up inlet_test for almost two weeks. Hope you guys might help me to figure the problem out.
When i compile ./build_roms.sh, it keep coming the following error:
ocpmix.f90:14:9:
14 | 30.72
| 1
Error: Invalid character in name at (1)
make: *** [/Users/venuscheung/ocean_model/inlet_test/Build_roms/ocpmix.o] Error 1
more information is attached. Please tell me what should i provide more to solve this problem. Thank you.
When i compile ./build_roms.sh, it keep coming the following error:
ocpmix.f90:14:9:
14 | 30.72
| 1
Error: Invalid character in name at (1)
make: *** [/Users/venuscheung/ocean_model/inlet_test/Build_roms/ocpmix.o] Error 1
more information is attached. Please tell me what should i provide more to solve this problem. Thank you.
- Attachments
-
- my_build_paths.sh
- (12.49 KiB) Downloaded 470 times
-
- build_roms.sh
- (11.86 KiB) Downloaded 520 times
Re: Problem with setting up inlet_test
I would look at these files in an editor which shows hidden characters, including the MakeDepend file. The vi(m) mode to see hidden characters is ":set list" - others can say how to do that with other editors. Are you being bitten by a rogue tab character? I can't tell.Error: Invalid character in name at (1)
make: *** [/Users/venuscheung/ocean_model/inlet_test/Build_roms/ocpmix.o] Error 1
Re: Problem with setting up inlet_test
Am I suppose to change anything inside ocpmix.o?kate wrote: ↑Sun Oct 27, 2019 6:12 pmI would look at these files in an editor which shows hidden characters, including the MakeDepend file. The vi(m) mode to see hidden characters is ":set list" - others can say how to do that with other editors. Are you being bitten by a rogue tab character? I can't tell.Error: Invalid character in name at (1)
make: *** [/Users/venuscheung/ocean_model/inlet_test/Build_roms/ocpmix.o] Error 1
btw I am using Mac OS, gfortran as my compiler and open-mpi installing by brew.
Re: Problem with setting up inlet_test
the problem here is that SWAN has characters after column 72 that list when the code was updated. for example, the offending line in ocpmix.F is
! logical function EQREAL ( Checks whether REAL1 is appr. 30.72
and as you can see, the 30.72 is actually swan jargon for the version update.
To fix this you need to tell your compiler that certain files are fixed format, and some are free. This is in Compilers/*, where for you i think it would be
Compilers/Linux-gfortran.mk
If you are using swan+roms coupling, i suggest you use COAWST as we have been updating that coupling for many years. In COAWST/Compilers/Linux-gfortran.mk there is
ifdef USE_SWAN
$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -ffixed-form
$(SCRATCH_DIR)/ocpids.o: FFLAGS += -ffixed-form
$(SCRATCH_DIR)/ocpmix.o: FFLAGS += -ffixed-form
....
so that should take care of it. Can you check your version of Linux-gfortran??
-j
! logical function EQREAL ( Checks whether REAL1 is appr. 30.72
and as you can see, the 30.72 is actually swan jargon for the version update.
To fix this you need to tell your compiler that certain files are fixed format, and some are free. This is in Compilers/*, where for you i think it would be
Compilers/Linux-gfortran.mk
If you are using swan+roms coupling, i suggest you use COAWST as we have been updating that coupling for many years. In COAWST/Compilers/Linux-gfortran.mk there is
ifdef USE_SWAN
$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -ffixed-form
$(SCRATCH_DIR)/ocpids.o: FFLAGS += -ffixed-form
$(SCRATCH_DIR)/ocpmix.o: FFLAGS += -ffixed-form
....
so that should take care of it. Can you check your version of Linux-gfortran??
-j
Re: Problem with setting up inlet_test
the attached file is my Linux-gfortran, but seems nothing special.jcwarner wrote: ↑Mon Oct 28, 2019 4:08 pm the problem here is that SWAN has characters after column 72 that list when the code was updated. for example, the offending line in ocpmix.F is
! logical function EQREAL ( Checks whether REAL1 is appr. 30.72
and as you can see, the 30.72 is actually swan jargon for the version update.
To fix this you need to tell your compiler that certain files are fixed format, and some are free. This is in Compilers/*, where for you i think it would be
Compilers/Linux-gfortran.mk
If you are using swan+roms coupling, i suggest you use COAWST as we have been updating that coupling for many years. In COAWST/Compilers/Linux-gfortran.mk there is
ifdef USE_SWAN
$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -ffixed-form
$(SCRATCH_DIR)/ocpids.o: FFLAGS += -ffixed-form
$(SCRATCH_DIR)/ocpmix.o: FFLAGS += -ffixed-form
....
so that should take care of it. Can you check your version of Linux-gfortran??
-j
- Attachments
-
- Linux-gfortran.mk
- (11.12 KiB) Downloaded 475 times
Re: Problem with setting up inlet_test
if you type
uname -s
what comes back?
can you send the whole build log?
-j
uname -s
what comes back?
can you send the whole build log?
-j
Re: Problem with setting up inlet_test
ok so you need to edit
Compilers/Darwin-gfortran.mk
can you send the whole build.log? so i can see what flags are being issued? Look at the FFLAGS and make sure it is sending the Fixed format options.
Compilers/Darwin-gfortran.mk
can you send the whole build.log? so i can see what flags are being issued? Look at the FFLAGS and make sure it is sending the Fixed format options.
Re: Problem with setting up inlet_test
sorry I didnt notice that the file is failed to attach.
- Attachments
-
- log.txt
- (282.23 KiB) Downloaded 444 times
Re: Problem with setting up inlet_test
ok the search continues. it has
cd /Users/venuscheung/ocean_model/inlet_test_romsG/Build_roms; /usr/local/Cellar/open-mpi/4.0.2/bin/mpif90 -c -frepack-arrays -O3 -I/usr/local/MCT/include -ffixed-form ocpmix.f90
ocpmix.f90:14:9:
14 | 30.72
| 1
Error: Invalid character in name at (1)
can you send to me the ocpminx.f90 file. -j
cd /Users/venuscheung/ocean_model/inlet_test_romsG/Build_roms; /usr/local/Cellar/open-mpi/4.0.2/bin/mpif90 -c -frepack-arrays -O3 -I/usr/local/MCT/include -ffixed-form ocpmix.f90
ocpmix.f90:14:9:
14 | 30.72
| 1
Error: Invalid character in name at (1)
can you send to me the ocpminx.f90 file. -j
Re: Problem with setting up inlet_test
I cant find my ocpmix.f90 in the build file but i have the original file in WAVE/SWAN/jcwarner wrote: ↑Wed Oct 30, 2019 1:57 am ok the search continues. it has
cd /Users/venuscheung/ocean_model/inlet_test_romsG/Build_roms; /usr/local/Cellar/open-mpi/4.0.2/bin/mpif90 -c -frepack-arrays -O3 -I/usr/local/MCT/include -ffixed-form ocpmix.f90
ocpmix.f90:14:9:
14 | 30.72
| 1
Error: Invalid character in name at (1)
can you send to me the ocpminx.f90 file. -j
- Attachments
-
- ocpmix.F
- (93.76 KiB) Downloaded 477 times
Re: Problem with setting up inlet_test
no i need to see the .f90
i need to see what the compiler is seeing on that line.
i need to see what the compiler is seeing on that line.
Re: Problem with setting up inlet_test
oh I just found out that I have searched inside a wrong directory, here's my ocpmix.f90 and .o.
- Attachments
-
- ocpmix.F
- (93.76 KiB) Downloaded 447 times
-
- ocpmix.f90
- (93.58 KiB) Downloaded 452 times
Last edited by venuscheung on Wed Oct 30, 2019 3:17 am, edited 1 time in total.
Re: Problem with setting up inlet_test
ummmm...sorry again. These should be the correct file. Please ignore the previous files.venuscheung wrote: ↑Wed Oct 30, 2019 3:09 amoh I just found out that I have searched inside a wrong directory, here's my ocpmix.f90 and .o.
- Attachments
-
- ocpmix.f90
- (93.43 KiB) Downloaded 500 times
Re: Problem with setting up inlet_test
ok i can see the problem now. for some reason, when your code does the cpp preprocessing it changes line 14 from
! equal to REAL2 ) 30.72
to
30.72
the pre-processor tries to clean up the code a bit, and for some reason it is messing this up. It looks like the rest of the
Do me a favor and edit SWAN/Src/ocpmix.F and remove these lines:
! logical function EQREAL ( Checks whether REAL1 is appr. 30.72
! equal to REAL2 ) 30.72
just delete those 2 lines in the .F, recompile, and lets see.
-j
! equal to REAL2 ) 30.72
to
30.72
the pre-processor tries to clean up the code a bit, and for some reason it is messing this up. It looks like the rest of the
Do me a favor and edit SWAN/Src/ocpmix.F and remove these lines:
! logical function EQREAL ( Checks whether REAL1 is appr. 30.72
! equal to REAL2 ) 30.72
just delete those 2 lines in the .F, recompile, and lets see.
-j
Re: Problem with setting up inlet_test
The problem is the version of cpp that comes with Xcode. It's likely that Homebrew (I know Macports does) has a working cpp you can use instead. I would suggest you:
The Xcode cpp removes all the text between and including "/* Checks" and "REAL2 */" but leaves the line return for some odd reason. Leaving you with:
instead of:
Notice that the single-line comment (/* splits an input line into data items */) is handled correctly. There may be a flag to remedy this but I don't know it.
- Make a ~/Compilers/ROMS directory (mkdir -p ~/Compilers/ROMS)
- Place a copy of the Darwin-gfortran.mk file from the Compilers directory of your ROMS source code into the directory above.
- Update the "COMPILERS" variable in your build script to point to this directory.
- Edit ~/Compilers/ROMS/Darwin-gfortran.mk and change the line "CPP := /usr/bin/cpp" to "CPP:= /usr/local/bin/cpp" or whatever the path to the Homebrew cpp executable is.
Code: Select all
! FOR
! logical function EQREAL /* Checks whether REAL1 is appr. 30.72
! equal to REAL2 */ 30.72
! LSPLIT /* splits an input line into data items */ 40.00
! BUGFIX 40.03
Code: Select all
! FOR
! logical function EQREAL
30.72
! LSPLIT 40.00
! BUGFIX 40.03
Code: Select all
! FOR
! logical function EQREAL 30.72
! LSPLIT 40.00
! BUGFIX 40.03
Re: Problem with setting up inlet_test
one very silly question...but may I ask should I do anything for the MCT and ARPACK file under Lib?
Or I should make and install them?
Thank you
Or I should make and install them?
Thank you
Re: Problem with setting up inlet_test
i suggest that you should be using COAWST for roms + swan coupling. We distribute a manual that has explanations of the inlet test and many other test cases. also how to compile and install mct. we dont use arpack.
if you need coawst, send me an email to jcwarner@usgs.gov
the same swan issue will be in my version, as swan is from a different group.
-j
if you need coawst, send me an email to jcwarner@usgs.gov
the same swan issue will be in my version, as swan is from a different group.
-j
Re: Problem with setting up inlet_test
Thank you for your help. I have sucessfully compile romsM but still some problem in running it.jcwarner wrote: ↑Wed Oct 30, 2019 5:07 pm i suggest that you should be using COAWST for roms + swan coupling. We distribute a manual that has explanations of the inlet test and many other test cases. also how to compile and install mct. we dont use arpack.
if you need coawst, send me an email to jcwarner@usgs.gov
the same swan issue will be in my version, as swan is from a different group.
-j
May I ask what is special about coupling roms and swan using COAWST.
Really THANK A LOT
Re: Problem with setting up inlet_test
we have been advancing the coupling to swan a lot more, it will be a more recent version of swan, we also added more wave current interactions, more sediment algorithms, vegetation/marsh, wave watch 3 coupling, wrf coupling, infragravity wave model, new wave-current asymmetry bedload, ... bunch of stuff.
Re: Problem with setting up inlet_test
when I run mpirun -np 2 ./romsM coupling_inlet_test.in > run.log 2>&1, it gives out error but I have already check all file is in the correct path and directory...jcwarner wrote: ↑Wed Oct 30, 2019 5:29 pm we have been advancing the coupling to swan a lot more, it will be a more recent version of swan, we also added more wave current interactions, more sediment algorithms, vegetation/marsh, wave watch 3 coupling, wrf coupling, infragravity wave model, new wave-current asymmetry bedload, ... bunch of stuff.
- Attachments
-
- run.log
- (1.9 KiB) Downloaded 436 times
Re: Problem with setting up inlet_test
And yet:
coupling_inlet_test.in is in your current run directory? Plus any files it refers to?INP_PAR - Unable to open ROMS/TOMS input script file.
Re: Problem with setting up inlet_test
this is the Rutgers way of specifying the coupling:
Ocean Export: bath:SSH:Ubar:Vbar:ZO
Waves Export: Wdir:Wamp:Wlen:Wptop:Wpbot:Wubot
i will send you the coawst way in a minute.
-j
Ocean Export: bath:SSH:Ubar:Vbar:ZO
Waves Export: Wdir:Wamp:Wlen:Wptop:Wpbot:Wubot
i will send you the coawst way in a minute.
-j
-
- Posts: 39
- Joined: Thu Oct 17, 2019 8:56 pm
- Location: Clarkson University
Re: Problem with setting up inlet_test
Hi jcwarner,jcwarner wrote: ↑Wed Oct 30, 2019 5:29 pm we have been advancing the coupling to swan a lot more, it will be a more recent version of swan, we also added more wave current interactions, more sediment algorithms, vegetation/marsh, wave watch 3 coupling, wrf coupling, infragravity wave model, new wave-current asymmetry bedload, ... bunch of stuff.
How is the coupling of Roms and Wave watch iii now? Is it still in progress? If so, when will it be completed?
Re: Problem with setting up inlet_test
yes we have roms wrf ww3 swan coupling in the coawst system. if you send me an email, i can add you to that distribution.
jcwarner@usgs.gov
-j
jcwarner@usgs.gov
-j
Re: Problem with setting up inlet_test
Hi jcwarner, can you help me to solve the WW3 running errors.jcwarner wrote: ↑Tue Feb 18, 2020 1:29 am yes we have roms wrf ww3 swan coupling in the coawst system. if you send me an email, i can add you to that distribution.
jcwarner@usgs.gov
-j
I tried to run the case of sandy using COAWST-V3.5, where the input data used the existing files in the Sandy folder and the configure file (*.in, *.h and *.inp) used the default parameters. I can successfully run the fully coupled application that WRF + ROMS + SWAN, but I melt an error when running WW3-only (WW3-V6.07.1) according to the user manual.
Running environment:
- Ubuntu 18.04LTS
- gfortran 7.4.0
- mpich 3.3a2
- netcdf-fortran 4.4.4
- netcdf-C 4.6.1
1. compile COAWST ok
2. ./ww3_grid ok
3. ./ww3_strt ok
4. ./ww3_prep ok
5. mpirun -np 2 ./coawstM ww3_grid.inp fail
Please see the attachment for the corresponding log file.
Error information as follow:
Code: Select all
*** WAVEWATCH III Program shell ***
===============================================
Comment character is '$'
Input fields :
--------------------------------------------------
ice param. 1 ---/NO
ice param. 2 ---/NO
ice param. 3 ---/NO
ice param. 4 ---/NO
ice param. 5 ---/NO
mud density ---/NO
mud thkness ---/NO
mud viscos. ---/NO
water levels ---/NO
currents ---/NO
winds YES/--
ice fields ---/NO
mean param. ---/NO
1D spectra ---/NO
2D spectra ---/NO
*** WAVEWATCH III WARNING :
NUMBER OF REQUESTED OUTPUT FIELD FLAGS IN GROUP 2
LESS THAN AVAILABLE, CHECK DOCS FOR MORE OPTIONS
*** WAVEWATCH III WARNING :
NUMBER OF REQUESTED OUTPUT FIELD FLAGS IN GROUP 4
LESS THAN AVAILABLE, CHECK DOCS FOR MORE OPTIONS
*** WAVEWATCH III WARNING :
NUMBER OF REQUESTED OUTPUT FIELD FLAGS IN GROUP 6
LESS THAN AVAILABLE, CHECK DOCS FOR MORE OPTIONS
Fields : Water depth
Current vel.
Wind speed
Air-sea temp. dif.
Water level
Wave height
Mean wave length
Mean wave period(+2)
Mean wave period(-1)
Mean wave period(+1)
Peak frequency
Mean wave dir. a1b1
Mean dir. spr. a1b1
Peak direction
Part. wave height
Part. peak period
Part. peak wave len.
Part. mean direction
Part. dir. spread
Part. wind sea frac.
Part. peak direction
Part. peakedness
Friction velocity
Charnock parameter
Energy flux
Wind-wave enrgy flux
Wind-wave net mom. f
Wind-wave neg.mom.f.
Whitecap coverage
Whitecap mean thick.
Mean breaking height
Dominant break prob
Radiation stresses
Wave-ocean mom. flux
wave ind p Bern Head
Wave-ocean TKE flux
Stokes transport
Stokes drift at z=0
2nd order pressure
Bottom rms ampl.
Bottom rms velocity
Bedform parameters
Energy diss. in WBBL
Moment. loss in WBBL
Mean square slopes
Phillips tail const
Slope direction
Tail slope direction
Goda peakedness parm
Undefined / Not Used
Avg. time step.
Cut-off freq.
Maximum spatial CFL
Maximum angular CFL
Maximum k advect CFL
At line 394 of file w3iogomd.F90
Fortran runtime error: Unit number is negative and unit was not already opened with OPEN(NEWUN
Error termination. Backtrace:
#0 0x14a85eba52da in ???
#1 0x14a85eba5ec5 in ???
#2 0x14a85eba668d in ???
#3 0x14a85ed1f7fb in ???
#4 0x55a3ca681f4e in __w3iogomd_MOD_w3readflgrd
at /home/henry/coawst/COAWST/WW3/model/tmp/w3iogomd.F90:394
#5 0x55a3ca54ed59 in ww3_init_
at /home/henry/coawst/COAWST/WW3/model/tmp/ww3_shel.F90:1236
#6 0x55a3ca54b0a1 in ???
#7 0x55a3ca54af32 in ???
#8 0x14a85e204b96 in ???
#9 0x55a3ca54af69 in ???
#10 0xffffffffffffffff in ???
- Attachments
-
- ww3_strt.log
- (6.12 KiB) Downloaded 418 times
-
- ww3_prep.log
- (4.7 KiB) Downloaded 471 times
-
- ww3_grid.log
- (25.22 KiB) Downloaded 431 times
Re: Problem with setting up inlet_test
looks like it cant find a file, maybe the wind file or the setup file.??
can you send to me
/home/henry/coawst/COAWST/WW3/model/tmp/w3iogomd.F90
/home/henry/coawst/COAWST/WW3/model/tmp/ww3_shel.F90
i can look on those line numbers and see what file it is trying to find.
WW3 does a lot of soft links (not my favorite thing) to input files, so you need to be careful. Let me see what is on those files and i can try it here.
-j
can you send to me
/home/henry/coawst/COAWST/WW3/model/tmp/w3iogomd.F90
/home/henry/coawst/COAWST/WW3/model/tmp/ww3_shel.F90
i can look on those line numbers and see what file it is trying to find.
WW3 does a lot of soft links (not my favorite thing) to input files, so you need to be careful. Let me see what is on those files and i can try it here.
-j
Re: Problem with setting up inlet_test
Thank you for your reply, here are the two .F90 files. I am very appreciate for your help if you can give me some advice.jcwarner wrote: ↑Tue Mar 17, 2020 1:56 pm looks like it cant find a file, maybe the wind file or the setup file.??
can you send to me
/home/henry/coawst/COAWST/WW3/model/tmp/w3iogomd.F90
/home/henry/coawst/COAWST/WW3/model/tmp/ww3_shel.F90
i can look on those line numbers and see what file it is trying to find.
WW3 does a lot of soft links (not my favorite thing) to input files, so you need to be careful. Let me see what is on those files and i can try it here.
-j
- Attachments
-
- ww3_shel.F90
- (75.46 KiB) Downloaded 396 times
-
- w3iogomd.F90
- (139.42 KiB) Downloaded 392 times