flopy.utils.mtlistfile module

This is a class for reading the mass budget from a (multi-component) mt3d(usgs) run. Also includes support for SFT budget.

class MtListBudget(file_name)[source]

Bases: object

MT3D mass budget reader

Parameters:

file_name (str) – the list file name

Examples

>>> mt_list = MtListBudget("my_mt3d.list")
>>> incremental, cumulative = mt_list.get_budget()
>>> gw_df, sw_df = mt_list.parse(start_datetime="10-21-2015")
parse(forgive=True, diff=True, start_datetime=None, time_unit='d')[source]

Main entry point for parsing the list file.

Parameters:
  • forgive (bool) – flag to raise exceptions when fail-to-read occurs. Default is True

  • diff (bool) – flag to return dataframes with ‘in minus out’ columns. Default is True

  • start_datetime (str) – str that can be parsed by pandas.to_datetime. Example: ‘1-1-1970’. Default is None.

  • time_unit (str) – str to pass to pandas.to_timedelta. Default is ‘d’ (days)

Returns:

df_gw,df_sw – a dataframe for the groundwater mass and (optionally) surface-water mass budget. If the SFT process is not used, df_sw is None.

Return type:

pandas.DataFrame