MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
swf-sto.f90
Go to the documentation of this file.
1!> @brief This module contains the storage package methods
2!!
3!! This module contains the methods used to add the effects of storage
4!! on the surface water flow equation.
5!!
6!<
8
9 use kindmodule, only: dp, i4b, lgp
12 use simvariablesmodule, only: errmsg
14 use basedismodule, only: disbasetype
17 use disv1dmodule, only: disv1dtype
18 use swfcxsmodule, only: swfcxstype
19
20 implicit none
21 public :: swfstotype, sto_cr
22
23 character(len=LENBUDTXT), dimension(1) :: budtxt = & !< text labels for budget terms
24 &[' STORAGE']
25
26 !> @brief flags indicating which STO options were found in the input
28 logical(LGP) :: ipakcb = .false.
29 end type stooptionsfoundtype
30
32 integer(I4B), pointer :: iss => null() !< steady state flag: 1 = steady, 0 = transient
33 integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !< pointer to model ibound
34 real(dp), dimension(:), pointer, contiguous :: qsto => null() !< storage rates
35
36 ! -- pointers to information in dfw package
37 integer(I4B), dimension(:), pointer, contiguous :: idcxs => null() !< pointer to cross section id vector in dfw
38
39 ! -- pointer to packages needed for calculations
40 type(swfcxstype), pointer :: cxs
41
42 ! -- input context pointers for read and prepare
43 integer(I4B), pointer :: iper => null() !< input context loaded period
44 character(len=:), pointer :: storage !< input context storage string
45 contains
46 procedure :: sto_ar
47 procedure :: sto_rp
48 procedure :: sto_ad
49 procedure :: sto_fc
50 procedure :: sto_fc_dis1d
51 procedure :: sto_fc_dis2d
52 !procedure :: sto_fn
53 procedure :: sto_cq
54 procedure :: sto_bd
56 procedure :: sto_da
57 procedure :: allocate_scalars
58 procedure, private :: allocate_arrays
59 procedure, private :: source_options
60 procedure, private :: source_data
61 procedure, private :: log_options
62 procedure, private :: set_dfw_pointers
63 procedure, private :: reach_length_pointer
64 procedure, private :: calc_storage_dis1d
65 procedure, private :: calc_storage_dis2d
66 end type
67
68contains
69
70 !> @brief Create a new package object
71 !!
72 !! Create a new storage (STO) object
73 !!
74 !<
75 subroutine sto_cr(stoobj, name_model, mempath, inunit, iout, cxs)
76 ! -- dummy variables
77 type(swfstotype), pointer :: stoobj !< SwfStoType object
78 character(len=*), intent(in) :: name_model !< name of model
79 character(len=*), intent(in) :: mempath !< input context mem path
80 integer(I4B), intent(in) :: inunit !< package input file unit
81 integer(I4B), intent(in) :: iout !< model listing file unit
82 type(swfcxstype), pointer, intent(in) :: cxs !< the pointer to the cxs package
83 !
84 ! -- Create the object
85 allocate (stoobj)
86 !
87 ! -- create name and memory path
88 call stoobj%set_names(1, name_model, 'STO', 'STO', mempath)
89 !
90 ! -- Allocate scalars
91 call stoobj%allocate_scalars()
92 !
93 ! -- Set variables
94 stoobj%inunit = inunit
95 stoobj%iout = iout
96
97 ! -- store pointers
98 stoobj%cxs => cxs
99
100 end subroutine sto_cr
101
102 !> @brief Allocate and read method for package
103 !!
104 !! Method to allocate and read static data for the STO package.
105 !!
106 !<
107 subroutine sto_ar(this, dis, ibound)
108 ! -- modules
111 ! -- dummy variables
112 class(swfstotype) :: this !< SwfStoType object
113 class(disbasetype), pointer, intent(in) :: dis !< model discretization object
114 integer(I4B), dimension(:), pointer, contiguous :: ibound !< model ibound array
115 ! -- local variables
116 ! -- formats
117 character(len=*), parameter :: fmtsto = &
118 "(1x,/1x,'STO -- STORAGE PACKAGE, VERSION 1, 10/27/2023', &
119 &' INPUT READ FROM UNIT ', i0, //)"
120 !
121 ! --print a message identifying the storage package.
122 write (this%iout, fmtsto) this%inunit
123
124 ! -- set pointers to data in dfw package
125 call this%set_dfw_pointers()
126
127 !
128 ! -- store pointers to arguments that were passed in
129 this%dis => dis
130 this%ibound => ibound
131 !
132 ! -- set pointer to model iss
133 call mem_setptr(this%iss, 'ISS', create_mem_path(this%name_model))
134 !
135 ! -- Allocate arrays
136 call this%allocate_arrays(dis%nodes)
137 !
138 ! -- Read storage options
139 call this%source_options()
140 !
141 ! -- read the data block
142 ! no griddata at the moment for SWF Storage Package
143 ! call this%source_data()
144 end subroutine sto_ar
145
146 !> @brief Read and prepare method for package
147 !!
148 !! Method to read and prepare stress period data for the STO package.
149 !!
150 !<
151 subroutine sto_rp(this)
152 ! -- modules
153 use tdismodule, only: kper
154 implicit none
155 ! -- dummy variables
156 class(swfstotype) :: this !< SwfStoType object
157 ! -- local variables
158 character(len=16) :: css(0:1)
159 ! -- data
160 data css(0)/' TRANSIENT'/
161 data css(1)/' STEADY-STATE'/
162 !
163 ! -- confirm package is active
164 if (this%inunit <= 0) return
165 !
166 ! -- confirm loaded iper
167 if (this%iper /= kper) return
168 !
169 write (this%iout, '(//,1x,a)') 'PROCESSING STORAGE PERIOD DATA'
170 !
171 ! -- set period iss
172 if (this%storage == 'STEADY-STATE') then
173 this%iss = 1
174 else if (this%storage == 'TRANSIENT') then
175 this%iss = 0
176 else
177 write (errmsg, '(a,a)') 'Unknown STORAGE data tag: ', &
178 trim(this%storage)
179 call store_error(errmsg)
180 call store_error_filename(this%input_fname)
181 end if
182 !
183 write (this%iout, '(1x,a)') 'END PROCESSING STORAGE PERIOD DATA'
184 !
185 write (this%iout, '(//1X,A,I0,A,A,/)') &
186 'STRESS PERIOD ', kper, ' IS ', trim(adjustl(css(this%iss)))
187 end subroutine sto_rp
188
189 !> @brief Advance the package
190 !!
191 !! Advance data in the STO package.
192 !!
193 !<
194 subroutine sto_ad(this)
195 ! -- modules
196 ! -- dummy variables
197 class(swfstotype) :: this !< SwfStoType object
198 end subroutine sto_ad
199
200 !> @brief Fill A and right-hand side for the package
201 !!
202 !! Fill the coefficient matrix and right-hand side with the STO package terms.
203 !!
204 !<
205 subroutine sto_fc(this, kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
206 ! -- modules
207 use tdismodule, only: delt
208 ! -- dummy
209 class(swfstotype) :: this
210 integer(I4B) :: kiter
211 real(DP), intent(inout), dimension(:) :: stage_old
212 real(DP), intent(inout), dimension(:) :: stage_new
213 class(matrixbasetype), pointer :: matrix_sln
214 integer(I4B), intent(in), dimension(:) :: idxglo
215 real(DP), intent(inout), dimension(:) :: rhs
216 ! -- local
217 ! -- formats
218 character(len=*), parameter :: fmtsperror = &
219 &"('Detected time step length of zero. SWF Storage Package cannot be ', &
220 &'used unless delt is non-zero.')"
221 !
222 ! -- test if steady-state stress period
223 if (this%iss /= 0) return
224 !
225 ! -- Ensure time step length is not zero
226 if (delt == dzero) then
227 write (errmsg, fmtsperror)
228 call store_error(errmsg, terminate=.true.)
229 end if
230
231 if (this%dis%is_1d()) then
232 call this%sto_fc_dis1d(kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
233 else
234 call this%sto_fc_dis2d(kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
235 end if
236
237 end subroutine sto_fc
238
239 !> @brief Fill A and right-hand side for the package
240 !!
241 !! Fill the coefficient matrix and right-hand side with the STO package terms.
242 !!
243 !<
244 subroutine sto_fc_dis1d(this, kiter, stage_old, stage_new, matrix_sln, &
245 idxglo, rhs)
246 ! -- modules
247 ! -- dummy
248 class(swfstotype) :: this
249 integer(I4B) :: kiter
250 real(DP), intent(inout), dimension(:) :: stage_old
251 real(DP), intent(inout), dimension(:) :: stage_new
252 class(matrixbasetype), pointer :: matrix_sln
253 integer(I4B), intent(in), dimension(:) :: idxglo
254 real(DP), intent(inout), dimension(:) :: rhs
255 ! -- local
256 integer(I4B) :: n, idiag
257 real(DP) :: derv
258 real(DP) :: qsto
259 real(DP), dimension(:), pointer :: reach_length
260
261 ! Set pointer to reach_length for 1d
262 reach_length => this%reach_length_pointer()
263
264 ! -- Calculate coefficients and put into amat
265 do n = 1, this%dis%nodes
266
267 ! -- skip if constant stage
268 if (this%ibound(n) < 0) cycle
269
270 call this%calc_storage_dis1d(n, stage_new(n), stage_old(n), &
271 reach_length(n), qsto, derv)
272
273 ! -- Fill amat and rhs
274 idiag = this%dis%con%ia(n)
275 call matrix_sln%add_value_pos(idxglo(idiag), -derv)
276 rhs(n) = rhs(n) + qsto - derv * stage_new(n)
277
278 end do
279 end subroutine sto_fc_dis1d
280
281 !> @brief Fill A and right-hand side for the package
282 !!
283 !! Fill the coefficient matrix and right-hand side with the STO package terms.
284 !!
285 !<
286 subroutine sto_fc_dis2d(this, kiter, stage_old, stage_new, matrix_sln, &
287 idxglo, rhs)
288 ! -- modules
289 ! -- dummy
290 class(swfstotype) :: this
291 integer(I4B) :: kiter
292 real(DP), intent(inout), dimension(:) :: stage_old
293 real(DP), intent(inout), dimension(:) :: stage_new
294 class(matrixbasetype), pointer :: matrix_sln
295 integer(I4B), intent(in), dimension(:) :: idxglo
296 real(DP), intent(inout), dimension(:) :: rhs
297 ! -- local
298 integer(I4B) :: n, idiag
299 real(DP) :: derv
300 real(DP) :: qsto
301
302 ! -- Calculate coefficients and put into amat
303 do n = 1, this%dis%nodes
304 !
305 ! -- skip if constant stage
306 if (this%ibound(n) < 0) cycle
307
308 ! Calculate storage and derivative term
309 call this%calc_storage_dis2d(n, stage_new(n), stage_old(n), &
310 qsto, derv)
311
312 ! -- Fill amat and rhs
313 idiag = this%dis%con%ia(n)
314 call matrix_sln%add_value_pos(idxglo(idiag), -derv)
315 rhs(n) = rhs(n) + qsto - derv * stage_new(n)
316
317 end do
318
319 end subroutine sto_fc_dis2d
320
321 !> @brief Calculate flows for package
322 !<
323 subroutine sto_cq(this, flowja, stage_new, stage_old)
324 ! -- dummy
325 class(swfstotype) :: this
326 real(DP), intent(inout), dimension(:) :: flowja
327 real(DP), intent(inout), dimension(:) :: stage_new
328 real(DP), intent(inout), dimension(:) :: stage_old
329 ! -- local
330 real(DP), dimension(:), pointer :: reach_length
331 integer(I4B) :: n
332 integer(I4B) :: idiag
333 real(DP) :: dx
334 real(DP) :: q
335
336 ! -- test if steady-state stress period
337 if (this%iss /= 0) return
338
339 ! Set pointer to reach_length for 1d
340 reach_length => this%reach_length_pointer()
341
342 ! -- Calculate storage term
343 do n = 1, this%dis%nodes
344 !
345 ! -- skip if constant stage
346 if (this%ibound(n) < 0) cycle
347
348 ! Calculate storage for either the DIS1D or DIS2D cases and
349 ! add to flowja
350 if (associated(reach_length)) then
351 dx = reach_length(n)
352 call this%calc_storage_dis1d(n, stage_new(n), stage_old(n), dx, q)
353 else
354 call this%calc_storage_dis2d(n, stage_new(n), stage_old(n), q)
355 end if
356 this%qsto(n) = -q
357 idiag = this%dis%con%ia(n)
358 flowja(idiag) = flowja(idiag) + this%qsto(n)
359
360 end do
361 end subroutine sto_cq
362
363 subroutine calc_storage_dis1d(this, n, stage_new, stage_old, dx, qsto, derv)
364 ! module
365 use tdismodule, only: delt
367 ! dummy
368 class(swfstotype) :: this
369 integer(I4B), intent(in) :: n
370 real(DP), intent(in) :: stage_new
371 real(DP), intent(in) :: stage_old
372 real(DP), intent(in) :: dx
373 real(DP), intent(inout) :: qsto
374 real(DP), intent(inout), optional :: derv
375 ! local
376 real(DP) :: depth_new
377 real(DP) :: depth_old
378 real(DP) :: width_n
379 real(DP) :: width_m
380 real(DP) :: cxs_area_new
381 real(DP) :: cxs_area_old
382 real(DP) :: cxs_area_eps
383 real(DP) :: eps
384
385 call this%dis%get_flow_width(n, n, 0, width_n, width_m)
386 depth_new = stage_new - this%dis%bot(n)
387 depth_old = stage_old - this%dis%bot(n)
388 cxs_area_new = this%cxs%get_area(this%idcxs(n), width_n, depth_new)
389 cxs_area_old = this%cxs%get_area(this%idcxs(n), width_n, depth_old)
390 qsto = (cxs_area_new - cxs_area_old) * dx / delt
391 if (present(derv)) then
392 eps = get_perturbation(depth_new)
393 cxs_area_eps = this%cxs%get_area(this%idcxs(n), width_n, depth_new + eps)
394 derv = (cxs_area_eps - cxs_area_new) * dx / delt / eps
395 end if
396
397 end subroutine calc_storage_dis1d
398
399 subroutine calc_storage_dis2d(this, n, stage_new, stage_old, qsto, derv)
400 ! module
401 use tdismodule, only: delt
403 ! dummy
404 class(swfstotype) :: this
405 integer(I4B), intent(in) :: n
406 real(DP), intent(in) :: stage_new
407 real(DP), intent(in) :: stage_old
408 real(DP), intent(inout) :: qsto
409 real(DP), intent(inout), optional :: derv
410 ! local
411 real(DP) :: area
412 real(DP) :: depth_new
413 real(DP) :: depth_old
414 real(DP) :: depth_eps
415 real(DP) :: volume_new
416 real(DP) :: volume_old
417 real(DP) :: eps
418
419 area = this%dis%get_area(n)
420 depth_new = stage_new - this%dis%bot(n)
421 depth_old = stage_old - this%dis%bot(n)
422 volume_new = area * depth_new
423 volume_old = area * depth_old
424 qsto = (volume_new - volume_old) / delt
425
426 if (present(derv)) then
427 eps = get_perturbation(depth_new)
428 depth_eps = depth_new + eps
429 derv = (depth_eps - depth_new) * area / delt / eps
430 end if
431
432 end subroutine calc_storage_dis2d
433
434 !> @brief Model budget calculation for package
435 !!
436 !! Budget calculation for the STO package components. Components include
437 !! specific storage and specific yield storage.
438 !!
439 !<
440 subroutine sto_bd(this, isuppress_output, model_budget)
441 ! -- modules
442 use tdismodule, only: delt
444 ! -- dummy variables
445 class(swfstotype) :: this !< SwfStoType object
446 integer(I4B), intent(in) :: isuppress_output !< flag to suppress model output
447 type(budgettype), intent(inout) :: model_budget !< model budget object
448 ! -- local variables
449 real(DP) :: rin
450 real(DP) :: rout
451 !
452 ! -- Add storage rates to model budget
453 call rate_accumulator(this%qsto, rin, rout)
454 call model_budget%addentry(rin, rout, delt, ' STO', &
455 isuppress_output, ' STORAGE')
456 end subroutine sto_bd
457
458 !> @brief Save model flows for package
459 !!
460 !! Save cell-by-cell budget terms for the STO package.
461 !!
462 !<
463 subroutine sto_save_model_flows(this, icbcfl, icbcun)
464 ! -- dummy variables
465 class(swfstotype) :: this !< SwfStoType object
466 integer(I4B), intent(in) :: icbcfl !< flag to output budget data
467 integer(I4B), intent(in) :: icbcun !< cell-by-cell file unit number
468 ! -- local variables
469 integer(I4B) :: ibinun
470 integer(I4B) :: iprint, nvaluesp, nwidthp
471 character(len=1) :: cdatafmp = ' ', editdesc = ' '
472 real(DP) :: dinact
473 !
474 ! -- Set unit number for binary output
475 if (this%ipakcb < 0) then
476 ibinun = icbcun
477 elseif (this%ipakcb == 0) then
478 ibinun = 0
479 else
480 ibinun = this%ipakcb
481 end if
482 if (icbcfl == 0) ibinun = 0
483 !
484 ! -- Record the storage rates if requested
485 if (ibinun /= 0) then
486 iprint = 0
487 dinact = dzero
488 !
489 ! -- qsto
490 call this%dis%record_array(this%qsto, this%iout, iprint, -ibinun, &
491 budtxt(1), cdatafmp, nvaluesp, &
492 nwidthp, editdesc, dinact)
493 end if
494 end subroutine sto_save_model_flows
495
496 !> @brief Deallocate package memory
497 !!
498 !! Deallocate STO package scalars and arrays.
499 !!
500 !<
501 subroutine sto_da(this)
502 ! -- modules
504 ! -- dummy variables
505 class(swfstotype) :: this !< SwfStoType object
506 !
507 ! -- Deallocate arrays if package is active
508 if (this%inunit > 0) then
509 call mem_deallocate(this%qsto)
510 nullify (this%idcxs)
511 nullify (this%iper)
512 nullify (this%storage)
513 end if
514 !
515 ! -- Deallocate scalars
516 !
517 ! -- deallocate parent
518 call this%NumericalPackageType%da()
519 end subroutine sto_da
520
521 !> @brief Allocate scalars
522 !!
523 !! Allocate and initialize scalars for the STO package. The base numerical
524 !! package allocate scalars method is also called.
525 !!
526 !<
527 subroutine allocate_scalars(this)
528 ! -- modules
530 ! -- dummy variables
531 class(swfstotype) :: this !< SwfStoType object
532 !
533 ! -- allocate scalars in NumericalPackageType
534 call this%NumericalPackageType%allocate_scalars()
535 !
536 ! -- allocate scalars
537 !call mem_allocate(this%xxx, 'XXX', this%memoryPath)
538 !
539 ! -- initialize scalars
540 !this%xxx = 0
541 end subroutine allocate_scalars
542
543 !> @brief Allocate package arrays
544 !!
545 !! Allocate and initialize STO package arrays.
546 !!
547 !<
548 subroutine allocate_arrays(this, nodes)
549 ! -- modules
551 ! -- dummy variables
552 class(swfstotype), target :: this !< SwfStoType object
553 integer(I4B), intent(in) :: nodes !< active model nodes
554 ! -- local variables
555 integer(I4B) :: n
556 !
557 ! -- Allocate arrays
558 call mem_allocate(this%qsto, nodes, 'STRGSS', this%memoryPath)
559 !
560 ! -- set input context pointers
561 if (this%inunit > 0) then
562 call mem_setptr(this%iper, 'IPER', this%input_mempath)
563 call mem_setptr(this%storage, 'STORAGE', this%input_mempath)
564 end if
565 !
566 ! -- Initialize arrays
567 this%iss = 0
568 do n = 1, nodes
569 this%qsto(n) = dzero
570 end do
571 end subroutine allocate_arrays
572
573 !> @brief Source input options for package
574 !!
575 !! Source options block parameters for STO package.
576 !!
577 !<
578 subroutine source_options(this)
579 ! -- modules
582 ! -- dummy variables
583 class(swfstotype) :: this !< SwfStoType object
584 ! -- local variables
585 type(stooptionsfoundtype) :: found
586 !
587 ! -- source package input
588 call mem_set_value(this%ipakcb, 'IPAKCB', this%input_mempath, found%ipakcb)
589 !
590 if (found%ipakcb) then
591 this%ipakcb = -1
592 end if
593 !
594 ! -- log found options
595 call this%log_options(found)
596 end subroutine source_options
597
598 !> @brief Log found options for package
599 !!
600 !! Log options block for STO package.
601 !!
602 !<
603 subroutine log_options(this, found)
604 ! -- modules
606 ! -- dummy variables
607 class(swfstotype) :: this !< SwfStoType object
608 type(stooptionsfoundtype), intent(in) :: found
609 ! -- local variables
610 ! -- formats
611 character(len=*), parameter :: fmtisvflow = &
612 "(4x,'CELL-BY-CELL FLOW INFORMATION WILL BE SAVED TO BINARY FILE &
613 &WHENEVER ICBCFL IS NOT ZERO.')"
614 !
615 write (this%iout, '(1x,a)') 'PROCESSING STORAGE OPTIONS'
616 !
617 if (found%ipakcb) then
618 write (this%iout, fmtisvflow)
619 end if
620 !
621 write (this%iout, '(1x,a)') 'END OF STORAGE OPTIONS'
622 end subroutine log_options
623
624 !> @brief Source input data for package
625 !!
626 !! Source griddata block parameters for STO package.
627 !!
628 !<
629 subroutine source_data(this)
630 ! -- modules
632 ! -- dummy variables
633 class(swfstotype) :: this !< SwfStoType object
634 ! -- local variables
635 character(len=24), dimension(1) :: aname
636 integer(I4B), dimension(:), pointer, contiguous :: map
637 !
638 ! -- initialize data
639 data aname(1)/' XXX'/
640 !
641 ! -- set map to reduce data input arrays
642 map => null()
643 if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser
644 !
645 ! -- log griddata
646 write (this%iout, '(1x,a)') 'PROCESSING GRIDDATA'
647 write (this%iout, '(1x,a)') 'END PROCESSING GRIDDATA'
648 end subroutine source_data
649
650 !> @brief Set pointers to channel properties in DFW Package
651 !<
652 subroutine set_dfw_pointers(this)
653 ! -- modules
655 ! -- dummy
656 class(swfstotype) :: this !< this instance
657 ! -- local
658 character(len=LENMEMPATH) :: dfw_mem_path
659
660 dfw_mem_path = create_mem_path(this%name_model, 'DFW')
661 call mem_setptr(this%idcxs, 'IDCXS', dfw_mem_path)
662
663 end subroutine set_dfw_pointers
664
665 function reach_length_pointer(this) result(ptr)
666 ! dummy
667 class(swfstotype) :: this !< this instance
668 ! return
669 real(dp), dimension(:), pointer :: ptr
670 ! local
671 class(disbasetype), pointer :: dis
672
673 ptr => null()
674 dis => this%dis
675 select type (dis)
676 type is (disv1dtype)
677 ptr => dis%length
678 end select
679
680 end function reach_length_pointer
681
682end module swfstomodule
This module contains the BudgetModule.
Definition Budget.f90:20
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
@ dis
DIS6 discretization.
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
integer(i4b), parameter lenmempath
maximum length of the memory path
Definition Constants.f90:27
subroutine log_options(this, found)
Write user options to list file.
Definition Disv1d.f90:307
subroutine allocate_scalars(this, name_model, input_mempath)
Allocate scalar variables.
Definition Disv1d.f90:232
subroutine allocate_arrays(this)
Definition Disv1d.f90:796
subroutine source_options(this)
Copy options from IDM into package.
Definition Disv1d.f90:272
This module defines variable data types.
Definition kind.f90:8
real(dp) function, public get_perturbation(x)
Calculate a numerical perturbation given the value of x.
Definition MathUtil.f90:372
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains the base numerical package type.
This module contains simulation methods.
Definition Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition Sim.f90:94
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) iout
file unit number for simulation output
This module contains the SourceCommonModule.
logical(lgp) function, public filein_fname(filename, tagname, input_mempath, input_fname)
enforce and set a single input filename provided via FILEIN keyword
This module contains the storage package methods.
Definition swf-sto.f90:7
subroutine sto_fc_dis2d(this, kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
Fill A and right-hand side for the package.
Definition swf-sto.f90:288
subroutine calc_storage_dis2d(this, n, stage_new, stage_old, qsto, derv)
Definition swf-sto.f90:400
subroutine sto_save_model_flows(this, icbcfl, icbcun)
Save model flows for package.
Definition swf-sto.f90:464
subroutine source_data(this)
Source input data for package.
Definition swf-sto.f90:630
subroutine sto_fc(this, kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
Fill A and right-hand side for the package.
Definition swf-sto.f90:206
subroutine sto_bd(this, isuppress_output, model_budget)
Model budget calculation for package.
Definition swf-sto.f90:441
subroutine sto_cq(this, flowja, stage_new, stage_old)
Calculate flows for package.
Definition swf-sto.f90:324
subroutine sto_rp(this)
Read and prepare method for package.
Definition swf-sto.f90:152
subroutine sto_ad(this)
Advance the package.
Definition swf-sto.f90:195
subroutine sto_ar(this, dis, ibound)
Allocate and read method for package.
Definition swf-sto.f90:108
subroutine sto_da(this)
Deallocate package memory.
Definition swf-sto.f90:502
subroutine sto_fc_dis1d(this, kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
Fill A and right-hand side for the package.
Definition swf-sto.f90:246
real(dp) function, dimension(:), pointer reach_length_pointer(this)
Definition swf-sto.f90:666
subroutine calc_storage_dis1d(this, n, stage_new, stage_old, dx, qsto, derv)
Definition swf-sto.f90:364
subroutine set_dfw_pointers(this)
Set pointers to channel properties in DFW Package.
Definition swf-sto.f90:653
subroutine, public sto_cr(stoobj, name_model, mempath, inunit, iout, cxs)
Create a new package object.
Definition swf-sto.f90:76
character(len=lenbudtxt), dimension(1) budtxt
Definition swf-sto.f90:23
integer(i4b), pointer, public kper
current stress period number
Definition tdis.f90:26
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
flags indicating which STO options were found in the input
Definition swf-sto.f90:27