MODFLOW 6  version 6.7.0.dev1
USGS Modular Hydrologic Model
basedismodule Module Reference

Data Types

type  disbasetype
 

Functions/Subroutines

subroutine dis_df (this)
 Define the discretization. More...
 
subroutine dis_ac (this, moffset, sparse)
 Add connections to sparse cell connectivity matrix. More...
 
subroutine dis_mc (this, moffset, idxglo, matrix_sln)
 Map cell connections in the numerical solution coefficient matrix. More...
 
subroutine dis_ar (this, icelltype)
 Allocate and setup variables, and write binary grid file. More...
 
subroutine write_grb (this, icelltype)
 Write a binary grid file. More...
 
subroutine dis_da (this)
 @brier Deallocate variables More...
 
subroutine nodeu_to_string (this, nodeu, str)
 Convert a user nodenumber to a string (nodenumber), (k,j), or (k,i,j) More...
 
subroutine nodeu_to_array (this, nodeu, arr)
 Convert a user nodenumber to an array (nodenumber), (k,j), or (k,i,j) More...
 
integer(i4b) function get_nodeuser (this, noder)
 Convert a reduced nodenumber to a user node number. More...
 
integer(i4b) function get_nodenumber_idx1 (this, nodeu, icheck)
 
integer(i4b) function get_nodenumber_idx2 (this, k, j, icheck)
 
integer(i4b) function get_nodenumber_idx3 (this, k, i, j, icheck)
 
subroutine connection_normal (this, noden, nodem, ihc, xcomp, ycomp, zcomp, ipos)
 Get normal vector components between the cell and a given neighbor. The normal points outward from the shared face between noden and nodem. More...
 
subroutine connection_vector (this, noden, nodem, nozee, satn, satm, ihc, xcomp, ycomp, zcomp, conlen)
 Get unit vector components between the cell and a given neighbor. Saturation must be provided to compute cell center vertical coordinates. Also return the straight-line connection length. More...
 
subroutine, public dis_transform_xy (x, y, xorigin, yorigin, angrot, xglo, yglo)
 Get global (x, y) coordinates from cell-local coordinates. More...
 
subroutine get_dis_type (this, dis_type)
 Get the discretization type (DIS, DISV, or DISU) More...
 
integer(i4b) function get_dis_enum (this)
 Get the discretization type enumeration. More...
 
subroutine allocate_scalars (this, name_model, input_mempath)
 Allocate and initialize scalar variables. More...
 
subroutine allocate_arrays (this)
 Allocate and initialize arrays. More...
 
integer(i4b) function nodeu_from_string (this, lloc, istart, istop, in, iout, line, flag_string, allow_zero)
 Convert a string to a user nodenumber. More...
 
integer(i4b) function nodeu_from_cellid (this, cellid, inunit, iout, flag_string, allow_zero)
 Convert a cellid string to a user nodenumber. More...
 
integer(i4b) function noder_from_string (this, lloc, istart, istop, in, iout, line, flag_string)
 Convert a string to a reduced nodenumber. More...
 
integer(i4b) function noder_from_cellid (this, cellid, inunit, iout, flag_string, allow_zero)
 Convert cellid string to reduced nodenumber. More...
 
logical function supports_layers (this)
 Indicates whether the grid discretization supports layers. More...
 
integer(i4b) function get_ncpl (this)
 Return number of cells per layer. This is nodes for a DISU grid, as there are no layers. More...
 
real(dp) function get_cell_volume (this, n, x)
 Return volume of cell n based on x value passed. More...
 
subroutine get_polyverts (this, ic, polyverts, closed)
 Get a 2D array of polygon vertices, listed in clockwise order beginning with the lower left corner. More...
 
subroutine read_int_array (this, line, lloc, istart, istop, iout, in, iarray, aname)
 Read an integer array. More...
 
subroutine read_dbl_array (this, line, lloc, istart, istop, iout, in, darray, aname)
 Read a double precision array. More...
 
subroutine fill_int_array (this, ibuff1, ibuff2)
 Fill an integer array. More...
 
subroutine fill_dbl_array (this, buff1, buff2)
 Fill a double precision array. More...
 
subroutine read_list (this, line_reader, in, iout, iprpak, nlist, inamedbound, iauxmultcol, nodelist, rlist, auxvar, auxname, boundname, label, pkgname, tsManager, iscloc, indxconvertflux)
 Read a list using the list reader. More...
 
subroutine read_layer_array (this, nodelist, darray, ncolbnd, maxbnd, icolbnd, aname, inunit, iout)
 Read a 2d double array into col icolbnd of darray. More...
 
subroutine record_array (this, darray, iout, iprint, idataun, aname, cdatafmp, nvaluesp, nwidthp, editdesc, dinact)
 Record a double precision array. More...
 
subroutine record_connection_array (this, flowja, ibinun, iout)
 Record a connection-based double precision array. More...
 
subroutine noder_to_string (this, noder, str)
 Convert reduced node number to string (nodenumber), (k,j) or (k,i,j) More...
 
subroutine noder_to_array (this, noder, arr)
 Convert reduced node number to array (nodenumber), (k,j) or (k,i,j) More...
 
subroutine record_srcdst_list_header (this, text, textmodel, textpackage, dstmodel, dstpackage, naux, auxtxt, ibdchn, nlist, iout)
 Record list header for imeth=6. More...
 
subroutine record_srcdst_list_entry (this, ibdchn, noder, noder2, q, naux, aux, olconv, olconv2)
 Record list header. More...
 
subroutine nlarray_to_nodelist (this, darray, nodelist, maxbnd, nbound, aname)
 Convert an integer array to nodelist. More...
 
subroutine highest_active (this, n, ibound)
 Find the first highest active cell beneath cell n. More...
 
real(dp) function get_area (this, node)
 Return the cell area for the given node. More...
 
real(dp) function get_area_factor (this, node, idx_conn)
 @ brief Calculate the area factor for the cell connection More...
 
subroutine get_flow_width (this, n, m, idx_conn, width_n, width_m)
 @ brief Calculate the flow width between two cells More...
 
logical(lgp) function is_3d (this)
 @Brief return true if grid is three dimensional More...
 
logical(lgp) function is_2d (this)
 @Brief return true if grid is two dimensional More...
 
logical(lgp) function is_1d (this)
 @Brief return true if grid is one dimensional More...
 

Function/Subroutine Documentation

◆ allocate_arrays()

