Dear Jonathan, Dear Ansley, thanks for your help with the call of SCAT2GRIDGAUSS_XY. The function works well now. Martin