![]() |
MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
|
This module contains the base boundary package. More...
Data Types | |
| type | bndtype |
| BndType. More... | |
Functions/Subroutines | |
| subroutine | bnd_df (this, neq, dis) |
| Define boundary package options and dimensions. | |
| subroutine | bnd_ac (this, moffset, sparse) |
| Add boundary package connection to matrix. | |
| subroutine | bnd_mc (this, moffset, matrix_sln) |
| Map boundary package connection to matrix. | |
| subroutine | bnd_ar (this) |
| Allocate and read method for boundary package. | |
| subroutine | bnd_rp (this) |
| Allocate and read method for package. | |
| subroutine | bnd_ad (this) |
| Advance the boundary package. | |
| subroutine | bnd_ck (this) |
| Check boundary package period data. | |
| subroutine | bnd_reset (this) |
| Reset bnd package before formulating. | |
| subroutine | bnd_cf (this) |
| Formulate the package hcof and rhs terms. | |
| subroutine | bnd_fc (this, rhs, ia, idxglo, matrix_sln) |
| Copy hcof and rhs terms into solution. | |
| subroutine | bnd_fn (this, rhs, ia, idxglo, matrix_sln) |
| Add Newton-Raphson terms for package into solution. | |
| subroutine | bnd_nur (this, neqpak, x, xtemp, dx, inewtonur, dxmax, locmax) |
| Apply Newton-Raphson under-relaxation for package. | |
| subroutine | bnd_cc (this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak) |
| Convergence check for package. | |
| subroutine | bnd_cq (this, x, flowja, iadv) |
| Calculate advanced package flows. | |
| subroutine | bnd_cq_simrate (this, hnew, flowja, imover) |
| Calculate simrate. | |
| subroutine | bnd_cq_simtomvr (this, flowja) |
| Calculate flow to the mover. | |
| subroutine | bnd_bd (this, model_budget) |
| Add package flows to model budget. | |
| subroutine | bnd_ot_package_flows (this, icbcfl, ibudfl) |
| Output advanced package flow terms. | |
| subroutine | bnd_ot_dv (this, idvsave, idvprint) |
| Output advanced package dependent-variable terms. | |
| subroutine | bnd_ot_bdsummary (this, kstp, kper, iout, ibudfl) |
| Output advanced package budget summary. | |
| subroutine | bnd_ot_model_flows (this, icbcfl, ibudfl, icbcun, imap) |
| Output package flow terms. | |
| subroutine | bnd_dt (this) |
| Submit an ATS time step request (no-op by default). | |
| subroutine | bnd_fp (this) |
| Final processing at end of simulation (no-op by default). | |
| subroutine | bnd_da (this) |
| Deallocate package memory. | |
| subroutine | allocate_scalars (this) |
| Allocate package scalars. | |
| subroutine | allocate_arrays (this, nodelist, auxvar) |
| Allocate package arrays. | |
| subroutine | pack_initialize (this) |
| Allocate and initialize select package members. | |
| subroutine | set_pointers (this, neq, ibound, xnew, xold, flowja) |
| Set pointers to model variables. | |
| subroutine | bnd_read_options (this) |
| Read additional options for package. | |
| subroutine | bnd_read_dimensions (this) |
| Read dimensions for package. | |
| subroutine | bnd_read_initial_attr (this) |
| Read initial parameters for package. | |
| subroutine | bnd_options (this, option, found) |
| Read additional options for package. | |
| subroutine | copy_boundname (this) |
| Copy boundnames into boundnames_cst. | |
| subroutine | pak_setup_outputtab (this) |
| Setup output table for package. | |
| subroutine | define_listlabel (this) |
| Define the list label for the package. | |
| logical(lgp) function | bnd_obs_supported (this) |
| Determine if observations are supported. | |
| subroutine | bnd_df_obs (this) |
| Define the observation types available in the package. | |
| subroutine | bnd_rp_obs (this) |
| Read and prepare observations for a package. | |
| subroutine | bnd_bd_obs (this) |
| Save observations for the package. | |
| subroutine | bnd_ot_obs (this) |
| Output observations for the package. | |
| subroutine | bnd_rp_ts (this) |
| Assign time series links for the package. | |
| subroutine | bnd_rp_log (this) |
| Log period input for a boundary package. | |
| class(bndtype) function, pointer, private | castasbndclass (obj) |
| Cast as a boundary type. | |
| subroutine, public | addbndtolist (list, bnd) |
| Add boundary to package list. | |
| class(bndtype) function, pointer, public | getbndfromlist (list, idx) |
| Get boundary from package list. | |
| subroutine, public | save_print_model_flows (icbcfl, ibudfl, icbcun, iprflow, outputtab, nbound, nodelist, flow, ibound, title, text, ipakcb, dis, naux, textmodel, textpackage, dstmodel, dstpackage, auxname, auxvar, iout, inamedbound, boundname, imap) |
| Save and/or print flows for a package. | |
| subroutine | bnd_activate_viscosity (this) |
| Activate viscosity terms. | |
This module contains the base model boundary package class that is extended by all model boundary packages. The base model boundary package extends the NumericalPackageType.
| subroutine, public bndmodule::addbndtolist | ( | type(listtype), intent(inout) | list, |
| class(bndtype), intent(inout), pointer | bnd ) |
Subroutine to add a boundary package to a package list.
| [in,out] | list | package list |
| [in,out] | bnd | boundary package |
Definition at line 1724 of file BoundaryPackage.f90.

