![]() |
MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
|


Public Member Functions | |
| procedure | buy_df (this, dis, buy_input) |
| Read options and package data, or set from argument. | |
| procedure | buy_ar (this, npf, ibound) |
| Allocate and Read. | |
| procedure | buy_ar_bnd (this, packobj, hnew) |
| Buoyancy ar_bnd routine to activate density in packages. | |
| procedure | buy_rp (this) |
| Check for new buy period data. | |
| procedure | buy_ad (this) |
| Advance. | |
| procedure | buy_cf (this, kiter) |
| Fill coefficients. | |
| procedure | buy_cf_bnd (this, packobj, hnew) |
| Fill coefficients. | |
| procedure | buy_fc (this, kiter, matrix_sln, idxglo, rhs, hnew) |
| Fill coefficients. | |
| procedure | buy_fn (this, kiter, matrix_sln, idxglo, rhs, hnew) |
| Fill Newton terms. | |
| procedure | buy_ot_dv (this, idvfl) |
| Save density array to binary file. | |
| procedure | buy_cq (this, hnew, flowja) |
| Add buy term to flowja. | |
| procedure | buy_da (this) |
| Deallocate. | |
| procedure | allocate_scalars (this) |
| Allocate scalars used by the package. | |
| procedure | set_concentration_pointer (this, modelname, conc, icbund) |
| Pass in a gwt model name, concentration array and ibound, and store a pointer to these in the BUY package so that density can be calculated from them. | |
| procedure | set_names (this, ibcnum, name_model, pakname, ftype, input_mempath) |
| Set package names. | |
| procedure | allocate_scalars (this) |
| Allocate package scalars. | |
| procedure | da (this) |
| Deallocate package scalars. | |
| procedure | read_check_ionper (this) |
| Check ionper. | |
| procedure | get_block_data (this, tags, lfound, varinames) |
| Read griddata block for a package. | |
Public Attributes | |
| type(gwfnpftype), pointer | npf => null() |
| npf object | |
| integer(i4b), pointer | ioutdense => null() |
| unit number for saving density | |
| integer(i4b), pointer | iform => null() |
| formulation: 0 freshwater head, 1 hh rhs, 2 hydraulic head | |
| integer(i4b), pointer | ireadelev => null() |
| if 1 then elev has been allocated and filled | |
| integer(i4b), pointer | ireadconcbuy => null() |
| if 1 then dense has been read from this buy input file | |
| integer(i4b), pointer | iconcset => null() |
| if 1 then conc is pointed to a gwt modelx | |
| real(dp), pointer | denseref => null() |
| reference fluid density | |
| real(dp), dimension(:), pointer, contiguous | dense => null() |
| density | |
| real(dp), dimension(:), pointer, contiguous | concbuy => null() |
| concentration array if specified in buy package | |
| real(dp), dimension(:), pointer, contiguous | elev => null() |
| cell center elevation (optional; if not specified, then use (top+bot)/2) | |
| integer(i4b), dimension(:), pointer | ibound => null() |
| store pointer to ibound | |
| integer(i4b), pointer | nrhospecies => null() |
| number of species used in equation of state to calculate density | |
| real(dp), dimension(:), pointer, contiguous | drhodc => null() |
| change in density with change in concentration | |
| real(dp), dimension(:), pointer, contiguous | crhoref => null() |
| reference concentration used in equation of state | |
| real(dp), dimension(:), pointer, contiguous | ctemp => null() |
| temporary array of size (nrhospec) to pass to calcdens | |
| character(len=lenmodelname), dimension(:), allocatable | cmodelname |
| names of gwt models used in equation of state | |
| character(len=lenauxname), dimension(:), allocatable | cauxspeciesname |
| names of gwt models used in equation of state | |
| type(concentrationpointer), dimension(:), allocatable | modelconc |
| concentration pointer for each transport model | |
| character(len=lenmodelname) | name_model = '' |
| the name of the model that contains this package | |
| character(len=lenpackagename) | packname = '' |
| name of the package | |
| character(len=lenmempath) | memorypath = '' |
| the location in the memory manager where the variables are stored | |
| character(len=lenmempath) | memorypathmodel = '' |
| the location in the memory manager where the variables of the parent model are stored | |
| character(len=lenmempath) | input_mempath = '' |
| input context mempath | |
| character(len=linelength), pointer | input_fname => null() |
| input file name | |
| character(len=lenftype) | filtyp = '' |
| file type (CHD, DRN, RIV, etc.) | |
| character(len=lenftype), pointer | package_type => null() |
| package type (same as filtyp) stored in memory manager | |
| integer(i4b), pointer | id => null() |
| consecutive package number in model | |
| integer(i4b), pointer | inunit => null() |
| unit number for input file | |
| integer(i4b), pointer | iout => null() |
| unit number for writing package output | |
| integer(i4b), pointer | inewton => null() |
| newton flag | |
| integer(i4b), pointer | iasym => null() |
| package causes matrix asymmetry | |
| integer(i4b), pointer | iprpak => null() |
| integer flag to echo input | |
| integer(i4b), pointer | iprflow => null() |
| flag to print simulated flows | |
| integer(i4b), pointer | ipakcb => null() |
| output flows (-1, 0, 1) - save_flows | |
| integer(i4b), pointer | ionper => null() |
| stress period for next data | |
| integer(i4b), pointer | lastonper => null() |
| last value of ionper (for checking) | |
| type(blockparsertype) | parser |
| parser object for reading blocks of information | |
| class(disbasetype), pointer | dis => null() |
| model discretization object | |
Private Member Functions | |
| procedure, private | calcbuy (this, n, m, icon, hn, hm, buy) |
| Calculate buyancy term for this connection. | |
| procedure, private | calchhterms (this, n, m, icon, hn, hm, rhsterm, amatnn, amatnm) |
| Calculate hydraulic head term for this connection. | |
| procedure, private | calc_gbuy (this, n, m, icon, hn, hm) |
| Buoyancy flow per unit conductance for this connection. | |
| procedure, private | buy_hcond (this, n, m, icon, hn, hm, hyn, hym) |
| Horizontal conductance for the buoyancy flow. | |
| procedure, private | npf_sats (this, n, m, hn, hm, satn, satm) |
| Saturations used by npf for a horizontal connection. | |
| procedure, private | upstream_cells (this, n, m, icon, hn, hm, iuph, iupf, gbuy) |
| Head-based and flow-based Newton upstream cells. | |
| procedure, private | npf_cond_correction (this, n, m, ipos, hnew) |
| Correction to the npf conductance of a horizontal connection. | |
| procedure, private | add_newton_term (this, n, m, ipos, iu, drive, matrix_sln, idxglo, rhs, hnew) |
| Add a Newton upstream-saturation term for connection n-m. | |
| procedure, private | buy_calcdens (this) |
| calculate fluid density from concentration | |
| procedure, private | buy_calcelev (this) |
| Calculate cell elevations to use in density flow equations. | |
| procedure, private | allocate_arrays (this, nodes) |
| Allocate arrays used by the package. | |
| procedure, private | source_options (this) |
| Source input options. | |
| procedure, private | set_options (this, input_data) |
| Sets options as opposed to reading them from a file. | |
| procedure, private | log_options (this, found, densityfile) |
| log input options | |
| procedure, private | source_dimensions (this) |
| Source dimensions for package. | |
| procedure, private | source_packagedata (this) |
| source packagedata for package | |
| procedure, private | set_packagedata (this, input_data) |
| Sets package data instead of reading from file. | |
Definition at line 30 of file gwf-buy.f90.
|
private |
For a flow into n of condsat * sat(iu) * drive, add the derivative with respect to the head of the upstream cell iu to rows n and m. This mirrors the fill pattern and upstream thickness used by npf.
As in npf, the saturation derivative is evaluated with the top and bottom of the upstream cell. With the HIGHEST_CELL_SATURATION option the conductance uses saturations evaluated with the top and bottom of the cell with the higher bottom, so where the upstream cell is not that cell the derivative does not match the saturation used in the flow. This affects only the convergence path, not the converged solution.
| [in] | n | node n (n < m) |
| [in] | m | node m |
| [in] | ipos | position of connection n-m in row n |
| [in] | iu | upstream node (n or m) |
| [in] | drive | flow into n per unit conductance |
Definition at line 72 of file gwf-buy.f90.
|
private |
Definition at line 76 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::allocate_scalars | ( | class(gwfbuytype) | this | ) |
Definition at line 75 of file gwf-buy.f90.
|
inherited |
Allocate and initialize base numerical package scalars.
| this | NumericalPackageType object |
Definition at line 54 of file NumericalPackage.f90.
| procedure gwfbuymodule::gwfbuytype::buy_ad | ( | class(gwfbuytype) | this | ) |
Definition at line 57 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_ar | ( | class(gwfbuytype) | this, |
| type(gwfnpftype), intent(in), pointer | npf, | ||
| integer(i4b), dimension(:), pointer | ibound ) |
Definition at line 54 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_ar_bnd | ( | class(gwfbuytype) | this, |
| class(bndtype), pointer | packobj, | ||
| real(dp), dimension(:), intent(in) | hnew ) |
This routine is called from gwf_ar() as it goes through each package
Definition at line 55 of file gwf-buy.f90.
|
private |
Definition at line 73 of file gwf-buy.f90.
|
private |
Definition at line 74 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_cf | ( | class(gwfbuytype) | this, |
| integer(i4b) | kiter ) |
Definition at line 58 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_cf_bnd | ( | class(gwfbuytype) | this, |
| class(bndtype), pointer | packobj, | ||
| real(dp), dimension(:), intent(in) | hnew ) |
Definition at line 59 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_cq | ( | class(gwfbuytype) | this, |
| real(dp), dimension(:), intent(in) | hnew, | ||
| real(dp), dimension(:), intent(inout) | flowja ) |
Definition at line 63 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_da | ( | class(gwfbuytype) | this | ) |
Definition at line 64 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_df | ( | class(gwfbuytype) | this, |
| class(disbasetype), intent(in), pointer | dis, | ||
| type(gwfbuyinputdatatype), intent(in), optional | buy_input ) |
| this | this buoyancy package | |
| [in] | dis | pointer to discretization |
| [in] | buy_input | optional buy input data, otherwise read from file |
Definition at line 53 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_fc | ( | class(gwfbuytype) | this, |
| integer(i4b) | kiter, | ||
| class(matrixbasetype), pointer | matrix_sln, | ||
| integer(i4b), dimension(:), intent(in) | idxglo, | ||
| real(dp), dimension(:), intent(inout) | rhs, | ||
| real(dp), dimension(:), intent(inout) | hnew ) |
Definition at line 60 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_fn | ( | class(gwfbuytype) | this, |
| integer(i4b) | kiter, | ||
| class(matrixbasetype), pointer | matrix_sln, | ||
| integer(i4b), dimension(:), intent(in) | idxglo, | ||
| real(dp), dimension(:), intent(inout) | rhs, | ||
| real(dp), dimension(:), intent(inout) | hnew ) |
With the Newton formulation, the flow across a horizontal connection is scaled by the saturation of the upstream cell, selected here from the direction of the total (head plus buoyancy) flow. Add the derivative of the buoyancy flow with respect to the upstream head and, where npf selected a different upstream cell from the head difference, move the npf Newton term to the flow-based upstream cell.
Definition at line 61 of file gwf-buy.f90.
|
private |
Same as the npf conductance except that, with the Newton formulation, the upstream cell is selected from the direction of the total flow. The flow-based upstream cell is always used, rather than only where it differs from the head-based one: hcond breaks a tie in the heads in the orientation of the calling row, so at equal heads the two rows of a connection could otherwise use the saturations of different cells.
| [in] | hyn | effective hydraulic conductivity of n toward m |
| [in] | hym | effective hydraulic conductivity of m toward n |
Definition at line 68 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_ot_dv | ( | class(gwfbuytype) | this, |
| integer(i4b), intent(in) | idvfl ) |
Definition at line 62 of file gwf-buy.f90.
| procedure gwfbuymodule::gwfbuytype::buy_rp | ( | class(gwfbuytype) | this | ) |
Definition at line 56 of file gwf-buy.f90.
|
private |
Returns the buoyancy part of the flow from m into n divided by the conductance, so that the total flow is cond * (hm - hn + gbuy). It is zero when the densities of both cells equal the reference density.
Definition at line 67 of file gwf-buy.f90.
|
private |
Definition at line 65 of file gwf-buy.f90.
|
private |
Definition at line 66 of file gwf-buy.f90.
|
inherited |
Deallocate and initialize base numerical package scalars.
| this | NumericalPackageType object |
Definition at line 55 of file NumericalPackage.f90.
|
inherited |
Generic method to read data in the GRIDDATA block for a package.
| this | NumericalPackageType object | |
| [in] | tags | vector with variable tags |
| [in,out] | lfound | boolean vector indicating of a variable tag was found |
| [in] | varinames | optional vector of variable names |
Definition at line 57 of file NumericalPackage.f90.
|
private |
Definition at line 79 of file gwf-buy.f90.
|
private |
With the Newton formulation npf scales the saturated conductance by the saturation of the cell with the higher head. Return the conductance to add so that the npf flow uses the flow-based upstream cell instead; zero where the two upstream cells agree.
Definition at line 71 of file gwf-buy.f90.
|
private |
The cell saturations, adjusted as npf does when the HIGHEST_CELL_SATURATION option is active.
Definition at line 69 of file gwf-buy.f90.
|
inherited |
Generic method to read and check ionperiod, which is used to determine if new period data should be read from the input file. The check of ionperiod also makes sure periods are increasing in subsequent period data blocks.
| [in,out] | this | NumericalPackageType object |
Definition at line 56 of file NumericalPackage.f90.
| procedure gwfbuymodule::gwfbuytype::set_concentration_pointer | ( | class(gwfbuytype) | this, |
| character(len=lenmodelname), intent(in) | modelname, | ||
| real(dp), dimension(:), pointer | conc, | ||
| integer(i4b), dimension(:), pointer | icbund ) |
This routine is called from the gwfgwt exchange in the exg_ar() method
Definition at line 83 of file gwf-buy.f90.
|
inherited |
Method to assign the filtyp (ftype), the model name, and package name for a package. This method also creates the memoryPath and memoryPathModel that is used by the memory manager when variables are allocated.
| [in,out] | this | NumericalPackageType object |
| [in] | ibcnum | unique package number |
| [in] | name_model | name of the model |
| [in] | pakname | name of the package |
| [in] | ftype | package type |
Definition at line 53 of file NumericalPackage.f90.
|
private |
| [in] | input_data | the input data to be set |
Definition at line 78 of file gwf-buy.f90.
|
private |
| this | this buyoancy pkg | |
| [in] | input_data | the input data to be set |
Definition at line 82 of file gwf-buy.f90.
|
private |
Definition at line 80 of file gwf-buy.f90.
|
private |
Definition at line 77 of file gwf-buy.f90.
|
private |
Definition at line 81 of file gwf-buy.f90.
|
private |
npf selects the upstream cell of a horizontal connection from the head difference: the cell with the higher head, or the higher-numbered cell when the heads are equal. The buoyancy flow is generally not zero when the heads are equal, so the flow (and the residual) would jump when the order of two nearly equal heads changes. The flow-based upstream cell is selected from the sign of the total flow, hm - hn + gbuy, which keeps the product of flow and upstream saturation continuous. Both are evaluated in the orientation lower node to higher node so that they are the same for both rows of the connection.
| [out] | iuph | upstream node from the head difference |
| [out] | iupf | upstream node from the total flow |
| [out] | gbuy | buoyancy flow from higher into lower node, per unit conductance |
Definition at line 70 of file gwf-buy.f90.
| character(len=lenauxname), dimension(:), allocatable gwfbuymodule::gwfbuytype::cauxspeciesname |
Definition at line 48 of file gwf-buy.f90.
| character(len=lenmodelname), dimension(:), allocatable gwfbuymodule::gwfbuytype::cmodelname |
Definition at line 47 of file gwf-buy.f90.
| real(dp), dimension(:), pointer, contiguous gwfbuymodule::gwfbuytype::concbuy => null() |
Definition at line 39 of file gwf-buy.f90.
| real(dp), dimension(:), pointer, contiguous gwfbuymodule::gwfbuytype::crhoref => null() |
Definition at line 45 of file gwf-buy.f90.
| real(dp), dimension(:), pointer, contiguous gwfbuymodule::gwfbuytype::ctemp => null() |
Definition at line 46 of file gwf-buy.f90.
| real(dp), dimension(:), pointer, contiguous gwfbuymodule::gwfbuytype::dense => null() |
Definition at line 38 of file gwf-buy.f90.
| real(dp), pointer gwfbuymodule::gwfbuytype::denseref => null() |
Definition at line 37 of file gwf-buy.f90.
|
inherited |
Definition at line 50 of file NumericalPackage.f90.
| real(dp), dimension(:), pointer, contiguous gwfbuymodule::gwfbuytype::drhodc => null() |
Definition at line 44 of file gwf-buy.f90.
| real(dp), dimension(:), pointer, contiguous gwfbuymodule::gwfbuytype::elev => null() |
Definition at line 40 of file gwf-buy.f90.
|
inherited |
Definition at line 33 of file NumericalPackage.f90.
|
inherited |
Definition at line 41 of file NumericalPackage.f90.
| integer(i4b), dimension(:), pointer gwfbuymodule::gwfbuytype::ibound => null() |
Definition at line 41 of file gwf-buy.f90.
| integer(i4b), pointer gwfbuymodule::gwfbuytype::iconcset => null() |
Definition at line 36 of file gwf-buy.f90.
|
inherited |
Definition at line 37 of file NumericalPackage.f90.
| integer(i4b), pointer gwfbuymodule::gwfbuytype::iform => null() |
Definition at line 33 of file gwf-buy.f90.
|
inherited |
Definition at line 40 of file NumericalPackage.f90.
|
inherited |
Definition at line 32 of file NumericalPackage.f90.
|
inherited |
Definition at line 31 of file NumericalPackage.f90.
|
inherited |
Definition at line 38 of file NumericalPackage.f90.
|
inherited |
Definition at line 45 of file NumericalPackage.f90.
|
inherited |
Definition at line 39 of file NumericalPackage.f90.
| integer(i4b), pointer gwfbuymodule::gwfbuytype::ioutdense => null() |
Definition at line 32 of file gwf-buy.f90.
|
inherited |
Definition at line 44 of file NumericalPackage.f90.
|
inherited |
Definition at line 43 of file NumericalPackage.f90.
|
inherited |
Definition at line 42 of file NumericalPackage.f90.
| integer(i4b), pointer gwfbuymodule::gwfbuytype::ireadconcbuy => null() |
Definition at line 35 of file gwf-buy.f90.
| integer(i4b), pointer gwfbuymodule::gwfbuytype::ireadelev => null() |
Definition at line 34 of file gwf-buy.f90.
|
inherited |
Definition at line 46 of file NumericalPackage.f90.
|
inherited |
Definition at line 28 of file NumericalPackage.f90.
|
inherited |
Definition at line 29 of file NumericalPackage.f90.
| type(concentrationpointer), dimension(:), allocatable gwfbuymodule::gwfbuytype::modelconc |
Definition at line 50 of file gwf-buy.f90.
|
inherited |
Definition at line 26 of file NumericalPackage.f90.
| type(gwfnpftype), pointer gwfbuymodule::gwfbuytype::npf => null() |
Definition at line 31 of file gwf-buy.f90.
| integer(i4b), pointer gwfbuymodule::gwfbuytype::nrhospecies => null() |
Definition at line 43 of file gwf-buy.f90.
|
inherited |
Definition at line 34 of file NumericalPackage.f90.
|
inherited |
Definition at line 27 of file NumericalPackage.f90.
|
inherited |
Definition at line 49 of file NumericalPackage.f90.