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

Derived type for the Budget object. More...

Collaboration diagram for budgetmodule::budgettype:
Collaboration graph

Public Member Functions

procedure budget_df (this, maxsize, bdtype, bddim, labeltitle, bdzone)
 Define information for this object.
procedure budget_ot (this, kstp, kper, iout)
 Output the budget table.
procedure budget_da (this)
 Deallocate memory.
procedure set_ibudcsv (this, ibudcsv)
 Set unit number for csv output file.
procedure reset (this)
 Reset the budget object.
procedure add_single_entry (this, rin, rout, delt, text, isupress_accumulate, rowlabel)
 Add a single row of information.
procedure add_multi_entry (this, budterm, delt, budtxt, isupress_accumulate, rowlabel)
 Add multiple rows of information.
generic addentry (this, rin, rout, delt, text, isupress_accumulate, rowlabel)
 Add a single row of information.
generic addentry (this, budterm, delt, budtxt, isupress_accumulate, rowlabel)
 Add multiple rows of information.
procedure finalize_step (this, delt)
 Update accumulators.
procedure writecsv (this, totim)
 Write csv output.
procedure allocate_scalars (this, name_model)
 allocate scalar variables

Public Attributes

integer(i4b), pointer msum => null()
integer(i4b), pointer maxsize => null()
real(dp), pointer budperc => null()
logical, pointer written_once => null()
real(dp), dimension(:, :), pointer vbvl => null()
character(len=lenbudtxt), dimension(:), pointer, contiguous vbnm => null()
character(len=20), pointer bdtype => null()
character(len=5), pointer bddim => null()
character(len=lenbudrowlabel), dimension(:), pointer, contiguous rowlabel => null()
character(len=16), pointer labeltitle => null()
character(len=20), pointer bdzone => null()
logical, pointer labeled => null()
integer(i4b), pointer ibudcsv => null()
integer(i4b), pointer icsvheader => null()

Private Member Functions

procedure, private allocate_arrays (this)
 allocate array variables
procedure, private resize (this, maxsize)
 Resize the budget object.
procedure, private write_csv_header (this)
 Write csv header.

Detailed Description

This derived type stores and prints information about a model budget.

Definition at line 40 of file Budget.f90.

Member Function/Subroutine Documentation

◆ add_multi_entry()

procedure budgetmodule::budgettype::add_multi_entry ( class(budgettype) this,
real(dp), dimension(:, :), intent(in) budterm,
real(dp), intent(in) delt,
character(len=lenbudtxt), dimension(:), intent(in) budtxt,
integer(i4b), intent(in), optional isupress_accumulate,
character(len=*), intent(in), optional rowlabel )

Add information corresponding to one multiple rows in the budget table budterm is an array with inflow in column 1 and outflow in column 2 delt is the time step length budtxt is the name of the entries. It should have one entry for each row in budterm isupress_accumulate is an optional flag. If specified as 1, then the volume is NOT added to the accumulators on vbvl(1, :) and vbvl(2, :). rowlabel is a LENBUDROWLABEL character text entry that is written to the right of the table. It can be used for adding package names to budget entries. For multiple entries, the same rowlabel is used for each entry.

Parameters
thisBudgetType object
[in]budtermarray of budget terms
[in]delttime step length
[in]budtxtname of the entries
[in]isupress_accumulatesuppress accumulate
[in]rowlabelrow label

Definition at line 66 of file Budget.f90.

◆ add_single_entry()

procedure budgetmodule::budgettype::add_single_entry ( class(budgettype) this,
real(dp), intent(in) rin,
real(dp), intent(in) rout,
real(dp), intent(in) delt,
character(len=lenbudtxt), intent(in) text,
integer(i4b), intent(in), optional isupress_accumulate,
character(len=*), intent(in), optional rowlabel )

Add information corresponding to one row in the budget table rin the inflow rate rout is the outflow rate delt is the time step length text is the name of the entry isupress_accumulate is an optional flag. If specified as 1, then the volume is NOT added to the accumulators on vbvl(1, :) and vbvl(2, :). rowlabel is a LENBUDROWLABEL character text entry that is written to the right of the table. It can be used for adding package names to budget entries.

