MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
swfocmodule Module Reference

Data Types

type  swfoctype
 @ brief Output control More...
 

Functions/Subroutines

subroutine, public oc_cr (ocobj, name_model, inunit, iout)
 @ brief Create SwfOcType More...
 
subroutine oc_ar (this, name, datavec, dis, dnodata)
 @ brief Allocate and read SwfOcType More...
 

Function/Subroutine Documentation

◆ oc_ar()

subroutine swfocmodule::oc_ar ( class(swfoctype this,
character(len=*), intent(in)  name,
real(dp), dimension(:), intent(in), pointer, contiguous  datavec,
class(disbasetype), intent(in), pointer  dis,
real(dp), intent(in)  dnodata 
)
private

Setup head and budget as output control variables.

Parameters
thisSwfOcType object
[in]datavecdata vector
[in]dismodel discretization package
[in]dnodatano data value

Definition at line 56 of file swf-oc.f90.

57  ! -- dummy
58  class(SwfOcType) :: this !< SwfOcType object
59  character(len=*), intent(in) :: name
60  real(DP), dimension(:), pointer, contiguous, intent(in) :: datavec !< data vector
61  class(DisBaseType), pointer, intent(in) :: dis !< model discretization package
62  real(DP), intent(in) :: dnodata !< no data value
63  ! -- local
64  integer(I4B) :: i, nocdobj, inodata
65  type(OutputControlDataType), pointer :: ocdobjptr
66  real(DP), dimension(:), pointer, contiguous :: nullvec => null()
67  !
68  ! -- Initialize variables
69  inodata = 0
70  nocdobj = 2
71  allocate (this%ocds(nocdobj))
72  do i = 1, nocdobj
73  call ocd_cr(ocdobjptr)
74  select case (i)
75  case (1)
76  call ocdobjptr%init_dbl('BUDGET', nullvec, dis, 'PRINT LAST ', &
77  'COLUMNS 10 WIDTH 11 DIGITS 4 GENERAL ', &
78  this%iout, dnodata)
79  case (2)
80  call ocdobjptr%init_dbl(name, datavec, dis, 'PRINT LAST ', &
81  'COLUMNS 10 WIDTH 11 DIGITS 4 GENERAL ', &
82  this%iout, dnodata)
83  end select
84  this%ocds(i) = ocdobjptr
85  deallocate (ocdobjptr)
86  end do
87  !
88  ! -- Read options or set defaults if this package not on
89  if (this%inunit > 0) then
90  call this%read_options()
91  end if
Here is the call graph for this function:

◆ oc_cr()

subroutine, public swfocmodule::oc_cr ( type(swfoctype), pointer  ocobj,
character(len=*), intent(in)  name_model,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout 
)

Create by allocating a new SwfOcType object and initializing member variables.

Parameters
ocobjSwfOcType object
[in]name_modelname of the model
[in]inunitunit number for input
[in]ioutunit number for output

Definition at line 30 of file swf-oc.f90.

31  ! -- dummy
32  type(SwfOcType), pointer :: ocobj !< SwfOcType object
33  character(len=*), intent(in) :: name_model !< name of the model
34  integer(I4B), intent(in) :: inunit !< unit number for input
35  integer(I4B), intent(in) :: iout !< unit number for output
36  !
37  ! -- Create the object
38  allocate (ocobj)
39  !
40  ! -- Allocate scalars
41  call ocobj%allocate_scalars(name_model)
42  !
43  ! -- Save unit numbers
44  ocobj%inunit = inunit
45  ocobj%iout = iout
46  !
47  ! -- Initialize block parser
48  call ocobj%parser%Initialize(inunit, iout)
Here is the caller graph for this function: