MODFLOW 6  version 6.8.0.dev0
USGS Modular Hydrologic Model
gwf-drn.f90
Go to the documentation of this file.
1 module drnmodule
2  use kindmodule, only: dp, i4b
3  use constantsmodule, only: dzero, done, dtwo, &
5  use simvariablesmodule, only: errmsg
10  use bndmodule, only: bndtype
11  use bndextmodule, only: bndexttype
14  !
15  implicit none
16  !
17  private
18  public :: drn_create
19  public :: drntype
20  !
21  character(len=LENFTYPE) :: ftype = 'DRN'
22  character(len=LENPACKAGENAME) :: text = ' DRN'
23  !
24  type, extends(bndexttype) :: drntype
25 
26  real(dp), dimension(:), pointer, contiguous :: elev => null() !< DRN elevation
27  real(dp), dimension(:), pointer, contiguous :: cond => null() !< DRN conductance at aquifer interface
28  integer(I4B), pointer :: iauxddrncol => null()
29  integer(I4B), pointer :: icubic_scaling => null()
30 
31  contains
32 
33  procedure :: allocate_scalars => drn_allocate_scalars
34  procedure :: allocate_arrays => drn_allocate_arrays
35  procedure :: source_options => drn_options
36  procedure :: log_drn_options
37  procedure :: bnd_rp => drn_rp
38  procedure :: bnd_ck => drn_ck
39  procedure :: bnd_cf => drn_cf
40  procedure :: bnd_fc => drn_fc
41  procedure :: bnd_fn => drn_fn
42  procedure :: bnd_da => drn_da
43  procedure :: define_listlabel
44  procedure :: get_drain_elevations
45  procedure :: get_drain_factor
46  procedure :: bound_value => drn_bound_value
47  procedure :: cond_mult
48  ! -- methods for observations
49  procedure, public :: bnd_obs_supported => drn_obs_supported
50  procedure, public :: bnd_df_obs => drn_df_obs
51  procedure, public :: drn_store_user_cond
52  end type drntype
53 
54 contains
55 
56  !> @brief Create a New Drn Package and point packobj to the new package
57  !<
58  subroutine drn_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
59  mempath)
60  ! -- dummy
61  class(bndtype), pointer :: packobj
62  integer(I4B), intent(in) :: id
63  integer(I4B), intent(in) :: ibcnum
64  integer(I4B), intent(in) :: inunit
65  integer(I4B), intent(in) :: iout
66  character(len=*), intent(in) :: namemodel
67  character(len=*), intent(in) :: pakname
68  character(len=*), intent(in) :: mempath
69  ! -- local
70  type(drntype), pointer :: drnobj
71  !
72  ! -- allocate the object and assign values to object variables
73  allocate (drnobj)
74  packobj => drnobj
75  !
76  ! -- create name and memory path
77  call packobj%set_names(ibcnum, namemodel, pakname, ftype, mempath)
78  packobj%text = text
79  !
80  ! -- allocate scalars
81  call drnobj%allocate_scalars()
82  !s
83  ! -- initialize package
84  call packobj%pack_initialize()
85  !
86  ! -- initialize
87  packobj%inunit = inunit
88  packobj%iout = iout
89  packobj%id = id
90  packobj%ibcnum = ibcnum
91  packobj%ncolbnd = 2
92  packobj%ictMemPath = create_mem_path(namemodel, 'NPF')
93  end subroutine drn_create
94 
95  !> @brief Deallocate memory
96  !<
97  subroutine drn_da(this)
98  ! -- modules
100  ! -- dummy
101  class(drntype) :: this
102  !
103  ! -- Deallocate parent package
104  call this%BndExtType%bnd_da()
105  !
106  ! -- scalars
107  call mem_deallocate(this%iauxddrncol)
108  call mem_deallocate(this%icubic_scaling)
109  !
110  ! -- arrays
111  call mem_deallocate(this%elev, 'ELEV', this%memoryPath)
112  call mem_deallocate(this%cond, 'COND', this%memoryPath)
113  end subroutine drn_da
114 
115  !> @brief Allocate package scalar members
116  !<
117  subroutine drn_allocate_scalars(this)
118  ! -- modules
120  ! -- dummy
121  class(drntype) :: this
122  !
123  ! -- call base type allocate scalars
124  call this%BndExtType%allocate_scalars()
125  !
126  ! -- allocate the object and assign values to object variables
127  call mem_allocate(this%iauxddrncol, 'IAUXDDRNCOL', this%memoryPath)
128  call mem_allocate(this%icubic_scaling, 'ICUBIC_SCALING', this%memoryPath)
129  !
130  ! -- Set values
131  this%iauxddrncol = 0
132  if (this%inewton /= 0) then
133  this%icubic_scaling = 1
134  else
135  this%icubic_scaling = 0
136  end if
137  end subroutine drn_allocate_scalars
138 
139  !> @brief Allocate package arrays
140  !<
141  subroutine drn_allocate_arrays(this, nodelist, auxvar)
142  ! -- modules
144  ! -- dummy
145  class(drntype) :: this
146  integer(I4B), dimension(:), pointer, contiguous, optional :: nodelist
147  real(DP), dimension(:, :), pointer, contiguous, optional :: auxvar
148  !
149  ! -- call base type allocate arrays
150  call this%BndExtType%allocate_arrays(nodelist, auxvar)
151  !
152  ! -- set drn input context pointers
153  call mem_setptr(this%elev, 'ELEV', this%input_mempath)
154  call mem_setptr(this%cond, 'COND', this%input_mempath)
155  !
156  ! --checkin drn input context pointers
157  call mem_checkin(this%elev, 'ELEV', this%memoryPath, &
158  'ELEV', this%input_mempath)
159  call mem_checkin(this%cond, 'COND', this%memoryPath, &
160  'COND', this%input_mempath)
161  end subroutine drn_allocate_arrays
162 
163  !> @brief Read and prepare
164  !<
165  subroutine drn_rp(this)
166  use tdismodule, only: kper
167  ! -- dummy
168  class(drntype), intent(inout) :: this
169  !
170  if (this%iper /= kper) return
171  !
172  ! -- Call the parent class read and prepare
173  call this%BndExtType%bnd_rp()
174  !
175  ! -- store user cond
176  if (this%ivsc == 1) then
177  call this%drn_store_user_cond()
178  end if
179  end subroutine drn_rp
180 
181  !> @brief Source options specific to DrnType
182  !<
183  subroutine drn_options(this)
184  ! -- modules
185  use inputoutputmodule, only: urword
189  ! -- dummy
190  class(drntype), intent(inout) :: this
191  ! -- local
192  type(gwfdrnparamfoundtype) :: found
193  character(len=LENAUXNAME) :: ddrnauxname
194  integer(I4B) :: n
195  !
196  ! -- source base class options
197  call this%BndExtType%source_options()
198  !
199  ! -- source drain options
200  call mem_set_value(this%imover, 'MOVER', this%input_mempath, found%mover)
201  call mem_set_value(ddrnauxname, 'AUXDEPTHNAME', this%input_mempath, &
202  found%auxdepthname)
203  call mem_set_value(this%icubic_scaling, 'ICUBICSFAC', this%input_mempath, &
204  found%icubicsfac)
205  !
206  if (found%auxdepthname) then
207  this%iauxddrncol = -1
208  !
209  ! -- Error if no aux variable specified
210  if (this%naux == 0) then
211  write (errmsg, '(a,2(1x,a))') &
212  'AUXDEPTHNAME was specified as', trim(adjustl(ddrnauxname)), &
213  'but no AUX variables specified.'
214  call store_error(errmsg)
215  end if
216  !
217  ! -- Assign ddrn column
218  this%iauxddrncol = 0
219  do n = 1, this%naux
220  if (ddrnauxname == this%auxname(n)) then
221  this%iauxddrncol = n
222  exit
223  end if
224  end do
225  !
226  ! -- Error if aux variable cannot be found
227  if (this%iauxddrncol == 0) then
228  write (errmsg, '(a,2(1x,a))') &
229  'AUXDEPTHNAME was specified as', trim(adjustl(ddrnauxname)), &
230  'but no AUX variable found with this name.'
231  call store_error(errmsg)
232  end if
233  end if
234  !
235  ! -- log DRN specific options
236  call this%log_drn_options(found)
237  !
238  ! -- terminate if errors were detected
239  if (count_errors() > 0) then
240  call store_error_filename(this%input_fname)
241  end if
242  end subroutine drn_options
243 
244  !> @ brief Log DRN specific package options
245  !<
246  subroutine log_drn_options(this, found)
247  ! -- modules
249  ! -- dummy variables
250  class(drntype), intent(inout) :: this
251  type(gwfdrnparamfoundtype), intent(in) :: found
252  ! -- local variables
253  ! -- format
254  !
255  ! -- log found options
256  write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text)) &
257  //' OPTIONS'
258  !
259  if (found%mover) then
260  write (this%iout, '(4x,A)') 'MOVER OPTION ENABLED'
261  end if
262  !
263  if (found%icubicsfac) then
264  write (this%iout, '(4x,a,1x,a)') &
265  'CUBIC SCALING will be used for drains with non-zero DDRN values', &
266  'even if the NEWTON-RAPHSON method is not being used.'
267  end if
268  !
269  ! -- close logging block
270  write (this%iout, '(1x,a)') &
271  'END OF '//trim(adjustl(this%text))//' OPTIONS'
272  end subroutine log_drn_options
273 
274  !> @brief Check drain boundary condition data
275  !<
276  subroutine drn_ck(this)
277  ! -- dummy
278  class(drntype), intent(inout) :: this
279  ! -- local
280  integer(I4B) :: i
281  integer(I4B) :: node
282  real(DP) :: bt
283  real(DP) :: drndepth
284  real(DP) :: drntop
285  real(DP) :: drnbot
286  ! -- formats
287  character(len=*), parameter :: fmtddrnerr = &
288  "('SCALED-CONDUCTANCE DRN BOUNDARY (',i0,') BOTTOM ELEVATION &
289  &(',f10.3,') IS LESS THAN CELL BOTTOM (',f10.3,')')"
290  character(len=*), parameter :: fmtdrnerr = &
291  "('DRN BOUNDARY (',i0,') ELEVATION (',f10.3,') IS LESS THAN CELL &
292  &BOTTOM (',f10.3,')')"
293  character(len=*), parameter :: fmtcondmulterr = &
294  "('DRN BOUNDARY (',i0,') CONDUCTANCE MULTIPLIER (',g10.3,') IS &
295  &LESS THAN ZERO')"
296  character(len=*), parameter :: fmtconderr = &
297  "('DRN BOUNDARY (',i0,') CONDUCTANCE (',g10.3,') IS LESS THAN &
298  &ZERO')"
299  !
300  ! -- check stress period data
301  do i = 1, this%nbound
302  node = this%nodelist(i)
303  bt = this%dis%bot(node)
304  !
305  ! -- calculate the drainage depth and the top and bottom of
306  ! the conductance scaling elevations
307  call this%get_drain_elevations(i, drndepth, drntop, drnbot)
308  !
309  ! -- accumulate errors
310  if (drnbot < bt .and. this%icelltype(node) /= 0) then
311  if (drndepth /= dzero) then
312  write (errmsg, fmt=fmtddrnerr) i, drnbot, bt
313  else
314  write (errmsg, fmt=fmtdrnerr) i, drnbot, bt
315  end if
316  call store_error(errmsg)
317  end if
318  if (this%iauxmultcol > 0) then
319  if (this%auxvar(this%iauxmultcol, i) < dzero) then
320  write (errmsg, fmt=fmtcondmulterr) &
321  i, this%auxvar(this%iauxmultcol, i)
322  call store_error(errmsg)
323  end if
324  end if
325  if (this%cond(i) < dzero) then
326  write (errmsg, fmt=fmtconderr) i, this%cond(i)
327  call store_error(errmsg)
328  end if
329  end do
330  !
331  ! -- write summary of drain package error messages
332  if (count_errors() > 0) then
333  call store_error_filename(this%input_fname)
334  end if
335  end subroutine drn_ck
336 
337  !> @brief Formulate the HCOF and RHS terms
338  !!
339  !! Skip if no drains
340  !<
341  subroutine drn_cf(this)
342  ! -- dummy
343  class(drntype) :: this
344  ! -- local
345  integer(I4B) :: i
346  integer(I4B) :: node
347  real(DP) :: cdrn
348  real(DP) :: drnbot
349  real(DP) :: fact
350  !
351  ! -- Return if no drains
352  if (this%nbound == 0) return
353  !
354  ! -- Calculate hcof and rhs for each drn entry
355  do i = 1, this%nbound
356  node = this%nodelist(i)
357  if (this%ibound(node) <= 0) then
358  this%hcof(i) = dzero
359  this%rhs(i) = dzero
360  cycle
361  end if
362  !
363  ! -- set local variables for this drain
364  cdrn = this%cond_mult(i)
365 
366  !
367  ! -- calculate the drainage scaling factor
368  call this%get_drain_factor(i, fact, drnbot)
369  !
370  ! -- calculate rhs and hcof
371  this%rhs(i) = -fact * cdrn * drnbot
372  this%hcof(i) = -fact * cdrn
373  end do
374  end subroutine drn_cf
375 
376  !> @brief Copy rhs and hcof into solution rhs and amat
377  !<
378  subroutine drn_fc(this, rhs, ia, idxglo, matrix_sln)
379  ! -- dummy
380  class(drntype) :: this
381  real(DP), dimension(:), intent(inout) :: rhs
382  integer(I4B), dimension(:), intent(in) :: ia
383  integer(I4B), dimension(:), intent(in) :: idxglo
384  class(matrixbasetype), pointer :: matrix_sln
385  ! -- local
386  integer(I4B) :: i
387  integer(I4B) :: n
388  integer(I4B) :: ipos
389  real(DP) :: fact
390  real(DP) :: drnbot
391  real(DP) :: drncond
392  real(DP) :: qdrn
393  !
394  ! -- packmvrobj fc
395  if (this%imover == 1) then
396  call this%pakmvrobj%fc()
397  end if
398  !
399  ! -- Copy package rhs and hcof into solution rhs and amat
400  do i = 1, this%nbound
401  n = this%nodelist(i)
402  rhs(n) = rhs(n) + this%rhs(i)
403  ipos = ia(n)
404  call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
405  !
406  ! -- calculate the drainage scaling factor
407  call this%get_drain_factor(i, fact, drnbot)
408  !
409  ! -- If mover is active and this drain is discharging,
410  ! store available water (as positive value).
411  if (this%imover == 1 .and. fact > dzero) then
412  drncond = this%cond_mult(i)
413  qdrn = fact * drncond * (this%xnew(n) - drnbot)
414  call this%pakmvrobj%accumulate_qformvr(i, qdrn)
415  end if
416  end do
417  end subroutine drn_fc
418 
419  !> @brief Fill newton terms
420  !<
421  subroutine drn_fn(this, rhs, ia, idxglo, matrix_sln)
422  implicit none
423  ! -- dummy
424  class(drntype) :: this
425  real(DP), dimension(:), intent(inout) :: rhs
426  integer(I4B), dimension(:), intent(in) :: ia
427  integer(I4B), dimension(:), intent(in) :: idxglo
428  class(matrixbasetype), pointer :: matrix_sln
429  ! -- local
430  integer(I4B) :: i
431  integer(I4B) :: node
432  integer(I4B) :: ipos
433  real(DP) :: cdrn
434  real(DP) :: xnew
435  real(DP) :: drndepth
436  real(DP) :: drntop
437  real(DP) :: drnbot
438  real(DP) :: drterm
439  !
440  ! -- Copy package rhs and hcof into solution rhs and amat
441  if (this%iauxddrncol /= 0) then
442  do i = 1, this%nbound
443  node = this%nodelist(i)
444  !
445  ! -- test if node is constant or inactive
446  if (this%ibound(node) <= 0) then
447  cycle
448  end if
449  !
450  ! -- set local variables for this drain
451  cdrn = this%cond_mult(i)
452  xnew = this%xnew(node)
453  !
454  ! -- calculate the drainage depth and the top and bottom of
455  ! the conductance scaling elevations
456  call this%get_drain_elevations(i, drndepth, drntop, drnbot)
457  !
458  ! -- calculate scaling factor
459  if (drndepth /= dzero) then
460  drterm = sqsaturationderivative(drntop, drnbot, xnew, &
461  c1=-done, c2=dtwo)
462  drterm = drterm * cdrn * (drnbot - xnew)
463  !
464  ! -- fill amat and rhs with newton-raphson terms
465  ipos = ia(node)
466  call matrix_sln%add_value_pos(idxglo(ipos), drterm)
467  rhs(node) = rhs(node) + drterm * xnew
468  end if
469  end do
470  end if
471  end subroutine drn_fn
472 
473  !> @brief Define the list heading that is written to iout when PRINT_INPUT
474  !! option is used
475  !<
476  subroutine define_listlabel(this)
477  ! -- dummy
478  class(drntype), intent(inout) :: this
479  !
480  ! -- create the header list label
481  this%listlabel = trim(this%filtyp)//' NO.'
482  if (this%dis%ndim == 3) then
483  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'LAYER'
484  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'ROW'
485  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'COL'
486  elseif (this%dis%ndim == 2) then
487  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'LAYER'
488  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'CELL2D'
489  else
490  write (this%listlabel, '(a, a7)') trim(this%listlabel), 'NODE'
491  end if
492  write (this%listlabel, '(a, a16)') trim(this%listlabel), 'DRAIN EL.'
493  write (this%listlabel, '(a, a16)') trim(this%listlabel), 'CONDUCTANCE'
494  if (this%inamedbound == 1) then
495  write (this%listlabel, '(a, a16)') trim(this%listlabel), 'BOUNDARY NAME'
496  end if
497  end subroutine define_listlabel
498 
499  !> @brief Define drain depth and the top and bottom elevations used to scale
500  !! the drain conductance
501  !<
502  subroutine get_drain_elevations(this, i, drndepth, drntop, drnbot)
503  ! -- dummy
504  class(drntype), intent(inout) :: this
505  integer(I4B), intent(in) :: i
506  real(DP), intent(inout) :: drndepth
507  real(DP), intent(inout) :: drntop
508  real(DP), intent(inout) :: drnbot
509  ! -- local
510  real(DP) :: drnelev
511  real(DP) :: elev
512  !
513  ! -- initialize dummy and local variables
514  drndepth = dzero
515  drnelev = this%elev(i)
516  !
517  ! -- set the drain depth
518  if (this%iauxddrncol > 0) then
519  drndepth = this%auxvar(this%iauxddrncol, i)
520  end if
521  !
522  ! -- calculate the top and bottom drain elevations
523  if (drndepth /= dzero) then
524  elev = drnelev + drndepth
525  drntop = max(elev, drnelev)
526  drnbot = min(elev, drnelev)
527  else
528  drntop = drnelev
529  drnbot = drnelev
530  end if
531  end subroutine get_drain_elevations
532 
533  !> @brief Get the drain conductance scale factor
534  !<
535  subroutine get_drain_factor(this, i, factor, opt_drnbot)
536  ! -- dummy
537  class(drntype), intent(inout) :: this
538  integer(I4B), intent(in) :: i
539  real(DP), intent(inout) :: factor
540  real(DP), intent(inout), optional :: opt_drnbot
541  ! -- local
542  integer(I4B) :: node
543  real(DP) :: xnew
544  real(DP) :: drndepth
545  real(DP) :: drntop
546  real(DP) :: drnbot
547  !
548  ! -- set local variables for this drain
549  node = this%nodelist(i)
550  xnew = this%xnew(node)
551  !
552  ! -- calculate the drainage depth and the top and bottom of
553  ! the conductance scaling elevations
554  call this%get_drain_elevations(i, drndepth, drntop, drnbot)
555  !
556  ! -- set opt_drnbot to drnbot if passed as dummy variable
557  if (present(opt_drnbot)) then
558  opt_drnbot = drnbot
559  end if
560  !
561  ! -- calculate scaling factor
562  if (drndepth /= dzero) then
563  if (this%icubic_scaling /= 0) then
564  factor = sqsaturation(drntop, drnbot, xnew, c1=-done, c2=dtwo)
565  else
566  factor = squadraticsaturation(drntop, drnbot, xnew, eps=dzero)
567  end if
568  else
569  if (xnew <= drnbot) then
570  factor = dzero
571  else
572  factor = done
573  end if
574  end if
575  end subroutine get_drain_factor
576 
577  ! -- Procedures related to observations
578 
579  !> @brief Return true because DRN package supports observations
580  !!
581  !! Overrides BndType%bnd_obs_supported()
582  !<
583  logical function drn_obs_supported(this)
584  implicit none
585  ! -- dummy
586  class(drntype) :: this
587  !
588  drn_obs_supported = .true.
589  end function drn_obs_supported
590 
591  !> @brief Store observation type supported by DRN package
592  !!
593  !! Overrides BndType%bnd_df_obs
594  !<
595  subroutine drn_df_obs(this)
596  implicit none
597  ! -- dummy
598  class(drntype) :: this
599  ! -- local
600  integer(I4B) :: indx
601  !
602  call this%obs%StoreObsType('drn', .true., indx)
603  this%obs%obsData(indx)%ProcessIdPtr => defaultobsidprocessor
604  !
605  ! -- Store obs type and assign procedure pointer
606  ! for to-mvr observation type.
607  call this%obs%StoreObsType('to-mvr', .true., indx)
608  this%obs%obsData(indx)%ProcessIdPtr => defaultobsidprocessor
609  end subroutine drn_df_obs
610 
611  !> @brief Store user-specified drain conductance
612  !<
613  subroutine drn_store_user_cond(this)
614  ! -- dummy
615  class(drntype), intent(inout) :: this
616  ! -- local
617  integer(I4B) :: n
618  !
619  ! -- store backup copy of conductance values
620  do n = 1, this%nbound
621  this%condinput(n) = this%cond_mult(n)
622  end do
623  end subroutine drn_store_user_cond
624 
625  !> @brief Apply multiplier to conductance value depending on user-selected option
626  !<
627  function cond_mult(this, row) result(cond)
628  ! -- modules
629  use constantsmodule, only: dzero
630  ! -- dummy variables
631  class(drntype), intent(inout) :: this
632  integer(I4B), intent(in) :: row
633  ! -- result
634  real(dp) :: cond
635  !
636  if (this%iauxmultcol > 0) then
637  cond = this%cond(row) * this%auxvar(this%iauxmultcol, row)
638  else
639  cond = this%cond(row)
640  end if
641  end function cond_mult
642 
643  !> @brief Return requested boundary value
644  !<
645  function drn_bound_value(this, col, row) result(bndval)
646  ! -- modules
647  use constantsmodule, only: dzero
648  ! -- dummy variables
649  class(drntype), intent(inout) :: this
650  integer(I4B), intent(in) :: col
651  integer(I4B), intent(in) :: row
652  ! -- result
653  real(dp) :: bndval
654  !
655  select case (col)
656  case (1)
657  bndval = this%elev(row)
658  case (2)
659  bndval = this%cond_mult(row)
660  case default
661  errmsg = 'Programming error. DRN bound value requested column '&
662  &'outside range of ncolbnd (2).'
663  call store_error(errmsg)
664  call store_error_filename(this%input_fname)
665  end select
666  end function drn_bound_value
667 
668 end module drnmodule
This module contains the extended boundary package.
This module contains the base boundary package.
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
integer(i4b), parameter lenpackagename
maximum length of the package name
Definition: Constants.f90:23
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
Definition: Constants.f90:39
integer(i4b), parameter lenauxname
maximum length of a aux variable
Definition: Constants.f90:35
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:65
real(dp), parameter dtwo
real constant 2
Definition: Constants.f90:79
real(dp), parameter done
real constant 1
Definition: Constants.f90:76
character(len=lenftype) ftype
Definition: gwf-drn.f90:21
subroutine drn_da(this)
Deallocate memory.
Definition: gwf-drn.f90:98
subroutine, public drn_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath)
Create a New Drn Package and point packobj to the new package.
Definition: gwf-drn.f90:60
real(dp) function cond_mult(this, row)
Apply multiplier to conductance value depending on user-selected option.
Definition: gwf-drn.f90:628
subroutine drn_fn(this, rhs, ia, idxglo, matrix_sln)
Fill newton terms.
Definition: gwf-drn.f90:422
subroutine drn_allocate_arrays(this, nodelist, auxvar)
Allocate package arrays.
Definition: gwf-drn.f90:142
real(dp) function drn_bound_value(this, col, row)
Return requested boundary value.
Definition: gwf-drn.f90:646
subroutine define_listlabel(this)
Define the list heading that is written to iout when PRINT_INPUT option is used.
Definition: gwf-drn.f90:477
logical function drn_obs_supported(this)
Return true because DRN package supports observations.
Definition: gwf-drn.f90:584
subroutine get_drain_factor(this, i, factor, opt_drnbot)
Get the drain conductance scale factor.
Definition: gwf-drn.f90:536
subroutine drn_allocate_scalars(this)
Allocate package scalar members.
Definition: gwf-drn.f90:118
subroutine drn_cf(this)
Formulate the HCOF and RHS terms.
Definition: gwf-drn.f90:342
subroutine drn_ck(this)
Check drain boundary condition data.
Definition: gwf-drn.f90:277
subroutine drn_options(this)
Source options specific to DrnType.
Definition: gwf-drn.f90:184
subroutine drn_rp(this)
Read and prepare.
Definition: gwf-drn.f90:166
character(len=lenpackagename) text
Definition: gwf-drn.f90:22
subroutine get_drain_elevations(this, i, drndepth, drntop, drnbot)
Define drain depth and the top and bottom elevations used to scale the drain conductance.
Definition: gwf-drn.f90:503
subroutine log_drn_options(this, found)
@ brief Log DRN specific package options
Definition: gwf-drn.f90:247
subroutine drn_store_user_cond(this)
Store user-specified drain conductance.
Definition: gwf-drn.f90:614
subroutine drn_fc(this, rhs, ia, idxglo, matrix_sln)
Copy rhs and hcof into solution rhs and amat.
Definition: gwf-drn.f90:379
subroutine drn_df_obs(this)
Store observation type supported by DRN package.
Definition: gwf-drn.f90:596
subroutine, public urword(line, icol, istart, istop, ncode, n, r, iout, in)
Extract a word from a string.
This module defines variable data types.
Definition: kind.f90:8
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains the derived type ObsType.
Definition: Obs.f90:127
subroutine, public defaultobsidprocessor(obsrv, dis, inunitobs, iout)
@ brief Process IDstring provided for each observation
Definition: Obs.f90:246
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_filename(filename, terminate)
Store the erroring file name.
Definition: Sim.f90:203
This module contains simulation variables.
Definition: SimVariables.f90:9
character(len=maxcharlen) errmsg
error message string
real(dp) function squadraticsaturation(top, bot, x, eps)
@ brief sQuadraticSaturation
real(dp) function sqsaturationderivative(top, bot, x, c1, c2)
@ brief sQSaturationDerivative
real(dp) function sqsaturation(top, bot, x, c1, c2)
@ brief sQSaturation
integer(i4b), pointer, public kper
current stress period number
Definition: tdis.f90:26
@ brief BndType
This class is used to store a single deferred-length character string. It was designed to work in an ...
Definition: CharString.f90:23