imod.mf6.Modflow6Simulation.open_head#

Modflow6Simulation.open_head(dry_nan: bool = False, simulation_start_time: Optional[datetime64] = None, time_unit: Optional[str] = 'd') Union[DataArray, UgridDataArray][source]#

Open heads 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
  • dry_nan (bool, default value: False.) – Whether to convert dry values to NaN.

  • simulation_start_time (Optional datetime) – The time and date correpsonding to the beginning of the simulation. Use this to convert the time coordinates of the output array to calendar time/dates. time_unit must also be present if this argument is present.

  • time_unit (Optional str) – The time unit MF6 is working in, in string representation. Only used if simulation_start_time was provided. Admissible values are: ns -> nanosecond ms -> microsecond s -> second m -> minute h -> hour d -> day w -> week Units “month” or “year” are not supported, as they do not represent unambiguous timedelta values durations.

Returns

head

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 heads:

>>> head = simulation.open_head()