iwfm.iwfm_sub_preproc

iwfm.iwfm_sub_preproc(in_pp_file, elem_pairs_file, out_base_name, verbose=False)[source]

Read in the Preprocessor main file of a model and a list of element pairs for a submodel.

Use existing model Elements, Nodes, Stream specification, Lake and Stratigraphy files to produce new preprocessor files for the submodel, and pickle files of submodel nodes, stream nodes and lakes

Parameters:
  • in_pp_file (str) – name of existing preprocessor main input file

  • elem_pairs_file (str) – name of file listing elements of existing nmodel and submodel

  • out_base_name (str) – root of submodel output file names

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

Returns:

  • pre_files_new (PreprocessorFiles) – PreprocessorFiles dataclass of submodel preprocessor file names

  • sub_elem_list (ints) – list of existing model elements in submodel

  • new_srs (ints) – list of existing model subregions in submodel

  • elem_dict (dict) – dictionary existing model element to submodel element

  • sub_node_list (ints) – list of existing model nodes in submodel

  • snode_dict (ints) – list of existing model stream nodes in submodel

  • lake_info (list) – description of each lake in the submodel