DOI-USGS / COAWST

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

itriad in distributed SWAN vs COAWST SWAN model #277

Closed tarankalra1 closed 2 days ago

tarankalra1 commented 4 days ago

Hi John,

I was doing testing of standalone SWAN (downloaded swan directly) vs the one we have through COAWST distribution. The same input files to the model gave different output of wave height for modeling reefs (attached difference image).

I dug in a bit deeper and found that we are using the triad option in COAWST that defaults to a different formulation (ITRIAD=11) while the directly distributed SWAN model used a different one (ITRIAD=1). Other than that, there is no difference in the output file that could lead to the wave height differences. I was wondering if you knew why we had defaulted to a different formulation in COAWST. I tried 2 standalone versions of SWAN 41.10 and the most recent one SWAN 41.41.

The COAWST model that I have used is from gitlab and used SWAN 41.31.

There must be some physical reasoning why we are defaulting to a different option in COAWST for triads and may be you know about that. diff_10perc_RestoredReef_outs_GM_TSKdirect

jcwarner-usgs commented 2 days ago

Taran-

we are using SWAN 41.45. it was a big update and now it uses cmake to build.

in swanpre1.ftn i see ! ! ============================================================ ! ! / -> COLL ! | -> DCTA [trfac] [p] \ NONC ! | ! TRIad < LTA [trfac] [cutfr] [dint] & ! | ! | SPB [trfac] [a] [b] [dint] ! ! ! | -> ELDeberky [urcrit] ! | ! BIPHase < SAPRykina [a] (NOT documented) ! | ! | WIT [lpar] ! ! ! TRIad [itriad] [trfac] [cutfr] [dint] [a] [b] [p] [urcrit] [urslim] (obsolete) ! ! ============================================================ ! ! IF ( KEYWIS ('TRI') .OR. KEYWIS ('NL3') ) THEN ! ITRIAD = 5 CALL INKEYW ('REQ',' ') IF ( KEYWIS('LTA') ) THEN

so if you just list TRIAD in the INPUT, it will default to itriad=5.

in previous coawst, the swanpre1 had IF (KEYWIS ('TRI')) THEN CALL ININTG ('ITRIAD', ITRIAD, 'STA', 11) <---------------------this set default = 11 IF (ITRIAD.EQ.1) THEN CALL INREAL ('TRFAC', PTRIAD(1), 'STA', 0.8) 41.44 CALL INREAL ('CUTFR', PTRIAD(2), 'STA', 2.5) 40.61 40.56 30.82 ELSEIF (ITRIAD.EQ.2) THEN CALL INREAL ('TRFAC', PTRIAD(1), 'STA', 0.90) 41.46 CALL INREAL ('A' , PTRIAD(6), 'STA', 0.95) 41.46 CALL INREAL ('B' , PTRIAD(7), 'STA', 0.0 ) 41.46 CALL INREAL ('P' , PTRIAD(8), 'STA', 0.0 ) ELSEIF (ITRIAD.EQ.5) THEN CALL INREAL ('TRFAC', PTRIAD(1), 'STA', 0.35) 41.45 CALL INREAL ('CUTFR', PTRIAD(2), 'STA', 1.33333333) ELSEIF (ITRIAD.EQ.11) THEN ! original LTA (before version 41.01) CALL INREAL ('TRFAC', PTRIAD(1), 'STA', 0.05) CALL INREAL ('CUTFR', PTRIAD(2), 'STA', 2.5) ENDIF

So it was a change in SWAN distribution. i am not sure what the 5 and 11 are ,but if you want a certain value then just set that in the INPUT. I also just found an issue with the default quadruplets. The new swan had changed that also to 2 for curgrids, but i changed that back to quadruplets = 3. it had been giving some 'hot spots' in the wave fields but the 3 value resolved that.

tarankalra1 commented 2 days ago

John,

that is interesting that they modify the defaults. Thank you for the quick response.