-
Notifications
You must be signed in to change notification settings - Fork 568
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
Staging/UKMO Oct 2021 #499
Conversation
Error introduced after recent FLX5 switch addition.
Hi @ukmo-ccbunney
|
Hi Ali, |
OK - so this is happening due to a divide by zero error in FLX5 that is happening when TAUA is zero. Line 186 in dd31794
|
@JessicaMeixner-NOAA this is similar to the issue in the ufs (divide by zero). |
Yes - I was thinking that; I assume you put a sensible limiter on the relevant variables? UST = MAX(1E-6, SQRT(TAUA/RHOAIR)) Then everything runs ok - I just need to ensure that 1e-16 is a sensible lower limit for UST... Edit: Actually, I see @JessicaMeixner-NOAA checks for a non zero value on USTAR - perhaps that is a better approach here too? |
Either I think works, I did find that the existing check in ST4 was too small, that we have quite a few cases where ust>0 but < 0.001, so 1E-6 is probably a better catch. (This is my branch with the fix that had the minimal impact in terms of changing answer in reg tests: https://github.com/JessicaMeixner-NOAA/WW3/tree/debug/ST4dividebyzerofix I hope to submit a PR with this fix tomorrow. I had to look at calculations/values of z0 as well as UST for this case). |
The discussion in #497 suggests that there is a wider problem with divide by zero errors w.r.t. USTAR which are probably beyond the scope of this PR. I have made a fix to the FLX5 module so that the calculated USTAR value has a min of 1e-4, as suggested by @mickaelaccensi . This fixes the errors seen when running with the Intel compiler. This does result in some small differences in the output of the ww3_tp2.15/FLX5 regtests, mainly at a few points around the coast where USTAR was probably calculated as zero before and is now 1e-4. @aliabdolali - can you rerun your regression tests and see if this fixes the issue for you? Thanks. |
The regtests all passed on NOAA RDHPC with intel compiler with the expected non-b4b tests:
and due to this dev
matrixCompFull.txt I'll create an issue to address a consistent minimum USTAR for each source term. |
Bugfix/FLX5 Tau Small bugfix to variable INTENT
Pull Request Summary
Staging branch comprising the following individual PRs:
Description
See individual PRs for full info.
W3SRCE
subroutine that was introduced with the new FLX5 switchIN
toINOUT
to avoid compilation issues on some compilers.Issue(s) addressed
Check list
Is your feature branch up to date with the authoritative repository (NOAA/develop)? YES
Please list appropriate labels code managers should add for this PR: bug
Reviewers: @aliabdolali
Commit Message
UKMO Staging Oct 2021:
W3SRCE
subroutine that was introduced with the new FLX5 switchIN
toINOUT
to avoid compilation issues on some compilers.Testing
Expected changes:
ww3-tp2.15/ST[46]FLX5
: Differences expected in the output point and grid files due to bug in W3SRCE call being fixed.mww3_test_03
: Known not B4B.Regression test results:
matrixComp_staging_ukmo_oct2021.zip