Hi Moritz, More generally from Stefan's answer: 1) MASK is a raster that you can use is your r.mapcalc expressions 2) A two-step process where everything is filled, and then the parts outside the mask are re-nulled? -k.