flopy.mf6.utils.mfsimlistfile module

class MfSimulationList(file_name: PathLike)[source]

Bases: object

get_memory_all(units: str = 'gigabytes') dict[source]

Get a dictionary of the memory table written if it is available in the simulation list file. The memory table is only available if the memory_print_option is set to ‘all’ in the simulation name file options block.

Parameters:

units (str) – Memory units for return results. Valid values are ‘gigabytes’, ‘megabytes’, ‘kilobytes’, and ‘bytes’ (default is ‘gigabytes’).

Returns:

memory_all – dictionary with the memory information for each variable in the MODFLOW 6 memory manager. The dictionary keys are the full memory path for a variable (the memory path and variable name). The dictionary entry for each key includes the memory path, the variable name, data type, size, and memory used for each variable. None is returned if the memory table is not present in the simulation listing file.

Return type:

dict

get_memory_summary(units: str = 'gigabytes') dict[source]

Get the summary memory information if it is available in the simulation list file. Summary memory information is only available if the memory_print_option is set to ‘summary’ in the simulation name file options block.

Parameters:

units (str) – Memory units for return results. Valid values are ‘gigabytes’, ‘megabytes’, ‘kilobytes’, and ‘bytes’ (default is ‘gigabytes’).

Returns:

memory_summary – dictionary with the total memory for each simulation component. None is returned if summary memory data is not present in the simulation listing file.

Return type:

dict

get_memory_usage(virtual: bool = False, units: str = 'gigabytes') float[source]

Get the simulation memory usage from the simulation list file.

Parameters:
  • virtual (bool) – Return total or virtual memory usage (default is total)

  • units (str) – Memory units for return results. Valid values are ‘gigabytes’, ‘megabytes’, ‘kilobytes’, and ‘bytes’ (default is ‘gigabytes’).

Returns:

memory_usage – Total memory usage for a simulation (in Gigabytes)

Return type:

float

get_non_virtual_memory_usage()[source]
Returns:

non_virtual – Non-virtual memory usage, which is the difference between the total and virtual memory usage

Return type:

float

get_outer_iterations() int[source]

Get the total outer iterations from the simulation list file.

Returns:

outer_iterations – Sum of all TOTAL ITERATIONS found in the list file

Return type:

float

get_runtime(units: str = 'seconds', simulation_timer: str = 'elapsed') float[source]

Get model runtimes from the simulation list file.

Parameters:
  • units (str) – Units in which to return the timer. Acceptable values are ‘seconds’, ‘minutes’, ‘hours’ (default is ‘seconds’)

  • simulation_timer (str) – Timer to return. Acceptable values are ‘elapsed’, ‘formulate’, ‘solution’ (default is ‘elapsed’)

Returns:

out – Floating point value with the runtime in requested units. Returns NaN if runtime not found in list file

Return type:

float

get_total_iterations() int[source]

Get the total number of iterations from the simulation list file.

Returns:

total_iterations – Sum of all TOTAL ITERATIONS found in the list file

Return type:

float

property is_normal_termination: bool

Return boolean indicating if the simulation terminated normally

Returns:

success – Boolean indicating if the simulation terminated normally

Return type:

bool