DOI-USGS / COAWST

COAWST modeling system git repository
Other
109 stars 52 forks source link

ROMS+SWAN - WAM cycle 4.5 boundary conditions #24

Closed ymamoutos closed 3 years ago

ymamoutos commented 3 years ago

Greetings

I am trying to setup a coupled ROMS-SWAN coastal application using COAWST. ROMS setup is OK and running smoothly but SWAN - coupled and not - gives the following error when I run it using debugger :

forrtl: error (182): floating invalid - possible uninitialized real/complex variable. Image PC Routine Line Source
coawstG 00000000038DD3C4 Unknown Unknown Unknown libpthread-2.17.s 00002B43600F85D0 Unknown Unknown Unknown coawstG 00000000036B48F7 inreal 482 ocpcre.f90 coawstG 000000000333F2EA swread 1704 swanpre1.f90 coawstG 0000000002EDD57D swaninitialize 331 swanmain.f90 coawstG 0000000002E0DCAD waves_control_mod 76 waves_control.f90 coawstG 00000000004180E0 MAIN 214 master.f90 coawstG 000000000040F7A2 Unknown Unknown Unknown libc-2.17.so 00002B436052B495 libc_start_main Unknown Unknown coawstG 000000000040F6A9 Unknown Unknown Unknown

For SWAN boundary conditions I am using WAM output (unformatted files) from our operational model. SWAN errfile gives the following message

Terminating error: File cannot be opened/does not exist: CBO20210205000000.

I must also say that I tried to run SWAN 41.31 version (http://swanmodel.sourceforge.net/) and ended up to modify swanpre2.f and swanmain.f to read properly WAM files. At the moment I haven't change anything in COAWST SWAN code. I am using intel fortran 19.0.4.243 and mpich 3.2.1.

Any help or suggestion is highly appreciated

Giannis

jcwarner-usgs commented 3 years ago

ok. here are a few questions:

-there is an error saying that the CBO.. file does not exist. does it exist in the same dir as the exe? -you said that you ended up modifying swanpre2 and swanmain to get the code to read the WAM files. did that work? -did you try to modify those same files in COAWST to see if that works?

-j

ymamoutos commented 3 years ago

Greetings from Greece John

Many thanks for your reply. I must admit that I was a bit sloppy...The CBO* files were set in different path in the SWAN input file. After I moved them to the correct one - the same folder with coawst executable the error "File cannot be opened/does not exist: CBO20210205000000" vanished, but SWAN - as happened with the official distribution - didn't read them correctly. So I merged the modifications to COAWST SWAN source and now the coupled model runs smoothly. If you like I can attached the modified swainpre2.f and swanmain.f in order to check them but I am not sure if these changes are generic and apply to all WAM versions.

Again many thanks

Kind Regards

Giannis

jcwarner-usgs commented 3 years ago

Hope all is well in Greece. Glad you were able to correct the issue. Yes - if you want to provide those files you modified, i can add them to the distribution with a cpp def around it. so that way others can have your option if they need it. thanks j

ashlyku commented 1 year ago

Hi Giannis, I am trying to force SWAN (version 41.45) boundary from WAM (Cycle 6). I am getting error ' BOUNDNEST2 WAMNEST 'CBO20220101000000' UNF CRAY -20 36 14 * Terminating error: File cannot be opened/does not exist: ^@^@^@^@^@@A^@^@ÈA<92> I cant actually figure out the error. I am writing 'CBO' files in binary. i have been stuck with this for the last two weeks.If you have a modified code for SWAN which couples it to WAM, Could you be able to share it with me? Regards, Ashly.

ymamoutos commented 1 year ago

Dear Ashly

I am attaching two modified files (swanmain.ftn swanmain.txt swanpre2.txt and swanpre2.ftn) for swan version 4131. Check lines starting with ! IM CORRECTION to see the changes. These changes worked with WAM cycle 4.5 output files and I haven't check them for WAM cycle 6.0. Also add this line to your *.swn file

BOUNdnest2 WAMNest '/bounds_fileU2' UNF WKstat 14

where bounds_fileU2 has the CBO* files listed (I am attaching bounds_fileU2 also) bounds_fileU2.txt

John i am sorry for my extremely late response.

Good Luck and Kind Regards

Giannis Mamoutos

ashlyku commented 1 year ago

Dear Giannis, Thanks a lot. SWAN is running now. WAM saves the boundary value every 1 hr. And PRINT file shows the WAM boundary files are read properly by SWAN with the updated source files. But there is an error in the PRINT file " no grid points on nested boundary". I am a beginner and don't really know how to solve this. PRINTSWAN.txt Thank you once again for the help. Regards, Ashly.