imod.mf6.Modflow6Simulation.mask_all_models#
- Modflow6Simulation.mask_all_models(mask: DataArray | UgridDataArray) None [source]#
This function applies a mask to all models in a simulation, provided they use the same discretization. The method parameter “mask” is an idomain-like array. Masking will overwrite idomain with the mask where the mask is <0. Where the mask is >0, the original value of idomain will be kept. Masking will update the packages accordingly, blanking their input where needed, and is therefore not a reversible operation.
- Parameters:
mask (xr.DataArray, xu.UgridDataArray of ints) – idomain-like integer array. >0 sets cells to active, 0 sets cells to inactive, <0 sets cells to vertical passthrough
Examples
To mask all models in a simulation, you can use the following code:
>>> mf6_sim.mask_all_models(new_idomain)
This masks the model inplace and updates the packages accordingly. The mask should be an idomain-like array, i.e. it should have the same shape as the model and contain integer values.