iwfm.iwfm_model

class iwfm.iwfm_model(pre_fpath, sim_file, verbose=False)[source]

Read an IWFM model’s preprocessor and simulation input files.

Instantiating this class reads the preprocessor main file, nodes, elements, and stratigraphy, plus the simulation main file, and stores the results as instance attributes.

__init__(pre_fpath, sim_file, verbose=False)[source]

Read the IWFM preprocessor and simulation files for this model.

Parameters:
  • pre_fpath (str) – path to the preprocessor main input file

  • sim_file (str) – simulation main input file name

  • verbose (bool, default=False) – turn command-line output on or off

Methods

__init__(pre_fpath, sim_file[, verbose])

Read the IWFM preprocessor and simulation files for this model.

aquifer_thickness()

Return the aquifer thickness at each node and layer, or None if not read.

aquitard_thickness()

Return the aquitard thickness at each node and layer, or None if not read.

elem_coords()

Return a list of coordinates of an element [[x0,y0],[x1,y1],[x2,y2]<,...>].

elems2poly()

Compile a dictionary of model elements as shapely polygons.

get_aquifer_bottom()

Return the aquifer bottom elevation at each node and layer, or None if not read.

get_aquifer_top()

Return the aquifer top elevation at each node and layer, or None if not read.

get_aquitard_bottom()

Return the aquitard bottom elevation at each node and layer, or None if not read.

get_aquitard_top()

Return the aquitard top elevation at each node and layer, or None if not read.

get_lse()

Return the land surface elevation at each node, or None if not read.

get_nlayers()

Return the number of aquifer layers.

point_in_elem(x, y)

Return the element number if the point (x,y) is in an element, 0 otherwise.

read_chars(char_file, elem_nodes)

Read an IWFM Element Characteristics file and return a list of characteristics for each element.

read_elements(elem_file)

Read an IWFM Element file, and return a list of the nodes making up each element.

read_lake_pre(lake_file)

Read an IWFM Lake file and return (a) a list of elements and (b) a list of properties for each lake.

read_nodes(node_file)

Read an IWFM Node file, and return a list of the nodes and their coordinates.

read_preproc(pre_file)

Read an IWFM Preprocessor main input file, and return a list of the files called and some settings.

read_sim(sim_file)

Read an IWFM Simulation main input file, and return a SimulationFiles dataclass with the files called and some settings.

read_strat(strat_file)

Read an IWFM Stratigraphy file and store layer elevations and thicknesses.

read_streams_pre(stream_file)

Read an IWFM Stream Geometry file and compile a list of stream reaches and (b) a dictionary of stream nodes, and return the number of stream nodes.