Increase valid_max for f in ounp#1014
Conversation
|
@benoitp-cmc, this sounds like a good find. I'm curious about the new value you selected for |
|
@benoitp-cmc, thank you for your explanation. I can see how selecting 1e20 is attractive if it is tricky to pick a realistic max value. I'm curious if others have thoughts on the value to use (going with 1E20, or trying to find a realistic valid_max)? |
|
100 is certainly to low! I would say that 1e20 is a bit excessive, even if it is in line with the max value for the 2D spectra (I couldn't immediately see where this was set). To me 1000 seems like a sensible value - I've never heard of real world energy densities anywhere near this, but could be wrong! Equally, 10000 would be fine - it does give some leeway in case someone wants to do something crazy like mess around with hypothetical waves in high gravity environments! |
|
@ukmo-ccbunney thanks for adding your perspective. I was kind of ballparking the same (1000, 10000) for realistic max values, if we want to go with realistic, which I'm not saying we need to. Maybe we'll wait a bit to see if anyone else wants to chime in? I don't have a real strong preference for a particular choice at this point |
|
I think 1e20 comes from efth's valid max which is due to its scale factor at 0.0004. So here, for f variable it should not be that, it is probably a copy/paste... |
@mickaelaccensi thank you for this insight. @benoitp-cmc, you mentioned 1000 or 10 000 for realistic values. Does one of those or a different realistic value seem acceptable to you, here? |
|
1000 sounds ok |
|
@MatthewMasarik-NOAA I agree on 1000. A maximum that is extremely unlikely to be exceeded in normal conditions is probably more useful than one that would just be useful in theoretical studies. If someone is doing waves on exoplanet using this model, they probably have many other things to adjust. |
Great. Thanks, @benoitp-cmc. I'll run the test you provided, then continue with the approval process if that checks out. Thanks @ukmo-ccbunney and @mickaelaccensi for your input. |
|
@benoitp-cmc I wanted to run the test case you listed at: https://hpfx.collab.science.gc.ca/~bpo001/WW3/issue_988/. Can you also provide the switch file you compiled with? |
|
@MatthewMasarik-NOAA I should have thought about this. I added the switch with the rest: https://hpfx.collab.science.gc.ca/~bpo001/WW3/issue_988/switch |
@benoitp-cmc perfect, thanks. I'll get this tested. |
MatthewMasarik-NOAA
left a comment
There was a problem hiding this comment.
Code Review PASS
Testing PASS
- Regression tests were not run in this case, only the program
ww3_ounpwas modified and was tested with the test case provided for it. - The
ww3_ounptest case was run with the currentdevelopbranch, and seen to display a message in ncview when the data (304.252) exceeded thevalid_maxvalue (100) forf.
- The test case was then run with the 'fix' branch and the maximum value is seen to be 304.252 in ncview.
|
Hi @benoitp-cmc, I just approved your PR. Could you sync your branch up and I will merge it? |
|
@MatthewMasarik-NOAA done. Thanks! |
|
Thank you for this fix to |
* origin/develop: handle NaN air-sea temperatures from nearest land points (NOAA-EMC#869) Increase valid_max for f in ounp (NOAA-EMC#1014) Bugfix deallocation of invalid memory in ww3_prnc (NOAA-EMC#1016) Update to orion intel module path and two typo corrections. (NOAA-EMC#1011) Bugfix to out of bounds array write in w3profsmd_pdlib.f90 (NOAA-EMC#1013) Simple logic fix for time interpolation of boundary nodes at the end of W3XYPFSNIMP. (NOAA-EMC#1005) in w3iors use NSEA instead of NSEAL in serial write/read of VA (NOAA-EMC#954) Update documentation for UNST namelist (NOAA-EMC#986) In certain coupled configurations, the piece of code testing the coupling frequency to check if 'receive' coupling exchanges need to take place fail, resulting in an infinite loop causing the integration between time zero and the first time step to repeat indefinitely. This check needs to be rewritten, which fixes also issue NOAA-EMC#816 in a simpler way. (NOAA-EMC#999)
Pull Request Summary
The valid_max attribute for the f variable (1D spectra energy) in ww3_ounp is set to 100. It can exceed that value.
Description
Set the
valid_maxattribute of thefvariable to 1e20. Otherwise, large energy gets masked out (it occured with hurricane Fiona 2022).Please also include the following information:
POINT%TYPE = 1; SPECTRA%OUTPUT = 2.Issue(s) addressed
Commit Message
Increase valid_max for f in ounp #988
Check list
Testing
matrixCompSummary.txt
matrixDiff.txt
provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):
matrixCompFull.txt