91
92 class(MethodModelType), intent(inout) :: this
93 type(CellDefnType), pointer, intent(inout) :: defn
94
95 integer(I4B) :: ic, ictopnbr, itopface, idiag, ipos
96
97 ic = defn%icell
98 defn%isatstat = saturation_saturated
99
100
101 if (this%fmi%ibdgwfsat0(ic) == 0) then
102 defn%isatstat = saturation_dry
103 return
104 end if
105
106
107 if (this%fmi%gwfsat(ic) < done) then
108 defn%isatstat = saturation_watertable
109 return
110 end if
111
112
113 itopface = defn%npolyverts + 3
114 if (defn%facenbr(itopface) == 0) then
115 defn%isatstat = saturation_saturated
116 return
117 end if
118
119
120 idiag = this%fmi%dis%con%ia(ic)
121 ipos = idiag + defn%facenbr(itopface)
122 ictopnbr = this%fmi%dis%con%ja(ipos)
123 if (this%fmi%ibdgwfsat0(ictopnbr) == 0) then
124 defn%isatstat = saturation_watertable
125 return
126 end if
127