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