Some compilers are complaining about underflows in the shortwave calculation. These are coming from exponentials with very small arguments. The current code to get rid of those values does not avoid their being calculated in the first place:
argmax = 10.
exp_min = exp(-argmax)
f = max(exp(-A), exp_min) ! exp(-A) is what we are trying to compute
We should do this instead:
argmax = 10.
exp_min = min(argmax, A)
f = exp(-exp_min)
This type of calculation occurs in 3 places in icepack_shortwave.F90.
I expect this to change the answers (nonBFB).
Some compilers are complaining about underflows in the shortwave calculation. These are coming from exponentials with very small arguments. The current code to get rid of those values does not avoid their being calculated in the first place:
We should do this instead:
This type of calculation occurs in 3 places in icepack_shortwave.F90. I expect this to change the answers (nonBFB).