output files of SWAN model

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
Rocky_Wang
Posts: 50
Joined: Tue Mar 01, 2016 1:38 am
Location: the Ocean University of China

output files of SWAN model

#1 Unread post by Rocky_Wang »

Hi everyone,
Recently, in order to couple the SWAN model, I have run the inlet-test case successfully, but when I use matlab to check the output files of SWAN, such as hsig.mat, fric.mat and so on , I found cannot open them. The attachment are my .in , log ,print file and hsig.mat. Can you tell me the reason? if there are some thing wrong with my swan_inlet_test.in. Thanks very much!
Attachments
inlet.zip
(2.24 MiB) Downloaded 567 times
捕获.PNG

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: output files of SWAN model

#2 Unread post by jcwarner »

are you using Rutgers version of swan coupling or COAWST?
In the past, this error was due to a byte offset needed for matlab, and it depending on the compiler. So we have added some flags , such as
in Compilers/CYGWIN-ifort.mk
ifdef USE_SWAN
FFLAGS += /noextend_source -assume:byterecl
endif

what compiler are you using?
-j

Rocky_Wang
Posts: 50
Joined: Tue Mar 01, 2016 1:38 am
Location: the Ocean University of China

Re: output files of SWAN model

#3 Unread post by Rocky_Wang »

Thanks John, I use the Linux-ifort.mk, Could you mind show me how to add the flags?
Attachments
捕获2.PNG
捕获2.PNG (31.74 KiB) Viewed 14783 times

Rocky_Wang
Posts: 50
Joined: Tue Mar 01, 2016 1:38 am
Location: the Ocean University of China

Re: output files of SWAN model

#4 Unread post by Rocky_Wang »

Sorry, I forget to say that the ROMS I use is Rutgers version of swan coupling.

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: output files of SWAN model

#5 Unread post by jcwarner »

to the Compilers/Linux-ifort.mk, you will need to add
ifdef USE_SWAN
FFLAGS += -assume byterecl
endif

i would suggest that if you intend on doing a lot of research with swan+roms, that you switch to coawst. We have updated swan to more recent versions, include vortex force wave effects on currents, have swan with grid refinement, coupling with refinement to roms, etc etc. We are up to date with Rutgers version of roms, so there is no difference there.

-john

Rocky_Wang
Posts: 50
Joined: Tue Mar 01, 2016 1:38 am
Location: the Ocean University of China

Re: output files of SWAN model

#6 Unread post by Rocky_Wang »

Thanks very much John, I sloved the problem. change nothing and just add what you said. I sent an application letter about COAWST to your E-mail Address, MY name is Rocky. Thanks again!

Rocky_Wang
Posts: 50
Joined: Tue Mar 01, 2016 1:38 am
Location: the Ocean University of China

Re: output files of SWAN model

#7 Unread post by Rocky_Wang »

jcwarner wrote: Fri Oct 21, 2016 12:20 pm to the Compilers/Linux-ifort.mk, you will need to add
ifdef USE_SWAN
FFLAGS += -assume byterecl
endif

i would suggest that if you intend on doing a lot of research with swan+roms, that you switch to coawst. We have updated swan to more recent versions, include vortex force wave effects on currents, have swan with grid refinement, coupling with refinement to roms, etc etc. We are up to date with Rutgers version of roms, so there is no difference there.

-john
Hi John

This problem occurs again when I run the Inlet_test case of COAWST. The MAT result output by SWAN cannot be opened using MATLAB. This time, I use the gfortran compiler. What should I do to modify linux-gfortran.mk??

Thanks

chenghao
Attachments
770E8DEF18D6EBDFD81E62F37A788900.png
770E8DEF18D6EBDFD81E62F37A788900.png (8.85 KiB) Viewed 11235 times

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: output files of SWAN model

#8 Unread post by jcwarner »

i think for some versions of gfortran you need to add

FFLAGS += -fconvert=big-endian

see if that works.
what do you get for
gfortran --version

Post Reply