Hello Huy!
Yes, it is possible! Indeed, in my opinion for better simulations, this is the solution.
In the limwac.f subroutine there is a secion where it says "TO BE MODIFIED BY USER". In this part of the code, there is an example that shows, as the last procedure, an assignment to the variable FBOR.
What you need to do is change that assignment. In the example, the value that enters FBOR is a frequency spectrum (SPEC) distributed over a few directions (FRA). What you will do is change the assignment to the actual value of the spectrum from SWAN.
A few cautions:
- Make sure you only assign spectra at liquid boundaries. That is, where LIBFOR is equal to KENT.
- Make sure the direction convention is correct. You can check that and the frequencies by looking at the variables FREQ (discretized frequencies) and TETA (discretized directions, nautical convention).
- And finally, the biggest problem (although yet pretty simple), possibly the spectrum returned by SWAN will not have the same discretization as the one being used by TOMAWAC, so you'll possibly have to resort to an interpolation.
Best Regards,
Phelype