MeteoSwiss-APN/dawn

Cuda-ico vertical interval wrong generation

Stagno opened this issue · 0 comments

If one specifies this vertical interval in SIR:

"interval": {
                      "specialLowerLevel": "End",
                      "specialUpperLevel": "End",
                      "lowerOffset": -1
                    },

(with domain.upwards[-1:] in Dusk)
cuda-ico generates the following wrong translation:

int klo = kidx * LEVELS_PER_THREAD + 1048575;
int khi = (kidx + 1) * LEVELS_PER_THREAD + 1048575;

instead of

int klo = kidx * LEVELS_PER_THREAD + (kSize-1);
int khi = (kidx + 1) * LEVELS_PER_THREAD + (kSize-1);