pycomus.Utils package¶
Submodules¶
pycomus.Utils.BoundaryCheck module¶
- pycomus.Utils.BoundaryCheck.Check3DValueExistGrid(Value: int | float | ndarray, ValueName: str, num_lyr: int, num_row: int, num_col: int, OriginValueList: List) ndarray[source]¶
- pycomus.Utils.BoundaryCheck.CheckValueFormat(Value: int | float | Dict[int, int | float | ndarray], ValueName: str, period: List, num_lyr: int, num_row: int, num_col: int) Dict[source]¶
- pycomus.Utils.BoundaryCheck.CheckValueGtZero(Value: int | float | Dict[int, int | float | ndarray], ValueName: str, period: List, num_lyr: int, num_row: int, num_col: int) Dict[source]¶
- pycomus.Utils.BoundaryCheck.check_3d_format(Value: int | float | ndarray, ValueName: str, num_lyr: int, num_row: int, num_col: int) ndarray[source]¶
- pycomus.Utils.BoundaryCheck.check_3d_zero(Value: int | float | ndarray, ValueName: str, num_lyr: int, num_row: int, num_col: int) ndarray[source]¶
pycomus.Utils.CONSTANTS module¶
pycomus.Utils.Map module¶
- class pycomus.Utils.Map.ComusPlot(model, tar_layer: int = 0)[source]¶
Bases:
objectPlot COMUS Model Output Data.
Attributes:¶
- model: pycomus.ComusModel
COMUS Model Object
- tar_layer: int
Target Layer Index.
plt: matplotlib.pyplot
Methods:¶
- __init__(self, model, tar_layer: int = 0)
Plot COMUS Model Output Data.
- plot_grid(self, color: str = “#ffffff”, edge_color: str = “#000000”, line_width: Union[int, float] = 1) -> LineCollection
Plot Grid To Map.
- plot_contour(self, value: np.ndarray, **kwargs)
Plot Contour Plot.
- show_plot(self)
Show Plot.
Returns:¶
- instance: pycomus.ComusPlot
COMUS Plot Object.
Example:¶
>>> import pycomus >>> model1 = pycomus.ComusModel(model_name="OneDimFlowSim") >>> data = pycomus.ComusData(model1) >>> head = data.read_cell_head(tar_period=25, tar_iter=0, tar_layer=2)
- plot_contour(value: ndarray, **kwargs)[source]¶
Plot Contour Plot.
- Parameters:
value – np.ndarray 2D Array
kwargs – contourf_kwargs/colorbar_kwargs/contour_kwargs/clabel_kwargs
pycomus.Utils.ReadData module¶
- class pycomus.Utils.ReadData.ComusData(model)[source]¶
Bases:
objectRead COMUS Model Output Data.
Attributes:¶
- model: pycomus.ComusModel
COMUS Model Object
Methods:¶
- __init__(self, model)
Read COMUS Model Output Data.
- read_cell_head(self, tar_period: int = 0, tar_iter: int = 0, tar_layer: int = 0) -> np.ndarray
Read groundwater levels for a specific stress period, a certain simulation time frame, and a particular layer.
- read_cell_dropdown(self, tar_period: int = 0, tar_iter: int = 0, tar_layer: int = 0) -> np.ndarray
Read groundwater dropdown for a specific stress period, a certain simulation time frame, and a particular layer.
- read_cell_flo(self, tar_period: int = 0, tar_iter: int = 0, tar_layer: int = 0) -> Tuple[
np.ndarray, np.ndarray, np.ndarray] Read groundwater flow for a specific stress period, a certain simulation time frame, and a particular layer.
- read_cell_bd(self, tar_period: int = 0, tar_iter: int = 0, tar_layer: int = 0) -> Dict
Read groundwater balance for a specific stress period, a certain simulation time frame, and a particular layer.
Returns:¶
- instance: pycomus.ComusData
COMUS Simuate Data Object.
Example:¶
>>> import pycomus >>> model1 = pycomus.ComusModel(model_name="OneDimFlowSim") >>> data = pycomus.ComusData(model1) >>> head = data.read_cell_head(tar_period=25, tar_iter=0, tar_layer=2)
- read_cell_bd(tar_period: int = 0, tar_iter: int = 0, tar_layer: int = 0) Dict[source]¶
Read groundwater balance for a specific stress period, a certain simulation time frame, and a particular layer.
- Parameters:
tar_period – int
tar_iter – int
tar_layer – int
- Returns:
Dict
- read_cell_dropdown(tar_period: int = 0, tar_iter: int = 0, tar_layer: int = 0) ndarray[source]¶
Read groundwater dropdown for a specific stress period, a certain simulation time frame, and a particular layer.
- Parameters:
tar_period – int
tar_iter – int
tar_layer – int
- Returns:
np.ndarray
- read_cell_flo(tar_period: int = 0, tar_iter: int = 0, tar_layer: int = 0) Tuple[ndarray, ndarray, ndarray][source]¶
Read groundwater flow for a specific stress period, a certain simulation time frame, and a particular layer.
- Parameters:
tar_period – int
tar_iter – int
tar_layer – int
- Returns:
Tuple[np.ndarray, np.ndarray, np.ndarray]