10 module procedure uzf_obs_supported
11 uzf_obs_supported = .true.
12 end procedure uzf_obs_supported
19 module procedure uzf_df_obs
23 call this%obs%StoreObsType(
'uzf-gwrch', .true., indx)
24 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
27 call this%obs%StoreObsType(
'uzf-gwd', .true., indx)
28 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
31 call this%obs%StoreObsType(
'uzf-gwd-to-mvr', .true., indx)
32 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
35 call this%obs%StoreObsType(
'uzf-gwet', .true., indx)
36 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
39 call this%obs%StoreObsType(
'infiltration', .true., indx)
40 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
43 call this%obs%StoreObsType(
'from-mvr', .true., indx)
44 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
47 call this%obs%StoreObsType(
'rej-inf', .true., indx)
48 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
51 call this%obs%StoreObsType(
'rej-inf-to-mvr', .true., indx)
52 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
55 call this%obs%StoreObsType(
'uzet', .true., indx)
56 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
59 call this%obs%StoreObsType(
'storage', .true., indx)
60 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
63 call this%obs%StoreObsType(
'net-infiltration', .true., indx)
64 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
67 call this%obs%StoreObsType(
'water-content', .false., indx)
68 this%obs%obsData(indx)%ProcessIdPtr => uzf_process_obsid
69 end procedure uzf_df_obs
76 module procedure uzf_rp_obs
87 character(len=LENBOUNDNAME) :: bname
88 class(ObserveType),
pointer :: obsrv => null()
9010
format(
'Boundary "', a,
'" for observation "', a, &
91 '" is invalid in package "', a,
'"')
9260
format(
'Invalid node number in OBS input: ', i0)
95 do i = 1, this%obs%npakobs
96 obsrv => this%obs%pakobs(i)%obsrv
100 if (nn == namedboundflag)
then
101 bname = obsrv%FeatureName
106 if (this%inamedbound /= 0)
then
108 if (this%boundname(n) == bname)
then
109 obsrv%BndFound = .true.
110 obsrv%CurrentTimeStepEndValue = dzero
111 call obsrv%AddObsIndex(n)
112 if (obsrv%indxbnds_count == 1)
then
121 if (.not. obsrv%BndFound)
then
122 write (errmsg, 10) trim(bname), trim(obsrv%Name), trim(this%packName)
123 call store_error(errmsg)
129 nn = obsrv%NodeNumber
134 if (nn < 1 .or. nn > this%nodes)
then
135 write (errmsg, 60) nn
136 call store_error(errmsg)
138 obsrv%BndFound = .true.
140 obsrv%CurrentTimeStepEndValue = dzero
141 call obsrv%AddObsIndex(nn)
146 if (obsrv%ObsTypeId ==
'WATER-CONTENT')
then
147 n = obsrv%indxbnds_count
149 write (errmsg,
'(a,3(1x,a))') &
150 trim(adjustl(obsrv%ObsTypeId)),
'for observation', &
151 trim(adjustl(obsrv%Name)), &
152 'must be assigned to a UZF cell with a unique boundname.'
153 call store_error(errmsg, terminate=.true.)
157 obsdepth = obsrv%Obsdepth
160 obsrv%dblPak1 = obsdepth
165 iuzid = obsrv%intPak1
166 dmax = this%uzfobj%celtop(iuzid) - this%uzfobj%celbot(iuzid)
172 if (obsdepth <= dzero .or. obsdepth > dmax)
then
173 write (errmsg,
'(a,3(1x,a),1x,g0,1x,a,1x,g0,a)') &
174 trim(adjustl(obsrv%ObsTypeId)),
'for observation', &
175 trim(adjustl(obsrv%Name)),
'specified depth (', obsdepth, &
176 ') must be greater than 0.0 and less than ', dmax,
'.'
177 call store_error(errmsg)
180 do j = 1, obsrv%indxbnds_count
181 nn = obsrv%indxbnds(j)
182 if (nn < 1 .or. nn > this%maxbound)
then
183 write (errmsg,
'(a,2(1x,a),1x,i0,1x,a,1x,i0,a)') &
184 trim(adjustl(obsrv%ObsTypeId)),
'uzfno must be greater than 0 ', &
185 'and less than or equal to', this%maxbound, &
186 '(specified value is ', nn,
').'
187 call store_error(errmsg)
194 if (count_errors() > 0)
then
195 call store_error_filename(this%input_fname)
198 end procedure uzf_rp_obs
203 module procedure uzf_bd_obs
209 type(ObserveType),
pointer :: obsrv => null()
211 call this%uzf_solve(reset_state=.false.)
214 if (this%obs%npakobs > 0)
then
215 call this%obs%obs_bd_clear()
216 do i = 1, this%obs%npakobs
217 obsrv => this%obs%pakobs(i)%obsrv
218 do ii = 1, obsrv%indxbnds_count
219 n = obsrv%indxbnds(ii)
221 select case (obsrv%ObsTypeId)
229 case (
'UZF-GWD-TO-MVR')
230 if (this%imover == 1)
then
237 if (this%igwetflag > 0)
then
238 v = this%uzfobj%gwet(n)
243 case (
'INFILTRATION')
244 v = this%appliedinf(n)
246 if (this%imover == 1)
then
247 v = this%pakmvrobj%get_qfrommvr(n)
254 case (
'REJ-INF-TO-MVR')
255 if (this%imover == 1)
then
256 v = this%rejinftomvr(n)
262 if (this%ietflag /= 0)
then
270 case (
'NET-INFILTRATION')
271 v = this%infiltration(n)
272 case (
'WATER-CONTENT')
273 v = this%uzfobj%get_water_content_at_depth(n, obsrv%obsDepth)
275 errmsg =
'Unrecognized observation type: '//trim(obsrv%ObsTypeId)
276 call store_error(errmsg)
278 call this%obs%SaveOneSimval(obsrv, v)
283 if (count_errors() > 0)
then
284 call store_error_filename(this%input_fname)
287 end procedure uzf_bd_obs
294 subroutine uzf_process_obsid(obsrv, dis, inunitobs, iout)
297 type(ObserveType),
intent(inout) :: obsrv
298 class(DisBaseType),
intent(in) :: dis
299 integer(I4B),
intent(in) :: inunitobs
300 integer(I4B),
intent(in) :: iout
302 integer(I4B) :: n, nn
304 integer(I4B) :: icol, istart, istop, istat
306 character(len=LINELENGTH) :: string
310 string = obsrv%IDstring
316 call urword(string, icol, istart, istop, 1, n, r, iout, inunitobs)
317 read (string(istart:istop), 30, iostat=istat) nn
320 obsrv%NodeNumber = nn
324 obsrv%FeatureName = string(istart:istop)
329 obsrv%NodeNumber = namedboundflag
333 if (obsrv%ObsTypeId ==
'WATER-CONTENT')
then
334 call urword(string, icol, istart, istop, 3, n, r, iout, inunitobs)
337 obsrv%Obsdepth = obsdepth
339 end subroutine uzf_process_obsid
341end submodule uzfmoduleobs
integer(i4b), pointer, public kper
current stress period number