DOI-USGS / COAWST

COAWST modeling system git repository
Other
100 stars 48 forks source link

"Terminating error: unexpected end of command input" in SWAN only nested model #252

Open tobiashi26 opened 2 months ago

tobiashi26 commented 2 months ago

Hello,

I'm currently trying to run a nested SWAN only model with three grids. With only one grid the model runs well and finishes without producing any errors. However, the nested model seems to run well until the computation has finished at which point a file/several files named "Errfile02-00X" are produced indicating the error "Terminating error: unexpected end of command input." Judging from the PRINT files, the program seems to be completed for the first grid/domain but not move past the nonstationary computation for two nested domains. When running the COAWST with one processor, the specified output files are written correctly (although the error file is still generated).

image

However, when running the program with more than one processor the output files for the two smaller domains fail to converge.

image

A similar error is generated when I try running the Inlet_test Swanonly example. I was wondering if you had any idea what could be wrong or had any suggestions? I attached the the input files, batch script, and some of the error and print files below.

Thank you very much!

era5_wm_n.in.txt era5_CC_n.in.txt era5_ED_n.in.txt era5_n.out.txt era5_n.sh.txt PRINT01-001.txt PRINT02-001.txt PRINT03-001.txt Errfile02-001.txt fort.52.txt

jcwarner-usgs commented 2 months ago

not sure. if it hits an error near the end, then the files may not be pulled together. here are some things to try (looks like a short test, so that is good). replace all the $ with & . i thought the comments should be & symbols. make sure there are no Tabs. look at the 3 input files in a text editor that can tell Tabs. have all 3 input files just end with the STOP dont add more lines after that. rm that $ line at the end in all 3 files. let me know if that helps.

"A similar error is generated when I try running the Inlet_test Swanonly example. " is that as we distribute or with some modifications? -j

tobiashi26 commented 2 months ago

Hi @jcwarner-usgs,

Thanks for getting back to me!

I updated the file to use & instead of $ for comments, removed the empty line with '$' at the end of the files, and checked for tabs but still got the same error. I also tried removing comments altogether, but this didn't work either.

Yes, I'm also trying to run the original Inlet_test, Swanonly example without modifications. I'm also having a similar problem. image image I attached some of the files from the model Swanonly example below if that offers any clues.

Errfile02-001.txt PRINT01-001.txt PRINT02-001.txt swaninit01-001.txt swaninit02-001.txt

Thanks!

jcwarner-usgs commented 1 month ago

OK. sorry for the late reply. This was me - my fault. sorry. I had an issue with the file numbers, especially when we have used the partitions and we had like 1000 files open. So i made some changes and it was bad. Please try this. Edit SWAN/src/swanmain.ftn and change lines 1188 from

  DO IUNIT=1,HIOPEN                                                                                
     INQUIRE ( UNIT=IUNIT, OPENED=LOPEN, NAME=FILENM )                41.79 34.01
     ........

to DO IUNIT=100,HIOPEN
INQUIRE ( UNIT=IUNIT, OPENED=LOPEN, NAME=FILENM ) 41.79 34.01

it was just one change, from 1 to 100. recompile and see if that works.

tobiashi26 commented 1 month ago

Hi @jcwarner-usgs,

Thanks for getting back to me. I changed line 1188 of the "SWAN/src/swanmain.ftn" file as you recommended, and everything's working now (i.e. no "Err" files are generated, and the output files converge).

I appreciate the help!