MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
swfstomodule Module Reference

This module contains the storage package methods. More...

Data Types

type  stooptionsfoundtype
 flags indicating which STO options were found in the input More...
type  swfstotype

Functions/Subroutines

subroutine, public sto_cr (stoobj, name_model, mempath, inunit, iout, cxs)
 Create a new package object.
subroutine sto_ar (this, dis, ibound)
 Allocate and read method for package.
subroutine sto_rp (this)
 Read and prepare method for package.
subroutine sto_ad (this)
 Advance the package.
subroutine sto_fc (this, kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
 Fill A and right-hand side for the package.
subroutine sto_fc_dis1d (this, kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
 Fill A and right-hand side for the package.
subroutine sto_fc_dis2d (this, kiter, stage_old, stage_new, matrix_sln, idxglo, rhs)
 Fill A and right-hand side for the package.
subroutine sto_cq (this, flowja, stage_new, stage_old)
 Calculate flows for package.
subroutine calc_storage_dis1d (this, n, stage_new, stage_old, dx, qsto, derv)
subroutine calc_storage_dis2d (this, n, stage_new, stage_old, qsto, derv)
subroutine sto_bd (this, isuppress_output, model_budget)
 Model budget calculation for package.
subroutine sto_save_model_flows (this, icbcfl, icbcun)
 Save model flows for package.
subroutine sto_da (this)
 Deallocate package memory.
subroutine allocate_scalars (this)
 Allocate scalars.
subroutine allocate_arrays (this, nodes)
 Allocate package arrays.
subroutine source_options (this)
 Source input options for package.
subroutine log_options (this, found)
 Log found options for package.
subroutine source_data (this)
 Source input data for package.
subroutine set_dfw_pointers (this)
 Set pointers to channel properties in DFW Package.
real(dp) function, dimension(:), pointer reach_length_pointer (this)

Variables

character(len=lenbudtxt), dimension(1) budtxt = [' STORAGE']

Detailed Description

This module contains the methods used to add the effects of storage on the surface water flow equation.

Function/Subroutine Documentation

◆ allocate_arrays()

subroutine swfstomodule::allocate_arrays ( class(swfstotype), target this,
integer(i4b), intent(in) nodes )

Allocate and initialize STO package arrays.

Parameters
thisSwfStoType object
[in]nodesactive model nodes

Definition at line 548 of file swf-sto.f90.

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

◆ allocate_scalars()

subroutine swfstomodule::allocate_scalars ( class(swfstotype) this)

Allocate and initialize scalars for the STO package. The base numerical package allocate scalars method is also called.

Parameters
thisSwfStoType object

Definition at line 527 of file swf-sto.f90.

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

◆ calc_storage_dis1d()

subroutine swfstomodule::calc_storage_dis1d ( class(swfstotype) this,
integer(i4b), intent(in) n,
real(dp), intent(in) stage_new,
real(dp), intent(in) stage_old,
real(dp), intent(in) dx,
real(dp), intent(inout) qsto,
real(dp), intent(inout), optional derv )

Definition at line 363 of file swf-sto.f90.

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
real(dp) function, public get_perturbation(x)
Calculate a numerical perturbation given the value of x.
Definition MathUtil.f90:372
real(dp), pointer, public delt
length of the current time step
Definition tdis.f90:32
Here is the call graph for this function:

◆ calc_storage_dis2d()

subroutine swfstomodule::calc_storage_dis2d ( class(swfstotype) this,
integer(i4b), intent(in) n,
real(dp), intent(in) stage_new,
real(dp), intent(in) stage_old,
real(dp), intent(inout) qsto,
real(dp), intent(inout), optional derv )

Definition at line 399 of file swf-sto.f90.

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
Here is the call graph for this function:

◆ log_options()

subroutine swfstomodule::log_options ( class(swfstotype) this,
type(stooptionsfoundtype), intent(in) found )

Log options block for STO package.

Parameters
thisSwfStoType object

Definition at line 603 of file swf-sto.f90.

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'

◆ reach_length_pointer()

real(dp) function, dimension(:), pointer swfstomodule::reach_length_pointer ( class(swfstotype) this)
Parameters
thisthis instance

Definition at line 665 of file swf-sto.f90.

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

◆ set_dfw_pointers()

subroutine swfstomodule::set_dfw_pointers ( class(swfstotype) this)
Parameters
thisthis instance

Definition at line 652 of file swf-sto.f90.

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

◆ source_data()

subroutine swfstomodule::source_data ( class(swfstotype) this)

Source griddata block parameters for STO package.

Parameters
thisSwfStoType object

Definition at line 629 of file swf-sto.f90.

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'

◆ source_options()

subroutine swfstomodule::source_options ( class(swfstotype) this)

Source options block parameters for STO package.

Parameters
thisSwfStoType object

Definition at line 578 of file swf-sto.f90.

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)
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
Here is the call graph for this function:

◆ sto_ad()

subroutine swfstomodule::sto_ad ( class(swfstotype) this)

Advance data in the STO package.

Parameters
thisSwfStoType object

Definition at line 194 of file swf-sto.f90.

195 ! -- modules
196 ! -- dummy variables
197 class(SwfStoType) :: this !< SwfStoType object

◆ sto_ar()

subroutine swfstomodule::sto_ar ( class(swfstotype) this,
class(disbasetype), intent(in), pointer dis,
integer(i4b), dimension(:), pointer, contiguous ibound )

Method to allocate and read static data for the STO package.

Parameters
thisSwfStoType object
[in]dismodel discretization object
iboundmodel ibound array

Definition at line 107 of file swf-sto.f90.

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()
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
Here is the call graph for this function:

◆ sto_bd()

subroutine swfstomodule::sto_bd ( class(swfstotype) this,
integer(i4b), intent(in) isuppress_output,
type(budgettype), intent(inout) model_budget )

Budget calculation for the STO package components. Components include specific storage and specific yield storage.

Parameters
thisSwfStoType object
[in]isuppress_outputflag to suppress model output
[in,out]model_budgetmodel budget object

Definition at line 440 of file swf-sto.f90.

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')
This module contains the BudgetModule.
Definition Budget.f90:20
subroutine, public rate_accumulator(flow, rin, rout)
Rate accumulator subroutine.
Definition Budget.f90:634
Derived type for the Budget object.
Definition Budget.f90:40
Here is the call graph for this function:

◆ sto_cq()

subroutine swfstomodule::sto_cq ( class(swfstotype) this,
real(dp), dimension(:), intent(inout) flowja,
real(dp), dimension(:), intent(inout) stage_new,
real(dp), dimension(:), intent(inout) stage_old )

Definition at line 323 of file swf-sto.f90.

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

◆ sto_cr()

subroutine, public swfstomodule::sto_cr ( type(swfstotype), pointer stoobj,
character(len=*), intent(in) name_model,
character(len=*), intent(in) mempath,
integer(i4b), intent(in) inunit,
integer(i4b), intent(in) iout,
type(swfcxstype), intent(in), pointer cxs )

Create a new storage (STO) object

Parameters
stoobjSwfStoType object
[in]name_modelname of model
[in]mempathinput context mem path
[in]inunitpackage input file unit
[in]ioutmodel listing file unit
[in]cxsthe pointer to the cxs package

Definition at line 75 of file swf-sto.f90.

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
Here is the caller graph for this function:

◆ sto_da()

subroutine swfstomodule::sto_da ( class(swfstotype) this)

Deallocate STO package scalars and arrays.

Parameters
thisSwfStoType object

Definition at line 501 of file swf-sto.f90.

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()

◆ sto_fc()

subroutine swfstomodule::sto_fc ( class(swfstotype) this,
integer(i4b) kiter,
real(dp), dimension(:), intent(inout) stage_old,
real(dp), dimension(:), intent(inout) stage_new,
class(matrixbasetype), pointer matrix_sln,
integer(i4b), dimension(:), intent(in) idxglo,
real(dp), dimension(:), intent(inout) rhs )

Fill the coefficient matrix and right-hand side with the STO package terms.

Definition at line 205 of file swf-sto.f90.

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
Here is the call graph for this function:

◆ sto_fc_dis1d()

subroutine swfstomodule::sto_fc_dis1d ( class(swfstotype) this,
integer(i4b) kiter,
real(dp), dimension(:), intent(inout) stage_old,
real(dp), dimension(:), intent(inout) stage_new,
class(matrixbasetype), pointer matrix_sln,
integer(i4b), dimension(:), intent(in) idxglo,
real(dp), dimension(:), intent(inout) rhs )

Fill the coefficient matrix and right-hand side with the STO package terms.

Definition at line 244 of file swf-sto.f90.

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

◆ sto_fc_dis2d()

subroutine swfstomodule::sto_fc_dis2d ( class(swfstotype) this,
integer(i4b) kiter,
real(dp), dimension(:), intent(inout) stage_old,
real(dp), dimension(:), intent(inout) stage_new,
class(matrixbasetype), pointer matrix_sln,
integer(i4b), dimension(:), intent(in) idxglo,
real(dp), dimension(:), intent(inout) rhs )

Fill the coefficient matrix and right-hand side with the STO package terms.

Definition at line 286 of file swf-sto.f90.

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

◆ sto_rp()

subroutine swfstomodule::sto_rp ( class(swfstotype) this)

Method to read and prepare stress period data for the STO package.

Parameters
thisSwfStoType object

Definition at line 151 of file swf-sto.f90.

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)))
integer(i4b), pointer, public kper
current stress period number
Definition tdis.f90:26
Here is the call graph for this function:

◆ sto_save_model_flows()

subroutine swfstomodule::sto_save_model_flows ( class(swfstotype) this,
integer(i4b), intent(in) icbcfl,
integer(i4b), intent(in) icbcun )

Save cell-by-cell budget terms for the STO package.

Parameters
thisSwfStoType object
[in]icbcflflag to output budget data
[in]icbcuncell-by-cell file unit number

Definition at line 463 of file swf-sto.f90.

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

Variable Documentation

◆ budtxt

character(len=lenbudtxt), dimension(1) swfstomodule::budtxt = [' STORAGE']

Definition at line 23 of file swf-sto.f90.