imod.mf6.Modflow6Simulation.open_concentration#

Modflow6Simulation.open_concentration(species_ls: list[str] | None = None, dry_nan: bool = False, simulation_start_time: datetime64 | None = None, time_unit: str | None = 'd') DataArray | UgridDataArray[source]#

Open concentration of finished simulation, requires that the run method has been called.

The data is lazily read per timestep and automatically converted into (dense) xr.DataArrays or xu.UgridDataArrays, for DIS and DISV respectively. The conversion is done via the information stored in the Binary Grid file (GRB).

Parameters:
  • species_ls (list of strings, default value: None.) – List of species names, which will be used to concatenate the concentrations along the "species" dimension, in case the simulation has multiple species and thus multiple transport models. If None, transport model names will be used as species names.

  • dry_nan (bool, default value: False.) – Whether to convert dry values to NaN.

Returns:

concentration

Return type:

Union[xr.DataArray, xu.UgridDataArray]

Examples

Make sure you write and run your model first

>>> simulation.write(path/to/model)
>>> simulation.run()

Then open concentrations:

>>> concentration = simulation.open_concentration()