|
private |
Allocate and initialize base boundary package arrays. This method only needs to be overridden if additional arrays are defined for a specific package.
| this | BndType object |
| nodelist | package nodelist |
| auxvar | package aux variable array |
Definition at line 1017 of file BoundaryPackage.f90.
|
private |
Allocate and initialize base boundary package scalars. This method only needs to be overridden if additional scalars are defined for a specific package.
| this | BndType object |
Definition at line 942 of file BoundaryPackage.f90.

|
private |
Add boundary package connection to the matrix for packages that add connections to the coefficient matrix. An example would be the GWF model MAW package. Base implementation that must be extended.
| [in,out] | this | BndType object |
| [in] | moffset | solution matrix model offset |
| [in,out] | sparse | sparse object |
Definition at line 237 of file BoundaryPackage.f90.

|
private |
Method to activate addition of viscosity terms when package type is DRN, GHB, or RIV (method not needed by other packages at this point)
| [in,out] | this | BndType object |
Definition at line 1916 of file BoundaryPackage.f90.
|
private |
Advance data in the boundary package. The method sets advances time series, time array series, and observation data. A boundary package only needs to override this method if additional data needs to be advanced.
| this | BndType object |
Definition at line 386 of file BoundaryPackage.f90.
|
private |
Generic method to allocate and read static data for model boundary packages. A boundary package only needs to override this method if input data varies from the standard boundary package.
| [in,out] | this | BndType object |
Definition at line 266 of file BoundaryPackage.f90.
|
private |
Add the flow between package and the model (ratin and ratout) to the model budget. This method only needs to be overridden if a different calculation needs to be made.
| this | BndType object | |
| [in,out] | model_budget | model budget object |
Definition at line 691 of file BoundaryPackage.f90.

