MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches

Derived type for the SSM Package. More...

Inheritance diagram for tspssmmodule::tspssmtype:
Inheritance graph
Collaboration diagram for tspssmmodule::tspssmtype:
Collaboration graph

Public Member Functions

procedure ssm_df (this)
 @ brief Define SSM Package
procedure ssm_ar (this, dis, ibound, cnew)
 @ brief Allocate and read SSM Package
procedure ssm_rp (this)
 @ brief Read and prepare this SSM Package
procedure ssm_ad (this)
 @ brief Advance the SSM Package
procedure ssm_fc (this, matrix_sln, idxglo, rhs)
 @ brief Fill coefficients
procedure ssm_cq (this, flowja)
 @ brief Calculate flow
procedure ssm_bd (this, isuppress_output, model_budget)
 @ brief Calculate the global SSM budget terms
procedure ssm_ot_flow (this, icbcfl, ibudfl, icbcun)
 @ brief Output flows
procedure ssm_da (this)
 @ brief Deallocate
procedure allocate_scalars (this)
 @ brief Allocate scalars
procedure set_names (this, ibcnum, name_model, pakname, ftype, input_mempath)
 @ brief Set package names
procedure allocate_scalars (this)
 @ brief Allocate package scalars
procedure da (this)
 @ brief Deallocate package scalars
procedure read_check_ionper (this)
 @ brief Check ionper
procedure get_block_data (this, tags, lfound, varinames)
 @ brief Read griddata block for a package

Public Attributes

integer(i4b), pointer nbound
 total number of flow boundaries in this time step
integer(i4b), dimension(:), pointer, contiguous isrctype => null()
 source type 0 is unspecified, 1 is aux, 2 is auxmixed, 3 is ssmi, 4 is ssmimixed
integer(i4b), dimension(:), pointer, contiguous iauxpak => null()
 aux col for concentration/temperature
integer(i4b), dimension(:), pointer, contiguous ibound => null()
 pointer to model ibound
real(dp), dimension(:), pointer, contiguous cnew => null()
 pointer to gwtx
type(tspfmitype), pointer fmi => null()
 pointer to fmi object
type(tabletype), pointer outputtab => null()
 output table object
type(tspspctype), dimension(:), pointer ssmivec => null()
 array of stress package concentration or temperature objects
real(dp), pointer eqnsclfac => null()
 governing equation scale factor; =1. for solute; =rhow*cpw for energy
character(len=lenvarname) depvartype = ''
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 ssm_term (this, ipackage, ientry, rrate, rhsval, hcofval, cssm, qssm)
 @ brief Calculate the SSM mass flow rate and hcof and rhs values
procedure, private allocate_arrays (this)
 @ brief Allocate arrays
procedure, private source_options (this)
 Source input options.
procedure, private source_sources (this)
 Source sources input block.
procedure, private source_fileinput (this)
 Source fileinput input block.
procedure, private pak_setup_outputtab (this)
 @ brief Setup the output table
procedure, private set_iauxpak (this, ip, packname, auxname)
 @ brief Set iauxpak array value for package ip
procedure, private set_ssmivec (this, ip, packname, spc_mempath, input_fname)
 Set ssmivec array value for package ip.
procedure, private get_ssm_conc (this, ipackage, ientry, nbound_flow, conc, lauxmixed)
 @ brief Provide bound concentration (or temperature) and mixed flag

Detailed Description

This derived type corresponds to the SSM Package, which adds the effects of groundwater sources and sinks to the solute transport equation.

Definition at line 37 of file tsp-ssm.f90.

Member Function/Subroutine Documentation

◆ allocate_arrays()

procedure, private tspssmmodule::tspssmtype::allocate_arrays ( class(tspssmtype) this)
private

Allocate array variables for this derived type

Parameters
thisTspSsmType object

Definition at line 63 of file tsp-ssm.f90.

◆ allocate_scalars() [1/2]

procedure numericalpackagemodule::numericalpackagetype::allocate_scalars ( class(numericalpackagetype) this)
inherited

Allocate and initialize base numerical package scalars.

Parameters
thisNumericalPackageType object

Definition at line 54 of file NumericalPackage.f90.

◆ allocate_scalars() [2/2]

procedure tspssmmodule::tspssmtype::allocate_scalars ( class(tspssmtype) this)

Allocate scalar variables for this derived type

Parameters
thisTspSsmType object

Definition at line 61 of file tsp-ssm.f90.

◆ da()

procedure numericalpackagemodule::numericalpackagetype::da ( class(numericalpackagetype) this)
inherited

Deallocate and initialize base numerical package scalars.

Parameters
thisNumericalPackageType object

Definition at line 55 of file NumericalPackage.f90.

◆ get_block_data()

procedure numericalpackagemodule::numericalpackagetype::get_block_data ( class(numericalpackagetype) this,
character(len=24), dimension(:), intent(in) tags,
logical, dimension(:), intent(inout) lfound,
character(len=24), dimension(:), intent(in), optional varinames )
inherited

Generic method to read data in the GRIDDATA block for a package.

Parameters
thisNumericalPackageType object
[in]tagsvector with variable tags
[in,out]lfoundboolean vector indicating of a variable tag was found
[in]varinamesoptional vector of variable names

Definition at line 57 of file NumericalPackage.f90.

◆ get_ssm_conc()

procedure, private tspssmmodule::tspssmtype::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 )
private

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.

Parameters
thisTspSsmType
[in]ipackagepackage number
[in]ientrybound number
[in]nbound_flowsize of flow package bound list
[out]concuser-specified concentration/temperature for this bound
[out]lauxmixeduser-specified flag for marking this as a mixed boundary

Definition at line 70 of file tsp-ssm.f90.

◆ pak_setup_outputtab()

procedure, private tspssmmodule::tspssmtype::pak_setup_outputtab ( class(tspssmtype), intent(inout) this)
private

Setup the output table by creating the column headers.

Definition at line 67 of file tsp-ssm.f90.

◆ read_check_ionper()

procedure numericalpackagemodule::numericalpackagetype::read_check_ionper ( class(numericalpackagetype), intent(inout) this)
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.

Parameters
[in,out]thisNumericalPackageType object

Definition at line 56 of file NumericalPackage.f90.

◆ set_iauxpak()

procedure, private tspssmmodule::tspssmtype::set_iauxpak ( class(tspssmtype), intent(inout) this,
integer(i4b), intent(in) ip,
character(len=*), intent(in) packname,
character(len=*), intent(in) auxname )
private

The routine searches through the auxiliary names in package ip and sets iauxpak to the column number corresponding to the correct auxiliary column.

Parameters
[in,out]thisTspSsmType
[in]ippackage number
[in]packnamename of package
[in]auxnamename of aux

Definition at line 68 of file tsp-ssm.f90.

◆ set_names()

procedure numericalpackagemodule::numericalpackagetype::set_names ( class(numericalpackagetype), intent(inout) this,
integer(i4b), intent(in) ibcnum,
character(len=*), intent(in) name_model,
character(len=*), intent(in) pakname,
character(len=*), intent(in) ftype,
character(len=*), intent(in), optional input_mempath )
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.

Parameters
[in,out]thisNumericalPackageType object
[in]ibcnumunique package number
[in]name_modelname of the model
[in]paknamename of the package
[in]ftypepackage type

Definition at line 53 of file NumericalPackage.f90.

◆ set_ssmivec()

procedure, private tspssmmodule::tspssmtype::set_ssmivec ( class(tspssmtype), intent(inout) this,
integer(i4b), intent(in) ip,
character(len=*), intent(in) packname,
character(len=*), intent(in) spc_mempath,
character(len=*), intent(in) input_fname )
private

Initialize TspSpcType from the input mempath.

Parameters
[in,out]thisTspSsmType
[in]ippackage number
[in]packnamename of corresponding flow package
[in]spc_mempathinput mempath for this SPC instance
[in]input_fnameSPC input file name (for error messages)

