4.1.2. Coupled Mode Inputs¶
Special inputs are only required for coupled mode simulation. The special inputs include a text format input file that tells pyHS2MF6 where to find the two models and where to find the spatial mapping dictionaries. Mapping dictionaries provide the means to translate between the lumped parameter HSPF representation and the MODFLOW 6 three-dimensional computational grid representation.
4.1.2.1. pyHS2MF6_Inputs.py¶
Module containing methods and attributes related to pyHS2MF6 input files.
This module provides the main text input file reading methods for a coupled model simulation. It also provides persistent storage of these input values obtained from the input file..
- pyHS2MF6_Inputs.DATE_FMT = '%Y-%m-%d'¶
Date format used in the coupled model input file
- pyHS2MF6_Inputs.END_DT = None¶
Simulation end time
- pyHS2MF6_Inputs.FULL_HSP2_HDF5 = None¶
FQDN pathname for HSPsquared, HDF5 input file. Created from HSP2_HDF5 and HSP2_DIR
- pyHS2MF6_Inputs.FULL_PL_MAP = None¶
FQDN path and file name for PL mapping - assumes that in same directory as input file
- pyHS2MF6_Inputs.FULL_RR_MAP = None¶
FQDN path and file name for RR mapping - assumes that in same directory as input file
- pyHS2MF6_Inputs.FULL_SP_MAP = None¶
FQDN path and file name for SP mapping - assumes that in same directory as input file
- pyHS2MF6_Inputs.HSP2_DIR = None¶
Directory for HSPsquared input fles
- pyHS2MF6_Inputs.HSP2_HDF5 = None¶
Name of HSPsquared HDF5 input file
- pyHS2MF6_Inputs.HSP2_NUM_IL = None¶
Total number of IMPLND objects/targets in the HSP2 model
- pyHS2MF6_Inputs.HSP2_NUM_PL = None¶
Total number of PERLND objects/targets in the HSP2 model
- pyHS2MF6_Inputs.HSP2_NUM_RR = None¶
Total number of RCHRES objects/targets in the HSP2 model
- pyHS2MF6_Inputs.INPUT_FILE = None¶
Coupled model input file
- pyHS2MF6_Inputs.MF6_DIR = None¶
MODFLOW 6 model directory. .sim file must be here
- pyHS2MF6_Inputs.MF6_IUZFN = None¶
Number of UZF cells defined in the MODFLOW 6 model
- pyHS2MF6_Inputs.MF6_NCPL = None¶
Number of cells per layer in the MODFLOW 6 model
- pyHS2MF6_Inputs.MF6_NLAY = None¶
Number of layers in the MODFLOW 6 model
- pyHS2MF6_Inputs.MF6_NVERT = None¶
Number of vertices per layer in the MODFLOW 6 model
- pyHS2MF6_Inputs.MF6_ROOT = None¶
Root name for the MODFLOW 6 model to run
- pyHS2MF6_Inputs.PL_MAP_GW_PFILE = None¶
Pickle file with dictionary for mapping PERLND areas to groundwater model cells.
This dictionary has a required format. The dictionary keys are the HSPF target Id, i.e., ‘P001’. The values are a list, L, with 2 items.
(float): total UZF cell area in this target ID
1. (pd.DataFrame): DataFrame that describes the UZF cell specifications for the target ID key. The DataFrame index is the 2D Cell ID, 1-based. The DataFrame has four columns.
“iuzno” (int): UZF cell ID, 1-based
- “TopActive” (int): the top active layer for this model cell,
1-based
- “SArea_m2” (float): surface area of this cell within the
HSPF target ID in m2
“Weight” (float): dimensionless weight for allocating flow
Flow from HSPF to this cell
Should be > 0 and <= 100.0
- pyHS2MF6_Inputs.RR_MAP_GW_PFILE = None¶
Pickle file with dictionary for mapping RCHRES locations to groundwater model cells.
This dictionary has a required format. The dictionary keys are the HSPF target Id, i.e., ‘R001’. The values are a list, L, with 3 items.
(int): HSPF RCHRES exit that goes to groundwater. Must be > 1 and <= 5.
(float): total UZF cell area in this target ID
2. (pd.DataFrame): DataFrame that describes the UZF cell specifications within this target ID. The DataFrame index is the 2D Cell ID, 1-based. The DataFrame has four columns.
“iuzno” (int): UZF cell ID, 1-based
- “TopActive” (int): the top active layer for this model cell,
1-based
- “SArea_m2” (float): surface area of this cell within the
HSPF target ID in m2
“Weight” (float): dimensionless weight for allocating flow
Flow from HSPF to this cell
Should be > 0 and <= 100.0
- pyHS2MF6_Inputs.SP_MAP_GW_PFILE = None¶
Pickle file with dictionary for mapping MODFLOW 6 springs.
Springs must be represented with drain (DRN) package boundary conditions. This dictionary has a required format. The dictionary keys are the labels/names for the springs as represented in the .drn and .drn.obs files in MODFLOW 6. The values are lists with the following items.
(str): target ID for the HSPF location
- (int): 2D cell Id, 1-based, for the cell where the drain is
placed
- (int): top active layer, 1-based, for the cell where the drain
is placed
(float): surface area for the cell where the drain is located
Note: the combination (top active layer, 2D Cell ID) fully specifies the drain location for MODFLOW 6 cell using DISV grid style.
- pyHS2MF6_Inputs.START_DT = None¶
Simulation start time
- pyHS2MF6_Inputs.get_END_DT()¶
Get the END_DT global
- pyHS2MF6_Inputs.get_FULL_HSP2_HDF5()¶
Get the FULL_HSP2_HDF5 global
- pyHS2MF6_Inputs.get_FULL_PL_MAP()¶
Get the FULL_PL_MAP global
- pyHS2MF6_Inputs.get_FULL_RR_MAP()¶
Get the FULL_RR_MAP global
- pyHS2MF6_Inputs.get_FULL_SP_MAP()¶
Get the FULL_SP_MAP global
- pyHS2MF6_Inputs.get_HSP2_DIR()¶
Get the HSP2_DIR global
- pyHS2MF6_Inputs.get_HSP2_NUM_IL()¶
Get the HSP2_NUM_IL global
- pyHS2MF6_Inputs.get_HSP2_NUM_PL()¶
Get the HSP2_NUM_PL global
- pyHS2MF6_Inputs.get_HSP2_NUM_RR()¶
Get the HSP2_NUM_RR global
- pyHS2MF6_Inputs.get_MF6_DIR()¶
Get the MF6_DIR global
- pyHS2MF6_Inputs.get_MF6_IUZFN()¶
Get the MF6_IUZFN global
- pyHS2MF6_Inputs.get_MF6_NCPL()¶
Get the MF6_NCPL global
- pyHS2MF6_Inputs.get_MF6_NLAY()¶
Get the MF6_NLAY global
- pyHS2MF6_Inputs.get_MF6_NVERT()¶
Get the MF6_NVERT global
- pyHS2MF6_Inputs.get_MF6_ROOT()¶
Get the MF6_ROOT global
- pyHS2MF6_Inputs.get_START_DT()¶
Get the START_DT global
- pyHS2MF6_Inputs.readInputFile(FileName, DirPath)¶
Read the input file and store to the module-wide globals.
Reads designated key words from lines that do not start with ‘#’ and that have the designated key word separated from its value by an ‘=’. In other words ‘#’ at the line start denotes a comment.
- Parameters
FileName (str) – name for the input file
DirPath (str) – FQDN filepath for the directory with the input file
- Returns
0 means success; != 0 means failure
- Return type
int