|
private |
Method to save simulated values for the boundary package. This method will need to be overridden for boundary packages with more observations than the calculate flow term (simvals) and to-mover.
| this | BndType object |
Definition at line 1624 of file BoundaryPackage.f90.
|
private |
Perform additional convergence checks on the flow between the package and the model it is attached to. This additional convergence check is applied to packages that solve their own continuity equation as part of the formulate step at the beginning of a Picard iteration. A boundary package only needs to override this method if a specific boundary package solves its own continuity equation. Example packages that implement this additional convergence check is the CSUB, SFR, LAK, and UZF packages.
| [in,out] | this | BndType object |
| [in] | innertot | total number of inner iterations |
| [in] | kiter | Picard iteration number |
| [in] | iend | flag indicating if this is the last Picard iteration |
| [in] | icnvgmod | flag inficating if the model has met specific convergence criteria |
| [in,out] | cpak | string for user node |
| [in,out] | ipak | location of the maximum dependent variable change |
| [in,out] | dpak | maximum dependent variable change |
Definition at line 524 of file BoundaryPackage.f90.
|
private |
Formulate the hcof and rhs terms for the package that will be added to the coefficient matrix and right-hand side vector. Base implementation that must be extended by each model boundary package.
| this | BndType object |
Definition at line 437 of file BoundaryPackage.f90.
|
private |
Check the boundary package period data. Base implementation that must be extended by each model boundary package.
| [in,out] | this | BndType object |
Definition at line 411 of file BoundaryPackage.f90.
|
private |
Calculate the flow between connected advanced package control volumes. Only advanced boundary packages need to override this method.
| [in,out] | this | BndType object |
| [in] | x | current dependent-variable value |
| [in,out] | flowja | flow between two connected control volumes |
| [in] | iadv | flag that indicates if this is an advance package |
Definition at line 543 of file BoundaryPackage.f90.
|
private |
Calculate the flow between package and the model (for example, GHB and groundwater cell) and store in the simvals variable. This method only needs to be overridden if a different calculation needs to be made.
| this | BndType object | |
| [in] | hnew | current dependent-variable value |
| [in,out] | flowja | flow between package and model |
| [in] | imover | flag indicating if the mover package is active |
Definition at line 581 of file BoundaryPackage.f90.
|
private |
Calculate the flow between package and the model that is sent to the mover package and store in the simtomvr variable. This method only needs to be overridden if a different calculation needs to be made.
| this | BndType object | |
| [in,out] | flowja | flow between package and model |
Definition at line 625 of file BoundaryPackage.f90.
|
private |
Deallocate base boundary package scalars and arrays. This method only needs to be overridden if additional variables are defined for a specific package.
| this | BndType object |
Definition at line 850 of file BoundaryPackage.f90.
| subroutine bndmodule::bnd_df | ( | class(bndtype), intent(inout) | this, |
| integer(i4b), intent(inout) | neq, | ||
| class(disbasetype), pointer | dis ) |
Define base boundary package options and dimensions for a model boundary package.
| [in,out] | this | BndType object |
| [in,out] | neq | number of equations |
| dis | discretization object |
Definition at line 178 of file BoundaryPackage.f90.

|
private |
Method to define the observation types available in a boundary package. This method should be overridden if observations are supported in a boundary package.
| this | BndType object |
Definition at line 1540 of file BoundaryPackage.f90.
|
private |
| this | BndType object |
Definition at line 832 of file BoundaryPackage.f90.
|
private |
Add the hcof and rhs terms for the boundary package to the coefficient matrix and right-hand side vector. A boundary package only needs to override this method if it is different for a specific boundary package.
| this | BndType object | |
| [in,out] | rhs | right-hand side vector for model |
| [in] | ia | solution CRS row pointers |
| [in] | idxglo | mapping vector for model (local) to solution (global) |
| matrix_sln | solution coefficient matrix |
Definition at line 451 of file BoundaryPackage.f90.
|
private |
Calculate and add the Newton-Raphson terms for the boundary package to the coefficient matrix and right-hand side vector. A boundary package only needs to override this method if a specific boundary package needs to add Newton-Raphson terms.
| this | BndType object | |
| [in,out] | rhs | right-hand side vector for model |
| [in] | ia | solution CRS row pointers |
| [in] | idxglo | mapping vector for model (local) to solution (global) |
| matrix_sln | solution coefficient matrix |
Definition at line 479 of file BoundaryPackage.f90.
|
private |
| this | BndType object |
Definition at line 839 of file BoundaryPackage.f90.
|
private |
Map boundary package connection to the matrix for packages that add connections to the coefficient matrix. An example would be the GWF model MAW package. Base implementation that must be extended.
| [in,out] | this | BndType object |
| [in] | moffset | solution matrix model offset |
| matrix_sln | global system matrix |
Definition at line 253 of file BoundaryPackage.f90.
|
private |
Apply Newton-Raphson under-relaxation for a boundary package. A boundary package only needs to override this method if a specific boundary package needs to apply Newton-Raphson under-relaxation. An example is the MAW package which adds rows to the system of equations and may need to have the dependent-variable constrained by the bottom of the model.
| [in,out] | this | BndType object |
| [in] | neqpak | number of equations in the package |
| [in,out] | x | dependent variable |
| [in] | xtemp | previous dependent variable |
| [in,out] | dx | change in dependent variable |
| [in,out] | inewtonur | flag indicating if newton-raphson under-relaxation should be applied |
| [in,out] | dxmax | maximum change in the dependent variable |
| [in,out] | locmax | location of the maximum change in the dependent variable |
Definition at line 499 of file BoundaryPackage.f90.
|
private |
Function to determine if observations are supported by the boundary package. By default, observations are not supported. This method should be overridden if observations are supported in a boundary package.
| this | BndType object |
Definition at line 1524 of file BoundaryPackage.f90.
|
private |
Read additional options for a boundary package. This method should be overridden options in addition to the base options are implemented in a boundary package.
| [in,out] | this | BndType object |
| [in,out] | option | option keyword string |
| [in,out] | found | boolean indicating if the option was found |
Definition at line 1432 of file BoundaryPackage.f90.
|
private |
Output advanced boundary package budget summary. This method only needs to be overridden for advanced packages that save budget summaries to the model listing file.
| this | BndType object | |
| [in] | kstp | time step number |
| [in] | kper | period number |
| [in] | iout | flag and unit number for the model listing file |
| [in] | ibudfl | flag indicating budget should be written |
Definition at line 756 of file BoundaryPackage.f90.
|
private |
Output advanced boundary package dependent-variable terms. This method only needs to be overridden for advanced packages that save dependent variable terms for each control volume.
| this | BndType object | |
| [in] | idvsave | flag and unit number for dependent-variable output |
| [in] | idvprint | flag indicating if dependent-variable should be written to the model listing file |
Definition at line 741 of file BoundaryPackage.f90.
|
private |
Output flow terms between the boundary package and model to a binary file and/or print flows to the model listing file. This method should not need to be overridden.
| this | BndType object | |
| [in] | icbcfl | flag for cell-by-cell output |
| [in] | ibudfl | flag indication if cell-by-cell data should be saved |
| [in] | icbcun | unit number for cell-by-cell output |
| [in] | imap | mapping vector that converts the 1 to nbound values to lake number, maw number, etc. |
Definition at line 773 of file BoundaryPackage.f90.

