Shallow water equations with depth-dependent anisotropic porosity for subgrid-scale topography