Parameters
thisBudgetType object
[in]rininflow rate
[in]routoutflow rate
[in]delttime step length
[in]textname of the entry
[in]isupress_accumulateaccumulate flag
[in]rowlabelrow label

Definition at line 65 of file Budget.f90.

◆ addentry() [1/2]

generic budgetmodule::budgettype::addentry ( class(budgettype) this,
real(dp), dimension(:, :), intent(in) budterm,
real(dp), intent(in) delt,
character(len=lenbudtxt), dimension(:), intent(in) budtxt,
integer(i4b), intent(in), optional isupress_accumulate,
character(len=*), intent(in), optional rowlabel )

Add information corresponding to one multiple rows in the budget table budterm is an array with inflow in column 1 and outflow in column 2 delt is the time step length budtxt is the name of the entries. It should have one entry for each row in budterm isupress_accumulate is an optional flag. If specified as 1, then the volume is NOT added to the accumulators on vbvl(1, :) and vbvl(2, :). rowlabel is a LENBUDROWLABEL character text entry that is written to the right of the table. It can be used for adding package names to budget entries. For multiple entries, the same rowlabel is used for each entry.

Parameters
thisBudgetType object
[in]budtermarray of budget terms
[in]delttime step length
[in]budtxtname of the entries
[in]isupress_accumulatesuppress accumulate
[in]rowlabelrow label

Definition at line 67 of file Budget.f90.

◆ addentry() [2/2]

generic budgetmodule::budgettype::addentry ( class(budgettype) this,
real(dp), intent(in) rin,
real(dp), intent(in) rout,
real(dp), intent(in) delt,
character(len=lenbudtxt), intent(in) text,
integer(i4b), intent(in), optional isupress_accumulate,
character(len=*), intent(in), optional rowlabel )

Add information corresponding to one row in the budget table rin the inflow rate rout is the outflow rate delt is the time step length text is the name of the entry isupress_accumulate is an optional flag. If specified as 1, then the volume is NOT added to the accumulators on vbvl(1, :) and vbvl(2, :). rowlabel is a LENBUDROWLABEL character text entry that is written to the right of the table. It can be used for adding package names to budget entries.

Parameters
thisBudgetType object
[in]rininflow rate
[in]routoutflow rate
[in]delttime step length
[in]textname of the entry
[in]isupress_accumulateaccumulate flag
[in]rowlabelrow label

Definition at line 67 of file Budget.f90.

Here is the call graph for this function:

◆ allocate_arrays()

procedure, private budgetmodule::budgettype::allocate_arrays ( class(budgettype) this)
private

Allocate array variables of this budget object

Parameters
thisBudgetType object

Definition at line 72 of file Budget.f90.

◆ allocate_scalars()

procedure budgetmodule::budgettype::allocate_scalars ( class(budgettype) this,
character(len=*), intent(in) name_model )

Allocate scalar variables of this budget object

Parameters
thisBudgetType object
[in]name_modelname of the model

Definition at line 71 of file Budget.f90.

◆ budget_da()

procedure budgetmodule::budgettype::budget_da ( class(budgettype) this)

Deallocate budget memory

Parameters
thisBudgetType object

Definition at line 62 of file Budget.f90.

◆ budget_df()

procedure budgetmodule::budgettype::budget_df ( class(budgettype) this,
integer(i4b), intent(in) maxsize,
character(len=*), optional bdtype,
character(len=*), optional bddim,
character(len=*), optional labeltitle,
character(len=*), optional bdzone )

Allocate arrays and set member variables

Parameters
thisBudgetType object
[in]maxsizemaximum size of budget arrays
bdtypetype of budget, default is VOLUME
bddimdimensions of terms, default is L**3
labeltitlebudget label, default is PACKAGE NAME
bdzonecorresponding zone, default is ENTIRE MODEL

Definition at line 60 of file Budget.f90.

◆ budget_ot()

procedure budgetmodule::budgettype::budget_ot ( class(budgettype) this,
integer(i4b), intent(in) kstp,
integer(i4b), intent(in) kper,
integer(i4b), intent(in) iout )

Write the budget table for the current set of budget information.

