In pull request #1834, the allocated middle dimensions of the lookup tables were changes from 9 to 1 for mp==8 and 28 in order to save memory when hail wasn't included (for example, the array called tmr_racg). However, On lines 2527 and onwards in module_mp_thompson.F onward, these arrays are accessed using a value of 5, which comes from idx_bg(k) which is set by idx_bg1 which is 5 when graupel is not included, leading to an out of bounds error.
This issue luckily seems not to crash the program when it is run normally, but as far as I can tell, it cannot be run in debug mode (configured with the -D option) without stopping.
Changing line 79 in module_mp_thompson.F to
INTEGER, PARAMETER :: idx_bg1 = 1 ! index for rhog when mp=8 or 28
instead of = 5, prevents the model from crashing in debug mode.
It's fairly difficult for me to tell whether this "fix" has any unintended implications for the graupel-free versions of Thompson mp, aside from changing the value of rho_g.
I'm happy to give more details on my WRF config if needed.
In pull request #1834, the allocated middle dimensions of the lookup tables were changes from 9 to 1 for mp==8 and 28 in order to save memory when hail wasn't included (for example, the array called
tmr_racg). However, On lines 2527 and onwards inmodule_mp_thompson.Fonward, these arrays are accessed using a value of 5, which comes fromidx_bg(k)which is set byidx_bg1which is 5 when graupel is not included, leading to an out of bounds error.This issue luckily seems not to crash the program when it is run normally, but as far as I can tell, it cannot be run in debug mode (configured with the
-Doption) without stopping.Changing line 79 in
module_mp_thompson.Ftoinstead of
= 5, prevents the model from crashing in debug mode.It's fairly difficult for me to tell whether this "fix" has any unintended implications for the graupel-free versions of Thompson mp, aside from changing the value of
rho_g.I'm happy to give more details on my WRF config if needed.