I've simulated the issue with a fake dataset with same dimensions, extent and projection and it seems to work reasonably well.