Post title: Reason for choosing KISSVEC random number generator in RRTMG schemes
Hi all,
I have a question about the choice of the default random number generator used in the RRTMG longwave and shortwave radiation scheme in both WRF and MPAS. There are two different random number generators implemented in RRTMG: The KISSVEC random number generator (RNG) and the Mersenne Twister RNG. The choice of which one to use is made within the scheme by the integer control variable “irng” in the files module_ra_rrtmg_lw.F and module_ra_rrtmg_sw.F. In MPAS 7.0 or WRF 3.9, “irng” is hard coded to 0, which automatically selects the KISSVEC RNG.
I have been investigating this in MPAS as part of a project studying the impact of wind farm wake effects and surface roughness changes on the atmosphere, which rely on 1:1 comparisons between test cases and control runs (with/without change). In these comparisons, I have seen rather large changes far away from my introduced change, and found one of the key factors in this to be related to the KISSVEC RNG. The KISSVEC RNG seeds for random number generation are effectively selected based on the pressure at the four lowest model levels (see https://github.com/MPAS-Dev/MPAS-Model/blob/master/src/core_atmosphere/physics/physics_wrf/module_ra_rrtmg_lw.F around line 2391, similar in the shortwave radiation scheme module_ra_rrtmg_sw.F and WRF) and therefore depend on the model state. In my simulations, these pressure values change between the two runs, which means that the test case and control run will potentially use different random numbers for the stochastic cloud generator, introducing differences in the model runs solely caused by the selection of different random numbers. It is likely that this could also be related to the high sensitivity seen in WRF / MPAS simulations run on different platforms (CPUs, Compilers, and systems)
In investigating this, I found that the geos-chem model (https://github.com/geoschem/geos-chem) also uses RRTMG, but with the Mersenne Twister RNG. In MPAS, I implemented their constants and enabled the Mersenne Twister, which showed greatly reduced sensitivity of the model far from where the wind farm was introduced. This leads to my question of why WRF / MPAS is using the KISSVEC RNG and not the Mersenne Twister RNG?
Thanks a lot for your help and further clarification!
Marc
Hi all,
I have a question about the choice of the default random number generator used in the RRTMG longwave and shortwave radiation scheme in both WRF and MPAS. There are two different random number generators implemented in RRTMG: The KISSVEC random number generator (RNG) and the Mersenne Twister RNG. The choice of which one to use is made within the scheme by the integer control variable “irng” in the files module_ra_rrtmg_lw.F and module_ra_rrtmg_sw.F. In MPAS 7.0 or WRF 3.9, “irng” is hard coded to 0, which automatically selects the KISSVEC RNG.
I have been investigating this in MPAS as part of a project studying the impact of wind farm wake effects and surface roughness changes on the atmosphere, which rely on 1:1 comparisons between test cases and control runs (with/without change). In these comparisons, I have seen rather large changes far away from my introduced change, and found one of the key factors in this to be related to the KISSVEC RNG. The KISSVEC RNG seeds for random number generation are effectively selected based on the pressure at the four lowest model levels (see https://github.com/MPAS-Dev/MPAS-Model/blob/master/src/core_atmosphere/physics/physics_wrf/module_ra_rrtmg_lw.F around line 2391, similar in the shortwave radiation scheme module_ra_rrtmg_sw.F and WRF) and therefore depend on the model state. In my simulations, these pressure values change between the two runs, which means that the test case and control run will potentially use different random numbers for the stochastic cloud generator, introducing differences in the model runs solely caused by the selection of different random numbers. It is likely that this could also be related to the high sensitivity seen in WRF / MPAS simulations run on different platforms (CPUs, Compilers, and systems)
In investigating this, I found that the geos-chem model (https://github.com/geoschem/geos-chem) also uses RRTMG, but with the Mersenne Twister RNG. In MPAS, I implemented their constants and enabled the Mersenne Twister, which showed greatly reduced sensitivity of the model far from where the wind farm was introduced. This leads to my question of why WRF / MPAS is using the KISSVEC RNG and not the Mersenne Twister RNG?
Thanks a lot for your help and further clarification!
Marc