Definition at line 69 of file tsp-ssm.f90.

◆ source_fileinput()

procedure, private tspssmmodule::tspssmtype::source_fileinput ( class(tspssmtype) this)
private

Initialize an SPC input file reader for each input entry.

Definition at line 66 of file tsp-ssm.f90.

◆ source_options()

procedure, private tspssmmodule::tspssmtype::source_options ( class(tspssmtype) this)
private

Definition at line 64 of file tsp-ssm.f90.

◆ source_sources()

procedure, private tspssmmodule::tspssmtype::source_sources ( class(tspssmtype) this)
private

Definition at line 65 of file tsp-ssm.f90.

◆ ssm_ad()

procedure tspssmmodule::tspssmtype::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.

Parameters
thisTspSsmType object

Definition at line 55 of file tsp-ssm.f90.

◆ ssm_ar()

procedure tspssmmodule::tspssmtype::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.

Parameters
thisTspSsmType object
[in]disdiscretization package
iboundGWT model ibound
cnewGWT model dependent variable

Definition at line 53 of file tsp-ssm.f90.

◆ ssm_bd()

procedure tspssmmodule::tspssmtype::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.

Parameters
thisTspSsmType object
[in]isuppress_outputflag to suppress output
[in,out]model_budgetbudget object for the GWT model

Definition at line 58 of file tsp-ssm.f90.

◆ ssm_cq()

procedure tspssmmodule::tspssmtype::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.

Parameters
thisTspSsmType object
[in,out]flowjaflow across each face in the model grid

Definition at line 57 of file tsp-ssm.f90.

◆ ssm_da()

procedure tspssmmodule::tspssmtype::ssm_da ( class(tspssmtype) this)

Deallocate the memory associated with this derived type

Parameters
thisTspSsmType object

Definition at line 60 of file tsp-ssm.f90.

◆ ssm_df()

procedure tspssmmodule::tspssmtype::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.

Parameters
thisTspSsmType object

Definition at line 52 of file tsp-ssm.f90.

◆ ssm_fc()

procedure tspssmmodule::tspssmtype::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 56 of file tsp-ssm.f90.

◆ ssm_ot_flow()

procedure tspssmmodule::tspssmtype::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.

Parameters
thisTspSsmType object
[in]icbcflflag for writing binary budget terms
[in]ibudflflag for printing budget terms to list file
[in]icbcunfortran unit number for binary budget file

Definition at line 59 of file tsp-ssm.f90.

◆ ssm_rp()

procedure tspssmmodule::tspssmtype::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.

Parameters
thisTspSsmType object

Definition at line 54 of file tsp-ssm.f90.

◆ ssm_term()

procedure, private tspssmmodule::tspssmtype::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 )
private

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.

Parameters
thisTspSsmType
[in]ipackagepackage number
[in]ientrybound number
[out]rratecalculated mass flow rate
[out]rhsvalcalculated rhs value
[out]hcofvalcalculated hcof value
[out]cssmcalculated source concentration/temperature depending on flow direction
[out]qssmwater flow rate into model cell from boundary package

Definition at line 62 of file tsp-ssm.f90.

Member Data Documentation

◆ cnew

real(dp), dimension(:), pointer, contiguous tspssmmodule::tspssmtype::cnew => null()

Definition at line 43 of file tsp-ssm.f90.

◆ depvartype

character(len=lenvarname) tspssmmodule::tspssmtype::depvartype = ''

Definition at line 48 of file tsp-ssm.f90.

◆ dis

class(disbasetype), pointer numericalpackagemodule::numericalpackagetype::dis => null()
inherited

Definition at line 50 of file NumericalPackage.f90.

◆ eqnsclfac

real(dp), pointer tspssmmodule::tspssmtype::eqnsclfac => null()

Definition at line 47 of file tsp-ssm.f90.

◆ filtyp

character(len=lenftype) numericalpackagemodule::numericalpackagetype::filtyp = ''
inherited

Definition at line 33 of file NumericalPackage.f90.

◆ fmi

