Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unstructured W3XYPFSNIMP() clears boundary input #967

Closed
dpzimmer opened this issue Mar 31, 2023 · 4 comments
Closed

unstructured W3XYPFSNIMP() clears boundary input #967

dpzimmer opened this issue Mar 31, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@dpzimmer
Copy link
Contributor

When running an unstructured mesh using the implicit-n solver and providing with boundary input, the routine W3XYPFSNIMP clears the boundary input.

To Reproduce, run with IMPFSN=T, EXPFSN=F and a valid nest.ww3 and note the boundary nodes are all flat and not sending energy into the domain.

This is due to an inverted logic, multiplying by (1-IOBPD(ITH,IP)) rather than IOBPD(ITH,IP). In subroutine W3XYPFSNIMP of the file w3profsmd.F90.

Existing code:
!
! Time interpolation as done in rect grids
!
DO IBI=1, NBI
IP = MAPSF(ISBPI(IBI),1)
AC(IP) = ( RD1BBPI0(ISP,IBI) + RD2BBPIN(ISP,IBI) ) &
IOBPA(IP)(1-IOBPD(ITH,IP)) / CG(IK,ISBPI(IBI)) * CLATS(ISBPI(IBI))
END DO

Suggested patch:
!
! Time interpolation as done in rect grids
!
DO IBI=1, NBI
IP = MAPSF(ISBPI(IBI),1)
AC(IP) = ( RD1BBPI0(ISP,IBI) + RD2BBPIN(ISP,IBI) ) &
*IOBPA(IP)*IOBPD(ITH,IP) / CG(IK,ISBPI(IBI)) * CLATS(ISBPI(IBI))
END DO

@dpzimmer dpzimmer added the bug Something isn't working label Mar 31, 2023
@aronroland
Copy link
Collaborator

aronroland commented Apr 1, 2023

Dear @dpzimmer, great catch but let me explain you something with this scheme. The implicit scheme within the fractional step approach is not a good idea if the time step is toi big and the schemes decouple. Please consult my thesis, Roland, 2008 e.g. Researchgate. Therefore, this should only be carefully used. The best alternative would be to use the fully implicit model.

A pull request with this matter would be happily accepted from my side.

@dpzimmer
Copy link
Contributor Author

Dear @dpzimmer, great catch but let me explain you something with this scheme. The implicit scheme within the fractional step approach is not a good idea if the time step is tooi big and the schemes decouple. Please consult my thesis, Roland, 2008 e.g. Researchgate. Therefore, this should only be carefully used. The best alternative would be to use the fully implicit model.

Thanks for the tip Aron.

By fully implicit, would you mean the IMPTOTAL parameter in place of IMPFSN? I have tried to find documentation on this as well as (IMPREFRACTION, IMPFREQSHIFT, IMPSOURCE) which seem related, but without success.

The manual mentions a document entitled "Improving downscaling efficiency of WAVEWATCH III on unstructured
grids" which I can not locate.... the closest I have come to related information is a broken link to 'https://noaa-emc.github.io/WW3/files_devmeet/AliAbdolali_Implicit_20190801.pdf".

Any help would be appreciated, thanks.

Don.

@aliabdolali
Copy link
Contributor

look at https://github.com/NOAA-EMC/WW3/blob/develop/model/inp/ww3_grid.inp#L306-L346 and the manual.
Also, you can modify your setup to utilize fully implicit, following tp2.17 test https://github.com/NOAA-EMC/WW3/blob/develop/regtests/ww3_tp2.17/input/ww3_grid_c.inp
and if you are interested to learn more, check the following paper: Abdolali et al 2020 https://doi.org/10.1016/j.coastaleng.2020.103656

@dpzimmer
Copy link
Contributor Author

patched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants