Adds safety for single precision runs in mode_ice4_slow - #150
Conversation
7aae083 to
e1a6bcd
Compare
|
The maximum exp arg is precision dependent (88 for SP and 708 for DP), but we should lower it a few orders of magnitude to avoid further overflows since it is multiplied by something that is at least 1e3. My suggestion is 80 (SP) and 700 (DP), use a similar logic to what is employed in https://github.com/UMR-CNRM/PHYEX/pull/147/changes to check the precision. also the variable name should probably start with a Z because of coding conventions |
Could you implement take care of these improvements @pardallio ? |
Another problem when running sp with harmonie-arome.
In single precision, the argument of EXP can get too large. This is solved by MIN(MAX_EXP_ARG,...), where MAX_EXP_ARG = 100.0 is a completely arbitrary number. It was intended to be a quick fix, not as a permanent solution. Someone from the PHYEX developers can probably give better advice.
Some discussions regarding the choise of MAX_EXP_ARG can be found here: #147 (comment)
Davai validation: https://www.umr-cnrm.fr/davai/lightView/3174
The results are non bit-reproducible for corsica (inconsistent), but it seems to be the case for all the Davai experiments
See also the original davai experiment performed for #147, when this change was still included (see #147 (comment))
Note: the PR is based on this commit: c3e76b3