63
68
69 class(OutputControlType) :: this
70
71 class(OutputControlDataType), pointer :: ocdobjptr
72 integer(I4B), pointer :: iper
73 type(CharacterStringType), dimension(:), &
74 pointer, contiguous :: ocactions
75 type(CharacterStringType), dimension(:), &
76 pointer, contiguous :: rtypes
77 type(CharacterStringType), dimension(:), &
78 pointer, contiguous :: ocsettings
79 integer(I4B), pointer :: nlist
80 integer(I4B) :: n, ipos
81 character(len=LINELENGTH) :: ocaction, rtype, ocsetting
82 logical(LGP) :: found_rtype
83
84 character(len=*), parameter :: fmtboc = &
85 &"(1X,/1X,'BEGIN READING OUTPUT CONTROL FOR STRESS PERIOD ',I0)"
86 character(len=*), parameter :: fmteoc = &
87 &"(/,1X,'END READING OUTPUT CONTROL FOR STRESS PERIOD ',I0)"
88 character(len=*), parameter :: fmtroc = &
89 "(1X,/1X,'OUTPUT CONTROL FOR STRESS PERIOD ',I0, &
90 &' IS REPEATED USING SETTINGS FROM A PREVIOUS STRESS PERIOD.')"
91
92 if (this%input_mempath == '') return
93 call mem_setptr(iper,
'IPER', this%input_mempath)
94 if (iper /=
kper)
then
95
96 write (this%iout, fmtroc)
kper
97 return
98 else
99 this%iperoc = iper
100 write (this%iout, fmtboc) this%iperoc
101 end if
102
103
104 do ipos = 1, size(this%ocds)
105 ocdobjptr => this%ocds(ipos)
106 call ocdobjptr%psm%init()
107 end do
108
109 call mem_setptr(nlist,
'NBOUND', this%input_mempath)
110 call mem_setptr(ocactions,
'OCACTION', this%input_mempath)
111 call mem_setptr(rtypes,
'RTYPE', this%input_mempath)
112 call mem_setptr(ocsettings,
'SETTING', this%input_mempath)
113
114 do n = 1, nlist
115 ocaction = ocactions(n)
116 rtype = rtypes(n)
117 ocsetting = ocsettings(n)
118
119 found_rtype = .false.
120 do ipos = 1, size(this%ocds)
121 ocdobjptr => this%ocds(ipos)
122 if (rtype == trim(ocdobjptr%cname)) then
123 found_rtype = .true.
124 call ocdobjptr%psm%set(ocaction, ocsetting, this%iout)
125 call ocdobjptr%ocd_rp_check(this%input_fname)
126 end if
127 end do
128 if (.not. found_rtype) then
129 call store_error(
'Input OC period block rtype not found: "'// &
130 trim(rtype)//'".')
132 end if
133 end do
134
135 write (this%iout, fmteoc) this%iperoc
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
integer(i4b), pointer, public kper
current stress period number
This class is used to store a single deferred-length character string. It was designed to work in an ...