MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
BudgetObject.f90
Go to the documentation of this file.
1 ! Comprehensive budget object that stores all of the
2 ! intercell flows, and the inflows and the outflows for
3 ! an advanced package.
5 
6  use kindmodule, only: i4b, dp
13  use tablemodule, only: tabletype, table_cr
14  use basedismodule, only: disbasetype
16 
17  implicit none
18 
19  public :: budgetobjecttype
20  public :: budgetobject_cr
21  public :: budgetobject_cr_bfr
22 
24  !
25  ! -- name, number of control volumes, and number of budget terms
26  character(len=LENBUDTXT) :: name
27  integer(I4B) :: ncv
28  integer(I4B) :: nbudterm
29  !
30  ! -- state variables
31  real(dp), dimension(:), pointer :: xnew => null()
32  real(dp), dimension(:), pointer :: xold => null()
33  !
34  ! -- csr intercell flows
35  integer(I4B) :: iflowja
36  real(dp), dimension(:), pointer :: flowja => null()
37  !
38  ! -- storage
39  integer(I4B) :: nsto
40  real(dp), dimension(:, :), pointer :: qsto => null()
41  !
42  ! -- array of budget terms, with one separate entry for each term
43  ! such as rainfall, et, leakage, etc.
44  integer(I4B) :: iterm
45  type(budgettermtype), dimension(:), allocatable :: budterm
46  !
47  ! -- budget table object, for writing the typical MODFLOW budget
48  type(budgettype), pointer :: budtable => null()
49  !
50  ! -- flow table object, for writing the flow budget for
51  ! each control volume
52  logical, pointer :: add_cellids => null()
53  integer(I4B), pointer :: icellid => null()
54  integer(I4B), pointer :: nflowterms => null()
55  integer(I4B), dimension(:), pointer :: istart => null()
56  integer(I4B), dimension(:), pointer :: iflowterms => null()
57  type(tabletype), pointer :: flowtab => null()
58  !
59  ! -- budget file reader, for reading flows from a binary file
60  type(budgetfilereadertype), pointer :: bfr => null()
61 
62  contains
63 
64  procedure :: budgetobject_df
65  procedure :: flowtable_df
66  procedure :: accumulate_terms
67  procedure :: write_budtable
68  procedure :: write_flowtable
69  procedure :: save_flows
70  procedure :: read_flows
71  procedure :: budgetobject_da
72  procedure :: bfr_init
73  procedure :: bfr_advance
74  procedure :: fill_from_bfr
75 
76  end type budgetobjecttype
77 
78 contains
79 
80  !> @brief Create a new budget object
81  !<
82  subroutine budgetobject_cr(this, name)
83  ! -- dummy
84  type(budgetobjecttype), pointer :: this
85  character(len=*), intent(in) :: name
86  !
87  ! -- Create the object
88  allocate (this)
89  !
90  ! -- Initialize variables
91  this%name = name
92  this%ncv = 0
93  this%nbudterm = 0
94  this%iflowja = 0
95  this%nsto = 0
96  this%iterm = 0
97  !
98  ! -- Initialize budget table
99  call budget_cr(this%budtable, name)
100  end subroutine budgetobject_cr
101 
102  !> @brief Define the new budget object
103  !<
104  subroutine budgetobject_df(this, ncv, nbudterm, iflowja, nsto, &
105  bddim_opt, labeltitle_opt, bdzone_opt, &
106  ibudcsv)
107  ! -- dummy
108  class(budgetobjecttype) :: this
109  integer(I4B), intent(in) :: ncv
110  integer(I4B), intent(in) :: nbudterm
111  integer(I4B), intent(in) :: iflowja
112  integer(I4B), intent(in) :: nsto
113  character(len=*), optional :: bddim_opt
114  character(len=*), optional :: labeltitle_opt
115  character(len=*), optional :: bdzone_opt
116  integer(I4B), intent(in), optional :: ibudcsv
117  ! -- local
118  character(len=20) :: bdtype
119  character(len=5) :: bddim
120  character(len=16) :: labeltitle
121  character(len=20) :: bdzone
122  !
123  ! -- Set values
124  this%ncv = ncv
125  this%nbudterm = nbudterm
126  this%iflowja = iflowja
127  this%nsto = nsto
128  !
129  ! -- Allocate space for budterm
130  allocate (this%budterm(nbudterm))
131  !
132  ! -- Set the budget type to name
133  bdtype = this%name
134  !
135  ! -- Set the budget dimension
136  if (present(bddim_opt)) then
137  bddim = bddim_opt
138  else
139  bddim = 'L**3'
140  end if
141  !
142  ! -- Set the budget zone
143  if (present(bdzone_opt)) then
144  bdzone = bdzone_opt
145  else
146  bdzone = 'ENTIRE MODEL'
147  end if
148  !
149  ! -- Set the label title
150  if (present(labeltitle_opt)) then
151  labeltitle = labeltitle_opt
152  else
153  labeltitle = 'PACKAGE NAME'
154  end if
155  !
156  ! -- Setup the budget table object
157  call this%budtable%budget_df(nbudterm, bdtype, bddim, labeltitle, bdzone)
158  !
159  ! -- Trigger csv output
160  if (present(ibudcsv)) then
161  call this%budtable%set_ibudcsv(ibudcsv)
162  end if
163  end subroutine budgetobject_df
164 
165  !> @brief Define the new flow table object
166  !<
167  subroutine flowtable_df(this, iout, cellids)
168  ! -- dummy
169  class(budgetobjecttype) :: this
170  integer(I4B), intent(in) :: iout
171  character(len=*), intent(in), optional :: cellids
172  ! -- local
173  character(len=LINELENGTH) :: title
174  character(len=LINELENGTH) :: text
175  character(len=LENBUDTXT) :: flowtype
176  character(len=LENBUDTXT) :: tag
177  character(len=LENBUDTXT) :: coupletype
178  logical :: lfound
179  logical :: add_cellids
180  integer(I4B) :: maxcol
181  integer(I4B) :: idx
182  integer(I4B) :: ipos
183  integer(I4B) :: i
184  !
185  ! -- Process optional variables
186  if (present(cellids)) then
187  add_cellids = .true.
188  coupletype = cellids
189  else
190  add_cellids = .false.
191  end if
192  !
193  ! -- Allocate scalars
194  allocate (this%add_cellids)
195  allocate (this%icellid)
196  allocate (this%nflowterms)
197  !
198  ! -- Initialize scalars
199  this%add_cellids = add_cellids
200  this%nflowterms = 0
201  this%icellid = 0
202  !
203  ! -- Determine the number of columns in the table
204  maxcol = 3
205  if (add_cellids) then
206  maxcol = maxcol + 1
207  end if
208  do i = 1, this%nbudterm
209  lfound = .false.
210  flowtype = this%budterm(i)%get_flowtype()
211  if (trim(adjustl(flowtype)) == 'FLOW-JA-FACE') then
212  lfound = .true.
213  maxcol = maxcol + 2
214  else if (trim(adjustl(flowtype)) /= 'AUXILIARY') then
215  lfound = .true.
216  maxcol = maxcol + 1
217  end if
218  if (lfound) then
219  this%nflowterms = this%nflowterms + 1
220  if (add_cellids) then
221  if (trim(adjustl(flowtype)) == trim(adjustl(coupletype))) then
222  this%icellid = i
223  end if
224  end if
225  end if
226  end do
227  !
228  ! -- Allocate arrays
229  allocate (this%istart(this%nflowterms))
230  allocate (this%iflowterms(this%nflowterms))
231  !
232  ! -- Set up flow tableobj
233  title = trim(this%name)//' PACKAGE - SUMMARY OF FLOWS FOR '// &
234  'EACH CONTROL VOLUME'
235  call table_cr(this%flowtab, this%name, title)
236  call this%flowtab%table_df(this%ncv, maxcol, iout, transient=.true.)
237  !
238  ! -- Go through and set up flow table budget terms
239  text = 'NUMBER'
240  call this%flowtab%initialize_column(text, 10, alignment=tabcenter)
241  if (add_cellids) then
242  text = 'CELLID'
243  call this%flowtab%initialize_column(text, 20, alignment=tableft)
244  end if
245  idx = 1
246  do i = 1, this%nbudterm
247  lfound = .false.
248  flowtype = this%budterm(i)%get_flowtype()
249  tag = trim(adjustl(flowtype))
250  ipos = index(tag, '-')
251  if (ipos > 0) then
252  tag(ipos:ipos) = ' '
253  end if
254  if (trim(adjustl(flowtype)) == 'FLOW-JA-FACE') then
255  lfound = .true.
256  text = 'INFLOW'
257  call this%flowtab%initialize_column(text, 12, alignment=tabcenter)
258  text = 'OUTFLOW'
259  call this%flowtab%initialize_column(text, 12, alignment=tabcenter)
260  else if (trim(adjustl(flowtype)) /= 'AUXILIARY') then
261  lfound = .true.
262  call this%flowtab%initialize_column(tag, 12, alignment=tabcenter)
263  end if
264  if (lfound) then
265  this%iflowterms(idx) = i
266  idx = idx + 1
267  end if
268  end do
269  text = 'IN - OUT'
270  call this%flowtab%initialize_column(text, 12, alignment=tabcenter)
271  text = 'PERCENT DIFFERENCE'
272  call this%flowtab%initialize_column(text, 12, alignment=tabcenter)
273  end subroutine flowtable_df
274 
275  !> @brief Add up accumulators and submit to budget table
276  !<
277  subroutine accumulate_terms(this)
278  ! -- modules
279  use tdismodule, only: delt
280  ! -- dummy
281  class(budgetobjecttype) :: this
282  ! -- local
283  character(len=LENBUDTXT) :: flowtype
284  integer(I4B) :: i
285  real(DP) :: ratin, ratout
286  !
287  ! -- Reset the budget table
288  call this%budtable%reset()
289  !
290  ! -- Calculate the budget table terms
291  do i = 1, this%nbudterm
292  !
293  ! -- Accumulate positive and negative flows for each budget term
294  flowtype = this%budterm(i)%flowtype
295  select case (trim(adjustl(flowtype)))
296  case ('FLOW-JA-FACE')
297  ! -- Skip
298  case default
299  !
300  ! -- Calculate sum of positive and negative flows
301  call this%budterm(i)%accumulate_flow(ratin, ratout)
302  !
303  ! -- Pass accumulators into the budget table
304  call this%budtable%addentry(ratin, ratout, delt, flowtype)
305  end select
306  end do
307  end subroutine accumulate_terms
308 
309  !> @brief Write the flow table for each advanced package control volume
310  !<
311  subroutine write_flowtable(this, dis, kstp, kper, cellidstr)
312  ! -- dummy
313  class(budgetobjecttype) :: this
314  class(disbasetype), intent(in) :: dis
315  integer(I4B), intent(in) :: kstp
316  integer(I4B), intent(in) :: kper
317  character(len=20), dimension(:), optional :: cellidstr
318  ! -- local
319  character(len=LENBUDTXT) :: flowtype
320  character(len=20) :: cellid
321  integer(I4B) :: nlist
322  integer(I4B) :: id1
323  integer(I4B) :: id2
324  integer(I4B) :: icv
325  integer(I4B) :: idx
326  integer(I4B) :: i
327  integer(I4B) :: j
328  real(DP) :: v
329  real(DP) :: qin
330  real(DP) :: qout
331  real(DP) :: q
332  real(DP) :: qinflow
333  real(DP) :: qoutflow
334  real(DP) :: qerr
335  real(DP) :: qavg
336  real(DP) :: qpd
337  !
338  ! -- Reset starting position
339  do j = 1, this%nflowterms
340  this%istart(j) = 1
341  end do
342  !
343  ! -- Set table kstp and kper
344  call this%flowtab%set_kstpkper(kstp, kper)
345  !
346  ! -- Write the table
347  do icv = 1, this%ncv
348  call this%flowtab%add_term(icv)
349  !
350  ! -- Initialize flow terms for the control volume
351  qin = dzero
352  qout = dzero
353  !
354  ! -- Add cellid if required
355  if (this%add_cellids) then
356  if (present(cellidstr)) then
357  !
358  ! -- If there are not maxbound entries for this%budterm(idx),
359  ! which can happen for sfr, for example, if 'none' connections
360  ! are specified, then cellidstr should be passed in if the flow
361  ! table needs a cellid label.
362  cellid = cellidstr(icv)
363  else
364  !
365  ! -- Determine the cellid for this entry. The cellid, such as
366  ! (1, 10, 10), is assumed to be in the id2 column of this budterm.
367  j = this%icellid
368  idx = this%iflowterms(j)
369  i = this%istart(j)
370  id2 = this%budterm(idx)%get_id2(i)
371  if (id2 > 0) then
372  call dis%noder_to_string(id2, cellid)
373  else
374  cellid = 'NONE'
375  end if
376  end if
377  call this%flowtab%add_term(cellid)
378  end if
379  !
380  ! -- Iterate over the flow terms
381  do j = 1, this%nflowterms
382  !
383  ! -- Initialize flow terms for the row
384  q = dzero
385  qinflow = dzero
386  qoutflow = dzero
387  !
388  ! -- Determine the index, flowtype and length of
389  ! the flowterm
390  idx = this%iflowterms(j)
391  flowtype = this%budterm(idx)%get_flowtype()
392  nlist = this%budterm(idx)%get_nlist()
393  !
394  ! -- Iterate over the entries in the flowtype. If id1 is not ordered
395  ! then need to look through the entire list each time
396  colterm: do i = this%istart(j), nlist
397  id1 = this%budterm(idx)%get_id1(i)
398  if (this%budterm(idx)%ordered_id1) then
399  if (id1 > icv) then
400  this%istart(j) = i
401  exit colterm
402  end if
403  else
404  if (id1 /= icv) then
405  cycle colterm
406  end if
407  end if
408  if (id1 /= icv) then
409  v = dzero
410  else
411  v = this%budterm(idx)%get_flow(i)
412  end if
413  if (trim(adjustl(flowtype)) == 'FLOW-JA-FACE') then
414  if (v < dzero) then
415  qoutflow = qoutflow + v
416  else
417  qinflow = qinflow + v
418  end if
419  end if
420  !
421  ! -- Accumulators
422  q = q + v
423  if (v < dzero) then
424  qout = qout + v
425  else
426  qin = qin + v
427  end if
428  end do colterm
429  !
430  ! -- Add entry to table
431  if (trim(adjustl(flowtype)) == 'FLOW-JA-FACE') then
432  call this%flowtab%add_term(qinflow)
433  call this%flowtab%add_term(qoutflow)
434  else
435  call this%flowtab%add_term(q)
436  end if
437  end do
438  !
439  ! -- Calculate in-out and percent difference
440  qerr = qin + qout
441  qavg = dhalf * (qin - qout)
442  qpd = dzero
443  if (qavg > dzero) then
444  qpd = dhundred * qerr / qavg
445  end if
446  call this%flowtab%add_term(qerr)
447  call this%flowtab%add_term(qpd)
448  end do
449  end subroutine write_flowtable
450 
451  !> @brief Write the budget table
452  !<
453  subroutine write_budtable(this, kstp, kper, iout, ibudfl, totim, delt)
454  ! -- dummy
455  class(budgetobjecttype) :: this
456  integer(I4B), intent(in) :: kstp
457  integer(I4B), intent(in) :: kper
458  integer(I4B), intent(in) :: iout
459  integer(I4B), intent(in) :: ibudfl
460  real(DP), intent(in) :: totim
461  real(DP), intent(in) :: delt
462  !
463  ! -- Write the table
464  call this%budtable%finalize_step(delt)
465  if (ibudfl /= 0) then
466  call this%budtable%budget_ot(kstp, kper, iout)
467  end if
468  call this%budtable%writecsv(totim)
469  end subroutine write_budtable
470 
471  !> @brief Write the budget table
472  !<
473  subroutine save_flows(this, dis, ibinun, kstp, kper, delt, &
474  pertim, totim, iout)
475  ! -- dummy
476  class(budgetobjecttype) :: this
477  class(disbasetype), intent(in) :: dis
478  integer(I4B), intent(in) :: ibinun
479  integer(I4B), intent(in) :: kstp
480  integer(I4B), intent(in) :: kper
481  real(DP), intent(in) :: delt
482  real(DP), intent(in) :: pertim
483  real(DP), intent(in) :: totim
484  integer(I4B), intent(in) :: iout
485  ! -- dummy
486  integer(I4B) :: i
487  !
488  ! -- Save flows for each budget term
489  do i = 1, this%nbudterm
490  call this%budterm(i)%save_flows(dis, ibinun, kstp, kper, delt, &
491  pertim, totim, iout)
492  end do
493  end subroutine save_flows
494 
495  !> @brief Read from a binary file into this BudgetObjectType
496  !<
497  subroutine read_flows(this, dis, ibinun)
498  ! -- dummy
499  class(budgetobjecttype) :: this
500  class(disbasetype), intent(in) :: dis
501  integer(I4B), intent(in) :: ibinun
502  ! -- local
503  integer(I4B) :: kstp
504  integer(I4B) :: kper
505  real(DP) :: delt
506  real(DP) :: pertim
507  real(DP) :: totim
508  integer(I4B) :: i
509  !
510  ! -- Read flows for each budget term
511  do i = 1, this%nbudterm
512  call this%budterm(i)%read_flows(dis, ibinun, kstp, kper, delt, &
513  pertim, totim)
514  end do
515  end subroutine read_flows
516 
517  !> @brief Deallocate
518  !<
519  subroutine budgetobject_da(this)
520  ! -- dummy
521  class(budgetobjecttype) :: this
522  ! -- local
523  integer(I4B) :: i
524  !
525  ! -- Save flows for each budget term
526  do i = 1, this%nbudterm
527  call this%budterm(i)%deallocate_arrays()
528  end do
529  !
530  ! -- Destroy the flow table
531  if (associated(this%flowtab)) then
532  deallocate (this%add_cellids)
533  deallocate (this%icellid)
534  deallocate (this%nflowterms)
535  deallocate (this%istart)
536  deallocate (this%iflowterms)
537  call this%flowtab%table_da()
538  deallocate (this%flowtab)
539  nullify (this%flowtab)
540  end if
541  !
542  ! -- Destroy the budget object table
543  if (associated(this%budtable)) then
544  call this%budtable%budget_da()
545  deallocate (this%budtable)
546  nullify (this%budtable)
547  end if
548  end subroutine budgetobject_da
549 
550  !> @brief Create a new budget object from a binary flow file
551  !<
552  subroutine budgetobject_cr_bfr(this, name, ibinun, iout, colconv1, colconv2)
553  ! -- dummy
554  type(budgetobjecttype), pointer :: this
555  character(len=*), intent(in) :: name
556  integer(I4B), intent(in) :: ibinun
557  integer(I4B), intent(in) :: iout
558  character(len=16), dimension(:), optional :: colconv1
559  character(len=16), dimension(:), optional :: colconv2
560  ! -- local
561  integer(I4B) :: ncv, nbudterm
562  integer(I4B) :: iflowja, nsto
563  integer(I4B) :: i, j
564  !
565  ! -- Create the object
566  call budgetobject_cr(this, name)
567  !
568  ! -- Initialize the budget file reader
569  call this%bfr_init(ibinun, ncv, nbudterm, iout)
570  !
571  ! -- Define this budget object using number of control volumes and number
572  ! of budget terms read from ibinun
573  iflowja = 0
574  nsto = 0
575  call this%budgetobject_df(ncv, nbudterm, iflowja, nsto)
576  !
577  ! -- Set the conversion flags, which cause id1 or id2 to be converted from
578  ! user node numbers to reduced node numbers
579  if (present(colconv1)) then
580  do i = 1, nbudterm
581  do j = 1, size(colconv1)
582  if (colconv1(j) == adjustl(this%bfr%budtxtarray(i))) then
583  this%budterm(i)%olconv1 = .true.
584  exit
585  end if
586  end do
587  end do
588  end if
589  if (present(colconv2)) then
590  do i = 1, nbudterm
591  do j = 1, size(colconv2)
592  if (colconv2(j) == adjustl(this%bfr%budtxtarray(i))) then
593  this%budterm(i)%olconv2 = .true.
594  exit
595  end if
596  end do
597  end do
598  end if
599  end subroutine budgetobject_cr_bfr
600 
601  !> @brief Initialize the budget file reader
602  !<
603  subroutine bfr_init(this, ibinun, ncv, nbudterm, iout)
604  ! -- dummy
605  class(budgetobjecttype) :: this
606  integer(I4B), intent(in) :: ibinun
607  integer(I4B), intent(inout) :: ncv
608  integer(I4B), intent(inout) :: nbudterm
609  integer(I4B), intent(in) :: iout
610  !
611  ! -- Initialize budget file reader
612  allocate (this%bfr)
613  call this%bfr%initialize(ibinun, iout, ncv)
614  nbudterm = this%bfr%nbudterms
615  end subroutine bfr_init
616 
617  !> @brief Advance the binary file readers for setting the budget terms of
618  !! the next time step
619  !<
620  subroutine bfr_advance(this, dis, iout)
621  ! -- modules
622  use tdismodule, only: kstp, kper
623  ! -- dummy
624  class(budgetobjecttype) :: this
625  class(disbasetype), intent(in) :: dis
626  integer(I4B), intent(in) :: iout
627  ! -- local
628  logical :: readnext
629  ! -- formats
630  character(len=*), parameter :: fmtkstpkper = &
631  &"(1x,/1x, a, ' READING BUDGET TERMS FOR KSTP ', i0, ' KPER ', i0)"
632  character(len=*), parameter :: fmtbudkstpkper = &
633  "(1x,/1x, a, ' SETTING BUDGET TERMS FOR KSTP ', i0, ' AND KPER ', &
634  &i0, ' TO BUDGET FILE TERMS FROM KSTP ', i0, ' AND KPER ', i0)"
635  !
636  ! -- Do not read the budget if the budget is at end of file or if the next
637  ! record in the budget file is the first timestep of the next stress
638  ! period. Also do not read if it is the very first time step because
639  ! the first chunk of data is read as part of the initialization
640  readnext = .true.
641  if (kstp * kper == 1) then
642  readnext = .false.
643  else if (kstp * kper > 1) then
644  if (this%bfr%endoffile) then
645  readnext = .false.
646  else
647  if (this%bfr%kpernext == kper + 1 .and. this%bfr%kstpnext == 1) &
648  readnext = .false.
649  end if
650  end if
651  !
652  ! -- Read the next record
653  if (readnext) then
654  !
655  ! -- Write the current time step and stress period
656  if (iout > 0) &
657  write (iout, fmtkstpkper) this%name, kstp, kper
658  !
659  ! -- Read flows from the binary file and copy them into this%budterm(:)
660  call this%fill_from_bfr(dis, iout)
661  else
662  if (iout > 0) &
663  write (iout, fmtbudkstpkper) trim(this%name), kstp, kper, &
664  this%bfr%kstp, this%bfr%kper
665  end if
666  end subroutine bfr_advance
667 
668  !> @brief Copy the information from the binary file into budterms
669  !<
670  subroutine fill_from_bfr(this, dis, iout)
671  ! -- dummy
672  class(budgetobjecttype) :: this
673  class(disbasetype), intent(in) :: dis
674  integer(I4B), intent(in) :: iout
675  ! -- local
676  integer(I4B) :: i
677  logical :: success
678  !
679  ! -- Read flows from the binary file and copy them into this%budterm(:)
680  do i = 1, this%nbudterm
681  call this%bfr%read_record(success, iout)
682  call this%budterm(i)%fill_from_bfr(this%bfr, dis)
683  end do
684  end subroutine fill_from_bfr
685 
686 end module budgetobjectmodule
This module contains the BudgetModule.
Definition: Budget.f90:20
subroutine, public budget_cr(this, name_model)
@ brief Create a new budget object
Definition: Budget.f90:84
subroutine accumulate_terms(this)
Add up accumulators and submit to budget table.
subroutine, public budgetobject_cr(this, name)
Create a new budget object.
subroutine save_flows(this, dis, ibinun, kstp, kper, delt, pertim, totim, iout)
Write the budget table.
subroutine bfr_advance(this, dis, iout)
Advance the binary file readers for setting the budget terms of the next time step.
subroutine flowtable_df(this, iout, cellids)
Define the new flow table object.
subroutine write_budtable(this, kstp, kper, iout, ibudfl, totim, delt)
Write the budget table.
subroutine write_flowtable(this, dis, kstp, kper, cellidstr)
Write the flow table for each advanced package control volume.
subroutine budgetobject_df(this, ncv, nbudterm, iflowja, nsto, bddim_opt, labeltitle_opt, bdzone_opt, ibudcsv)
Define the new budget object.
subroutine bfr_init(this, ibinun, ncv, nbudterm, iout)
Initialize the budget file reader.
subroutine, public budgetobject_cr_bfr(this, name, ibinun, iout, colconv1, colconv2)
Create a new budget object from a binary flow file.
subroutine budgetobject_da(this)
Deallocate.
subroutine read_flows(this, dis, ibinun)
Read from a binary file into this BudgetObjectType.
subroutine fill_from_bfr(this, dis, iout)
Copy the information from the binary file into budterms.
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
@ tabcenter
centered table column
Definition: Constants.f90:172
@ tabright
right justified table column
Definition: Constants.f90:173
@ tableft
left justified table column
Definition: Constants.f90:171
@ tabucstring
upper case string table data
Definition: Constants.f90:180
@ tabstring
string table data
Definition: Constants.f90:179
@ tabreal
real table data
Definition: Constants.f90:182
@ tabinteger
integer table data
Definition: Constants.f90:181
real(dp), parameter dhundred
real constant 100
Definition: Constants.f90:86
real(dp), parameter dhalf
real constant 1/2
Definition: Constants.f90:68
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
This module defines variable data types.
Definition: kind.f90:8
subroutine, public table_cr(this, name, title)
Definition: Table.f90:87
integer(i4b), pointer, public kstp
current time step number
Definition: tdis.f90:24
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