#!/usr/bin/env python3 import grass.script as gs # Set the region for now arbitrary to 100 x 100 m. We might need to specify # the region later depending on how far the contaminant traveled over the years gs.run_command("g.region", rows=100, cols=100, res3=1, t=50, b=0, n=100,s=0, w=0, e=100, overwrite=True) # Define the boundary conditions following to the hydraulic gradient of 1% in # west-east and 2% in south-north direction with a mark of 35m in the SW corner gs.run_command("r.mapcalc",expression="bottomBC = if(row() == nrows(), 35 + 0.01*x(), 35)") gs.run_command("r.mapcalc",expression="leftBC = if(col() == 1 && row()>1 && row()