DOI-USGS / COAWST

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

SWAN halts/pauses at the middle of simulation #258

Closed able93 closed 1 month ago

able93 commented 1 month ago

Hello,

I am running a coupled ROMS+SWAN simulation, and it was going fine until the model stops, no blowup, no error. I tried to run them differently, and ROMS was good, but SWAN stops at similar time for every simulation, whether coupled or alone. The wind file is about 43gig, covers 652x562, 3hr interval (time length = 5484), for two years, and total rows of wind forcing file = 4219963584. How can I fix this problem.

Thanks

swan_input.txt

fbveg (3).log

jcwarner-usgs commented 1 month ago

i am not sure.

Do the PRINT files tell you anything as to why it stopped?

I see you have RESTART './output/swan_rst_par.dat' FREE 30 MIN If you can restart it, does it start and keep going?

maybe try for just 6 months at a time.

able93 commented 1 month ago

Thank you so much for the quick response.

I just attached one of the print outputs. It has no error, I even tried to run it for 10 days, I restarted it as well, but it stops at every 20110105.120000. I tried SWAN alone, coupled with ROMS, it stops on that very date and time. With ROMS, it just stops, no error, no blowout. ROMS then have to pause and wait for SWAN to do something.

PRINT01-013.txt

jcwarner-usgs commented 1 month ago

not sure.

try commenting out all the TPARs & BOUND SHAPESPEC JONSWAP MEAN DSPR DEGREES & BOUNDSPEC SEGMENT IJ 0 0 0 20 VARIABLE FILE 0 '/mnt/beegfs/home/201101/TPAR1.txt' & BOUNDSPEC SEGMENT IJ 0 20 0 40 VARIABLE FILE 0 '/mnt/beegfs/home/201101/TPAR2.txt' ... & BOUNDSPEC SEGMENT IJ 640 561 561 561 VARIABLE FILE 0 '/mnt/beegfs/home/201101/TPAR68.txt'

see if that runs.

what if you start it at 20110105.120000?

try just WIND 10. 30. to see if the wind file is messed up.

any Nans in the wind or Tpars?

able93 commented 1 month ago

Thank you once again.

So I commented the boundary files, and it worked well. But when I tried constant wind, and retaining the boundary files, staring from 20110105.120000, it paused again. I looked at the log, and I saw an error in processing boundary conditions. I checked through the boundary files, no Nan.

Boundary data type TPAR processed, time: 313200. Boundary data type TPAR processed, time: 324000. Boundary data type TPAR processed, time: 334800. Boundary data type TPAR processed, time: 345600. Boundary data type TPAR processed, time: 356400. Boundary data type TPAR processed, time: 367200. Boundary data type TPAR processed, time: 378000. Boundary data type TPAR processed, time: 388800. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : first moment is zero in calculating the Severe error : spectrum at boundary using param. bc. Severe error : No convergence calculating the spectrum Severe error : at the boundary using parametric bound. cond. Boundary data type TPAR processed, time: 399600. Boundary data type TPAR processed, time: 410400. Boundary data type TPAR processed, time: 421200. Boundary data type TPAR processed, time: 432000. Boundary data type TPAR processed, time: 0. Boundary data type TPAR processed, time: 10800. Boundary data type TPAR processed, time: 21600. Boundary data type TPAR processed, time: 32400. Boundary data type TPAR processed, time: 43200. Boundary data type TPAR processed, time: 54000.

jcwarner-usgs commented 1 month ago

Well, it looks like there is an error when it computes the boundary spectrum from one of the files at that time. Suggest you track down which file it is, you might have to comment out some of the TPARs, if those work, then uncomment more, etc, until you track down which file it is. then look at the parameters it is using. Is the Period = 0 ? that might cause an error.

able93 commented 1 month ago

So I tracked the file to TPAR 32.txt. At 20110113.0600000, there is a 0. You can have a look. I checked other boundary files as well, and can see 0. too. My domain covers the Gulf of Mexico and the Atlantic, and I used glo_30m to generate the boundary.

TPAR32.txt

jcwarner-usgs commented 1 month ago

i think it is date Hs Period dir spread 20110113.0600 1.07 4.52 0. 20

so i dont see a period of 0.
keep looking.

able93 commented 1 month ago

I have screened through the files, no period is 0. However for that TPAR32.txt, when I changed the 0 of the direction to like 1, it simulated past 20110105.120000, and then stopped at 20110107.120000, which indicated that there are still more 0 in the directions of other files. I checked, and found 0.

jcwarner-usgs commented 1 month ago

ok.. but honestly a direction of 0 should work. so make sure you check the output. glad it is running.

able93 commented 1 month ago

So the direction being 0 wasn't my problem, because the model also keeps stopping at 20110107.120000 after commenting more than half of the boundary files. Only if I comment on all boundary files that the model works smoothly. I want to try and create the spec 2D files, but I can't find Tools/mfiles/swan_forc/ww3_swan_input.m. I can only see create _swan_Tpar. Can I have the file to make spec2D please.

jcwarner-usgs commented 1 month ago

i think you need to figure out what the problem is before you create the same problem in a different way. if you commented half of the 2dspec files, then the problem is somewhere in the other ones. Do you get the same error? do you have TABS (instead of spaces) in the TPAR files? I dont think i distributed an m file to create SWAN 2d spec files. An example of what a 2d spec file should look like is: COAWST\Projects\Inlet_test\InWave\point1.spc2d it only has 1 time step, But to add more times, you repeat

20000101.010000 date and time FACTOR scale factor such as 0.14251295E-01 [ block of data freqs rows x dirs colums] 20000101.020000 date and time FACTOR scale factor such as 0.14251295E-01 [ block of data freqs x dirs] ....

able93 commented 1 month ago

So I tried torun the boundary files in bits, and this is one boundary file causing a problem. I also attached the output.

Thanks

PRINT.txt TPAR56.txt

jcwarner-usgs commented 1 month ago

Date Hs Tp Dir Spr 20110120.0300 0.08 2.97 11. 20 20110120.0600 0.11 0.01 1. 20

looks like hte period is close to zero. maybe there is a lower limit. Suggest you make all the periods be greater than 1.

able93 commented 1 month ago

Thank you so much.

It indeed seems there is a lower limit. When I changed the periods to a minimum of 1.00, the model worked.

Thank you once again