Parameters
thisBudgetType object
[in]kstptime step
[in]kperstress period
[in]ioutoutput unit number

Definition at line 61 of file Budget.f90.

◆ finalize_step()

procedure budgetmodule::budgettype::finalize_step ( class(budgettype) this,
real(dp), intent(in) delt )

This must be called before any output is written in order to update the accumulators in vbvl(1,:) and vbl(2,:).

Parameters
thisBudgetType object

Definition at line 68 of file Budget.f90.

◆ reset()

procedure budgetmodule::budgettype::reset ( class(budgettype) this)

Reset the budget object in preparation for next set of entries

Parameters
thisBudgetType object

Definition at line 64 of file Budget.f90.

◆ resize()

procedure, private budgetmodule::budgettype::resize ( class(budgettype) this,
integer(i4b), intent(in) maxsize )
private

If the size wasn't allocated to be large enough, then the budget object we reallocate itself to a larger size.

Parameters
thisBudgetType object
[in]maxsizemaximum size

Definition at line 73 of file Budget.f90.

◆ set_ibudcsv()

procedure budgetmodule::budgettype::set_ibudcsv ( class(budgettype) this,
integer(i4b), intent(in) ibudcsv )

This routine can be used to activate csv output by passing in a valid unit number opened for output

Parameters
thisBudgetType object
[in]ibudcsvunit number for csv budget output

Definition at line 63 of file Budget.f90.

◆ write_csv_header()

procedure, private budgetmodule::budgettype::write_csv_header ( class(budgettype) this)
private

This routine will write the csv header based on the names in vbnm

Parameters
thisBudgetType object

Definition at line 74 of file Budget.f90.

◆ writecsv()

procedure budgetmodule::budgettype::writecsv ( class(budgettype) this,
real(dp), intent(in) totim )

This routine will write a row of output to the csv file, if it is available for output. Upon first call, it will write the csv header.

Parameters
thisBudgetType object
[in]totimtime corresponding to this data

Definition at line 69 of file Budget.f90.

Member Data Documentation

◆ bddim

character(len=5), pointer budgetmodule::budgettype::bddim => null()

Definition at line 48 of file Budget.f90.

◆ bdtype

character(len=20), pointer budgetmodule::budgettype::bdtype => null()

Definition at line 47 of file Budget.f90.

◆ bdzone

character(len=20), pointer budgetmodule::budgettype::bdzone => null()

Definition at line 52 of file Budget.f90.

◆ budperc

real(dp), pointer budgetmodule::budgettype::budperc => null()

Definition at line 43 of file Budget.f90.

◆ ibudcsv

integer(i4b), pointer budgetmodule::budgettype::ibudcsv => null()

Definition at line 56 of file Budget.f90.

◆ icsvheader

integer(i4b), pointer budgetmodule::budgettype::icsvheader => null()

Definition at line 57 of file Budget.f90.

◆ labeled

logical, pointer budgetmodule::budgettype::labeled => null()

Definition at line 53 of file Budget.f90.

◆ labeltitle

character(len=16), pointer budgetmodule::budgettype::labeltitle => null()

Definition at line 51 of file Budget.f90.

◆ maxsize

integer(i4b), pointer budgetmodule::budgettype::maxsize => null()

Definition at line 42 of file Budget.f90.

◆ msum

integer(i4b), pointer budgetmodule::budgettype::msum => null()

Definition at line 41 of file Budget.f90.

◆ rowlabel

character(len=lenbudrowlabel), dimension(:), pointer, contiguous budgetmodule::budgettype::rowlabel => null()

Definition at line 49 of file Budget.f90.

◆ vbnm

character(len=lenbudtxt), dimension(:), pointer, contiguous budgetmodule::budgettype::vbnm => null()

Definition at line 46 of file Budget.f90.

◆ vbvl

real(dp), dimension(:, :), pointer budgetmodule::budgettype::vbvl => null()

Definition at line 45 of file Budget.f90.

◆ written_once

logical, pointer budgetmodule::budgettype::written_once => null()

Definition at line 44 of file Budget.f90.


The documentation for this type was generated from the following file:
  • /home/runner/work/modflow6/modflow6/src/Utilities/Budget.f90