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

Data Types

type  swfoctype
 Output control. More...

Functions/Subroutines

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

Function/Subroutine Documentation

◆ oc_ar()

subroutine swfocmodule::oc_ar ( class(swfoctype) this,
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 53 of file swf-oc.f90.

55 use kindmodule, only: lgp
57 ! -- dummy
58 class(SwfOcType) :: this !< SwfOcType object
59 real(DP), dimension(:), pointer, contiguous, intent(in) :: datavec !< data vector
60 class(DisBaseType), pointer, intent(in) :: dis !< model discretization package
61 real(DP), intent(in) :: dnodata !< no data value
62 ! -- local
63 integer(I4B) :: i, nocdobj, inodata
64 type(OutputControlDataType), pointer :: ocdobjptr
65 real(DP), dimension(:), pointer, contiguous :: nullvec => null()
66 character(len=LINELENGTH) :: stagefile, qoutflowfile
67 logical(LGP) :: found_qoutflowfile
68 logical(LGP) :: found_stagefile
69 !
70 ! -- Initialize variables
71 inodata = 0
72 nocdobj = 3
73 allocate (this%ocds(nocdobj))
74 do i = 1, nocdobj
75 call ocd_cr(ocdobjptr)
76 select case (i)
77 case (1)
78 call ocdobjptr%init_dbl('BUDGET', nullvec, dis, 'PRINT LAST ', &
79 'COLUMNS 10 WIDTH 11 DIGITS 4 GENERAL ', &
80 this%iout, dnodata)
81 case (2)
82 call ocdobjptr%init_dbl('STAGE', datavec, dis, 'PRINT LAST ', &
83 'COLUMNS 10 WIDTH 11 DIGITS 4 GENERAL ', &
84 this%iout, dnodata)
85 case (3)
86 call ocdobjptr%init_dbl('QOUTFLOW', datavec, dis, 'PRINT LAST ', &
87 'COLUMNS 10 WIDTH 11 DIGITS 4 GENERAL ', &
88 this%iout, dnodata)
89 end select
90 this%ocds(i) = ocdobjptr
91 deallocate (ocdobjptr)
92 end do
93 !
94 ! -- Read options or set defaults if this package not on
95 if (this%input_mempath /= '') then
96 write (this%iout, '(/,1x,a,/)') 'PROCESSING OC OPTIONS'
97 call this%source_options()
98 call mem_set_value(qoutflowfile, 'QOUTFLOWFILE', this%input_mempath, &
99 found_qoutflowfile)
100 call mem_set_value(stagefile, 'STAGEFILE', this%input_mempath, &
101 found_stagefile)
102 if (found_qoutflowfile) then
103 call this%set_ocfile('QOUTFLOW', qoutflowfile, this%iout)
104 end if
105 if (found_stagefile) then
106 call this%set_ocfile('STAGE', stagefile, this%iout)
107 end if
108 write (this%iout, '(1x,a)') 'END OF OC OPTIONS'
109 end if
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 dnodata
real no data constant
Definition Constants.f90:95
@ dis
DIS6 discretization.
This module defines variable data types.
Definition kind.f90:8
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,
character(len=*), intent(in) input_mempath,
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]input_mempathinput mempath of the package
[in]inunitunit number for input
[in]ioutunit number for output

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

30 ! -- dummy
31 type(SwfOcType), pointer :: ocobj !< SwfOcType object
32 character(len=*), intent(in) :: name_model !< name of the model
33 character(len=*), intent(in) :: input_mempath !< input mempath of the package
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, input_mempath)
42 !
43 ! -- Save unit numbers
44 ocobj%inunit = inunit
45 ocobj%iout = iout
Here is the caller graph for this function: