![]() |
MODFLOW 6
version 6.7.0.dev2
USGS Modular Hydrologic Model
|
This module contains the TspSsm Module. More...
Data Types | |
type | tspssmtype |
Derived type for the SSM Package. More... | |
Functions/Subroutines | |
subroutine, public | ssm_cr (ssmobj, name_model, input_mempath, inunit, iout, fmi, eqnsclfac, depvartype) |
@ brief Create a new SSM package More... | |
subroutine | ssm_df (this) |
@ brief Define SSM Package More... | |
subroutine | ssm_ar (this, dis, ibound, cnew) |
@ brief Allocate and read SSM Package More... | |
subroutine | ssm_rp (this) |
@ brief Read and prepare this SSM Package More... | |
subroutine | ssm_ad (this) |
@ brief Advance the SSM Package More... | |
subroutine | ssm_term (this, ipackage, ientry, rrate, rhsval, hcofval, cssm, qssm) |
@ brief Calculate the SSM mass flow rate and hcof and rhs values More... | |
subroutine | get_ssm_conc (this, ipackage, ientry, nbound_flow, conc, lauxmixed) |
@ brief Provide bound concentration (or temperature) and mixed flag More... | |
subroutine | ssm_fc (this, matrix_sln, idxglo, rhs) |
@ brief Fill coefficients More... | |
subroutine | ssm_cq (this, flowja) |
@ brief Calculate flow More... | |
subroutine | ssm_bd (this, isuppress_output, model_budget) |
@ brief Calculate the global SSM budget terms More... | |
subroutine | ssm_ot_flow (this, icbcfl, ibudfl, icbcun) |
@ brief Output flows More... | |
subroutine | ssm_da (this) |
@ brief Deallocate More... | |
subroutine | allocate_scalars (this) |
@ brief Allocate scalars More... | |
subroutine | allocate_arrays (this) |
@ brief Allocate arrays More... | |
subroutine | source_options (this) |
Source input options. More... | |
subroutine | source_sources (this) |
Source sources input block. More... | |
subroutine | source_fileinput (this) |
Source fileinput input block. More... | |
subroutine | set_iauxpak (this, ip, packname, auxname) |
@ brief Set iauxpak array value for package ip More... | |
subroutine | set_ssmivec (this, ip, packname, filename) |
@ brief Set ssmivec array value for package ip More... | |
subroutine | pak_setup_outputtab (this) |
@ brief Setup the output table More... | |
Variables | |
character(len=lenftype) | ftype = 'SSM' |
character(len=lenpackagename) | text = ' SOURCE-SINK MIX' |
This module contains the code for handling sources and sinks associated with groundwater flow model stress packages.
todo: need observations for SSM terms
subroutine tspssmmodule::allocate_arrays | ( | class(tspssmtype) | this | ) |
Allocate array variables for this derived type
this | TspSsmType object |
Definition at line 710 of file tsp-ssm.f90.
subroutine tspssmmodule::allocate_scalars | ( | class(tspssmtype) | this | ) |
Allocate scalar variables for this derived type
this | TspSsmType object |
Definition at line 690 of file tsp-ssm.f90.
subroutine tspssmmodule::get_ssm_conc | ( | class(tspssmtype) | this, |
integer(i4b), intent(in) | ipackage, | ||
integer(i4b), intent(in) | ientry, | ||
integer(i4b), intent(in) | nbound_flow, | ||
real(dp), intent(out) | conc, | ||
logical(lgp), intent(out) | lauxmixed | ||
) |
SSM concentrations and temperatures can be provided in auxiliary variables or through separate SPC files. If not provided, the default concentration (or temperature) is zero. This single routine provides the SSM bound concentration (or temperature) based on these different approaches. The mixed flag indicates whether or not the boundary as a mixed type.
this | TspSsmType | |
[in] | ipackage | package number |
[in] | ientry | bound number |
[in] | nbound_flow | size of flow package bound list |
[out] | conc | user-specified concentration/temperature for this bound |
[out] | lauxmixed | user-specified flag for marking this as a mixed boundary |
Definition at line 354 of file tsp-ssm.f90.
subroutine tspssmmodule::pak_setup_outputtab | ( | class(tspssmtype), intent(inout) | this | ) |
Setup the output table by creating the column headers.
Definition at line 1023 of file tsp-ssm.f90.
subroutine tspssmmodule::set_iauxpak | ( | class(tspssmtype), intent(inout) | this, |
integer(i4b), intent(in) | ip, | ||
character(len=*), intent(in) | packname, | ||
character(len=*), intent(in) | auxname | ||
) |
The routine searches through the auxiliary names in package ip and sets iauxpak to the column number corresponding to the correct auxiliary column.
[in,out] | this | TspSsmType |
[in] | ip | package number |
[in] | packname | name of package |
[in] | auxname | name of aux |
Definition at line 957 of file tsp-ssm.f90.
subroutine tspssmmodule::set_ssmivec | ( | class(tspssmtype), intent(inout) | this, |
integer(i4b), intent(in) | ip, | ||
character(len=*), intent(in) | packname, | ||
character(len=*), intent(in) | filename | ||
) |
This routine initializes the SPC input file.
[in,out] | this | TspSsmType |
[in] | ip | package number |
[in] | packname | name of package |
[in] | filename | package input file |
Definition at line 993 of file tsp-ssm.f90.
subroutine tspssmmodule::source_fileinput | ( | class(tspssmtype) | this | ) |
Initialize an SPC input file reader for each input entry.
Definition at line 850 of file tsp-ssm.f90.
subroutine tspssmmodule::source_options | ( | class(tspssmtype) | this | ) |
Definition at line 736 of file tsp-ssm.f90.
subroutine tspssmmodule::source_sources | ( | class(tspssmtype) | this | ) |
subroutine tspssmmodule::ssm_ad | ( | class(tspssmtype) | this | ) |
This routine is called from gwt_ad(). It is called at the beginning of each time step. The total number of flow boundaries is counted and stored in thisnbound. Also, if any SPC input files are used to provide source and sink concentrations (or temperatures) and time series are referenced in those files, then ssm concenrations must be interpolated for the time step.
this | TspSsmType object |
Definition at line 212 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_ar | ( | class(tspssmtype) | this, |
class(disbasetype), intent(in), pointer | dis, | ||
integer(i4b), dimension(:), pointer, contiguous | ibound, | ||
real(dp), dimension(:), pointer, contiguous | cnew | ||
) |
This routine is called from gwt_ar(). It allocates arrays, reads options and data, and sets up the output table.
this | TspSsmType object | |
[in] | dis | discretization package |
ibound | GWT model ibound | |
cnew | GWT model dependent variable |
Definition at line 130 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_bd | ( | class(tspssmtype) | this, |
integer(i4b), intent(in) | isuppress_output, | ||
type(budgettype), intent(inout) | model_budget | ||
) |
Calculate the global SSM budget terms using separate in and out entries for each flow package.
this | TspSsmType object | |
[in] | isuppress_output | flag to suppress output |
[in,out] | model_budget | budget object for the GWT model |
Definition at line 464 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_cq | ( | class(tspssmtype) | this, |
real(dp), dimension(:), intent(inout), contiguous | flowja | ||
) |
Calculate the resulting mass flow between the boundary and the connected GWT/GWE model cell. Update the diagonal position of the flowja array so that it ultimately contains the solute balance residual.
this | TspSsmType object | |
[in,out] | flowja | flow across each face in the model grid |
Definition at line 429 of file tsp-ssm.f90.
subroutine, public tspssmmodule::ssm_cr | ( | type(tspssmtype), pointer | ssmobj, |
character(len=*), intent(in) | name_model, | ||
character(len=*), intent(in) | input_mempath, | ||
integer(i4b), intent(in) | inunit, | ||
integer(i4b), intent(in) | iout, | ||
type(tspfmitype), intent(in), target | fmi, | ||
real(dp), intent(in), pointer | eqnsclfac, | ||
character(len=lenvarname), intent(in) | depvartype | ||
) |
Create a new SSM package by defining names, allocating scalars
ssmobj | TspSsmType object | |
[in] | name_model | name of the model |
[in] | input_mempath | input mempath |
[in] | inunit | fortran unit for input |
[in] | iout | fortran unit for output |
[in] | fmi | Transport FMI package |
[in] | eqnsclfac | governing equation scale factor |
[in] | depvartype | dependent variable type ('concentration' or 'temperature') |
Definition at line 80 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_da | ( | class(tspssmtype) | this | ) |
Deallocate the memory associated with this derived type
this | TspSsmType object |
Definition at line 644 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_df | ( | class(tspssmtype) | this | ) |
This routine is called from gwt_df(), but does not do anything because df is typically used to set up dimensions. For the ssm package, the total number of ssm entries is defined by the flow model.
this | TspSsmType object |
Definition at line 118 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_fc | ( | class(tspssmtype) | this, |
class(matrixbasetype), pointer | matrix_sln, | ||
integer(i4b), dimension(:), intent(in) | idxglo, | ||
real(dp), dimension(:), intent(inout) | rhs | ||
) |
This routine adds the effects of the SSM to the matrix equations by updating the a matrix and right-hand side vector.
Definition at line 387 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_ot_flow | ( | class(tspssmtype) | this, |
integer(i4b), intent(in) | icbcfl, | ||
integer(i4b), intent(in) | ibudfl, | ||
integer(i4b), intent(in) | icbcun | ||
) |
Based on user-specified controls, print SSM mass flow rates to the GWT listing file and/or write the SSM mass flow rates to the GWT binary budget file.
this | TspSsmType object | |
[in] | icbcfl | flag for writing binary budget terms |
[in] | ibudfl | flag for printing budget terms to list file |
[in] | icbcun | fortran unit number for binary budget file |
Definition at line 518 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_rp | ( | class(tspssmtype) | this | ) |
This routine is called from gwt_rp(). It is called at the beginning of each stress period. If any SPC input files are used to provide source and sink concentrations (or temperatures), then period blocks for the current stress period are read.
this | TspSsmType object |
Definition at line 185 of file tsp-ssm.f90.
subroutine tspssmmodule::ssm_term | ( | class(tspssmtype) | this, |
integer(i4b), intent(in) | ipackage, | ||
integer(i4b), intent(in) | ientry, | ||
real(dp), intent(out), optional | rrate, | ||
real(dp), intent(out), optional | rhsval, | ||
real(dp), intent(out), optional | hcofval, | ||
real(dp), intent(out), optional | cssm, | ||
real(dp), intent(out), optional | qssm | ||
) |
This is the primary SSM routine that calculates the matrix coefficient and right-hand-side value for any package and package entry. It returns several different optional variables that are used throughout this package to update matrix terms, budget calculations, and output tables.
this | TspSsmType | |
[in] | ipackage | package number |
[in] | ientry | bound number |
[out] | rrate | calculated mass flow rate |
[out] | rhsval | calculated rhs value |
[out] | hcofval | calculated hcof value |
[out] | cssm | calculated source concentration/temperature depending on flow direction |
[out] | qssm | water flow rate into model cell from boundary package |
Definition at line 254 of file tsp-ssm.f90.
character(len=lenftype) tspssmmodule::ftype = 'SSM' |
Definition at line 28 of file tsp-ssm.f90.
character(len=lenpackagename) tspssmmodule::text = ' SOURCE-SINK MIX' |
Definition at line 29 of file tsp-ssm.f90.