subroutine basedismodule::allocate_arrays ( class(disbasetype this)
private

Definition at line 451 of file DiscretizationBase.f90.

452  class(DisBaseType) :: this
453  integer :: isize
454  !
455  ! -- Allocate
456  call mem_allocate(this%mshape, this%ndim, 'MSHAPE', this%memoryPath)
457  call mem_allocate(this%xc, this%nodes, 'XC', this%memoryPath)
458  call mem_allocate(this%yc, this%nodes, 'YC', this%memoryPath)
459  call mem_allocate(this%top, this%nodes, 'TOP', this%memoryPath)
460  call mem_allocate(this%bot, this%nodes, 'BOT', this%memoryPath)
461  call mem_allocate(this%area, this%nodes, 'AREA', this%memoryPath)
462  !
463  ! -- Initialize
464  this%mshape(1) = this%nodes
465  !
466  ! -- Determine size of buff memory
467  if (this%nodes < this%nodesuser) then
468  isize = this%nodesuser
469  else
470  isize = this%nodes
471  end if
472  !
473  ! -- Allocate the arrays
474  call mem_allocate(this%dbuff, isize, 'DBUFF', this%name_model)
475  call mem_allocate(this%ibuff, isize, 'IBUFF', this%name_model)

◆ allocate_scalars()

subroutine basedismodule::allocate_scalars ( class(disbasetype this,
character(len=*), intent(in)  name_model,
character(len=*), intent(in)  input_mempath 
)

Definition at line 399 of file DiscretizationBase.f90.

400  ! -- dummy
401  class(DisBaseType) :: this
402  character(len=*), intent(in) :: name_model
403  character(len=*), intent(in) :: input_mempath
404  logical(LGP) :: found
405  !
406  ! -- Create memory path
407  this%memoryPath = create_mem_path(name_model, 'DIS')
408  !
409  ! -- Allocate
410  allocate (this%name_model)
411  allocate (this%input_fname)
412  !
413  call mem_allocate(this%inunit, 'INUNIT', this%memoryPath)
414  call mem_allocate(this%iout, 'IOUT', this%memoryPath)
415  call mem_allocate(this%nodes, 'NODES', this%memoryPath)
416  call mem_allocate(this%nodesuser, 'NODESUSER', this%memoryPath)
417  call mem_allocate(this%ndim, 'NDIM', this%memoryPath)
418  call mem_allocate(this%icondir, 'ICONDIR', this%memoryPath)
419  call mem_allocate(this%nogrb, 'NOGRB', this%memoryPath)
420  call mem_allocate(this%xorigin, 'XORIGIN', this%memoryPath)
421  call mem_allocate(this%yorigin, 'YORIGIN', this%memoryPath)
422  call mem_allocate(this%angrot, 'ANGROT', this%memoryPath)
423  call mem_allocate(this%nja, 'NJA', this%memoryPath)
424  call mem_allocate(this%njas, 'NJAS', this%memoryPath)
425  call mem_allocate(this%lenuni, 'LENUNI', this%memoryPath)
426  !
427  ! -- Initialize
428  this%name_model = name_model
429  this%input_mempath = input_mempath
430  this%input_fname = ''
431  this%inunit = 0
432  this%iout = 0
433  this%nodes = 0
434  this%nodesuser = 0
435  this%ndim = 1
436  this%icondir = 1
437  this%nogrb = 0
438  this%xorigin = dzero
439  this%yorigin = dzero
440  this%angrot = dzero
441  this%nja = 0
442  this%njas = 0
443  this%lenuni = 0
444  !
445  ! -- update input filename
446  call mem_set_value(this%input_fname, 'INPUT_FNAME', &
447  this%input_mempath, found)
Here is the call graph for this function:

◆ connection_normal()

subroutine basedismodule::connection_normal ( class(disbasetype this,
integer(i4b), intent(in)  noden,
integer(i4b), intent(in)  nodem,
integer(i4b), intent(in)  ihc,
real(dp), intent(inout)  xcomp,
real(dp), intent(inout)  ycomp,
real(dp), intent(inout)  zcomp,
integer(i4b), intent(in)  ipos 
)
private
Parameters
[in]nodencell (reduced nn)
[in]nodemneighbor (reduced nn)
[in]ihchorizontal connection flag

Definition at line 314 of file DiscretizationBase.f90.

316  class(DisBaseType) :: this
317  integer(I4B), intent(in) :: noden !< cell (reduced nn)
318  integer(I4B), intent(in) :: nodem !< neighbor (reduced nn)
319  integer(I4B), intent(in) :: ihc !< horizontal connection flag
320  real(DP), intent(inout) :: xcomp
321  real(DP), intent(inout) :: ycomp
322  real(DP), intent(inout) :: zcomp
323  integer(I4B), intent(in) :: ipos
324 
325  call store_error('Programmer error: connection_normal must be overridden', &
326  terminate=.true.)
Here is the call graph for this function:

◆ connection_vector()

subroutine basedismodule::connection_vector ( class(disbasetype this,
integer(i4b), intent(in)  noden,
integer(i4b), intent(in)  nodem,
logical, intent(in)  nozee,
real(dp), intent(in)  satn,
real(dp), intent(in)  satm,
integer(i4b), intent(in)  ihc,
real(dp), intent(inout)  xcomp,
real(dp), intent(inout)  ycomp,
real(dp), intent(inout)  zcomp,
real(dp), intent(inout)  conlen 
)
private
Parameters
[in]nodencell (reduced nn)
[in]nodemneighbor (reduced nn)
[in]ihchorizontal connection flag

Definition at line 332 of file DiscretizationBase.f90.

334  class(DisBaseType) :: this
335  integer(I4B), intent(in) :: noden !< cell (reduced nn)
336  integer(I4B), intent(in) :: nodem !< neighbor (reduced nn)
337  logical, intent(in) :: nozee
338  real(DP), intent(in) :: satn
339  real(DP), intent(in) :: satm
340  integer(I4B), intent(in) :: ihc !< horizontal connection flag
341  real(DP), intent(inout) :: xcomp
342  real(DP), intent(inout) :: ycomp
343  real(DP), intent(inout) :: zcomp
344  real(DP), intent(inout) :: conlen
345 
346  call store_error('Programmer error: connection_vector must be overridden', &
347  terminate=.true.)
Here is the call graph for this function:

◆ dis_ac()

subroutine basedismodule::dis_ac ( class(disbasetype this,
integer(i4b), intent(in)  moffset,
type(sparsematrix), intent(inout)  sparse 
)
private

Definition at line 134 of file DiscretizationBase.f90.

135  ! -- modules
136  use sparsemodule, only: sparsematrix
137  ! -- dummy
138  class(DisBaseType) :: this
139  integer(I4B), intent(in) :: moffset
140  type(sparsematrix), intent(inout) :: sparse
141  ! -- local
142  integer(I4B) :: i, j, ipos, iglo, jglo
143  !
144  do i = 1, this%nodes
145  do ipos = this%con%ia(i), this%con%ia(i + 1) - 1
146  j = this%con%ja(ipos)
147  iglo = i + moffset
148  jglo = j + moffset
149  call sparse%addconnection(iglo, jglo, 1)
150  end do
151  end do

◆ dis_ar()

subroutine basedismodule::dis_ar ( class(disbasetype this,
integer(i4b), dimension(:), intent(in)  icelltype 
)
private

Definition at line 175 of file DiscretizationBase.f90.

176  ! -- dummy
177  class(DisBaseType) :: this
178  integer(I4B), dimension(:), intent(in) :: icelltype
179  ! -- local
180  integer(I4B), dimension(:), allocatable :: ict
181  integer(I4B) :: nu, nr
182  !
183  ! -- Expand icelltype to full grid; fill with 0 if cell is excluded
184  allocate (ict(this%nodesuser))
185  do nu = 1, this%nodesuser
186  nr = this%get_nodenumber(nu, 0)
187  if (nr > 0) then
188  ict(nu) = icelltype(nr)
189  else
190  ict(nu) = 0
191  end if
192  end do
193  !
194  if (this%nogrb == 0) call this%write_grb(ict)

◆ dis_da()

subroutine basedismodule::dis_da ( class(disbasetype this)
private

Definition at line 206 of file DiscretizationBase.f90.

207  ! -- modules
209  ! -- dummy
210  class(DisBaseType) :: this
211  !
212  ! -- Strings
213  deallocate (this%name_model)
214  deallocate (this%input_fname)
215  !
216  ! -- Scalars
217  call mem_deallocate(this%inunit)
218  call mem_deallocate(this%iout)
219  call mem_deallocate(this%nodes)
220  call mem_deallocate(this%nodesuser)
221  call mem_deallocate(this%ndim)
222  call mem_deallocate(this%icondir)
223  call mem_deallocate(this%nogrb)
224  call mem_deallocate(this%xorigin)
225  call mem_deallocate(this%yorigin)
226  call mem_deallocate(this%angrot)
227  call mem_deallocate(this%nja)
228  call mem_deallocate(this%njas)
229  call mem_deallocate(this%lenuni)
230  !
231  ! -- Arrays
232  call mem_deallocate(this%mshape)
233  call mem_deallocate(this%xc)
234  call mem_deallocate(this%yc)
235  call mem_deallocate(this%top)
236  call mem_deallocate(this%bot)
237  call mem_deallocate(this%area)
238  call mem_deallocate(this%dbuff)
239  call mem_deallocate(this%ibuff)
240  !
241  ! -- Connections
242  call this%con%con_da()
243  deallocate (this%con)

◆ dis_df()

subroutine basedismodule::dis_df ( class(disbasetype this)
private

Definition at line 127 of file DiscretizationBase.f90.

128  class(DisBaseType) :: this
129  call store_error('Programmer error: dis_df must be overridden', &
130  terminate=.true.)
Here is the call graph for this function:

◆ dis_mc()

subroutine basedismodule::dis_mc ( class(disbasetype this,
integer(i4b), intent(in)  moffset,
integer(i4b), dimension(:), intent(inout)  idxglo,
class(matrixbasetype), pointer  matrix_sln 
)

Definition at line 155 of file DiscretizationBase.f90.

156  ! -- dummy
157  class(DisBaseType) :: this
158  integer(I4B), intent(in) :: moffset
159  integer(I4B), dimension(:), intent(inout) :: idxglo
160  class(MatrixBaseType), pointer :: matrix_sln
161  ! -- local
162  integer(I4B) :: i, j, ipos, iglo, jglo
163  !
164  do i = 1, this%nodes
165  iglo = i + moffset
166  do ipos = this%con%ia(i), this%con%ia(i + 1) - 1
167  j = this%con%ja(ipos)
168  jglo = j + moffset
169  idxglo(ipos) = matrix_sln%get_position(iglo, jglo)
170  end do
171  end do

◆ dis_transform_xy()

subroutine, public basedismodule::dis_transform_xy ( real(dp), intent(in)  x,
real(dp), intent(in)  y,
real(dp), intent(in)  xorigin,
real(dp), intent(in)  yorigin,
real(dp), intent(in)  angrot,
real(dp), intent(out)  xglo,
real(dp), intent(out)  yglo 
)
Parameters
[in]xthe cell-x coordinate to transform
[in]ythe cell-y coordinate to transform
[in]xoriginthe cell-y coordinate to transform
[in]yoriginthe cell-y coordinate to transform
[in]angrotthe cell-y coordinate to transform
[out]xglothe global cell-x coordinate
[out]yglothe global cell-y coordinate

Definition at line 351 of file DiscretizationBase.f90.

352  real(DP), intent(in) :: x !< the cell-x coordinate to transform
353  real(DP), intent(in) :: y !< the cell-y coordinate to transform
354  real(DP), intent(in) :: xorigin !< the cell-y coordinate to transform
355  real(DP), intent(in) :: yorigin !< the cell-y coordinate to transform
356  real(DP), intent(in) :: angrot !< the cell-y coordinate to transform
357  real(DP), intent(out) :: xglo !< the global cell-x coordinate
358  real(DP), intent(out) :: yglo !< the global cell-y coordinate
359  ! local
360  real(DP) :: ang
361 
362  xglo = x
363  yglo = y
364 
365  ! first _rotate_ to 'real world'
366  ang = angrot * dpio180
367  if (ang /= dzero) then
368  xglo = x * cos(ang) - y * sin(ang)
369  yglo = x * sin(ang) + y * cos(ang)
370  end if
371 
372  ! then _translate_
373  xglo = xglo + xorigin
374  yglo = yglo + yorigin
Here is the caller graph for this function:

◆ fill_dbl_array()

subroutine basedismodule::fill_dbl_array ( class(disbasetype), intent(inout)  this,
real(dp), dimension(:), intent(in), pointer, contiguous  buff1,
real(dp), dimension(:), intent(inout), pointer, contiguous  buff2 
)
private

Definition at line 734 of file DiscretizationBase.f90.

735  ! -- dummy
736  class(DisBaseType), intent(inout) :: this
737  real(DP), dimension(:), pointer, contiguous, intent(in) :: buff1
738  real(DP), dimension(:), pointer, contiguous, intent(inout) :: buff2
739  ! -- local
740  integer(I4B) :: nodeu
741  integer(I4B) :: noder
742 
743  do nodeu = 1, this%nodesuser
744  noder = this%get_nodenumber(nodeu, 0)
745  if (noder <= 0) cycle
746  buff2(noder) = buff1(nodeu)
747  end do
Here is the caller graph for this function:

◆ fill_int_array()

subroutine basedismodule::fill_int_array ( class(disbasetype), intent(inout)  this,
integer(i4b), dimension(:), intent(in), pointer, contiguous  ibuff1,
integer(i4b), dimension(:), intent(inout), pointer, contiguous  ibuff2 
)
private

Definition at line 717 of file DiscretizationBase.f90.

718  ! -- dummy
719  class(DisBaseType), intent(inout) :: this
720  integer(I4B), dimension(:), pointer, contiguous, intent(in) :: ibuff1
721  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: ibuff2
722  ! -- local
723  integer(I4B) :: nodeu
724  integer(I4B) :: noder
725 
726  do nodeu = 1, this%nodesuser
727  noder = this%get_nodenumber(nodeu, 0)
728  if (noder <= 0) cycle
729  ibuff2(noder) = ibuff1(nodeu)
730  end do
Here is the caller graph for this function:

◆ get_area()

real(dp) function basedismodule::get_area ( class(disbasetype this,
integer(i4b), intent(in)  node 
)
private
Parameters
[in]nodereduced node number

Definition at line 1106 of file DiscretizationBase.f90.

1107  class(DisBaseType) :: this
1108  integer(I4B), intent(in) :: node !< reduced node number
1109  real(DP) :: area
1110 
1111  area = this%area(node)

◆ get_area_factor()

real(dp) function basedismodule::get_area_factor ( class(disbasetype this,
integer(i4b), intent(in)  node,
integer(i4b), intent(in)  idx_conn 
)
private

Function calculates the area factor for the cell connection. The sum of all area factors for all cell connections to overlying or underlying cells cells will be 1.

TODO: confirm that this works for cells that are only partially covered by overlying or underlying cells.

Returns
connection cell area factor
Parameters
[in]nodecell node number
[in]idx_connconnection index

Definition at line 1123 of file DiscretizationBase.f90.

1124  ! -- return
1125  real(DP) :: area_factor !< connection cell area factor
1126  ! -- dummy
1127  class(DisBaseType) :: this
1128  integer(I4B), intent(in) :: node !< cell node number
1129  integer(I4B), intent(in) :: idx_conn !< connection index
1130  ! -- local
1131  real(DP) :: area_node
1132  real(DP) :: area_conn
1133  !
1134  ! -- calculate the cell area fraction
1135  area_node = this%area(node)
1136  area_conn = this%con%hwva(idx_conn)
1137  !
1138  ! -- return the cell area factor
1139  area_factor = area_conn / area_node

◆ get_cell_volume()

real(dp) function basedismodule::get_cell_volume ( class(disbasetype this,
integer(i4b), intent(in)  n,
real(dp), intent(in)  x 
)
private

Definition at line 647 of file DiscretizationBase.f90.

648  ! -- return
649  real(DP) :: get_cell_volume
650  ! -- dummy
651  class(DisBaseType) :: this
652  integer(I4B), intent(in) :: n
653  real(DP), intent(in) :: x
654  ! -- local
655  real(DP) :: tp
656  real(DP) :: bt
657  real(DP) :: sat
658  real(DP) :: thick
659 
660  get_cell_volume = dzero
661  tp = this%top(n)
662  bt = this%bot(n)
663  sat = squadraticsaturation(tp, bt, x)
664  thick = (tp - bt) * sat
665  get_cell_volume = this%area(n) * thick
Here is the call graph for this function:

◆ get_dis_enum()

integer(i4b) function basedismodule::get_dis_enum ( class(disbasetype), intent(in)  this)
private

Definition at line 388 of file DiscretizationBase.f90.

389  use constantsmodule, only: disundef
390  class(DisBaseType), intent(in) :: this
391  integer(I4B) :: dis_enum
392 
393  dis_enum = disundef
394  call store_error('Programmer error: get_dis_enum must be overridden', &
395  terminate=.true.)
This module contains simulation constants.
Definition: Constants.f90:9
@ disundef
undefined discretization
Definition: Constants.f90:153
Here is the call graph for this function:

◆ get_dis_type()

subroutine basedismodule::get_dis_type ( class(disbasetype), intent(in)  this,
character(len=*), intent(out)  dis_type 
)
private

Definition at line 378 of file DiscretizationBase.f90.

379  class(DisBaseType), intent(in) :: this
380  character(len=*), intent(out) :: dis_type
381 
382  dis_type = "Not implemented"
383  call store_error('Programmer error: get_dis_type must be overridden', &
384  terminate=.true.)
Here is the call graph for this function:

◆ get_flow_width()

subroutine basedismodule::get_flow_width ( class(disbasetype this,
integer(i4b), intent(in)  n,
integer(i4b), intent(in)  m,
integer(i4b), intent(in)  idx_conn,
real(dp), intent(out)  width_n,
real(dp), intent(out)  width_m 
)
private

This should only be called for connections with IHC > 0. Routine is needed, so it can be overridden by the linear network discretization, which allows for a separate flow

Parameters
[in]ncell node number
[in]mcell node number
[in]idx_connconnection index
[out]width_nflow width for cell n
[out]width_mflow width for cell m

Definition at line 1149 of file DiscretizationBase.f90.

1150  ! dummy
1151  class(DisBaseType) :: this
1152  integer(I4B), intent(in) :: n !< cell node number
1153  integer(I4B), intent(in) :: m !< cell node number
1154  integer(I4B), intent(in) :: idx_conn !< connection index
1155  real(DP), intent(out) :: width_n !< flow width for cell n
1156  real(DP), intent(out) :: width_m !< flow width for cell m
1157  ! local
1158  integer(I4B) :: isympos
1159 
1160  ! For general case, width_n = width_m
1161  isympos = this%con%jas(idx_conn)
1162  width_n = this%con%hwva(isympos)
1163  width_m = width_n
1164 

◆ get_ncpl()

integer(i4b) function basedismodule::get_ncpl ( class(disbasetype this)
private

Definition at line 638 of file DiscretizationBase.f90.

639  integer(I4B) :: get_ncpl
640  class(DisBaseType) :: this
641  get_ncpl = 0
642  call store_error('Programmer error: get_ncpl must be overridden', &
643  terminate=.true.)
Here is the call graph for this function:

◆ get_nodenumber_idx1()

integer(i4b) function basedismodule::get_nodenumber_idx1 ( class(disbasetype), intent(in)  this,
integer(i4b), intent(in)  nodeu,
integer(i4b), intent(in)  icheck 
)
private

Definition at line 279 of file DiscretizationBase.f90.

280  class(DisBaseType), intent(in) :: this
281  integer(I4B), intent(in) :: nodeu
282  integer(I4B), intent(in) :: icheck
283  integer(I4B) :: nodenumber
284 
285  nodenumber = 0
286  call store_error('Programmer error: get_nodenumber_idx1 must be overridden', &
287  terminate=.true.)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_nodenumber_idx2()

integer(i4b) function basedismodule::get_nodenumber_idx2 ( class(disbasetype), intent(in)  this,
integer(i4b), intent(in)  k,
integer(i4b), intent(in)  j,
integer(i4b), intent(in)  icheck 
)
private

Definition at line 290 of file DiscretizationBase.f90.

291  class(DisBaseType), intent(in) :: this
292  integer(I4B), intent(in) :: k, j
293  integer(I4B), intent(in) :: icheck
294  integer(I4B) :: nodenumber
295 
296  nodenumber = 0
297  call store_error('Programmer error: get_nodenumber_idx2 must be overridden', &
298  terminate=.true.)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_nodenumber_idx3()

integer(i4b) function basedismodule::get_nodenumber_idx3 ( class(disbasetype), intent(in)  this,
integer(i4b), intent(in)  k,
integer(i4b), intent(in)  i,
integer(i4b), intent(in)  j,
integer(i4b), intent(in)  icheck 
)
private

Definition at line 301 of file DiscretizationBase.f90.

302  class(DisBaseType), intent(in) :: this
303  integer(I4B), intent(in) :: k, i, j
304  integer(I4B), intent(in) :: icheck
305  integer(I4B) :: nodenumber
306 
307  nodenumber = 0
308  call store_error('Programmer error: get_nodenumber_idx3 must be overridden', &
309  terminate=.true.)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_nodeuser()

integer(i4b) function basedismodule::get_nodeuser ( class(disbasetype this,
integer(i4b), intent(in)  noder 
)
private

Definition at line 267 of file DiscretizationBase.f90.

268  class(DisBaseType) :: this
269  integer(I4B), intent(in) :: noder
270  integer(I4B) :: nodenumber
271 
272  if (this%nodes < this%nodesuser) then
273  nodenumber = this%nodeuser(noder)
274  else
275  nodenumber = noder
276  end if

◆ get_polyverts()

subroutine basedismodule::get_polyverts ( class(disbasetype), intent(inout)  this,
integer(i4b), intent(in)  ic,
real(dp), dimension(:, :), intent(out), allocatable  polyverts,
logical(lgp), intent(in), optional  closed 
)
private
Parameters
[in]iccell number (reduced)
[out]polyvertspolygon vertices (column-major indexing)
[in]closedwhether to close the polygon, duplicating a vertex

Definition at line 670 of file DiscretizationBase.f90.

671  class(DisBaseType), intent(inout) :: this
672  integer(I4B), intent(in) :: ic !< cell number (reduced)
673  real(DP), allocatable, intent(out) :: polyverts(:, :) !< polygon vertices (column-major indexing)
674  logical(LGP), intent(in), optional :: closed !< whether to close the polygon, duplicating a vertex
675 
676  errmsg = 'Programmer error: get_polyverts must be overridden'
677  call store_error(errmsg, terminate=.true.)
Here is the call graph for this function:

◆ highest_active()

subroutine basedismodule::highest_active ( class(disbasetype this,
integer(i4b), intent(inout)  n,
integer(i4b), dimension(:), intent(in)  ibound 
)
private

Definition at line 1068 of file DiscretizationBase.f90.

1069  ! -- dummy
1070  class(DisBaseType) :: this
1071  integer(I4B), intent(inout) :: n
1072  integer(I4B), dimension(:), intent(in) :: ibound
1073  ! -- locals
1074  integer(I4B) :: m, ii, iis
1075  logical done, bottomcell
1076  !
1077  ! -- Loop through connected cells until the highest active one (including a
1078  ! constant head cell) is found. Return that cell as n.
1079  done = .false.
1080  do while (.not. done)
1081  bottomcell = .true.
1082  cloop: do ii = this%con%ia(n) + 1, this%con%ia(n + 1) - 1
1083  m = this%con%ja(ii)
1084  iis = this%con%jas(ii)
1085  if (this%con%ihc(iis) == 0 .and. m > n) then
1086  !
1087  ! -- this cannot be a bottom cell
1088  bottomcell = .false.
1089  !
1090  ! -- vertical down
1091  if (ibound(m) /= 0) then
1092  n = m
1093  done = .true.
1094  exit cloop
1095  else
1096  n = m
1097  exit cloop
1098  end if
1099  end if
1100  end do cloop
1101  if (bottomcell) done = .true.
1102  end do

◆ is_1d()

logical(lgp) function basedismodule::is_1d ( class(disbasetype this)
private

Definition at line 1194 of file DiscretizationBase.f90.

1195  ! dummy
1196  class(DisBaseType) :: this
1197  ! return
1198  logical(LGP) :: r
1199  r = .false.
1200  select case (this%get_dis_enum())
1201  case (dis1d, disv1d, disu1d)
1202  r = .true.
1203  end select

◆ is_2d()

logical(lgp) function basedismodule::is_2d ( class(disbasetype this)
private

Definition at line 1181 of file DiscretizationBase.f90.

1182  ! dummy
1183  class(DisBaseType) :: this
1184  ! return
1185  logical(LGP) :: r
1186  r = .false.
1187  select case (this%get_dis_enum())
1188  case (dis2d, disv2d, disu2d)
1189  r = .true.
1190  end select

◆ is_3d()

logical(lgp) function basedismodule::is_3d ( class(disbasetype this)
private

Definition at line 1168 of file DiscretizationBase.f90.

1169  ! dummy
1170  class(DisBaseType) :: this
1171  ! return
1172  logical(LGP) :: r
1173  r = .false.
1174  select case (this%get_dis_enum())
1175  case (dis, disv, disu)
1176  r = .true.
1177  end select

◆ nlarray_to_nodelist()

subroutine basedismodule::nlarray_to_nodelist ( class(disbasetype this,
integer(i4b), dimension(:), pointer, contiguous  darray,
integer(i4b), dimension(maxbnd), intent(inout)  nodelist,
integer(i4b), intent(in)  maxbnd,
integer(i4b), intent(inout)  nbound,
character(len=*), intent(in)  aname 
)
private

For DIS/DISV, the array is layer number, for DISU it's node number.

Definition at line 1055 of file DiscretizationBase.f90.

1056  class(DisBaseType) :: this
1057  integer(I4B), intent(in) :: maxbnd
1058  integer(I4B), dimension(:), pointer, contiguous :: darray
1059  integer(I4B), dimension(maxbnd), intent(inout) :: nodelist
1060  integer(I4B), intent(inout) :: nbound
1061  character(len=*), intent(in) :: aname
1062 
1063  errmsg = 'Programmer error: nlarray_to_nodelist must be overridden'
1064  call store_error(errmsg, terminate=.true.)
Here is the call graph for this function:

◆ noder_from_cellid()

integer(i4b) function basedismodule::noder_from_cellid ( class(disbasetype this,
character(len=*), intent(inout)  cellid,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout,
logical, intent(in), optional  flag_string,
logical, intent(in), optional  allow_zero 
)
private

If flag_string argument is present and true, the first token in string is allowed to be a string (e.g. boundary name). In this case, if a string is encountered, return value as -2. If allow_zero argument is present and true, if all indices equal zero, the result can be zero. If allow_zero is false, a zero in any index is an error.

Definition at line 582 of file DiscretizationBase.f90.

584  ! -- return
585  integer(I4B) :: noder
586  ! -- dummy
587  class(DisBaseType) :: this
588  character(len=*), intent(inout) :: cellid
589  integer(I4B), intent(in) :: inunit
590  integer(I4B), intent(in) :: iout
591  logical, optional, intent(in) :: flag_string
592  logical, optional, intent(in) :: allow_zero
593  ! -- local
594  integer(I4B) :: nodeu
595  logical :: allowzerolocal
596  character(len=LINELENGTH) :: nodestr
597  logical :: flag_string_local
598  !
599  if (present(flag_string)) then
600  flag_string_local = flag_string
601  else
602  flag_string_local = .false.
603  end if
604  if (present(allow_zero)) then
605  allowzerolocal = allow_zero
606  else
607  allowzerolocal = .false.
608  end if
609  !
610  nodeu = this%nodeu_from_cellid(cellid, inunit, iout, flag_string_local, &
611  allowzerolocal)
612  !
613  ! -- Convert user-based nodenumber to reduced node number
614  if (nodeu > 0) then
615  noder = this%get_nodenumber(nodeu, 0)
616  else
617  noder = nodeu
618  end if
619  if (noder <= 0 .and. .not. flag_string_local) then
620  call this%nodeu_to_string(nodeu, nodestr)
621  write (errmsg, *) &
622  ' Cell is outside active grid domain: '// &
623  trim(adjustl(nodestr))
624  call store_error(errmsg)
625  end if
Here is the call graph for this function:

◆ noder_from_string()

integer(i4b) function basedismodule::noder_from_string ( class(disbasetype this,
integer(i4b), intent(inout)  lloc,
integer(i4b), intent(inout)  istart,
integer(i4b), intent(inout)  istop,
integer(i4b), intent(in)  in,
integer(i4b), intent(in)  iout,
character(len=*), intent(inout)  line,
logical, intent(in), optional  flag_string 
)
private

If the model is unstructured; just read user nodenumber. If flag_string argument is present and true, the first token in string is allowed to be a string (e.g. boundary name). In this case, if a string is encountered, return value as -2.

Definition at line 534 of file DiscretizationBase.f90.

536  ! -- dummy
537  class(DisBaseType) :: this
538  integer(I4B), intent(inout) :: lloc
539  integer(I4B), intent(inout) :: istart
540  integer(I4B), intent(inout) :: istop
541  integer(I4B), intent(in) :: in
542  integer(I4B), intent(in) :: iout
543  character(len=*), intent(inout) :: line
544  logical, optional, intent(in) :: flag_string
545  integer(I4B) :: noder
546  ! -- local
547  integer(I4B) :: nodeu
548  character(len=LINELENGTH) :: nodestr
549  logical :: flag_string_local
550  !
551  if (present(flag_string)) then
552  flag_string_local = flag_string
553  else
554  flag_string_local = .false.
555  end if
556  nodeu = this%nodeu_from_string(lloc, istart, istop, in, iout, line, &
557  flag_string_local)
558  !
559  ! -- Convert user-based nodenumber to reduced node number
560  if (nodeu > 0) then
561  noder = this%get_nodenumber(nodeu, 0)
562  else
563  noder = nodeu
564  end if
565  if (noder <= 0 .and. .not. flag_string_local) then
566  call this%nodeu_to_string(nodeu, nodestr)
567  write (errmsg, *) &
568  ' Cell is outside active grid domain: '// &
569  trim(adjustl(nodestr))
570  call store_error(errmsg)
571  end if
Here is the call graph for this function:

◆ noder_to_array()

subroutine basedismodule::noder_to_array ( class(disbasetype this,
integer(i4b), intent(in)  noder,
integer(i4b), dimension(:), intent(inout)  arr 
)
private

Definition at line 976 of file DiscretizationBase.f90.

977  ! -- dummy
978  class(DisBaseType) :: this
979  integer(I4B), intent(in) :: noder
980  integer(I4B), dimension(:), intent(inout) :: arr
981  ! -- local
982  integer(I4B) :: nodeu
983 
984  nodeu = this%get_nodeuser(noder)
985  call this%nodeu_to_array(nodeu, arr)

◆ noder_to_string()

subroutine basedismodule::noder_to_string ( class(disbasetype this,
integer(i4b), intent(in)  noder,
character(len=*), intent(inout)  str 
)
private

Definition at line 963 of file DiscretizationBase.f90.

964  ! -- dummy
965  class(DisBaseType) :: this
966  integer(I4B), intent(in) :: noder
967  character(len=*), intent(inout) :: str
968  ! -- local
969  integer(I4B) :: nodeu
970 
971  nodeu = this%get_nodeuser(noder)
972  call this%nodeu_to_string(nodeu, str)

◆ nodeu_from_cellid()

integer(i4b) function basedismodule::nodeu_from_cellid ( class(disbasetype this,
character(len=*), intent(inout)  cellid,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout,
logical, intent(in), optional  flag_string,
logical, intent(in), optional  allow_zero 
)
private

If flag_string is present and true, the first token may be non-numeric (e.g. boundary name). In this case, return -2.

If allow_zero is present and true, and all indices are zero, the result can be zero. If allow_zero is false, a zero in any index is an error.

Definition at line 511 of file DiscretizationBase.f90.

513  ! -- dummy
514  class(DisBaseType) :: this
515  character(len=*), intent(inout) :: cellid
516  integer(I4B), intent(in) :: inunit
517  integer(I4B), intent(in) :: iout
518  logical, optional, intent(in) :: flag_string
519  logical, optional, intent(in) :: allow_zero
520  integer(I4B) :: nodeu
521 
522  nodeu = 0
523  call store_error('Programmer error: nodeu_from_cellid must be overridden', &
524  terminate=.true.)
Here is the call graph for this function:

◆ nodeu_from_string()

integer(i4b) function basedismodule::nodeu_from_string ( class(disbasetype this,
integer(i4b), intent(inout)  lloc,
integer(i4b), intent(inout)  istart,
integer(i4b), intent(inout)  istop,
integer(i4b), intent(in)  in,
integer(i4b), intent(in)  iout,
character(len=*), intent(inout)  line,
logical, intent(in), optional  flag_string,
logical, intent(in), optional  allow_zero 
)
private

If DIS or DISV, read indices. If DISU, read user node number directly. If flag_string is present and true, the first token may be non-numeric (e.g. boundary name). In this case, return -2.

Definition at line 484 of file DiscretizationBase.f90.

486  ! -- dummy
487  class(DisBaseType) :: this
488  integer(I4B), intent(inout) :: lloc
489  integer(I4B), intent(inout) :: istart
490  integer(I4B), intent(inout) :: istop
491  integer(I4B), intent(in) :: in
492  integer(I4B), intent(in) :: iout
493  character(len=*), intent(inout) :: line
494  logical, optional, intent(in) :: flag_string
495  logical, optional, intent(in) :: allow_zero
496  integer(I4B) :: nodeu
497 
498  nodeu = 0
499  call store_error('Programmer error: nodeu_from_string must be overridden', &
500  terminate=.true.)
Here is the call graph for this function:

◆ nodeu_to_array()

subroutine basedismodule::nodeu_to_array ( class(disbasetype this,
integer(i4b), intent(in)  nodeu,
integer(i4b), dimension(:), intent(inout)  arr 
)
private

Definition at line 257 of file DiscretizationBase.f90.

258  class(DisBaseType) :: this
259  integer(I4B), intent(in) :: nodeu
260  integer(I4B), dimension(:), intent(inout) :: arr
261 
262  call store_error('Programmer error: nodeu_to_array must be overridden', &
263  terminate=.true.)
Here is the call graph for this function:

◆ nodeu_to_string()

subroutine basedismodule::nodeu_to_string ( class(disbasetype this,
integer(i4b), intent(in)  nodeu,
character(len=*), intent(inout)  str 
)

Definition at line 247 of file DiscretizationBase.f90.

248  class(DisBaseType) :: this
249  integer(I4B), intent(in) :: nodeu
250  character(len=*), intent(inout) :: str
251 
252  call store_error('Programmer error: nodeu_to_string must be overridden', &
253  terminate=.true.)
Here is the call graph for this function:

◆ read_dbl_array()

subroutine basedismodule::read_dbl_array ( class(disbasetype), intent(inout)  this,
character(len=*), intent(inout)  line,
integer(i4b), intent(inout)  lloc,
integer(i4b), intent(inout)  istart,
integer(i4b), intent(inout)  istop,
integer(i4b), intent(in)  iout,
integer(i4b), intent(in)  in,
real(dp), dimension(:), intent(inout), pointer, contiguous  darray,
character(len=*), intent(in)  aname 
)
private

Definition at line 699 of file DiscretizationBase.f90.

701  ! -- dummy
702  class(DisBaseType), intent(inout) :: this
703  character(len=*), intent(inout) :: line
704  integer(I4B), intent(inout) :: lloc
705  integer(I4B), intent(inout) :: istart
706  integer(I4B), intent(inout) :: istop
707  integer(I4B), intent(in) :: in
708  integer(I4B), intent(in) :: iout
709  real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray
710  character(len=*), intent(in) :: aname
711 
712  errmsg = 'Programmer error: read_dbl_array must be overridden'
713  call store_error(errmsg, terminate=.true.)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_int_array()

subroutine basedismodule::read_int_array ( class(disbasetype), intent(inout)  this,
character(len=*), intent(inout)  line,
integer(i4b), intent(inout)  lloc,
integer(i4b), intent(inout)  istart,
integer(i4b), intent(inout)  istop,
integer(i4b), intent(in)  iout,
integer(i4b), intent(in)  in,
integer(i4b), dimension(:), intent(inout), pointer, contiguous  iarray,
character(len=*), intent(in)  aname 
)
private

Definition at line 681 of file DiscretizationBase.f90.

683  ! -- dummy
684  class(DisBaseType), intent(inout) :: this
685  character(len=*), intent(inout) :: line
686  integer(I4B), intent(inout) :: lloc
687  integer(I4B), intent(inout) :: istart
688  integer(I4B), intent(inout) :: istop
689  integer(I4B), intent(in) :: in
690  integer(I4B), intent(in) :: iout
691  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: iarray
692  character(len=*), intent(in) :: aname
693 
694  errmsg = 'Programmer error: read_int_array must be overridden'
695  call store_error(errmsg, terminate=.true.)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_layer_array()

subroutine basedismodule::read_layer_array ( class(disbasetype this,
integer(i4b), dimension(maxbnd)  nodelist,
real(dp), dimension(ncolbnd, maxbnd), intent(inout)  darray,
integer(i4b), intent(in)  ncolbnd,
integer(i4b), intent(in)  maxbnd,
integer(i4b), intent(in)  icolbnd,
character(len=*), intent(in)  aname,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout 
)

For cells that are outside of the active domain, do not copy the array value into darray.

Definition at line 905 of file DiscretizationBase.f90.

907  ! -- dummy
908  class(DisBaseType) :: this
909  integer(I4B), intent(in) :: ncolbnd
910  integer(I4B), intent(in) :: maxbnd
911  integer(I4B), dimension(maxbnd) :: nodelist
912  real(DP), dimension(ncolbnd, maxbnd), intent(inout) :: darray
913  integer(I4B), intent(in) :: icolbnd
914  character(len=*), intent(in) :: aname
915  integer(I4B), intent(in) :: inunit
916  integer(I4B), intent(in) :: iout
917 
918  errmsg = 'Programmer error: read_layer_array must be overridden'
919  call store_error(errmsg, terminate=.true.)
Here is the call graph for this function:

◆ read_list()

subroutine basedismodule::read_list ( class(disbasetype this,
type(longlinereadertype), intent(inout)  line_reader,
integer(i4b), intent(in)  in,
integer(i4b), intent(in)  iout,
integer(i4b), intent(in)  iprpak,
integer(i4b), intent(inout)  nlist,
integer(i4b), intent(in)  inamedbound,
integer(i4b), intent(in)  iauxmultcol,
integer(i4b), dimension(:), intent(inout), pointer, contiguous  nodelist,
real(dp), dimension(:, :), intent(inout), pointer, contiguous  rlist,
real(dp), dimension(:, :), intent(inout), pointer, contiguous  auxvar,
character(len=lenauxname), dimension(:), intent(inout)  auxname,
character(len=lenboundname), dimension(:), intent(inout), pointer, contiguous  boundname,
character(len=*), intent(in)  label,
character(len=*), intent(in)  pkgname,
type(timeseriesmanagertype tsManager,
integer(i4b), intent(in)  iscloc,
integer(i4b), intent(in), optional  indxconvertflux 
)
private

Convert user node numbers to reduced numbers. Terminate if any nodenumbers are within an inactive domain. Set up time series and multiply by iauxmultcol if it exists. Write the list to iout if iprpak is set.

Definition at line 757 of file DiscretizationBase.f90.

761  ! -- modules
766  use inputoutputmodule, only: urword
769  ! -- dummy
770  class(DisBaseType) :: this
771  type(LongLineReaderType), intent(inout) :: line_reader
772  integer(I4B), intent(in) :: in
773  integer(I4B), intent(in) :: iout
774  integer(I4B), intent(in) :: iprpak
775  integer(I4B), intent(inout) :: nlist
776  integer(I4B), intent(in) :: inamedbound
777  integer(I4B), intent(in) :: iauxmultcol
778  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: nodelist
779  real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: rlist
780  real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: auxvar
781  character(len=LENAUXNAME), dimension(:), intent(inout) :: auxname
782  character(len=LENBOUNDNAME), dimension(:), pointer, contiguous, &
783  intent(inout) :: boundname
784  character(len=*), intent(in) :: label
785  character(len=*), intent(in) :: pkgName
786  type(TimeSeriesManagerType) :: tsManager
787  integer(I4B), intent(in) :: iscloc
788  integer(I4B), intent(in), optional :: indxconvertflux
789  ! -- local
790  integer(I4B) :: l
791  integer(I4B) :: nodeu, noder
792  character(len=LINELENGTH) :: nodestr
793  integer(I4B) :: ii, jj
794  real(DP), pointer :: bndElem => null()
795  type(ListReaderType) :: lstrdobj
796  type(TimeSeriesLinkType), pointer :: tsLinkBnd => null()
797  type(TimeSeriesLinkType), pointer :: tsLinkAux => null()
798  !
799  ! -- Read the list
800  call lstrdobj%read_list(line_reader, in, iout, nlist, inamedbound, &
801  this%mshape, nodelist, rlist, auxvar, auxname, &
802  boundname, label)
803  !
804  ! -- Go through all locations where a text string was found instead of
805  ! a double precision value and make time-series links to rlist
806  if (lstrdobj%ntxtrlist > 0) then
807  do l = 1, lstrdobj%ntxtrlist
808  ii = lstrdobj%idxtxtrow(l)
809  jj = lstrdobj%idxtxtcol(l)
810  tslinkbnd => null()
811  bndelem => rlist(jj, ii)
812  call read_value_or_time_series(lstrdobj%txtrlist(l), ii, jj, bndelem, &
813  pkgname, 'BND', tsmanager, iprpak, &
814  tslinkbnd)
815  if (associated(tslinkbnd)) then
816  !
817  ! -- If iauxmultcol is active and this column is the column
818  ! to be scaled, then assign tsLinkBnd%RMultiplier to auxvar
819  ! multiplier
820  if (iauxmultcol > 0 .and. jj == iscloc) then
821  tslinkbnd%RMultiplier => auxvar(iauxmultcol, ii)
822  end if
823  !
824  ! -- If boundaries are named, save the name in the link
825  if (lstrdobj%inamedbound == 1) then
826  tslinkbnd%BndName = lstrdobj%boundname(tslinkbnd%IRow)
827  end if
828  !
829  ! -- if the value is a flux and needs to be converted to a flow
830  ! then set the tsLinkBnd appropriately
831  if (present(indxconvertflux)) then
832  if (indxconvertflux == jj) then
833  tslinkbnd%convertflux = .true.
834  nodeu = nodelist(ii)
835  noder = this%get_nodenumber(nodeu, 0)
836  tslinkbnd%CellArea = this%get_area(noder)
837  end if
838  end if
839  !
840  end if
841  end do
842  end if
843  !
844  ! -- Make time-series substitutions for auxvar
845  if (lstrdobj%ntxtauxvar > 0) then
846  do l = 1, lstrdobj%ntxtauxvar
847  ii = lstrdobj%idxtxtauxrow(l)
848  jj = lstrdobj%idxtxtauxcol(l)
849  tslinkaux => null()
850  bndelem => auxvar(jj, ii)
851  call read_value_or_time_series(lstrdobj%txtauxvar(l), ii, jj, bndelem, &
852  pkgname, 'AUX', tsmanager, iprpak, &
853  tslinkaux)
854  if (lstrdobj%inamedbound == 1) then
855  if (associated(tslinkaux)) then
856  tslinkaux%BndName = lstrdobj%boundname(tslinkaux%IRow)
857  end if
858  end if
859  end do
860  end if
861  !
862  ! -- Multiply rlist by the multiplier column in auxvar
863  if (iauxmultcol > 0) then
864  do l = 1, nlist
865  rlist(iscloc, l) = rlist(iscloc, l) * auxvar(iauxmultcol, l)
866  end do
867  end if
868  !
869  ! -- Write the list to iout if requested
870  if (iprpak /= 0) then
871  call lstrdobj%write_list()
872  end if
873  !
874  ! -- Convert user nodenumbers to reduced nodenumbers, if necessary.
875  ! Conversion to reduced nodenumbers must be done last, after the
876  ! list is written so that correct indices are written to the list.
877  if (this%nodes < this%nodesuser) then
878  do l = 1, nlist
879  nodeu = nodelist(l)
880  noder = this%get_nodenumber(nodeu, 0)
881  if (noder <= 0) then
882  call this%nodeu_to_string(nodeu, nodestr)
883  write (errmsg, *) &
884  ' Cell is outside active grid domain: '// &
885  trim(adjustl(nodestr))
886  call store_error(errmsg)
887  end if
888  nodelist(l) = noder
889  end do
890  !
891  ! -- Check for errors and terminate if encountered
892  if (count_errors() > 0) then
893  write (errmsg, *) count_errors(), ' errors encountered.'
894  call store_error(errmsg)
895  call store_error_unit(in)
896  end if
897  end if
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
integer(i4b), parameter lenboundname
maximum length of a bound name
Definition: Constants.f90:36
subroutine, public urword(line, icol, istart, istop, ncode, n, r, iout, in)
Extract a word from a string.
Generic List Reader Module.
Definition: ListReader.f90:3
This module contains the LongLineReaderType.
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition: Sim.f90:92
integer(i4b) function, public count_errors()
Return number of errors.
Definition: Sim.f90:59
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.
Definition: Sim.f90:168
subroutine, public read_value_or_time_series(textInput, ii, jj, bndElem, pkgName, auxOrBnd, tsManager, iprpak, tsLink)
Call this subroutine if the time-series link is available or needed.
Here is the call graph for this function:

◆ record_array()

subroutine basedismodule::record_array ( class(disbasetype), intent(inout)  this,
real(dp), dimension(:), intent(inout), pointer, contiguous  darray,
integer(i4b), intent(in)  iout,
integer(i4b), intent(in)  iprint,
integer(i4b), intent(in)  idataun,
character(len=*), intent(in)  aname,
character(len=*), intent(in)  cdatafmp,
integer(i4b), intent(in)  nvaluesp,
integer(i4b), intent(in)  nwidthp,
character(len=*), intent(in)  editdesc,
real(dp), intent(in)  dinact 
)
private

The array is written to a formatted or unformatted external file depending on the arguments.

Parameters
[in,out]darraydouble precision array to record
[in]ioutascii output unit number
[in]iprintwhether to print the array
[in]idataunbinary output unit number
[in]anametext descriptor
[in]cdatafmpwrite format
[in]nvaluespvalues per line
[in]nwidthpnumber width
[in]editdescformat type (I, G, F, S, E)
[in]dinactdouble precision value for cells excluded from model domain

Definition at line 926 of file DiscretizationBase.f90.

928  ! -- dummy
929  class(DisBaseType), intent(inout) :: this
930  real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray !< double precision array to record
931  integer(I4B), intent(in) :: iout !< ascii output unit number
932  integer(I4B), intent(in) :: iprint !< whether to print the array
933  integer(I4B), intent(in) :: idataun !< binary output unit number
934  character(len=*), intent(in) :: aname !< text descriptor
935  character(len=*), intent(in) :: cdatafmp !< write format
936  integer(I4B), intent(in) :: nvaluesp !< values per line
937  integer(I4B), intent(in) :: nwidthp !< number width
938  character(len=*), intent(in) :: editdesc !< format type (I, G, F, S, E)
939  real(DP), intent(in) :: dinact !< double precision value for cells excluded from model domain
940 
941  errmsg = 'Programmer error: record_array must be overridden'
942  call store_error(errmsg, terminate=.true.)
Here is the call graph for this function:

◆ record_connection_array()

subroutine basedismodule::record_connection_array ( class(disbasetype this,
real(dp), dimension(:), intent(in)  flowja,
integer(i4b), intent(in)  ibinun,
integer(i4b), intent(in)  iout 
)
private

Definition at line 946 of file DiscretizationBase.f90.

947  ! -- dummy
948  class(DisBaseType) :: this
949  real(DP), dimension(:), intent(in) :: flowja
950  integer(I4B), intent(in) :: ibinun
951  integer(I4B), intent(in) :: iout
952  ! -- local
953  character(len=16), dimension(1) :: text
954  ! -- data
955  data text(1)/' FLOW-JA-FACE'/
956 
957  ! -- write full ja array
958  call ubdsv1(kstp, kper, text(1), ibinun, flowja, size(flowja), 1, 1, &
959  iout, delt, pertim, totim)
Here is the call graph for this function:

◆ record_srcdst_list_entry()

subroutine basedismodule::record_srcdst_list_entry ( class(disbasetype this,
integer(i4b), intent(in)  ibdchn,
integer(i4b), intent(in)  noder,
integer(i4b), intent(in)  noder2,
real(dp), intent(in)  q,
integer(i4b), intent(in)  naux,
real(dp), dimension(naux), intent(in)  aux,
logical, intent(in), optional  olconv,
logical, intent(in), optional  olconv2 
)
private

Definition at line 1009 of file DiscretizationBase.f90.

1011  ! -- dummy
1012  class(DisBaseType) :: this
1013  integer(I4B), intent(in) :: ibdchn
1014  integer(I4B), intent(in) :: noder
1015  integer(I4B), intent(in) :: noder2
1016  real(DP), intent(in) :: q
1017  integer(I4B), intent(in) :: naux
1018  real(DP), dimension(naux), intent(in) :: aux
1019  logical, optional, intent(in) :: olconv
1020  logical, optional, intent(in) :: olconv2
1021  ! -- local
1022  logical :: lconv
1023  logical :: lconv2
1024  integer(I4B) :: nodeu
1025  integer(I4B) :: nodeu2
1026  !
1027  ! -- Use ubdsvb to write list header
1028  if (present(olconv)) then
1029  lconv = olconv
1030  else
1031  lconv = .true.
1032  end if
1033  if (lconv) then
1034  nodeu = this%get_nodeuser(noder)
1035  else
1036  nodeu = noder
1037  end if
1038  if (present(olconv2)) then
1039  lconv2 = olconv2
1040  else
1041  lconv2 = .true.
1042  end if
1043  if (lconv2) then
1044  nodeu2 = this%get_nodeuser(noder2)
1045  else
1046  nodeu2 = noder2
1047  end if
1048  call ubdsvd(ibdchn, nodeu, nodeu2, q, naux, aux)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ record_srcdst_list_header()

subroutine basedismodule::record_srcdst_list_header ( class(disbasetype this,
character(len=16), intent(in)  text,
character(len=16), intent(in)  textmodel,
character(len=16), intent(in)  textpackage,
character(len=16), intent(in)  dstmodel,
character(len=16), intent(in)  dstpackage,
integer(i4b), intent(in)  naux,
character(len=16), dimension(:), intent(in)  auxtxt,
integer(i4b), intent(in)  ibdchn,
integer(i4b), intent(in)  nlist,
integer(i4b), intent(in)  iout 
)
private

Definition at line 989 of file DiscretizationBase.f90.

992  class(DisBaseType) :: this
993  character(len=16), intent(in) :: text
994  character(len=16), intent(in) :: textmodel
995  character(len=16), intent(in) :: textpackage
996  character(len=16), intent(in) :: dstmodel
997  character(len=16), intent(in) :: dstpackage
998  integer(I4B), intent(in) :: naux
999  character(len=16), dimension(:), intent(in) :: auxtxt
1000  integer(I4B), intent(in) :: ibdchn
1001  integer(I4B), intent(in) :: nlist
1002  integer(I4B), intent(in) :: iout
1003 
1004  errmsg = 'Programmer error: record_srcdst_list_header must be overridden'
1005  call store_error(errmsg, terminate=.true.)
Here is the call graph for this function:

◆ supports_layers()

logical function basedismodule::supports_layers ( class(disbasetype this)
private

Definition at line 629 of file DiscretizationBase.f90.

630  class(DisBaseType) :: this
631  supports_layers = .false.
632  call store_error('Programmer error: supports_layers must be overridden', &
633  terminate=.true.)
Here is the call graph for this function:

◆ write_grb()

subroutine basedismodule::write_grb ( class(disbasetype this,
integer(i4b), dimension(:), intent(in)  icelltype 
)
private

Definition at line 198 of file DiscretizationBase.f90.

199  class(DisBaseType) :: this
200  integer(I4B), dimension(:), intent(in) :: icelltype
201  call store_error('Programmer error: write_grb must be overridden', &
202  terminate=.true.)
Here is the call graph for this function: