195
198
199 class(RivType), intent(inout) :: this
200
201 character(len=LINELENGTH) :: errmsg
202 integer(I4B) :: i
203 integer(I4B) :: node
204 real(DP) :: bt
205 real(DP) :: stage
206 real(DP) :: rbot
207
208 character(len=*), parameter :: fmtriverr = &
209 "('RIV BOUNDARY (',i0,') RIVER BOTTOM (',f10.4,') IS LESS &
210 &THAN CELL BOTTOM (',f10.4,')')"
211 character(len=*), parameter :: fmtriverr2 = &
212 "('RIV BOUNDARY (',i0,') RIVER STAGE (',f10.4,') IS LESS &
213 &THAN RIVER BOTTOM (',f10.4,')')"
214 character(len=*), parameter :: fmtriverr3 = &
215 "('RIV BOUNDARY (',i0,') RIVER STAGE (',f10.4,') IS LESS &
216 &THAN CELL BOTTOM (',f10.4,')')"
217 character(len=*), parameter :: fmtcondmulterr = &
218 "('RIV BOUNDARY (',i0,') CONDUCTANCE MULTIPLIER (',g10.3,') IS &
219 &LESS THAN ZERO')"
220 character(len=*), parameter :: fmtconderr = &
221 "('RIV BOUNDARY (',i0,') CONDUCTANCE (',g10.3,') IS LESS THAN &
222 &ZERO')"
223
224
225 do i = 1, this%nbound
226 node = this%nodelist(i)
227 bt = this%dis%bot(node)
228 stage = this%stage(i)
229 rbot = this%rbot(i)
230
231 if (rbot < bt .and. this%icelltype(node) /= 0) then
232 write (errmsg, fmt=fmtriverr) i, rbot, bt
234 end if
235 if (stage < rbot) then
236 write (errmsg, fmt=fmtriverr2) i, stage, rbot
238 end if
239 if (stage < bt .and. this%icelltype(node) /= 0) then
240 write (errmsg, fmt=fmtriverr3) i, stage, bt
242 end if
243 if (this%iauxmultcol > 0) then
244 if (this%auxvar(this%iauxmultcol, i) <
dzero)
then
245 write (errmsg, fmt=fmtcondmulterr) &
246 i, this%auxvar(this%iauxmultcol, i)
248 end if
249 end if
250 if (this%cond(i) <
dzero)
then
251 write (errmsg, fmt=fmtconderr) i, this%cond(i)
253 end if
254 end do
255
256
259 end if
integer(i4b), parameter linelength
maximum length of a standard line
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.