![]() |
MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
|
Derived type for the SSM Package. More...


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 | |
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.
|
private |
Allocate array variables for this derived type
| this | TspSsmType object |
Definition at line 63 of file tsp-ssm.f90.
|
inherited |
Allocate and initialize base numerical package scalars.
| this | NumericalPackageType object |
Definition at line 54 of file NumericalPackage.f90.
| procedure tspssmmodule::tspssmtype::allocate_scalars | ( | class(tspssmtype) | this | ) |
Allocate scalar variables for this derived type
| this | TspSsmType object |
Definition at line 61 of file tsp-ssm.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 |
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 70 of file tsp-ssm.f90.
|
private |
Setup the output table by creating the column headers.
Definition at line 67 of file tsp-ssm.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.
|
private |
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 68 of file tsp-ssm.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 |
Initialize TspSpcType from the input mempath.
| [in,out] | this | TspSsmType |
| [in] | ip | package number |
| [in] | packname | name of corresponding flow package |
| [in] | spc_mempath | input mempath for this SPC instance |
| [in] | input_fname | SPC input file name (for error messages) |
Definition at line 69 of file tsp-ssm.f90.
|
private |
Initialize an SPC input file reader for each input entry.
Definition at line 66 of file tsp-ssm.f90.
|
private |
Definition at line 64 of file tsp-ssm.f90.
|
private |
Definition at line 65 of file tsp-ssm.f90.
| 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.
| this | TspSsmType object |
Definition at line 55 of file tsp-ssm.f90.
| 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.
| this | TspSsmType object | |
| [in] | dis | discretization package |
| ibound | GWT model ibound | |
| cnew | GWT model dependent variable |
Definition at line 53 of file tsp-ssm.f90.
| 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.
| this | TspSsmType object | |
| [in] | isuppress_output | flag to suppress output |
| [in,out] | model_budget | budget object for the GWT model |
Definition at line 58 of file tsp-ssm.f90.
| 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.
| this | TspSsmType object | |
| [in,out] | flowja | flow across each face in the model grid |
Definition at line 57 of file tsp-ssm.f90.
| procedure tspssmmodule::tspssmtype::ssm_da | ( | class(tspssmtype) | this | ) |
Deallocate the memory associated with this derived type
| this | TspSsmType object |
Definition at line 60 of file tsp-ssm.f90.
| 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.
| this | TspSsmType object |
Definition at line 52 of file tsp-ssm.f90.
| 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.
| 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.
| 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 59 of file tsp-ssm.f90.
| 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.
| this | TspSsmType object |
Definition at line 54 of file tsp-ssm.f90.
|
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.
| 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 62 of file tsp-ssm.f90.
| real(dp), dimension(:), pointer, contiguous tspssmmodule::tspssmtype::cnew => null() |
Definition at line 43 of file tsp-ssm.f90.
| character(len=lenvarname) tspssmmodule::tspssmtype::depvartype = '' |
Definition at line 48 of file tsp-ssm.f90.
|
inherited |
Definition at line 50 of file NumericalPackage.f90.
| real(dp), pointer tspssmmodule::tspssmtype::eqnsclfac => null() |
Definition at line 47 of file tsp-ssm.f90.
|
inherited |
Definition at line 33 of file NumericalPackage.f90.
| type(tspfmitype), pointer tspssmmodule::tspssmtype::fmi => null() |
Definition at line 44 of file tsp-ssm.f90.
|
inherited |
Definition at line 41 of file NumericalPackage.f90.
| integer(i4b), dimension(:), pointer, contiguous tspssmmodule::tspssmtype::iauxpak => null() |
Definition at line 41 of file tsp-ssm.f90.
| integer(i4b), dimension(:), pointer, contiguous tspssmmodule::tspssmtype::ibound => null() |
Definition at line 42 of file tsp-ssm.f90.
|
inherited |
Definition at line 37 of file NumericalPackage.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.
|
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), dimension(:), pointer, contiguous tspssmmodule::tspssmtype::isrctype => null() |
Definition at line 40 of file tsp-ssm.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.
|
inherited |
Definition at line 26 of file NumericalPackage.f90.
| integer(i4b), pointer tspssmmodule::tspssmtype::nbound |
Definition at line 39 of file tsp-ssm.f90.
| type(tabletype), pointer tspssmmodule::tspssmtype::outputtab => null() |
Definition at line 45 of file tsp-ssm.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.
| type(tspspctype), dimension(:), pointer tspssmmodule::tspssmtype::ssmivec => null() |
Definition at line 46 of file tsp-ssm.f90.