MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
gwt-ist.f90
Go to the documentation of this file.
1!> -- @brief Immobile Storage and Transfer (IST) Module
2!!
3!! The GwtIstModule is contains the GwtIstType, which is the
4!! derived type responsible for adding the effects of an
5!! immobile domain. In addition to representing transfer
6!! of mass between the mobile and immobile domain, the IST
7!! Package also represents the following processes within
8!! the immobile domain
9!! 1. Changes in dissolved solute mass
10!! 2. Decay of dissolved solute mass
11!! 3. Sorption
12!! 4. Decay of sorbed solute mass
13!<
15
16 use kindmodule, only: dp, i4b
17 use constantsmodule, only: done, dzero, dhalf, lenftype, &
20 use bndmodule, only: bndtype
21 use budgetmodule, only: budgettype
22 use tspfmimodule, only: tspfmitype
29 !
30 implicit none
31 !
32 private
33 public :: ist_create
34 !
35 character(len=LENFTYPE) :: ftype = 'IST'
36 character(len=LENPACKAGENAME) :: text = ' IMMOBILE DOMAIN'
37 integer(I4B), parameter :: nbditems = 5
38 character(len=LENBUDTXT), dimension(NBDITEMS) :: budtxt
39 data budtxt/' STORAGE-AQUEOUS', ' STORAGE-SORBED', &
40 ' DECAY-AQUEOUS', ' DECAY-SORBED', &
41 ' MOBILE-DOMAIN'/
42
43 !> @brief Immobile storage and transfer
44 !!
45 !! Data and methods for handling the effects of an
46 !! immobile domain. Note that there can be as many of these
47 !! domains as necessary. Each immobile domain represents
48 !! changes in immobile solute storage, decay of dissolved
49 !! immobile solute mass, sorption within the immobile domain,
50 !! and decay of immobile domain sorbed mass. The immobile
51 !! domain also includes exchange with the mobile domain.
52 !<
53 type, extends(bndtype) :: gwtisttype
54
55 type(tspfmitype), pointer :: fmi => null() !< flow model interface
56 type(gwtmsttype), pointer :: mst => null() !< mobile storage and transfer
57 type(budgettype), pointer :: budget => null() !< budget
58 type(outputcontroldatatype), pointer :: ocd => null() !< output control data
59 character(len=LINELENGTH) :: lstfmt !< lst file CIM print format
60 integer(I4B), pointer :: icimout => null() !< unit number for binary cim output
61 integer(I4B), pointer :: ibudgetout => null() !< binary budget output file
62 integer(I4B), pointer :: ibudcsv => null() !< unit number for csv budget output file
63 integer(I4B), pointer :: ioutsorbate => null() !< unit number for sorbate concentration output
64 integer(I4B), pointer :: idcy => null() !< order of decay rate (0:none, 1:first, 2:zero)
65 integer(I4B), pointer :: isrb => null() !< sorption active flag (0:off, 1:on); only linear is supported in ist
66 integer(I4B), pointer :: kiter => null() !< picard iteration counter
67 real(dp), pointer, contiguous :: cim(:) => null() !< concentration for immobile domain
68 real(dp), pointer, contiguous :: cimnew(:) => null() !< immobile concentration at end of current time step
69 real(dp), pointer, contiguous :: cimold(:) => null() !< immobile concentration at end of last time step
70 real(dp), pointer, contiguous :: cimsrb(:) => null() !< sorbate concentration in immobile domain
71 real(dp), pointer, contiguous :: zetaim(:) => null() !< mass transfer rate to immobile domain
72 real(dp), pointer, contiguous :: porosity(:) => null() !< immobile domain porosity defined as volume of immobile voids per volume of immobile domain
73 real(dp), pointer, contiguous :: volfrac(:) => null() !< volume fraction of the immobile domain defined as volume of immobile domain per aquifer volume
74 real(dp), pointer, contiguous :: bulk_density(:) => null() !< bulk density of immobile domain defined as mass of solids in immobile domain per volume of immobile domain
75 real(dp), pointer, contiguous :: distcoef(:) => null() !< distribution coefficient
76 real(dp), pointer, contiguous :: sp2(:) => null() !< second sorption parameter
77 real(dp), pointer, contiguous :: decay(:) => null() !< first or zero order rate constant for liquid
78 real(dp), pointer, contiguous :: decaylast(:) => null() !< decay rate used for last iteration (needed for zero order decay)
79 real(dp), pointer, contiguous :: decayslast(:) => null() !< sorbed decay rate used for last iteration (needed for zero order decay)
80 real(dp), pointer, contiguous :: decay_sorbed(:) => null() !< first or zero order rate constant for sorbed mass
81 real(dp), pointer, contiguous :: strg(:) => null() !< mass transfer rate
82 real(dp) :: budterm(2, nbditems) !< immmobile domain mass summaries
83 class(isothermtype), pointer :: isotherm => null() !< pointer to isotherm object
84
85 contains
86
87 procedure :: bnd_ar => ist_ar
88 procedure :: bnd_rp => ist_rp
89 procedure :: bnd_ad => ist_ad
90 procedure :: bnd_fc => ist_fc
91 procedure :: bnd_cq => ist_cq
92 procedure :: bnd_bd => ist_bd
94 procedure :: bnd_ot_dv => ist_ot_dv
98 procedure :: bnd_da => ist_da
99 procedure :: allocate_scalars
100 procedure :: read_options
101 procedure :: read_dimensions => ist_read_dimensions
102 procedure :: source_options
103 procedure :: source_data
104 procedure :: log_options
105 procedure :: log_data
106 procedure :: get_thetaim
107 procedure :: ist_calc_csrb
108 procedure, private :: ist_allocate_arrays
109
110 end type gwtisttype
111
112contains
113
114 !> @brief Create a new package object
115 !!
116 !! Create a new IST object
117 !!
118 !<
119 subroutine ist_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
120 mempath, fmi, mst)
121 ! -- dummy
122 class(bndtype), pointer :: packobj !< BndType pointer that will point to new IST Package
123 integer(I4B), intent(in) :: id !< name of the model
124 integer(I4B), intent(in) :: ibcnum !< consecutive package number
125 integer(I4B), intent(in) :: inunit !< unit number of package input file
126 integer(I4B), intent(in) :: iout !< unit number of model listing file
127 character(len=*), intent(in) :: namemodel !< name of the model
128 character(len=*), intent(in) :: pakname !< name of the package
129 character(len=*), intent(in) :: mempath
130 type(tspfmitype), pointer, intent(in) :: fmi
131 type(gwtmsttype), pointer, intent(in) :: mst
132 ! -- local
133 type(gwtisttype), pointer :: istobj
134 !
135 ! -- allocate the object and assign values to object variables
136 allocate (istobj)
137 packobj => istobj
138 !
139 ! -- create name and memory path
140 call packobj%set_names(ibcnum, namemodel, pakname, ftype, mempath)
141 packobj%text = text
142 !
143 ! -- allocate scalars
144 call packobj%allocate_scalars()
145 !
146 ! -- initialize package
147 call packobj%pack_initialize()
148 !
149 ! -- store values
150 packobj%inunit = inunit
151 packobj%iout = iout
152 packobj%id = id
153 packobj%ibcnum = ibcnum
154 packobj%ncolbnd = 1
155 packobj%iscloc = 1
156 !
157 ! -- Point IST specific variables
158 istobj%fmi => fmi
159 istobj%mst => mst
160 end subroutine ist_create
161
162 !> @brief Allocate and read method for package
163 !!
164 !! Method to allocate and read static data for the package.
165 !!
166 !<
167 subroutine ist_ar(this)
168 ! -- modules
170 use budgetmodule, only: budget_cr
171 ! -- dummy
172 class(gwtisttype), intent(inout) :: this !< GwtIstType object
173 ! -- local
174 integer(I4B) :: n
175 !
176 ! -- Allocate arrays
177 call this%ist_allocate_arrays()
178 !
179 ! -- Now that arrays are allocated, check in the cimnew array to
180 ! the output control manager for subsequent printing/saving
181 call this%ocd%init_dbl('CIM', this%cimnew, this%dis, 'PRINT LAST ', &
182 'COLUMNS 10 WIDTH 11 DIGITS 4 GENERAL ', &
183 this%iout, dhnoflo)
184
185 ! -- apply user override if provided
186 if (this%lstfmt /= '') then
187 call this%ocd%set_prnfmt(trim(this%lstfmt)//" ", 0)
188 end if
189 !
190 ! -- source the data block
191 call this%source_data()
192 !
193 ! -- set cimnew to the cim start values read from input
194 do n = 1, this%dis%nodes
195 this%cimnew(n) = this%cim(n)
196 end do
197 !
198 ! -- add volfrac to the volfracim accumulator in mst package
199 call this%mst%addto_volfracim(this%volfrac)
200 !
201 ! -- setup the immobile domain budget
202 call budget_cr(this%budget, this%memoryPath)
203 call this%budget%budget_df(nbditems, 'MASS', 'M', bdzone=this%packName)
204 call this%budget%set_ibudcsv(this%ibudcsv)
205 !
206 ! -- Create isotherm object if sorption is active
207 this%isotherm => create_isotherm(this%isrb, this%distcoef, this%sp2)
208 !
209 ! -- Perform a check to ensure that sorption and decay are set
210 ! consistently between the MST and IST packages.
211 if (this%idcy /= this%mst%idcy) then
212 call store_error('DECAY must be activated consistently between the &
213 &MST and IST Packages. Activate or deactivate DECAY for both &
214 &Packages.')
215 end if
216 if (this%isrb /= this%mst%isrb) then
217 call store_error('SORPTION must be activated consistently between the &
218 &MST and IST Packages. Activate or deactivate SORPTION for both &
219 &Packages. If activated, the same type of sorption (LINEAR, &
220 &FREUNDLICH, or LANGMUIR) must be specified in the options block of &
221 &both the MST and IST Packages.')
222 end if
223 if (count_errors() > 0) then
224 call store_error_filename(this%input_fname)
225 end if
226 end subroutine ist_ar
227
228 !> @brief Read and prepare method for package
229 !!
230 !! Method to read and prepare package data
231 !!
232 !<
233 subroutine ist_rp(this)
234 ! -- dummy
235 class(gwtisttype), intent(inout) :: this !< GwtIstType object
236 ! -- local
237 ! -- format
238 end subroutine ist_rp
239
240 !> @brief Advance the ist package
241 !!
242 !! Advance the IST Package and handle the adaptive time stepping
243 !! feature by copying from new to old or old to new accordingly
244 !!
245 !<
246 subroutine ist_ad(this)
247 ! -- modules
249 ! -- dummy variables
250 class(gwtisttype) :: this !< GwtIstType object
251 ! -- local variables
252 integer(I4B) :: n
253 !
254 ! -- Call parent advance
255 call this%BndType%bnd_ad()
256 !
257 ! -- set independent kiter counter to zero
258 this%kiter = 0
259 !
260 ! -- copy cimnew into cimold or vice versa if this is a repeat of
261 ! a failed time step
262 if (ifailedstepretry == 0) then
263 do n = 1, this%dis%nodes
264 this%cimold(n) = this%cimnew(n)
265 end do
266 else
267 do n = 1, this%dis%nodes
268 this%cimnew(n) = this%cimold(n)
269 end do
270 end if
271 end subroutine ist_ad
272
273 !> @brief Fill coefficient method for package
274 !<
275 subroutine ist_fc(this, rhs, ia, idxglo, matrix_sln)
276 ! modules
277 use tdismodule, only: delt
278 ! dummy
279 class(gwtisttype) :: this !< GwtIstType object
280 real(DP), dimension(:), intent(inout) :: rhs !< right-hand side vector for model
281 integer(I4B), dimension(:), intent(in) :: ia !< solution CRS row pointers
282 integer(I4B), dimension(:), intent(in) :: idxglo !< mapping vector for model (local) to solution (global)
283 class(matrixbasetype), pointer :: matrix_sln !< solution coefficient matrix
284 ! local
285 integer(I4B) :: n, idiag
286 real(DP) :: tled
287 real(DP) :: hhcof, rrhs
288 real(DP) :: swtpdt
289 real(DP) :: vcell
290 real(DP) :: thetaim
291 real(DP) :: zetaim
292 real(DP) :: kdnew
293 real(DP) :: kdold
294 real(DP) :: volfracim
295 real(DP) :: rhobim
296 real(DP) :: lambda1im
297 real(DP) :: lambda2im
298 real(DP) :: gamma1im
299 real(DP) :: gamma2im
300 real(DP) :: cimold
301 real(DP) :: f
302 real(DP) :: cimsrbold
303 real(DP) :: cimsrbnew
304 real(DP), dimension(9) :: ddterm
305
306 ! set variables
307 tled = done / delt
308 this%kiter = this%kiter + 1
309
310 ! loop through each node and calculate immobile domain contribution
311 ! to hcof and rhs
312 do n = 1, this%dis%nodes
313
314 ! skip if transport inactive
315 if (this%ibound(n) <= 0) cycle
316
317 ! calculate new and old water volumes
318 vcell = this%dis%get_cell_volume(n)
319 swtpdt = this%fmi%gwfsat(n)
320 thetaim = this%get_thetaim(n)
321 idiag = ia(n)
322
323 ! set exchange coefficient
324 zetaim = this%zetaim(n)
325
326 ! Add dual domain mass transfer contributions to rhs and hcof
327 ! dcimsrbdc = DZERO
328 kdnew = dzero
329 kdold = dzero
330 volfracim = dzero
331 rhobim = dzero
332 lambda1im = dzero
333 lambda2im = dzero
334 gamma1im = dzero
335 gamma2im = dzero
336
337 ! set variables for decay of aqueous solute
338 if (this%idcy == 1) lambda1im = this%decay(n)
339 if (this%idcy == 2) then
340 gamma1im = get_zero_order_decay(this%decay(n), this%decaylast(n), &
341 this%kiter, this%cimold(n), &
342 this%cimnew(n), delt)
343 this%decaylast(n) = gamma1im
344 end if
345
346 ! setup sorption variables
347 if (this%isrb > 0) then
348
349 ! initialize sorption variables
350 volfracim = this%volfrac(n)
351 rhobim = this%bulk_density(n)
352
353 ! set isotherm dependent sorption variables
354 cimsrbnew = this%isotherm%value(this%cimnew, n)
355 cimsrbold = this%isotherm%value(this%cimold, n)
356 select case (this%isrb)
357 case (sorption_linear)
358 kdnew = this%distcoef(n)
359 kdold = this%distcoef(n)
360 case (sorption_freund)
361 kdnew = get_freundlich_kd(this%cimnew(n), this%distcoef(n), &
362 this%sp2(n))
363 kdold = get_freundlich_kd(this%cimold(n), this%distcoef(n), &
364 this%sp2(n))
365 case (sorption_lang)
366 kdnew = get_langmuir_kd(this%cimnew(n), this%distcoef(n), &
367 this%sp2(n))
368 kdold = get_langmuir_kd(this%cimold(n), this%distcoef(n), &
369 this%sp2(n))
370 end select
371
372 ! set decay of sorbed solute parameters
373 if (this%idcy == 1) then
374 lambda2im = this%decay_sorbed(n)
375 else if (this%idcy == 2) then
376 gamma2im = get_zero_order_decay(this%decay_sorbed(n), &
377 this%decayslast(n), &
378 this%kiter, cimsrbold, &
379 cimsrbnew, delt)
380 this%decayslast(n) = gamma2im
381 end if
382 end if
383
384 ! calculate dual domain terms and get the hcof and rhs contributions
385 call get_ddterm(thetaim, vcell, delt, swtpdt, &
386 volfracim, rhobim, kdnew, kdold, lambda1im, lambda2im, &
387 gamma1im, gamma2im, zetaim, ddterm, f)
388 cimold = this%cimold(n)
389 call get_hcofrhs(ddterm, f, cimold, hhcof, rrhs)
390
391 ! update solution accumulators
392 call matrix_sln%add_value_pos(idxglo(idiag), hhcof)
393 rhs(n) = rhs(n) + rrhs
394
395 end do
396
397 end subroutine ist_fc
398
399 !> @brief Calculate package flows.
400 !<
401 subroutine ist_cq(this, x, flowja, iadv)
402 ! modules
403 use tdismodule, only: delt
404 use constantsmodule, only: dzero
405 ! dummy
406 class(gwtisttype), intent(inout) :: this !< GwtIstType object
407 real(DP), dimension(:), intent(in) :: x !< current dependent-variable value
408 real(DP), dimension(:), contiguous, intent(inout) :: flowja !< flow between two connected control volumes
409 integer(I4B), optional, intent(in) :: iadv !< flag that indicates if this is an advance package
410 ! local
411 integer(I4B) :: idiag
412 integer(I4B) :: n
413 real(DP) :: rate
414 real(DP) :: swtpdt
415 real(DP) :: hhcof, rrhs
416 real(DP) :: vcell
417 real(DP) :: thetaim
418 real(DP) :: zetaim
419 real(DP) :: kdnew
420 real(DP) :: kdold
421 real(DP) :: volfracim
422 real(DP) :: rhobim
423 real(DP) :: lambda1im
424 real(DP) :: lambda2im
425 real(DP) :: gamma1im
426 real(DP) :: gamma2im
427 real(DP) :: cimnew
428 real(DP) :: cimold
429 real(DP) :: f
430 real(DP) :: cimsrbold
431 real(DP) :: cimsrbnew
432 real(DP), dimension(9) :: ddterm
433 ! formats
434
435 ! initialize
436 this%budterm(:, :) = dzero
437
438 ! Calculate immobile domain transfer rate
439 do n = 1, this%dis%nodes
440
441 ! skip if transport inactive
442 rate = dzero
443 cimnew = dzero
444 if (this%ibound(n) > 0) then
445
446 ! calculate new and old water volumes
447 vcell = this%dis%get_cell_volume(n)
448 swtpdt = this%fmi%gwfsat(n)
449 thetaim = this%get_thetaim(n)
450
451 ! set exchange coefficient
452 zetaim = this%zetaim(n)
453
454 ! Calculate exchange with immobile domain
455 rate = dzero
456 hhcof = dzero
457 rrhs = dzero
458 kdnew = dzero
459 kdold = dzero
460 volfracim = dzero
461 rhobim = dzero
462 lambda1im = dzero
463 lambda2im = dzero
464 gamma1im = dzero
465 gamma2im = dzero
466 if (this%idcy == 1) lambda1im = this%decay(n)
467 if (this%idcy == 2) then
468 gamma1im = get_zero_order_decay(this%decay(n), this%decaylast(n), 0, &
469 this%cimold(n), this%cimnew(n), delt)
470 end if
471
472 ! setup sorption variables
473 if (this%isrb > 0) then
474
475 ! initialize sorption variables
476 volfracim = this%volfrac(n)
477 rhobim = this%bulk_density(n)
478
479 ! set isotherm dependent sorption variables
480 cimsrbnew = this%isotherm%value(this%cimnew, n)
481 cimsrbold = this%isotherm%value(this%cimold, n)
482 select case (this%isrb)
483 case (sorption_linear)
484 kdnew = this%distcoef(n)
485 kdold = this%distcoef(n)
486 case (sorption_freund)
487 kdnew = get_freundlich_kd(this%cimnew(n), this%distcoef(n), &
488 this%sp2(n))
489 kdold = get_freundlich_kd(this%cimold(n), this%distcoef(n), &
490 this%sp2(n))
491 case (sorption_lang)
492 kdnew = get_langmuir_kd(this%cimnew(n), this%distcoef(n), &
493 this%sp2(n))
494 kdold = get_langmuir_kd(this%cimold(n), this%distcoef(n), &
495 this%sp2(n))
496 end select
497
498 ! set decay of sorbed solute parameters
499 if (this%idcy == 1) then
500 lambda2im = this%decay_sorbed(n)
501 else if (this%idcy == 2) then
502 gamma2im = get_zero_order_decay(this%decay_sorbed(n), &
503 this%decayslast(n), &
504 0, cimsrbold, &
505 cimsrbnew, delt)
506 end if
507 end if
508
509 ! calculate the terms and then get the hcof and rhs contributions
510 call get_ddterm(thetaim, vcell, delt, swtpdt, &
511 volfracim, rhobim, kdnew, kdold, lambda1im, lambda2im, &
512 gamma1im, gamma2im, zetaim, ddterm, f)
513 cimold = this%cimold(n)
514 call get_hcofrhs(ddterm, f, cimold, hhcof, rrhs)
515
516 ! calculate rate from hcof and rhs
517 rate = hhcof * x(n) - rrhs
518
519 ! calculate immobile domain concentration
520 cimnew = get_ddconc(ddterm, f, cimold, x(n))
521
522 ! accumulate the budget terms
523 call accumulate_budterm(this%budterm, ddterm, cimnew, cimold, x(n), &
524 this%idcy)
525 end if
526
527 ! store rate and add to flowja
528 this%strg(n) = rate
529 idiag = this%dis%con%ia(n)
530 flowja(idiag) = flowja(idiag) + rate
531
532 ! store immobile domain concentration
533 this%cimnew(n) = cimnew
534
535 end do
536
537 ! calculate csrb
538 if (this%isrb /= 0) then
539 call this%ist_calc_csrb(this%cimnew)
540 end if
541
542 end subroutine ist_cq
543
544 !> @brief Calculate immobile sorbed concentration
545 !<
546 subroutine ist_calc_csrb(this, cim)
547 ! -- dummy
548 class(gwtisttype) :: this !< GwtMstType object
549 real(DP), intent(in), dimension(:) :: cim !< immobile domain aqueous concentration at end of this time step
550 ! -- local
551 integer(I4B) :: n
552 real(DP) :: csrb
553
554 ! Calculate sorbed concentration
555 do n = 1, size(cim)
556 csrb = dzero
557 if (this%ibound(n) > 0 .and. this%isrb /= sorption_off) then
558 csrb = this%isotherm%value(cim, n)
559 end if
560 this%cimsrb(n) = csrb
561 end do
562
563 end subroutine ist_calc_csrb
564
565 !> @brief Add package flows to model budget.
566 !!
567 !! Add the flow between IST package and the model (ratin and ratout) to the
568 !! model budget.
569 !!
570 !<
571 subroutine ist_bd(this, model_budget)
572 ! -- modules
573 use tdismodule, only: delt
575 ! -- dummy
576 class(gwtisttype) :: this !< GwtIstType object
577 type(budgettype), intent(inout) :: model_budget !< model budget object
578 ! -- local
579 real(DP) :: ratin
580 real(DP) :: ratout
581 integer(I4B) :: isuppress_output
582 isuppress_output = 0
583 call rate_accumulator(this%strg(:), ratin, ratout)
584 call model_budget%addentry(ratin, ratout, delt, this%text, &
585 isuppress_output, this%packName)
586 end subroutine ist_bd
587
588 !> @brief Output model flow terms.
589 !!
590 !! Output flow terms between the IST package and model to a binary file and/or
591 !! print flows to the model listing file.
592 !!
593 !<
594 subroutine ist_ot_model_flows(this, icbcfl, ibudfl, icbcun, imap)
595 ! -- modules
596 use constantsmodule, only: dzero
597 ! -- dummy
598 class(gwtisttype) :: this !< GwtIstType object
599 integer(I4B), intent(in) :: icbcfl !< flag for cell-by-cell output
600 integer(I4B), intent(in) :: ibudfl !< flag indication if cell-by-cell data should be saved
601 integer(I4B), intent(in) :: icbcun !< unit number for cell-by-cell output
602 integer(I4B), dimension(:), optional, intent(in) :: imap !< mapping vector
603 ! -- local
604 integer(I4B) :: n
605 integer(I4B) :: ibinun
606 integer(I4B) :: nbound
607 integer(I4B) :: naux
608 real(DP) :: rate
609 real(DP), dimension(0) :: auxrow
610 !
611 ! -- Set unit number for binary output
612 if (this%ipakcb < 0) then
613 ibinun = icbcun
614 elseif (this%ipakcb == 0) then
615 ibinun = 0
616 else
617 ibinun = this%ipakcb
618 end if
619 if (icbcfl == 0) ibinun = 0
620 !
621 ! -- Record the storage rate if requested
622 !
623 ! -- If cell-by-cell flows will be saved as a list, write header.
624 if (ibinun /= 0) then
625 nbound = this%dis%nodes
626 naux = 0
627 call this%dis%record_srcdst_list_header(this%text, this%name_model, &
628 this%name_model, this%name_model, &
629 this%packName, naux, this%auxname, &
630 ibinun, nbound, this%iout)
631 end if
632 !
633 ! -- Calculate immobile domain rhs and hcof
634 do n = 1, this%dis%nodes
635 !
636 ! -- skip if transport inactive
637 rate = dzero
638 if (this%ibound(n) > 0) then
639 !
640 ! -- set rate from this%strg
641 rate = this%strg(n)
642 end if
643 !
644 ! -- If saving cell-by-cell flows in list, write flow
645 if (ibinun /= 0) then
646 call this%dis%record_mf6_list_entry(ibinun, n, n, rate, &
647 naux, auxrow, &
648 olconv=.true., &
649 olconv2=.true.)
650 end if
651 !
652 end do
653 end subroutine ist_ot_model_flows
654
655 !> @brief Output dependent variables.
656 !<
657 subroutine ist_ot_dv(this, idvsave, idvprint)
658 ! dummy variables
659 class(gwtisttype) :: this !< BndType object
660 integer(I4B), intent(in) :: idvsave !< flag and unit number for dependent-variable output
661 integer(I4B), intent(in) :: idvprint !< flag indicating if dependent-variable should be written to the model listing file
662
663 call this%output_immobile_concentration(idvsave, idvprint)
664 call this%output_immobile_sorbate_concentration(idvsave, idvprint)
665
666 end subroutine ist_ot_dv
667
668 !> @brief Output immobile domain aqueous concentration.
669 !<
670 subroutine output_immobile_concentration(this, idvsave, idvprint)
671 ! modules
672 use tdismodule, only: kstp, endofperiod
673 ! dummy variables
674 class(gwtisttype) :: this !< BndType object
675 integer(I4B), intent(in) :: idvsave !< flag and unit number for dependent-variable output
676 integer(I4B), intent(in) :: idvprint !< flag indicating if dependent-variable should be written to the model listing file
677 ! local
678 integer(I4B) :: ipflg
679 integer(I4B) :: ibinun
680 !
681 ! Save cim to a binary file. ibinun is a flag where 1 indicates that
682 ! cim should be written to a binary file if a binary file is open for it.
683 ipflg = 0
684 ibinun = 1
685 if (idvsave == 0) ibinun = 0
686 if (ibinun /= 0) then
687 call this%ocd%ocd_ot(ipflg, kstp, endofperiod, this%iout, &
688 iprint_opt=0, isav_opt=ibinun)
689 end if
690 !
691 ! Print immobile domain concentrations to listing file
692 if (idvprint /= 0) then
693 call this%ocd%ocd_ot(ipflg, kstp, endofperiod, this%iout, &
694 iprint_opt=idvprint, isav_opt=0)
695 end if
696
697 end subroutine output_immobile_concentration
698
699 !> @brief Output immobile domain sorbate concentration.
700 !<
701 subroutine output_immobile_sorbate_concentration(this, idvsave, idvprint)
702 ! modules
703 ! dummy
704 class(gwtisttype) :: this !< BndType object
705 integer(I4B), intent(in) :: idvsave !< flag and unit number for dependent-variable output
706 integer(I4B), intent(in) :: idvprint !< flag indicating if dependent-variable should be written to the model listing file
707 ! local
708 character(len=1) :: cdatafmp = ' ', editdesc = ' '
709 integer(I4B) :: ibinun
710 integer(I4B) :: iprint, nvaluesp, nwidthp
711 real(DP) :: dinact
712
713 ! Save cimsrb to a binary file. ibinun is a flag where 1 indicates that
714 ! cim should be written to a binary file if a binary file is open for it.
715 ! Set unit number for sorbate output
716 if (this%ioutsorbate /= 0) then
717 ibinun = 1
718 else
719 ibinun = 0
720 end if
721 if (idvsave == 0) ibinun = 0
722
723 ! save sorbate concentration array
724 if (ibinun /= 0) then
725 iprint = 0
726 dinact = dhnoflo
727 if (this%ioutsorbate /= 0) then
728 ibinun = this%ioutsorbate
729 call this%dis%record_array(this%cimsrb, this%iout, iprint, ibinun, &
730 ' SORBATE', cdatafmp, nvaluesp, &
731 nwidthp, editdesc, dinact)
732 end if
733 end if
734
736
737 !> @brief Output IST package budget summary.
738 !!
739 !! Output advanced boundary package budget summary. This method only needs
740 !! to be overridden for advanced packages that save budget summaries
741 !! to the model listing file.
742 !!
743 !<
744 subroutine ist_ot_bdsummary(this, kstp, kper, iout, ibudfl)
745 ! -- modules
746 use tdismodule, only: delt, totim
747 ! -- dummy variables
748 class(gwtisttype) :: this !< GwtIstType object
749 integer(I4B), intent(in) :: kstp !< time step number
750 integer(I4B), intent(in) :: kper !< period number
751 integer(I4B), intent(in) :: iout !< flag and unit number for the model listing file
752 integer(I4B), intent(in) :: ibudfl !< flag indicating budget should be written
753 ! -- local
754 integer(I4B) :: isuppress_output = 0
755 !
756 ! -- Fill budget terms
757 call this%budget%reset()
758 call this%budget%addentry(this%budterm, delt, budtxt, isuppress_output)
759 !
760 ! -- Write budget to list file
761 call this%budget%finalize_step(delt)
762 if (ibudfl /= 0) then
763 call this%budget%budget_ot(kstp, kper, iout)
764 end if
765 !
766 ! -- Write budget csv
767 call this%budget%writecsv(totim)
768 end subroutine ist_ot_bdsummary
769
770 !> @brief Deallocate package memory
771 !!
772 !! Deallocate package scalars and arrays.
773 !!
774 !<
775 subroutine ist_da(this)
776 ! -- modules
778 ! -- dummy
779 class(gwtisttype) :: this !< GwtIstType object
780 !
781 ! -- Deallocate arrays if package was active
782 if (this%inunit > 0) then
783 call mem_deallocate(this%icimout)
784 call mem_deallocate(this%ibudgetout)
785 call mem_deallocate(this%ibudcsv)
786 call mem_deallocate(this%ioutsorbate)
787 call mem_deallocate(this%idcy)
788 call mem_deallocate(this%isrb)
789 call mem_deallocate(this%kiter)
790 call mem_deallocate(this%cim)
791 call mem_deallocate(this%cimnew)
792 call mem_deallocate(this%cimold)
793 call mem_deallocate(this%cimsrb)
794 call mem_deallocate(this%zetaim)
795 call mem_deallocate(this%porosity)
796 call mem_deallocate(this%volfrac)
797 call mem_deallocate(this%bulk_density)
798 call mem_deallocate(this%distcoef)
799 call mem_deallocate(this%sp2)
800 call mem_deallocate(this%decay)
801 call mem_deallocate(this%decaylast)
802 call mem_deallocate(this%decayslast)
803 call mem_deallocate(this%decay_sorbed)
804 call mem_deallocate(this%strg)
805 this%fmi => null()
806 this%mst => null()
807 end if
808 !
809 ! -- Scalars
810 !
811 ! -- Objects
812 call this%budget%budget_da()
813 deallocate (this%budget)
814 call this%ocd%ocd_da()
815 deallocate (this%ocd)
816 if (associated(this%isotherm)) then
817 deallocate (this%isotherm)
818 nullify (this%isotherm)
819 end if
820 !
821 ! -- deallocate parent
822 call this%BndType%bnd_da()
823 end subroutine ist_da
824
825 !> @brief Allocate package scalars
826 !!
827 !! Allocate and initialize package scalars.
828 !!
829 !<
830 subroutine allocate_scalars(this)
831 ! -- modules
834 ! -- dummy
835 class(gwtisttype) :: this !< GwtIstType object
836 ! -- local
837 !
838 ! -- call standard BndType allocate scalars
839 call this%BndType%allocate_scalars()
840 !
841 ! -- Allocate
842 call mem_allocate(this%icimout, 'ICIMOUT', this%memoryPath)
843 call mem_allocate(this%ibudgetout, 'IBUDGETOUT', this%memoryPath)
844 call mem_allocate(this%ibudcsv, 'IBUDCSV', this%memoryPath)
845 call mem_allocate(this%ioutsorbate, 'IOUTSORBATE', this%memoryPath)
846 call mem_allocate(this%isrb, 'ISRB', this%memoryPath)
847 call mem_allocate(this%idcy, 'IDCY', this%memoryPath)
848 call mem_allocate(this%kiter, 'KITER', this%memoryPath)
849 !
850 ! -- Initialize
851 this%lstfmt = ''
852 this%icimout = 0
853 this%ibudgetout = 0
854 this%ibudcsv = 0
855 this%ioutsorbate = 0
856 this%isrb = 0
857 this%idcy = 0
858 this%kiter = 0
859 !
860 ! -- Create the ocd object, which is used to manage printing and saving
861 ! of the immobile domain concentrations
862 call ocd_cr(this%ocd)
863 end subroutine allocate_scalars
864
865 !> @brief Allocate package arrays
866 !!
867 !! Allocate and initialize package arrays.
868 !!
869 !<
870 subroutine ist_allocate_arrays(this)
871 ! -- modules
873 ! -- dummy
874 class(gwtisttype), intent(inout) :: this !< GwtIstType object
875 ! -- local
876 integer(I4B) :: n
877 !
878 ! -- call standard BndType allocate scalars
879 ! nbound and maxbound are 0 in order to keep memory footprint low
880 call this%BndType%allocate_arrays()
881 !
882 ! -- allocate ist arrays of size nodes
883 call mem_allocate(this%strg, this%dis%nodes, 'STRG', this%memoryPath)
884 call mem_allocate(this%cim, this%dis%nodes, 'CIM', this%memoryPath)
885 call mem_allocate(this%cimnew, this%dis%nodes, 'CIMNEW', this%memoryPath)
886 call mem_allocate(this%cimold, this%dis%nodes, 'CIMOLD', this%memoryPath)
887 call mem_allocate(this%porosity, this%dis%nodes, 'POROSITY', this%memoryPath)
888 call mem_allocate(this%zetaim, this%dis%nodes, 'ZETAIM', this%memoryPath)
889 call mem_allocate(this%volfrac, this%dis%nodes, 'VOLFRAC', this%memoryPath)
890 if (this%isrb == 0) then
891 call mem_allocate(this%bulk_density, 1, 'BULK_DENSITY', this%memoryPath)
892 call mem_allocate(this%distcoef, 1, 'DISTCOEF', this%memoryPath)
893 call mem_allocate(this%sp2, 1, 'SP2', this%memoryPath)
894 call mem_allocate(this%cimsrb, 1, 'SORBATE', this%memoryPath)
895 else
896 call mem_allocate(this%bulk_density, this%dis%nodes, 'BULK_DENSITY', &
897 this%memoryPath)
898 call mem_allocate(this%distcoef, this%dis%nodes, 'DISTCOEF', &
899 this%memoryPath)
900 call mem_allocate(this%cimsrb, this%dis%nodes, 'SORBATE', &
901 this%memoryPath)
902 if (this%isrb == 1) then
903 call mem_allocate(this%sp2, 1, 'SP2', this%memoryPath)
904 else
905 call mem_allocate(this%sp2, this%dis%nodes, 'SP2', this%memoryPath)
906 end if
907 end if
908 if (this%idcy == 0) then
909 call mem_allocate(this%decay, 1, 'DECAY', this%memoryPath)
910 call mem_allocate(this%decaylast, 1, 'DECAYLAST', this%memoryPath)
911 else
912 call mem_allocate(this%decay, this%dis%nodes, 'DECAY', this%memoryPath)
913 call mem_allocate(this%decaylast, this%dis%nodes, 'DECAYLAST', &
914 this%memoryPath)
915 end if
916 if (this%isrb == 0 .and. this%idcy == 0) then
917 call mem_allocate(this%decayslast, 1, 'DECAYSLAST', this%memoryPath)
918 else
919 call mem_allocate(this%decayslast, this%dis%nodes, 'DECAYSLAST', &
920 this%memoryPath)
921 end if
922 call mem_allocate(this%decay_sorbed, 1, 'DECAY_SORBED', this%memoryPath)
923 !
924 ! -- initialize
925 do n = 1, this%dis%nodes
926 this%strg(n) = dzero
927 this%cim(n) = dzero
928 this%cimnew(n) = dzero
929 this%cimold(n) = dzero
930 this%porosity(n) = dzero
931 this%zetaim(n) = dzero
932 this%volfrac(n) = dzero
933 end do
934 do n = 1, size(this%bulk_density)
935 this%bulk_density(n) = dzero
936 this%distcoef(n) = dzero
937 this%cimsrb(n) = dzero
938 end do
939 do n = 1, size(this%sp2)
940 this%sp2(n) = dzero
941 end do
942 do n = 1, size(this%decay)
943 this%decay(n) = dzero
944 this%decaylast(n) = dzero
945 end do
946 do n = 1, size(this%decayslast)
947 this%decayslast(n) = dzero
948 end do
949 !
950 ! -- Set pointers
951 this%ocd%dis => this%dis
952 end subroutine ist_allocate_arrays
953
954 !> @brief Source options for package
955 !!
956 !! Method to source options for the package.
957 !<
958 subroutine source_options(this)
959 ! -- modules
962 use openspecmodule, only: access, form
966 ! -- dummy
967 class(gwtisttype), intent(inout) :: this
968 ! -- locals
969 character(len=LINELENGTH) :: prnfmt
970 integer(I4B), pointer :: columns, width, digits
971 type(gwtistparamfoundtype) :: found
972 character(len=LENVARNAME), dimension(3) :: sorption_method = &
973 &[character(len=LENVARNAME) :: 'LINEAR', 'FREUNDLICH', 'LANGMUIR']
974 character(len=linelength) :: sorbate_fname, cim6_fname, budget_fname, &
975 budgetcsv_fname
976 allocate (columns)
977 allocate (width)
978 allocate (digits)
979 !
980 ! -- update defaults with memory sourced values
981 call mem_set_value(this%ipakcb, 'SAVE_FLOWS', this%input_mempath, &
982 found%save_flows)
983 call mem_set_value(budget_fname, 'BUDGETFILE', this%input_mempath, &
984 found%budgetfile)
985 call mem_set_value(budgetcsv_fname, 'BUDGETCSVFILE', this%input_mempath, &
986 found%budgetcsvfile)
987 call mem_set_value(this%isrb, 'SORPTION', this%input_mempath, &
988 sorption_method, found%sorption)
989 call mem_set_value(this%idcy, 'ORDER1_DECAY', this%input_mempath, &
990 found%order1_decay)
991 call mem_set_value(this%idcy, 'ORDER0_DECAY', this%input_mempath, &
992 found%order0_decay)
993 call mem_set_value(cim6_fname, 'CIMFILE', this%input_mempath, &
994 found%cimfile)
995 call mem_set_value(sorbate_fname, 'SORBATEFILE', this%input_mempath, &
996 found%sorbatefile)
997 call mem_set_value(columns, 'COLUMNS', this%input_mempath, &
998 found%columns)
999 call mem_set_value(width, 'WIDTH', this%input_mempath, &
1000 found%width)
1001 call mem_set_value(digits, 'DIGITS', this%input_mempath, &
1002 found%digits)
1003 call mem_set_value(prnfmt, 'FORMAT', this%input_mempath, &
1004 found%format)
1005
1006 ! -- found side effects
1007 if (found%save_flows) this%ipakcb = -1
1008 if (found%budgetfile) then
1009 call assign_iounit(this%ibudgetout, this%inunit, "BUDGET fileout")
1010 call openfile(this%ibudgetout, this%iout, budget_fname, 'DATA(BINARY)', &
1011 form, access, 'REPLACE', mode_opt=mnormal)
1012 end if
1013 if (found%budgetcsvfile) then
1014 call assign_iounit(this%ibudcsv, this%inunit, "BUDGETCSV fileout")
1015 call openfile(this%ibudcsv, this%iout, budgetcsv_fname, 'CSV', &
1016 filstat_opt='REPLACE')
1017 end if
1018 if (found%sorption) then
1019 if (this%isrb == 0) then
1020 call store_error('Unknown sorption type was specified. &
1021 &Sorption must be specified as LINEAR, &
1022 &FREUNDLICH, or LANGMUIR.')
1023 call store_error_filename(this%input_fname)
1024 end if
1025 end if
1026 if (found%order1_decay) this%idcy = 1
1027 if (found%order0_decay) this%idcy = 2
1028 if (found%cimfile) then
1029 call this%ocd%set_ocfile(cim6_fname, this%iout)
1030 end if
1031 if ((found%columns .or. found%width .or. found%digits) .and. &
1032 .not. (found%columns .and. found%width .and. found%digits)) then
1033 call store_error('PRINT_FORMAT must include COLUMNS, WIDTH and DIGITS. &
1034 &Syntax is: COLUMNS <columns> WIDTH <width> &
1035 &DIGITS <digits> [<format>].')
1036 call store_error_filename(this%input_fname)
1037 end if
1038 if (found%columns .and. found%width .and. &
1039 found%digits .and. found%format) then
1040 write (this%lstfmt, '(a,i0,a,i0,a,i0,a)') 'COLUMNS ', columns, &
1041 ' WIDTH ', width, ' DIGITS ', digits, ' '//trim(prnfmt)
1042 end if
1043 if (found%sorbatefile) then
1044 this%ioutsorbate = getunit()
1045 call openfile(this%ioutsorbate, this%iout, sorbate_fname, &
1046 'DATA(BINARY)', form, access, 'REPLACE', mode_opt=mnormal)
1047 end if
1048 !
1049 ! -- log options
1050 if (this%iout > 0) then
1051 call this%log_options(found, cim6_fname, budget_fname, &
1052 budgetcsv_fname, sorbate_fname)
1053 end if
1054
1055 deallocate (columns)
1056 deallocate (width)
1057 deallocate (digits)
1058 end subroutine source_options
1059
1060 !> @brief Log user options to list file
1061 !<
1062 subroutine log_options(this, found, cim6_fname, budget_fname, &
1063 budgetcsv_fname, sorbate_fname)
1065 class(gwtisttype), intent(inout) :: this
1066 type(gwtistparamfoundtype), intent(in) :: found
1067 character(len=*), intent(in) :: cim6_fname
1068 character(len=*), intent(in) :: budget_fname
1069 character(len=*), intent(in) :: budgetcsv_fname
1070 character(len=*), intent(in) :: sorbate_fname
1071 ! -- formats
1072 character(len=*), parameter :: fmtisvflow = &
1073 "(4x,'CELL-BY-CELL FLOW INFORMATION WILL BE SAVED TO BINARY FILE &
1074 &WHENEVER ICBCFL IS NOT ZERO.')"
1075 character(len=*), parameter :: fmtlinear = &
1076 &"(4x,'LINEAR SORPTION IS SELECTED. ')"
1077 character(len=*), parameter :: fmtfreundlich = &
1078 &"(4x,'FREUNDLICH SORPTION IS ACTIVE. ')"
1079 character(len=*), parameter :: fmtlangmuir = &
1080 &"(4x,'LANGMUIR SORPTION IS ACTIVE. ')"
1081 character(len=*), parameter :: fmtidcy1 = &
1082 &"(4x,'FIRST-ORDER DECAY IS ACTIVE. ')"
1083 character(len=*), parameter :: fmtidcy2 = &
1084 &"(4x,'ZERO-ORDER DECAY IS ACTIVE. ')"
1085 character(len=*), parameter :: fmtistbin = &
1086 "(4x, 'IST ', 1x, a, 1x, ' WILL BE SAVED TO FILE: ', a, &
1087 &/4x, 'OPENED ON UNIT: ', I0)"
1088
1089 write (this%iout, '(1x,a)') 'PROCESSING IMMOBILE STORAGE AND TRANSFER &
1090 &OPTIONS'
1091 if (found%save_flows) then
1092 write (this%iout, fmtisvflow)
1093 end if
1094 if (found%budgetfile) then
1095 write (this%iout, fmtistbin) 'BUDGET', trim(adjustl(budget_fname)), &
1096 this%ibudgetout
1097 end if
1098 if (found%budgetcsvfile) then
1099 write (this%iout, fmtistbin) 'BUDGET CSV', trim(adjustl(budgetcsv_fname)), &
1100 this%ibudcsv
1101 end if
1102 if (found%sorption) then
1103 select case (this%isrb)
1104 case (sorption_linear)
1105 write (this%iout, fmtlinear)
1106 case (sorption_freund)
1107 write (this%iout, fmtfreundlich)
1108 case (sorption_lang)
1109 write (this%iout, fmtlangmuir)
1110 end select
1111 end if
1112 if (found%order1_decay) then
1113 write (this%iout, fmtidcy1)
1114 end if
1115 if (found%order0_decay) then
1116 write (this%iout, fmtidcy2)
1117 end if
1118 if (found%sorbatefile) then
1119 write (this%iout, fmtistbin) &
1120 'SORBATE', sorbate_fname, this%ioutsorbate
1121 end if
1122 write (this%iout, '(1x,a)') 'END OF IMMOBILE STORAGE AND TRANSFER &
1123 &OPTIONS'
1124 end subroutine log_options
1125
1126 !> @brief Read options for package
1127 !!
1128 !! Read options for boundary packages.
1129 !!
1130 !<
1131 subroutine read_options(this)
1132 ! -- modules
1133 ! -- dummy
1134 class(gwtisttype), intent(inout) :: this !< GwtIstType object
1135
1136 ! -- source options
1137 call this%source_options()
1138 end subroutine read_options
1139
1140 !> @brief Source data for package
1141 !!
1142 !! Method to source data for the package.
1143 !<
1144 subroutine source_data(this)
1145 ! -- modules
1146 use constantsmodule, only: linelength
1153 ! -- dummy
1154 class(gwtisttype) :: this
1155 ! -- locals
1156 !character(len=LINELENGTH) :: errmsg
1157 type(gwtistparamfoundtype) :: found
1158 integer(I4B) :: asize
1159 integer(I4B), dimension(:), pointer, contiguous :: map
1160 !
1161 ! -- set map to convert user input data into reduced data
1162 map => null()
1163 if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser
1164 !
1165 ! -- reallocate
1166 if (this%isrb == 0) then
1167 call get_isize('BULK_DENSITY', this%input_mempath, asize)
1168 if (asize > 0) &
1169 call mem_reallocate(this%bulk_density, this%dis%nodes, &
1170 'BULK_DENSITY', this%memoryPath)
1171 call get_isize('DISTCOEF', this%input_mempath, asize)
1172 if (asize > 0) &
1173 call mem_reallocate(this%distcoef, this%dis%nodes, 'DISTCOEF', &
1174 this%memoryPath)
1175 end if
1176 if (this%idcy == 0) then
1177 call get_isize('DECAY', this%input_mempath, asize)
1178 if (asize > 0) &
1179 call mem_reallocate(this%decay, this%dis%nodes, 'DECAY', this%memoryPath)
1180 end if
1181 call get_isize('DECAY_SORBED', this%input_mempath, asize)
1182 if (asize > 0) then
1183 call mem_reallocate(this%decay_sorbed, this%dis%nodes, &
1184 'DECAY_SORBED', this%memoryPath)
1185 end if
1186 if (this%isrb < 2) then
1187 call get_isize('SP2', this%input_mempath, asize)
1188 if (asize > 0) &
1189 call mem_reallocate(this%sp2, this%dis%nodes, 'SP2', this%memoryPath)
1190 end if
1191 !
1192 ! -- update defaults with memory sourced values
1193 call mem_set_value(this%porosity, 'POROSITY', this%input_mempath, map, &
1194 found%porosity)
1195 call mem_set_value(this%volfrac, 'VOLFRAC', this%input_mempath, map, &
1196 found%volfrac)
1197 call mem_set_value(this%zetaim, 'ZETAIM', this%input_mempath, map, &
1198 found%zetaim)
1199 call mem_set_value(this%cim, 'CIM', this%input_mempath, map, &
1200 found%cim)
1201 call mem_set_value(this%decay, 'DECAY', this%input_mempath, map, &
1202 found%decay)
1203 call mem_set_value(this%decay_sorbed, 'DECAY_SORBED', this%input_mempath, &
1204 map, found%decay_sorbed)
1205 call mem_set_value(this%bulk_density, 'BULK_DENSITY', this%input_mempath, &
1206 map, found%bulk_density)
1207 call mem_set_value(this%distcoef, 'DISTCOEF', this%input_mempath, map, &
1208 found%distcoef)
1209 call mem_set_value(this%sp2, 'SP2', this%input_mempath, map, &
1210 found%sp2)
1211
1212 ! -- log options
1213 if (this%iout > 0) then
1214 call this%log_data(found)
1215 end if
1216
1217 ! -- Check for required sorption variables
1218 if (this%isrb > 0) then
1219 if (.not. found%bulk_density) then
1220 write (errmsg, '(a)') 'Sorption is active but BULK_DENSITY &
1221 &not specified. BULK_DENSITY must be specified in GRIDDATA block.'
1222 call store_error(errmsg)
1223 end if
1224 if (.not. found%distcoef) then
1225 write (errmsg, '(a)') 'Sorption is active but distribution &
1226 &coefficient not specified. DISTCOEF must be specified in &
1227 &GRIDDATA block.'
1228 call store_error(errmsg)
1229 end if
1230 if (this%isrb > 1) then
1231 if (.not. found%sp2) then
1232 write (errmsg, '(a)') 'Freundlich or langmuir sorption is active &
1233 &but SP2 not specified. SP2 must be specified in &
1234 &GRIDDATA block.'
1235 call store_error(errmsg)
1236 end if
1237 end if
1238 else
1239 if (found%bulk_density) then
1240 write (warnmsg, '(a)') 'Sorption is not active but &
1241 &BULK_DENSITY was specified. BULK_DENSITY will have no affect on &
1242 &simulation results.'
1244 write (this%iout, '(1x,a)') 'WARNING. '//warnmsg
1245 end if
1246 if (found%distcoef) then
1247 write (warnmsg, '(a)') 'Sorption is not active but &
1248 &distribution coefficient was specified. DISTCOEF will have &
1249 &no affect on simulation results.'
1251 write (this%iout, '(1x,a)') 'WARNING. '//warnmsg
1252 end if
1253 if (found%sp2) then
1254 write (warnmsg, '(a)') 'Sorption is not active but &
1255 &SP2 was specified. SP2 will have &
1256 &no affect on simulation results.'
1258 write (this%iout, '(1x,a)') 'WARNING. '//warnmsg
1259 end if
1260 end if
1261
1262 ! -- Check for required decay/production rate coefficients
1263 if (this%idcy > 0) then
1264 if (.not. found%decay) then
1265 write (errmsg, '(a)') 'First or zero order decay is &
1266 &active but the first rate coefficient is not specified. DECAY &
1267 &must be specified in GRIDDATA block.'
1268 call store_error(errmsg)
1269 end if
1270 if (.not. found%decay_sorbed) then
1271 !
1272 ! -- If DECAY_SORBED not specified and sorption is active, then
1273 ! terminate with an error
1274 write (errmsg, '(a)') 'DECAY_SORBED not provided in GRIDDATA &
1275 &block but decay and sorption are active. Specify DECAY_SORBED &
1276 &in GRIDDATA block.'
1277 call store_error(errmsg)
1278 end if
1279 else
1280 if (found%decay) then
1281 write (warnmsg, '(a)') 'First- or zero-order decay &
1282 &is not active but decay was specified. DECAY will &
1283 &have no affect on simulation results.'
1285 write (this%iout, '(1x,a)') 'WARNING. '//warnmsg
1286 end if
1287 if (found%decay_sorbed) then
1288 write (warnmsg, '(a)') 'First- or zero-order decay &
1289 &is not active but DECAY_SORBED was specified. &
1290 &DECAY_SORBED will have no affect on simulation results.'
1292 write (this%iout, '(1x,a)') 'WARNING. '//warnmsg
1293 end if
1294 end if
1295
1296 ! -- Check for required dual domain arrays or warn if they are specified
1297 ! but won't be used.
1298 if (.not. found%cim) then
1299 write (this%iout, '(1x,a)') 'Warning. Dual domain is active but &
1300 &initial immobile domain concentration was not specified. &
1301 &Setting CIM to zero.'
1302 end if
1303 if (.not. found%zetaim) then
1304 write (errmsg, '(a)') 'Dual domain is active but dual &
1305 &domain mass transfer rate (ZETAIM) was not specified. ZETAIM &
1306 &must be specified in GRIDDATA block.'
1307 call store_error(errmsg)
1308 end if
1309 if (.not. found%porosity) then
1310 write (errmsg, '(a)') 'Dual domain is active but &
1311 &immobile domain POROSITY was not specified. POROSITY &
1312 &must be specified in GRIDDATA block.'
1313 call store_error(errmsg)
1314 end if
1315 if (.not. found%volfrac) then
1316 write (errmsg, '(a)') 'Dual domain is active but &
1317 &immobile domain VOLFRAC was not specified. VOLFRAC &
1318 &must be specified in GRIDDATA block. This is a new &
1319 &requirement for MODFLOW versions later than version &
1320 &6.4.1.'
1321 call store_error(errmsg)
1322 end if
1323
1324 ! -- terminate if errors
1325 if (count_errors() > 0) then
1326 call store_error_filename(this%input_fname)
1327 end if
1328 end subroutine source_data
1329
1330 !> @brief Log user data to list file
1331 !<
1332 subroutine log_data(this, found)
1334 class(gwtisttype), intent(inout) :: this
1335 type(gwtistparamfoundtype), intent(in) :: found
1336
1337 write (this%iout, '(1x,a)') 'PROCESSING GRIDDATA'
1338 if (found%porosity) then
1339 write (this%iout, '(4x,a)') 'MOBILE DOMAIN POROSITY set from input file'
1340 end if
1341 if (found%volfrac) then
1342 write (this%iout, '(4x,a)') 'VOLFRAC set from input file'
1343 end if
1344 if (found%zetaim) then
1345 write (this%iout, '(4x,a)') 'ZETAIM set from input file'
1346 end if
1347 if (found%cim) then
1348 write (this%iout, '(4x,a)') 'CIM set from input file'
1349 end if
1350 if (found%decay) then
1351 write (this%iout, '(4x,a)') 'DECAY RATE set from input file'
1352 end if
1353 if (found%decay_sorbed) then
1354 write (this%iout, '(4x,a)') 'DECAY SORBED RATE set from input file'
1355 end if
1356 if (found%bulk_density) then
1357 write (this%iout, '(4x,a)') 'BULK DENSITY set from input file'
1358 end if
1359 if (found%distcoef) then
1360 write (this%iout, '(4x,a)') 'DISTRIBUTION COEFFICIENT set from input file'
1361 end if
1362 if (found%sp2) then
1363 write (this%iout, '(4x,a)') 'SECOND SORPTION PARAM set from input file'
1364 end if
1365 write (this%iout, '(1x,a)') 'END PROCESSING GRIDDATA'
1366 end subroutine log_data
1367
1368 !> @brief Read dimensions for package
1369 !!
1370 !! Read dimensions for package.
1371 !!
1372 !<
1373 subroutine ist_read_dimensions(this)
1374 ! -- dummy
1375 class(gwtisttype), intent(inout) :: this !< GwtIstType object
1376 ! -- local
1377 ! -- format
1378 end subroutine ist_read_dimensions
1379
1380 !> @brief Return thetaim
1381 !!
1382 !! Calculate and return thetaim, volume of immobile voids per aquifer volume
1383 !!
1384 !<
1385 function get_thetaim(this, node) result(thetaim)
1386 ! -- modules
1387 ! -- dummy
1388 class(gwtisttype) :: this !< GwtIstType object
1389 integer(I4B), intent(in) :: node !< node number
1390 ! -- return
1391 real(dp) :: thetaim
1392 !
1393 thetaim = this%volfrac(node) * this%porosity(node)
1394 end function get_thetaim
1395
1396 !> @brief Calculate immobile domain equation terms
1397 !!
1398 !! This subroutine calculates the immobile domain (or dual domain) terms.
1399 !! The resulting ddterm and f terms are described in the GWT model report.
1400 !! The terms are concentration coefficients used in the balance equation
1401 !! for the immobile domain.
1402 !!
1403 !<
1404 subroutine get_ddterm(thetaim, vcell, delt, swtpdt, &
1405 volfracim, rhobim, kdnew, kdold, &
1406 lambda1im, lambda2im, &
1407 gamma1im, gamma2im, zetaim, ddterm, f)
1408 ! -- dummy
1409 real(DP), intent(in) :: thetaim !< immobile domain porosity
1410 real(DP), intent(in) :: vcell !< volume of cell
1411 real(DP), intent(in) :: delt !< length of time step
1412 real(DP), intent(in) :: swtpdt !< cell saturation at end of time step
1413 real(DP), intent(in) :: volfracim !< volume fraction of immobile domain
1414 real(DP), intent(in) :: rhobim !< bulk density for the immobile domain (fim * rhob)
1415 real(DP), intent(in) :: kdnew !< effective distribution coefficient for new time
1416 real(DP), intent(in) :: kdold !< effective distribution coefficient for old time
1417 real(DP), intent(in) :: lambda1im !< first-order decay rate in aqueous phase
1418 real(DP), intent(in) :: lambda2im !< first-order decay rate in sorbed phase
1419 real(DP), intent(in) :: gamma1im !< zero-order decay rate in aqueous phase
1420 real(DP), intent(in) :: gamma2im !< zero-order decay rate in sorbed phase
1421 real(DP), intent(in) :: zetaim !< transfer coefficient between mobile and immobile domains
1422 real(DP), dimension(:), intent(inout) :: ddterm !< nine terms comprising the balance equation of the immobile domain
1423 real(DP), intent(inout) :: f !< the f term used to calculate the immobile domain concentration
1424 ! -- local
1425 real(DP) :: tled
1426 !
1427 ! -- initialize
1428 tled = done / delt
1429 !
1430 ! -- Calculate terms. These terms correspond to the concentration
1431 ! coefficients in equation 7-4 of the GWT model report. However,
1432 ! an updated equation is presented as 9-9 in the supplemental technical
1433 ! information guide (mf6suptechinfo.pdf)
1434 ddterm(1) = thetaim * vcell * tled
1435 ddterm(2) = thetaim * vcell * tled
1436 ddterm(3) = volfracim * rhobim * vcell * kdnew * tled
1437 ddterm(4) = volfracim * rhobim * vcell * kdold * tled
1438 ddterm(5) = thetaim * lambda1im * vcell
1439 ddterm(6) = lambda2im * volfracim * rhobim * kdnew * vcell
1440 ddterm(7) = thetaim * gamma1im * vcell
1441 ddterm(8) = gamma2im * volfracim * rhobim * vcell
1442 ddterm(9) = vcell * swtpdt * zetaim
1443 !
1444 ! -- calculate denominator term, f
1445 f = ddterm(1) + ddterm(3) + ddterm(5) + ddterm(6) + ddterm(9)
1446 end subroutine get_ddterm
1447
1448 !> @brief Calculate the hcof and rhs terms for immobile domain
1449 !!
1450 !! This subroutine calculates the hcof and rhs terms that must
1451 !! be added to the solution system of equations
1452 !!
1453 !<
1454 subroutine get_hcofrhs(ddterm, f, cimold, hcof, rhs)
1455 ! -- dummy
1456 real(DP), dimension(:), intent(in) :: ddterm !< terms comprising the balance equation of the immobile domain
1457 real(DP), intent(in) :: f !< the f term used to calculate the immobile domain concentration
1458 real(DP), intent(in) :: cimold !< immobile domain concentration at end of last time step
1459 real(DP), intent(inout) :: hcof !< calculated contribution for the a-matrix diagonal position
1460 real(DP), intent(inout) :: rhs !< calculated contribution for the solution right-hand side
1461 !
1462 ! -- calculate hcof
1463 hcof = ddterm(9)**2 / f - ddterm(9)
1464 !
1465 ! -- calculate rhs, and switch the sign because this term needs to
1466 ! be moved to the left hand side
1467 rhs = (ddterm(2) + ddterm(4)) * cimold - ddterm(7) - ddterm(8)
1468 rhs = rhs * ddterm(9) / f
1469 rhs = -rhs
1470 end subroutine get_hcofrhs
1471
1472 !> @brief Calculate the immobile domain concentration
1473 !!
1474 !! This function calculates the concentration of the immobile domain.
1475 !!
1476 !<
1477 function get_ddconc(ddterm, f, cimold, cnew) result(cimnew)
1478 ! -- dummy
1479 real(dp), dimension(:), intent(in) :: ddterm !< terms comprising the balance equation of the immobile domain
1480 real(dp), intent(in) :: f !< the f term used to calculate the immobile domain concentration
1481 real(dp), intent(in) :: cimold !< immobile domain concentration at end of last time step
1482 real(dp), intent(in) :: cnew !< concentration of the mobile domain at the end of the time step
1483 ! -- result
1484 real(dp) :: cimnew !< calculated concentration of the immobile domain
1485 ! -- local
1486 !
1487 ! -- calculate ddconc
1488 cimnew = (ddterm(2) + ddterm(4)) * cimold + ddterm(9) * cnew - ddterm(7) &
1489 - ddterm(8)
1490 cimnew = cimnew / f
1491 end function get_ddconc
1492
1493 !> @brief Calculate the immobile domain budget terms
1494 !!
1495 !! This subroutine calculates and accumulates the immobile domain
1496 !! budget terms into the budterm accumulator
1497 !!
1498 !<
1499 subroutine accumulate_budterm(budterm, ddterm, cimnew, cimold, cnew, idcy)
1500 ! -- modules
1501 ! -- dummy
1502 real(DP), dimension(:, :), intent(inout) :: budterm !<
1503 real(DP), dimension(:), intent(in) :: ddterm !< terms comprising the balance equation of the immobile domain
1504 real(DP), intent(in) :: cimnew !< immobile domain concenration at the end of this time step
1505 real(DP), intent(in) :: cimold !< immobile domain concentration at end of last time step
1506 real(DP), intent(in) :: cnew !< mobile domain concentration at the end of this time step
1507 integer(I4B), intent(in) :: idcy !< order of decay rate (0:none, 1:first, 2:zero)
1508 ! -- local
1509 real(DP) :: rate
1510 integer(I4B) :: i
1511 !
1512 ! -- calculate STORAGE-AQUEOUS
1513 i = 1
1514 rate = -ddterm(1) * cimnew + ddterm(2) * cimold
1515 if (rate > dzero) then
1516 budterm(1, i) = budterm(1, i) + rate
1517 else
1518 budterm(2, i) = budterm(2, i) - rate
1519 end if
1520 !
1521 ! -- calculate STORAGE-SORBED
1522 i = 2
1523 rate = -ddterm(3) * cimnew + ddterm(4) * cimold
1524 if (rate > dzero) then
1525 budterm(1, i) = budterm(1, i) + rate
1526 else
1527 budterm(2, i) = budterm(2, i) - rate
1528 end if
1529 !
1530 ! -- calculate DECAY-AQUEOUS
1531 i = 3
1532 rate = dzero
1533 if (idcy == 1) then
1534 rate = -ddterm(5) * cimnew
1535 else if (idcy == 2) then
1536 rate = -ddterm(7)
1537 else
1538 rate = dzero
1539 end if
1540 if (rate > dzero) then
1541 budterm(1, i) = budterm(1, i) + rate
1542 else
1543 budterm(2, i) = budterm(2, i) - rate
1544 end if
1545 !
1546 ! -- calculate DECAY-SORBED
1547 i = 4
1548 if (idcy == 1) then
1549 rate = -ddterm(6) * cimnew
1550 else if (idcy == 2) then
1551 rate = -ddterm(8)
1552 else
1553 rate = dzero
1554 end if
1555 if (rate > dzero) then
1556 budterm(1, i) = budterm(1, i) + rate
1557 else
1558 budterm(2, i) = budterm(2, i) - rate
1559 end if
1560 !
1561 ! -- calculate MOBILE-DOMAIN
1562 i = 5
1563 rate = ddterm(9) * cnew - ddterm(9) * cimnew
1564 if (rate > dzero) then
1565 budterm(1, i) = budterm(1, i) + rate
1566 else
1567 budterm(2, i) = budterm(2, i) - rate
1568 end if
1569 !
1570 end subroutine accumulate_budterm
1571
1572 !> @brief Get effective Freundlich distribution coefficient
1573 !<
1574 function get_freundlich_kd(conc, kf, a) result(kd)
1575 ! -- dummy
1576 real(dp), intent(in) :: conc !< solute concentration
1577 real(dp), intent(in) :: kf !< freundlich constant
1578 real(dp), intent(in) :: a !< freundlich exponent
1579 real(dp), parameter :: k = 10.0_dp !< constant to limit derivative at c=0
1580 real(dp) :: eps !< small concentration offset
1581 ! -- return
1582 real(dp) :: kd !< effective distribution coefficient
1583 !
1584 eps = (k / (a * kf))**(1.0_dp / (a - 1.0_dp))
1585 if (conc > dzero) then
1586 kd = kf * (conc + eps)**(a - done) - kf * eps**(a - done)
1587 else
1588 kd = dzero
1589 end if
1590 end function get_freundlich_kd
1591
1592 !> @brief Get effective Langmuir distribution coefficient
1593 !<
1594 function get_langmuir_kd(conc, kl, sbar) result(kd)
1595 ! -- dummy
1596 real(dp), intent(in) :: conc !< solute concentration
1597 real(dp), intent(in) :: kl !< langmuir constant
1598 real(dp), intent(in) :: sbar !< langmuir sorption sites
1599 ! -- return
1600 real(dp) :: kd !< effective distribution coefficient
1601 !
1602 if (conc > dzero) then
1603 kd = (kl * sbar) / (done + kl * conc)
1604 else
1605 kd = dzero
1606 end if
1607 end function get_langmuir_kd
1608
1609end module gwtistmodule
This module contains the base boundary package.
subroutine bnd_ar(this)
Allocate and read method for boundary package.
subroutine bnd_rp(this)
Allocate and read method for package.
subroutine bnd_ot_dv(this, idvsave, idvprint)
Output advanced package dependent-variable terms.
subroutine bnd_ot_model_flows(this, icbcfl, ibudfl, icbcun, imap)
Output package flow terms.
subroutine bnd_da(this)
Deallocate package memory.
subroutine bnd_bd(this, model_budget)
Add package flows to model budget.
subroutine bnd_fc(this, rhs, ia, idxglo, matrix_sln)
Copy hcof and rhs terms into solution.
subroutine bnd_ot_bdsummary(this, kstp, kper, iout, ibudfl)
Output advanced package budget summary.
subroutine bnd_ad(this)
Advance the boundary package.
subroutine bnd_cq(this, x, flowja, iadv)
Calculate advanced package flows.
This module contains the BudgetModule.
Definition Budget.f90:20
subroutine, public budget_cr(this, name_model)
Create a new budget object.
Definition Budget.f90:85
subroutine, public rate_accumulator(flow, rin, rout)
Rate accumulator subroutine.
Definition Budget.f90:634
This module contains simulation constants.
Definition Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition Constants.f90:45
@ mnormal
normal output mode
integer(i4b), parameter lenpackagename
maximum length of the package name
Definition Constants.f90:23
integer(i4b), parameter lenbigline
maximum length of a big line
Definition Constants.f90:15
real(dp), parameter dhnoflo
real no flow constant
Definition Constants.f90:93
integer(i4b), parameter lenvarname
maximum length of a variable name
Definition Constants.f90:17
real(dp), parameter dhalf
real constant 1/2
Definition Constants.f90:68
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
Definition Constants.f90:39
real(dp), parameter dzero
real constant zero
Definition Constants.f90:65
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
Definition Constants.f90:37
real(dp), parameter done
real constant 1
Definition Constants.f90:76
subroutine ist_da(this)
Deallocate package memory.
Definition gwt-ist.f90:776
subroutine log_data(this, found)
Log user data to list file.
Definition gwt-ist.f90:1333
subroutine ist_calc_csrb(this, cim)
Calculate immobile sorbed concentration.
Definition gwt-ist.f90:547
subroutine ist_rp(this)
Read and prepare method for package.
Definition gwt-ist.f90:234
real(dp) function get_ddconc(ddterm, f, cimold, cnew)
Calculate the immobile domain concentration.
Definition gwt-ist.f90:1478
real(dp) function get_thetaim(this, node)
Return thetaim.
Definition gwt-ist.f90:1386
subroutine source_data(this)
Source data for package.
Definition gwt-ist.f90:1145
subroutine get_hcofrhs(ddterm, f, cimold, hcof, rhs)
Calculate the hcof and rhs terms for immobile domain.
Definition gwt-ist.f90:1455
subroutine get_ddterm(thetaim, vcell, delt, swtpdt, volfracim, rhobim, kdnew, kdold, lambda1im, lambda2im, gamma1im, gamma2im, zetaim, ddterm, f)
Calculate immobile domain equation terms.
Definition gwt-ist.f90:1408
integer(i4b), parameter nbditems
Definition gwt-ist.f90:37
subroutine output_immobile_sorbate_concentration(this, idvsave, idvprint)
Output immobile domain sorbate concentration.
Definition gwt-ist.f90:702
real(dp) function get_freundlich_kd(conc, kf, a)
Get effective Freundlich distribution coefficient.
Definition gwt-ist.f90:1575
subroutine source_options(this)
Source options for package.
Definition gwt-ist.f90:959
real(dp) function get_langmuir_kd(conc, kl, sbar)
Get effective Langmuir distribution coefficient.
Definition gwt-ist.f90:1595
subroutine ist_ot_model_flows(this, icbcfl, ibudfl, icbcun, imap)
Output model flow terms.
Definition gwt-ist.f90:595
subroutine ist_read_dimensions(this)
Read dimensions for package.
Definition gwt-ist.f90:1374
subroutine log_options(this, found, cim6_fname, budget_fname, budgetcsv_fname, sorbate_fname)
Log user options to list file.
Definition gwt-ist.f90:1064
subroutine allocate_scalars(this)
Allocate package scalars.
Definition gwt-ist.f90:831
character(len=lenftype) ftype
Definition gwt-ist.f90:35
subroutine ist_ar(this)
Allocate and read method for package.
Definition gwt-ist.f90:168
subroutine ist_ot_bdsummary(this, kstp, kper, iout, ibudfl)
Output IST package budget summary.
Definition gwt-ist.f90:745
subroutine ist_ot_dv(this, idvsave, idvprint)
Output dependent variables.
Definition gwt-ist.f90:658
subroutine ist_allocate_arrays(this)
Allocate package arrays.
Definition gwt-ist.f90:871
subroutine ist_cq(this, x, flowja, iadv)
Calculate package flows.
Definition gwt-ist.f90:402
subroutine ist_ad(this)
Advance the ist package.
Definition gwt-ist.f90:247
subroutine accumulate_budterm(budterm, ddterm, cimnew, cimold, cnew, idcy)
Calculate the immobile domain budget terms.
Definition gwt-ist.f90:1500
subroutine ist_bd(this, model_budget)
Add package flows to model budget.
Definition gwt-ist.f90:572
subroutine ist_fc(this, rhs, ia, idxglo, matrix_sln)
Fill coefficient method for package.
Definition gwt-ist.f90:276
character(len=lenbudtxt), dimension(nbditems) budtxt
Definition gwt-ist.f90:38
subroutine read_options(this)
Read options for package.
Definition gwt-ist.f90:1132
subroutine, public ist_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath, fmi, mst)
Create a new package object.
Definition gwt-ist.f90:121
character(len=lenpackagename) text
Definition gwt-ist.f90:36
subroutine output_immobile_concentration(this, idvsave, idvprint)
Output immobile domain aqueous concentration.
Definition gwt-ist.f90:671
real(dp) function get_zero_order_decay(decay_rate_usr, decay_rate_last, kiter, cold, cnew, delt)
Calculate zero-order decay rate and constrain if necessary.
Definition gwt-mst.f90:1448
subroutine, public assign_iounit(iounit, errunit, description)
assign io unit number
integer(i4b) function, public getunit()
Get a free unit number.
subroutine, public openfile(iu, iout, fname, ftype, fmtarg_opt, accarg_opt, filstat_opt, mode_opt)
Open a file.
integer(i4b), parameter sorption_off
Sorption is inactive (default).
integer(i4b), parameter sorption_freund
Freundlich sorption between aqueous and solid phases.
integer(i4b), parameter sorption_lang
Langmuir sorption between aqueous and solid phases.
integer(i4b), parameter sorption_linear
Linear sorption between aqueous and solid phases.
class(isothermtype) function, pointer, public create_isotherm(isotherm_type, distcoef, sp2)
Create an isotherm object based on type and parameters.
This module defines variable data types.
Definition kind.f90:8
subroutine, public get_isize(name, mem_path, isize)
Get the number of elements for this variable.
character(len=20) access
Definition OpenSpec.f90:7
character(len=20) form
Definition OpenSpec.f90:7
Output control data module.
subroutine, public ocd_cr(ocdobj)
Create a new output control data type.
This module contains simulation methods.
Definition Sim.f90:10
subroutine, public store_warning(msg, substring)
Store warning message.
Definition Sim.f90:241
subroutine, public store_error(msg, terminate)
Store an error message.
Definition Sim.f90:94
integer(i4b) function, public count_errors()
Return number of errors.
Definition Sim.f90:60
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
Definition Sim.f90:208
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
integer(i4b) ifailedstepretry
current retry for this time step
character(len=maxcharlen) warnmsg
warning message string
logical(lgp), pointer, public endofperiod
flag indicating end of stress period
Definition tdis.f90:30
real(dp), pointer, public totim
time relative to start of simulation
Definition tdis.f90:35
integer(i4b), pointer, public kstp
current time step number
Definition tdis.f90:27
real(dp), pointer, public delt
length of the current time step
Definition tdis.f90:32
Derived type for the Budget object.
Definition Budget.f90:40
Immobile storage and transfer.
Definition gwt-ist.f90:53
Mobile storage and transfer.
Definition gwt-mst.f90:49