|
private |
Method to output simulated values for the boundary package. This method should not need to be overridden.
| this | BndType object |
Definition at line 1666 of file BoundaryPackage.f90.
|
private |
Output advanced boundary package flow terms. This method only needs to be overridden for advanced packages that save flow terms than contribute to the continuity equation for each control volume.
| this | BndType object | |
| [in] | icbcfl | flag and unit number for cell-by-cell output |
| [in] | ibudfl | flag indication if cell-by-cell data should be saved |
Definition at line 726 of file BoundaryPackage.f90.
|
private |
Read base dimensions for boundary packages. This method should not need to be overridden unless more than MAXBOUND is specified in the DIMENSIONS block.
| [in,out] | this | BndType object |
Definition at line 1360 of file BoundaryPackage.f90.
|
private |
Read initial parameters for a boundary package. This method is not needed for most boundary packages. The SFR package is an example of a package that has overridden this method.
| [in,out] | this | BndType object |
Definition at line 1421 of file BoundaryPackage.f90.
|
private |
Read base options for boundary packages.
| [in,out] | this | BndType object |
Definition at line 1154 of file BoundaryPackage.f90.

|
private |
| this | BndType object |
Definition at line 421 of file BoundaryPackage.f90.
|
private |
Generic method to read and prepare period data for model boundary packages. A boundary package only needs to override this method if period data varies from the standard boundary package.
| [in,out] | this | BndType object |
Definition at line 294 of file BoundaryPackage.f90.
|
private |
Write stress period input to the listing file if requested. This default implementation is a no-op; BndExtType overrides it.
Definition at line 1692 of file BoundaryPackage.f90.
|
private |
Method to read and prepare observations for a boundary package This method should not need to be overridden for most boundary packages.
| [in,out] | this | BndType object |
Definition at line 1554 of file BoundaryPackage.f90.
|
private |
Assign the time series links for the boundary package. This method will need to be overridden for boundary packages that support time series.
Definition at line 1682 of file BoundaryPackage.f90.
|
private |
Subroutine to cast an object as a boundary package type.
| [in,out] | obj | input object |
Definition at line 1703 of file BoundaryPackage.f90.

|
private |
boundnames_cst is an array of type(CharacterStringType), which can be stored in the MemoryManager.
| [in,out] | this | BndType object |
Definition at line 1447 of file BoundaryPackage.f90.
|
private |
Method defined the list label for the boundary package. This method needs to be overridden by each boundary package.
| [in,out] | this | BndType object |
Definition at line 1509 of file BoundaryPackage.f90.
| class(bndtype) function, pointer, public bndmodule::getbndfromlist | ( | type(listtype), intent(inout) | list, |
| integer(i4b), intent(in) | idx ) |
Function to get a boundary package from a package list.
| [in,out] | list | package list |
| [in] | idx | package number |
Definition at line 1742 of file BoundaryPackage.f90.

|
private |
Allocate and initialize select base boundary package members. This method needs to be overridden by a package if it is needed for a specific package.
| this | BndType object |
Definition at line 1123 of file BoundaryPackage.f90.
|
private |
Setup output table for a boundary package that is used to output package to model flow terms to the model listing file.
| [in,out] | this | BndType object |
Definition at line 1467 of file BoundaryPackage.f90.

| subroutine, public bndmodule::save_print_model_flows | ( | integer(i4b), intent(in) | icbcfl, |
| integer(i4b), intent(in) | ibudfl, | ||
| integer(i4b), intent(in) | icbcun, | ||
| integer(i4b), intent(in) | iprflow, | ||
| type(tabletype), intent(inout), pointer | outputtab, | ||
| integer(i4b), intent(in) | nbound, | ||
| integer(i4b), dimension(:), intent(in), contiguous | nodelist, | ||
| real(dp), dimension(:), intent(in), contiguous | flow, | ||
| integer(i4b), dimension(:), intent(in), contiguous | ibound, | ||
| character(len=*), intent(in) | title, | ||
| character(len=*), intent(in) | text, | ||
| integer(i4b), intent(in) | ipakcb, | ||
| class(disbasetype), intent(in) | dis, | ||
| integer(i4b), intent(in) | naux, | ||
| character(len=*), intent(in) | textmodel, | ||
| character(len=*), intent(in) | textpackage, | ||
| character(len=*), intent(in) | dstmodel, | ||
| character(len=*), intent(in) | dstpackage, | ||
| character(len=*), dimension(:), intent(in) | auxname, | ||
| real(dp), dimension(:, :), intent(in) | auxvar, | ||
| integer(i4b), intent(in) | iout, | ||
| integer(i4b), intent(in) | inamedbound, | ||
| character(len=lenboundname), dimension(:), contiguous | boundname, | ||
| integer(i4b), dimension(:), intent(in), optional | imap ) |
Subroutine to save and/or print package flows to a model to a binary cell-by-cell flow file and the model listing file.
| [in] | icbcfl | flag indicating if the flow should be saved to the binary cell-by-cell flow file |
| [in] | ibudfl | flag indicating if the flow should be saved or printed |
| [in] | icbcun | file unit number for the binary cell-by-cell file |
| [in] | iprflow | print flows to list file |
| [in,out] | outputtab | output table object |
| [in] | nbound | number of boundaries this stress period |
| [in] | nodelist | boundary node list |
| [in] | flow | boundary flow terms |
| [in] | ibound | ibound array for the model |
| [in] | title | title for the output table |
| [in] | text | flow term description |
| [in] | ipakcb | flag indicating if flows will be saved |
| [in] | dis | model discretization object |
| [in] | naux | number of aux variables |
| [in] | textmodel | model name |
| [in] | textpackage | package name |
| [in] | dstmodel | mover destination model |
| [in] | dstpackage | mover destination package |
| [in] | auxname | aux variable name |
| [in] | auxvar | aux variable |
| [in] | iout | model listing file unit |
| [in] | inamedbound | flag indicating if boundnames are defined for the boundary entries |
| boundname | bound names | |
| [in] | imap | mapping array |
Definition at line 1760 of file BoundaryPackage.f90.

|
private |
Set pointers to model variables so that a package has access to these variables. This base method should not need to be overridden.
| this | BndType object |
| neq | number of equations in the model |
| ibound | model idomain |
| xnew | current dependent variable |
| xold | previous dependent variable |
| flowja | connection flow terms |
Definition at line 1133 of file BoundaryPackage.f90.