Irregular domains

DGM mit irregulärer Geometrie

At the current stage of development, the software only calculates rectangular areas in which every grid cell is relevant for computation. However, for real-world applications, arbitrary catchment areas must be calculable.

DGM with regular rectangular geometry

The simplest method for this is the use of masked NumPy arrays via numpy.masked. In addition to the data, these arrays contain a “mask” that defines whether a cell should be considered or not. In the current version, however, memory for the masked areas is still allocated. This has the advantage that individual areas can be masked and unmasked and subsequently contain the same data. On the other hand, masked areas consume just as much memory as unmasked areas, and the required memory for an area thus corresponds to that of the smallest rectangle that completely encloses the area under consideration.

Since numpy.masked is the tool provided by NumPy for exactly this task, this method was used despite the inefficient memory usage.