type(tspfmitype), pointer tspssmmodule::tspssmtype::fmi => null()

Definition at line 44 of file tsp-ssm.f90.

◆ iasym

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::iasym => null()
inherited

Definition at line 41 of file NumericalPackage.f90.

◆ iauxpak

integer(i4b), dimension(:), pointer, contiguous tspssmmodule::tspssmtype::iauxpak => null()

Definition at line 41 of file tsp-ssm.f90.

◆ ibound

integer(i4b), dimension(:), pointer, contiguous tspssmmodule::tspssmtype::ibound => null()

Definition at line 42 of file tsp-ssm.f90.

◆ id

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::id => null()
inherited

Definition at line 37 of file NumericalPackage.f90.

◆ inewton

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::inewton => null()
inherited

Definition at line 40 of file NumericalPackage.f90.

◆ input_fname

character(len=linelength), pointer numericalpackagemodule::numericalpackagetype::input_fname => null()
inherited

Definition at line 32 of file NumericalPackage.f90.

◆ input_mempath

character(len=lenmempath) numericalpackagemodule::numericalpackagetype::input_mempath = ''
inherited

Definition at line 31 of file NumericalPackage.f90.

◆ inunit

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::inunit => null()
inherited

Definition at line 38 of file NumericalPackage.f90.

◆ ionper

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::ionper => null()
inherited

Definition at line 45 of file NumericalPackage.f90.

◆ iout

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::iout => null()
inherited

Definition at line 39 of file NumericalPackage.f90.

◆ ipakcb

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::ipakcb => null()
inherited

Definition at line 44 of file NumericalPackage.f90.

◆ iprflow

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::iprflow => null()
inherited

Definition at line 43 of file NumericalPackage.f90.

◆ iprpak

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::iprpak => null()
inherited

Definition at line 42 of file NumericalPackage.f90.

◆ isrctype

integer(i4b), dimension(:), pointer, contiguous tspssmmodule::tspssmtype::isrctype => null()

Definition at line 40 of file tsp-ssm.f90.

◆ lastonper

integer(i4b), pointer numericalpackagemodule::numericalpackagetype::lastonper => null()
inherited

Definition at line 46 of file NumericalPackage.f90.

◆ memorypath

character(len=lenmempath) numericalpackagemodule::numericalpackagetype::memorypath = ''
inherited

Definition at line 28 of file NumericalPackage.f90.

◆ memorypathmodel

character(len=lenmempath) numericalpackagemodule::numericalpackagetype::memorypathmodel = ''
inherited

Definition at line 29 of file NumericalPackage.f90.

◆ name_model

character(len=lenmodelname) numericalpackagemodule::numericalpackagetype::name_model = ''
inherited

Definition at line 26 of file NumericalPackage.f90.

◆ nbound

integer(i4b), pointer tspssmmodule::tspssmtype::nbound

Definition at line 39 of file tsp-ssm.f90.

39 integer(I4B), pointer :: nbound !< total number of flow boundaries in this time step

◆ outputtab

type(tabletype), pointer tspssmmodule::tspssmtype::outputtab => null()

Definition at line 45 of file tsp-ssm.f90.

◆ package_type

character(len=lenftype), pointer numericalpackagemodule::numericalpackagetype::package_type => null()
inherited

Definition at line 34 of file NumericalPackage.f90.

◆ packname

character(len=lenpackagename) numericalpackagemodule::numericalpackagetype::packname = ''
inherited

Definition at line 27 of file NumericalPackage.f90.

◆ parser

type(blockparsertype) numericalpackagemodule::numericalpackagetype::parser
inherited

Definition at line 49 of file NumericalPackage.f90.

49 type(BlockParserType) :: parser !< parser object for reading blocks of information

◆ ssmivec

type(tspspctype), dimension(:), pointer tspssmmodule::tspssmtype::ssmivec => null()

Definition at line 46 of file tsp-ssm.f90.


The documentation for this type was generated from the following file:
  • /home/runner/work/modflow6/modflow6/src/Model/TransportModel/tsp-ssm.f90