MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
UzfCellGroup.f90
Go to the documentation of this file.
1!> @brief Unsaturated zone flow by the method of characteristics
2!!
3!! Water moves through the unsaturated zone as a train of kinematic waves, after
4!! Smith (1983) and the MODFLOW-2005 UZF1 Package (Niswonger and others, 2006).
5!! A wave is a step change in water content moving down at speed dflux/dtheta,
6!! with flux given by the Brooks-Corey relation
7!! flux = vks * ((theta - theta_res) / (theta_sat - theta_res))**bc_eps.
8!!
9!! The waves of one cell are held in columns of wave_depth, wave_theta,
10!! wave_flux and wave_speed, packed into positions 1 to nwaves(icell). The
11!! train is ordered so that wave 1 is deepest, depth decreases with index, and
12!! the wave at nwaves is the one at the land surface. Increasing infiltration
13!! adds a lead wave at the surface; decreasing infiltration adds a set of
14!! ntrailwaves trailing waves. Waves are routed until one reaches the bottom of
15!! the unsaturated zone, where it becomes recharge, or overtakes the wave ahead
16!! of it, where the two merge. Both events remove a wave and compact the train.
17!<
19
20 use kindmodule, only: dp, i4b, lgp
25 use tdismodule, only: itmuni, delt, kper
27
28 implicit none
29 private
30 public :: uzfcellgrouptype
31
32 !> @brief Snapshot of one cell's wave train
33 !!
34 !! Holds the waves of a single cell so they can be restored after a trial
35 !! solution. Two are kept: one for the outer-iteration reset in solve() and
36 !! one for the aet-to-pet retry loop in uzet().
37 !<
39 real(dp), pointer, dimension(:), contiguous :: depth => null()
40 real(dp), pointer, dimension(:), contiguous :: theta => null()
41 real(dp), pointer, dimension(:), contiguous :: flux => null()
42 real(dp), pointer, dimension(:), contiguous :: speed => null()
43 integer(I4B), pointer :: nwaves => null()
44 end type uzfwavestoretype
45
47 !
48 ! -- wave train; dimensioned (nwaves_max, ncells), with the waves of cell
49 ! icell occupying positions 1 to nwaves(icell)
50 real(dp), dimension(:, :), pointer, contiguous :: wave_depth => null() !< depth of the wave front below celtop
51 real(dp), dimension(:, :), pointer, contiguous :: wave_theta => null() !< water content behind the wave front
52 real(dp), dimension(:, :), pointer, contiguous :: wave_flux => null() !< unsaturated flux behind the wave front
53 real(dp), dimension(:, :), pointer, contiguous :: wave_speed => null() !< wave speed, dflux/dtheta
54 integer(I4B), pointer, dimension(:), contiguous :: nwaves => null() !< number of active waves in each cell
55 integer(I4B), pointer :: nwaves_max => null() !< wave capacity, NTRAILWAVES * NWAVESETS
56 integer(I4B), pointer :: ntrailwaves => null() !< trailing waves created when infiltration drops
57 !
58 ! -- unsaturated zone properties
59 real(dp), pointer, dimension(:), contiguous :: theta_res => null() !< residual water content
60 real(dp), pointer, dimension(:), contiguous :: theta_sat => null() !< saturated water content
61 real(dp), pointer, dimension(:), contiguous :: theta_init => null() !< initial water content
62 real(dp), pointer, dimension(:), contiguous :: bc_eps => null() !< Brooks-Corey exponent
63 real(dp), pointer, dimension(:), contiguous :: vks => null() !< vertical saturated hydraulic conductivity
64 !
65 ! -- geometry
66 real(dp), pointer, dimension(:), contiguous :: celtop => null() !< top of the unsaturated zone in this cell
67 real(dp), pointer, dimension(:), contiguous :: celbot => null() !< bottom of this cell
68 real(dp), pointer, dimension(:), contiguous :: landtop => null() !< land surface above this cell
69 real(dp), pointer, dimension(:), contiguous :: surfdep => null() !< undulation depth of the land surface
70 real(dp), pointer, dimension(:), contiguous :: cellarea => null() !< area of the host gwf cell
71 real(dp), pointer, dimension(:), contiguous :: uzfarea => null() !< area of this uzf cell
72 integer(I4B), pointer, dimension(:), contiguous :: landflag => null() !< cell is at land surface (1) or not (0)
73 integer(I4B), pointer, dimension(:), contiguous :: cell_below => null() !< uzf cell directly below, 0 if none
74 !
75 ! -- water table
76 real(dp), pointer, dimension(:), contiguous :: water_table => null() !< water table elevation this iteration
77 real(dp), pointer, dimension(:), contiguous :: water_table_old => null() !< water table elevation last time step
78 !
79 ! -- infiltration and discharge
80 real(dp), pointer, dimension(:), contiguous :: finf_spec => null() !< specified infiltration rate
81 real(dp), pointer, dimension(:), contiguous :: finf => null() !< infiltration rate applied to this cell
82 real(dp), pointer, dimension(:), contiguous :: finf_rej => null() !< infiltration rejected at land surface
83 real(dp), pointer, dimension(:), contiguous :: surf_infil => null() !< infiltration entering the unsaturated zone
84 real(dp), pointer, dimension(:), contiguous :: surf_infil_below => null() !< infiltration passed to cell_below
85 real(dp), pointer, dimension(:), contiguous :: surf_seep => null() !< groundwater discharge to land surface
86 real(dp), pointer, dimension(:), contiguous :: flux_to_wt => null() !< water reaching the water table this time step
87 !
88 ! -- evapotranspiration
89 real(dp), pointer, dimension(:), contiguous :: pet => null() !< potential et available to this cell
90 real(dp), pointer, dimension(:), contiguous :: pet_max => null() !< potential et at land surface
91 real(dp), pointer, dimension(:), contiguous :: gw_pet => null() !< potential et left for the saturated zone
92 real(dp), pointer, dimension(:), contiguous :: gwet => null() !< et taken from the saturated zone
93 real(dp), pointer, dimension(:), contiguous :: et_uz => null() !< et taken from the unsaturated zone
94 real(dp), pointer, dimension(:), contiguous :: ext_depth => null() !< extinction depth below land surface
95 real(dp), pointer, dimension(:), contiguous :: ext_depth_uz => null() !< part of the extinction depth in this cell
96 real(dp), pointer, dimension(:), contiguous :: theta_ext => null() !< extinction water content
97 real(dp), pointer, dimension(:), contiguous :: air_entry => null() !< air entry potential
98 real(dp), pointer, dimension(:), contiguous :: root_pot => null() !< root potential
99 real(dp), pointer, dimension(:), contiguous :: root_act => null() !< root activity function
100 !
101 ! -- wave snapshots, one cell each
102 type(uzfwavestoretype) :: wavsav !< waves saved across an outer iteration
103 type(uzfwavestoretype) :: etsav !< waves saved across the uzet retry loop
104 !
105 ! -- work arrays for leadwav, sized for the wave capacity of one cell
106 real(dp), pointer, dimension(:), contiguous :: overtake_time => null() !< time until each wave overtakes the one ahead
107 integer(I4B), pointer, dimension(:), contiguous :: wave_merges => null() !< wave merges with the one ahead this substep
108
109 contains
110
111 procedure :: init
112 procedure :: setdata
113 procedure :: sethead
114 procedure :: setdatauzfarea
115 procedure :: setdatafinf
116 procedure :: setdataet
117 procedure :: setdataetwc
118 procedure :: setdataetha
119 procedure :: setwaves
120 procedure :: shift_waves
121 procedure :: store_waves
122 procedure :: load_waves
123 procedure :: routewaves
124 procedure :: uzflow
125 procedure :: addrech
126 procedure :: trailwav
127 procedure :: leadwav
128 procedure :: advance
129 procedure :: solve
130 procedure :: unsat_stor
131 procedure :: update_wav
132 procedure :: simgwet
133 procedure :: caph
134 procedure :: rate_et_z
135 procedure :: uzet
136 procedure :: uz_rise
137 procedure :: rejfinf
138 procedure :: gwseep
139 procedure :: setbelowpet
140 procedure :: setgwpet
142 procedure :: dealloc
143 procedure :: get_water_content_at_depth
144 procedure :: get_wcnew
145 end type uzfcellgrouptype
146
147 interface
148
149 module subroutine setwaves(this, icell)
150 class(uzfcellgrouptype) :: this
151 integer(I4B), intent(in) :: icell
152 end subroutine setwaves
153
154 module subroutine routewaves(this, totfluxtot, delt, ietflag, icell, ierr)
155 class(uzfcellgrouptype) :: this
156 real(dp), intent(inout) :: totfluxtot
157 real(dp), intent(in) :: delt
158 integer(I4B), intent(in) :: ietflag
159 integer(I4B), intent(in) :: icell
160 integer(I4B), intent(inout) :: ierr
161 end subroutine routewaves
162
163 module subroutine shift_waves(this, icell, shft, strt, stp, cntr)
164 class(uzfcellgrouptype) :: this
165 integer(I4B), intent(in) :: icell
166 integer(I4B), intent(in) :: shft
167 integer(I4B), intent(in) :: strt
168 integer(I4B), intent(in) :: stp
169 integer(I4B), intent(in) :: cntr
170 end subroutine shift_waves
171
172 module subroutine store_waves(this, icell, store)
173 class(uzfcellgrouptype) :: this
174 integer(I4B), intent(in) :: icell
175 type(uzfwavestoretype), intent(inout) :: store
176 end subroutine store_waves
177
178 module subroutine load_waves(this, icell, store)
179 class(uzfcellgrouptype) :: this
180 integer(I4B), intent(in) :: icell
181 type(uzfwavestoretype), intent(in) :: store
182 end subroutine load_waves
183
184 module subroutine uzflow(this, thick, thickold, delt, ietflag, icell, ierr)
185 class(uzfcellgrouptype) :: this
186 real(dp), intent(inout) :: thickold
187 real(dp), intent(inout) :: thick
188 real(dp), intent(in) :: delt
189 integer(I4B), intent(in) :: ietflag
190 integer(I4B), intent(in) :: icell
191 integer(I4B), intent(inout) :: ierr
192 end subroutine uzflow
193
194 module subroutine factors(eps_thick, eps_flux)
195 real(dp), intent(out) :: eps_thick
196 real(dp), intent(out) :: eps_flux
197 end subroutine factors
198
199 module subroutine trailwav(this, icell, ierr)
200 class(uzfcellgrouptype) :: this
201 integer(I4B), intent(in) :: icell
202 integer(I4B), intent(inout) :: ierr
203 end subroutine trailwav
204
205 module subroutine leadwav(this, time, single_wave, trail_added, thetab, &
206 fluxb, dflux_surf, eps_flux, delt, icell)
207 class(uzfcellgrouptype) :: this
208 real(dp), intent(inout) :: thetab
209 real(dp), intent(inout) :: fluxb
210 real(dp), intent(in) :: eps_flux
211 real(dp), intent(inout) :: time
212 integer(I4B), intent(inout) :: single_wave
213 integer(I4B), intent(inout) :: trail_added
214 real(dp), intent(inout) :: dflux_surf
215 real(dp), intent(in) :: delt
216 integer(I4B), intent(in) :: icell
217 end subroutine leadwav
218
219 module function unsat_stor(this, icell, d1)
220 real(dp) :: unsat_stor
221 class(uzfcellgrouptype) :: this
222 integer(I4B), intent(in) :: icell
223 real(dp), intent(inout) :: d1
224 end function unsat_stor
225
226 module subroutine update_wav(this, icell, delt, iss, itest)
227 class(uzfcellgrouptype) :: this
228 integer(I4B), intent(in) :: icell
229 integer(I4B), intent(in) :: itest
230 integer(I4B), intent(in) :: iss
231 real(dp), intent(in) :: delt
232 end subroutine update_wav
233
234 module subroutine uz_rise(this, icell, totfluxtot)
235 class(uzfcellgrouptype) :: this
236 integer(I4B), intent(in) :: icell
237 real(dp), intent(inout) :: totfluxtot
238 end subroutine uz_rise
239
240 module function get_water_content_at_depth(this, icell, &
241 depth) result(theta_at_depth)
242 class(uzfcellgrouptype) :: this
243 integer(I4B), intent(in) :: icell !< uzf cell containing depth
244 real(dp), intent(in) :: depth !< depth within the cell
245 real(dp) :: theta_at_depth
246 end function get_water_content_at_depth
247
248 module function get_wcnew(this, icell) result(watercontent)
249 class(uzfcellgrouptype) :: this
250 integer(I4B), intent(in) :: icell !< uzf cell containing depth
251 real(dp) :: watercontent
252 end function get_wcnew
253
254 module function leadspeed(theta1, theta2, flux1, flux2, thts, thtr, eps, vks)
255 real(dp) :: leadspeed
256 real(dp), intent(in) :: theta1
257 real(dp), intent(in) :: theta2
258 real(dp), intent(in) :: flux1
259 real(dp), intent(inout) :: flux2
260 real(dp), intent(in) :: thts
261 real(dp), intent(in) :: thtr
262 real(dp), intent(in) :: eps
263 real(dp), intent(in) :: vks
264 end function leadspeed
265
266 module subroutine setgwpet(this, icell)
267 class(uzfcellgrouptype) :: this
268 integer(I4B), intent(in) :: icell
269 end subroutine setgwpet
270
271 module subroutine setbelowpet(this, icell, jbelow)
272 class(uzfcellgrouptype) :: this
273 integer(I4B), intent(in) :: icell
274 integer(I4B), intent(in) :: jbelow
275 end subroutine setbelowpet
276
277 module subroutine simgwet(this, igwetflag, icell, hgwf, trhs, thcof, det)
278 class(uzfcellgrouptype) :: this
279 integer(I4B), intent(in) :: igwetflag
280 integer(I4B), intent(in) :: icell
281 real(dp), intent(in) :: hgwf
282 real(dp), intent(inout) :: trhs
283 real(dp), intent(inout) :: thcof
284 real(dp), intent(inout) :: det
285 end subroutine simgwet
286
287 module subroutine uzet(this, icell, delt, ietflag, ierr)
288 class(uzfcellgrouptype) :: this
289 integer(I4B), intent(in) :: icell
290 real(dp), intent(in) :: delt
291 integer(I4B), intent(in) :: ietflag
292 integer(I4B), intent(inout) :: ierr
293 end subroutine uzet
294
295 module function caph(this, icell, tho)
296 real(dp) :: caph
297 class(uzfcellgrouptype) :: this
298 integer(I4B), intent(in) :: icell
299 real(dp), intent(in) :: tho
300 end function caph
301
302 module function rate_et_z(this, icell, factor, fktho, h)
303 real(dp) :: rate_et_z
304 class(uzfcellgrouptype) :: this
305 integer(I4B), intent(in) :: icell
306 real(dp), intent(in) :: factor, fktho, h
307 end function rate_et_z
308
309 end interface
310
311contains
312
313 !> @brief Allocate and set uzf object variables
314 !<
315 subroutine init(this, ncells, nwav, memory_path)
316 ! -- modules
318 ! -- dummy
319 class(uzfcellgrouptype) :: this
320 integer(I4B), intent(in) :: ncells
321 integer(I4B), intent(in) :: nwav
322 character(len=*), intent(in) :: memory_path
323 ! -- local
324 integer(I4B) :: icell
325 integer(I4B) :: j
326 !
327 ! -- wave state, one column per cell
328 call mem_allocate(this%wave_depth, nwav, ncells, 'WAVE_DEPTH', memory_path)
329 call mem_allocate(this%wave_theta, nwav, ncells, 'WAVE_THETA', memory_path)
330 call mem_allocate(this%wave_flux, nwav, ncells, 'WAVE_FLUX', memory_path)
331 call mem_allocate(this%wave_speed, nwav, ncells, 'WAVE_SPEED', memory_path)
332 call mem_allocate(this%nwaves, ncells, 'NWAVES', memory_path)
333 call mem_allocate(this%nwaves_max, 'NWAVES_MAX', memory_path)
334 call mem_allocate(this%ntrailwaves, 'NTRAILWAVES', memory_path)
335 !
336 ! -- cell properties and state
337 call mem_allocate(this%theta_res, ncells, 'THETA_RES', memory_path)
338 call mem_allocate(this%theta_sat, ncells, 'THETA_SAT', memory_path)
339 call mem_allocate(this%theta_init, ncells, 'THETA_INIT', memory_path)
340 call mem_allocate(this%bc_eps, ncells, 'BC_EPS', memory_path)
341 call mem_allocate(this%air_entry, ncells, 'AIR_ENTRY', memory_path)
342 call mem_allocate(this%root_pot, ncells, 'ROOT_POT', memory_path)
343 call mem_allocate(this%root_act, ncells, 'ROOT_ACT', memory_path)
344 call mem_allocate(this%theta_ext, ncells, 'THETA_EXT', memory_path)
345 call mem_allocate(this%et_uz, ncells, 'ET_UZ', memory_path)
346 call mem_allocate(this%flux_to_wt, ncells, 'FLUX_TO_WT', memory_path)
347 call mem_allocate(this%finf_spec, ncells, 'FINF_SPEC', memory_path)
348 call mem_allocate(this%finf, ncells, 'FINF', memory_path)
349 call mem_allocate(this%finf_rej, ncells, 'FINF_REJ', memory_path)
350 call mem_allocate(this%gwet, ncells, 'GWET', memory_path)
351 call mem_allocate(this%uzfarea, ncells, 'UZFAREA', memory_path)
352 call mem_allocate(this%cellarea, ncells, 'CELLAREA', memory_path)
353 call mem_allocate(this%celtop, ncells, 'CELTOP', memory_path)
354 call mem_allocate(this%celbot, ncells, 'CELBOT', memory_path)
355 call mem_allocate(this%landtop, ncells, 'LANDTOP', memory_path)
356 call mem_allocate(this%water_table, ncells, 'WATER_TABLE', memory_path)
357 call mem_allocate(this%water_table_old, ncells, 'WATER_TABLE_OLD', &
358 memory_path)
359 call mem_allocate(this%surfdep, ncells, 'SURFDEP', memory_path)
360 call mem_allocate(this%vks, ncells, 'VKS', memory_path)
361 call mem_allocate(this%surf_infil, ncells, 'SURF_INFIL', memory_path)
362 call mem_allocate(this%surf_infil_below, ncells, 'SURF_INFIL_BELOW', &
363 memory_path)
364 call mem_allocate(this%surf_seep, ncells, 'SURF_SEEP', memory_path)
365 call mem_allocate(this%gw_pet, ncells, 'GW_PET', memory_path)
366 call mem_allocate(this%pet, ncells, 'PET', memory_path)
367 call mem_allocate(this%pet_max, ncells, 'PET_MAX', memory_path)
368 call mem_allocate(this%ext_depth, ncells, 'EXT_DEPTH', memory_path)
369 call mem_allocate(this%ext_depth_uz, ncells, 'EXT_DEPTH_UZ', memory_path)
370 call mem_allocate(this%landflag, ncells, 'LANDFLAG', memory_path)
371 call mem_allocate(this%cell_below, ncells, 'CELL_BELOW', memory_path)
372 !
373 ! -- wave snapshots and leadwav work arrays, one cell wide
374 call mem_allocate(this%wavsav%depth, nwav, 'WSAV_DEPTH', memory_path)
375 call mem_allocate(this%wavsav%theta, nwav, 'WSAV_THETA', memory_path)
376 call mem_allocate(this%wavsav%flux, nwav, 'WSAV_FLUX', memory_path)
377 call mem_allocate(this%wavsav%speed, nwav, 'WSAV_SPEED', memory_path)
378 call mem_allocate(this%wavsav%nwaves, 'WSAV_NWAVES', memory_path)
379 call mem_allocate(this%etsav%depth, nwav, 'ETSAV_DEPTH', memory_path)
380 call mem_allocate(this%etsav%theta, nwav, 'ETSAV_THETA', memory_path)
381 call mem_allocate(this%etsav%flux, nwav, 'ETSAV_FLUX', memory_path)
382 call mem_allocate(this%etsav%speed, nwav, 'ETSAV_SPEED', memory_path)
383 call mem_allocate(this%etsav%nwaves, 'ETSAV_NWAVES', memory_path)
384 call mem_allocate(this%overtake_time, nwav, 'OVERTAKE_TIME', memory_path)
385 call mem_allocate(this%wave_merges, nwav, 'WAVE_MERGES', memory_path)
386 !
387 ! -- wave capacity and trailing wave count are the same for every cell
388 this%nwaves_max = nwav
389 this%ntrailwaves = 0
390 this%wavsav%nwaves = 0
391 this%etsav%nwaves = 0
392 do j = 1, nwav
393 this%wavsav%depth(j) = dzero
394 this%wavsav%theta(j) = dzero
395 this%wavsav%flux(j) = dzero
396 this%wavsav%speed(j) = dzero
397 this%etsav%depth(j) = dzero
398 this%etsav%theta(j) = dzero
399 this%etsav%flux(j) = dzero
400 this%etsav%speed(j) = dzero
401 this%overtake_time(j) = dzero
402 this%wave_merges(j) = 0
403 end do
404 do icell = 1, ncells
405 do j = 1, nwav
406 this%wave_depth(j, icell) = dzero
407 this%wave_theta(j, icell) = dzero
408 this%wave_flux(j, icell) = dzero
409 this%wave_speed(j, icell) = dzero
410 end do
411 this%nwaves(icell) = 1
412 this%theta_res(icell) = dzero
413 this%theta_sat(icell) = dzero
414 this%theta_init(icell) = dzero
415 this%bc_eps(icell) = dzero
416 this%air_entry(icell) = dzero
417 this%root_pot(icell) = dzero
418 this%root_act(icell) = dzero
419 this%theta_ext(icell) = dzero
420 this%et_uz(icell) = dzero
421 this%flux_to_wt(icell) = dzero
422 this%finf_spec(icell) = dzero
423 this%finf(icell) = dzero
424 this%finf_rej(icell) = dzero
425 this%gwet(icell) = dzero
426 this%uzfarea(icell) = dzero
427 this%cellarea(icell) = dzero
428 this%celtop(icell) = dzero
429 this%celbot(icell) = dzero
430 this%landtop(icell) = dzero
431 this%water_table(icell) = dzero
432 this%water_table_old(icell) = dzero
433 this%surfdep(icell) = dzero
434 this%vks(icell) = dzero
435 this%surf_infil(icell) = dzero
436 this%surf_infil_below(icell) = dzero
437 this%surf_seep(icell) = dzero
438 this%gw_pet(icell) = dzero
439 this%pet(icell) = dzero
440 this%pet_max(icell) = dzero
441 this%ext_depth(icell) = dzero
442 this%ext_depth_uz(icell) = dzero
443 this%landflag(icell) = 0
444 this%cell_below(icell) = 0
445 end do
446 !
447 ! -- check in the pre-refactor variable names
448 call this%checkin_deprecated_names(memory_path)
449 end subroutine init
450
451 !> @brief Alias the previous names of the renamed uzf variables
452 !!
453 !! The aliases share memory with the renamed arrays so that programs using
454 !! the previous names through the API still resolve them; each use is
455 !! reported as deprecated.
456 !<
457 subroutine checkin_deprecated_names(this, memory_path)
458 ! -- modules
460 ! -- dummy
461 class(uzfcellgrouptype) :: this
462 character(len=*), intent(in) :: memory_path
463 ! -- local
464 character(len=*), parameter :: version = '6.9.0' !< deprecation version
465 ! -- code
466 !
467 ! -- wave state
468 call mem_alias_deprecated(this%wave_depth, 'UZDPST', memory_path, &
469 'WAVE_DEPTH', memory_path, version)
470 call mem_alias_deprecated(this%wave_theta, 'UZTHST', memory_path, &
471 'WAVE_THETA', memory_path, version)
472 call mem_alias_deprecated(this%wave_flux, 'UZFLST', memory_path, &
473 'WAVE_FLUX', memory_path, version)
474 call mem_alias_deprecated(this%wave_speed, 'UZSPST', memory_path, &
475 'WAVE_SPEED', memory_path, version)
476 call mem_alias_deprecated(this%nwaves, 'NWAVST', memory_path, 'NWAVES', &
477 memory_path, version)
478 call mem_alias_deprecated(this%nwaves_max, 'NWAV_PVAR', memory_path, &
479 'NWAVES_MAX', memory_path, version)
480 ! -- cell properties and state
481 call mem_alias_deprecated(this%theta_res, 'THTR', memory_path, &
482 'THETA_RES', memory_path, version)
483 call mem_alias_deprecated(this%theta_sat, 'THTS', memory_path, &
484 'THETA_SAT', memory_path, version)
485 call mem_alias_deprecated(this%theta_init, 'THTI', memory_path, &
486 'THETA_INIT', memory_path, version)
487 call mem_alias_deprecated(this%bc_eps, 'EPS', memory_path, 'BC_EPS', &
488 memory_path, version)
489 call mem_alias_deprecated(this%air_entry, 'HA', memory_path, 'AIR_ENTRY', &
490 memory_path, version)
491 call mem_alias_deprecated(this%root_pot, 'HROOT', memory_path, 'ROOT_POT', &
492 memory_path, version)
493 call mem_alias_deprecated(this%root_act, 'ROOTACT', memory_path, &
494 'ROOT_ACT', memory_path, version)
495 call mem_alias_deprecated(this%theta_ext, 'EXTWC', memory_path, &
496 'THETA_EXT', memory_path, version)
497 call mem_alias_deprecated(this%et_uz, 'ETACT', memory_path, 'ET_UZ', &
498 memory_path, version)
499 call mem_alias_deprecated(this%flux_to_wt, 'TOTFLUX', memory_path, &
500 'FLUX_TO_WT', memory_path, version)
501 call mem_alias_deprecated(this%finf_spec, 'SINF', memory_path, &
502 'FINF_SPEC', memory_path, version)
503 call mem_alias_deprecated(this%gwet, 'GWET_PVAR', memory_path, 'GWET', &
504 memory_path, version)
505 call mem_alias_deprecated(this%pet_max, 'PETMAX', memory_path, 'PET_MAX', &
506 memory_path, version)
507 call mem_alias_deprecated(this%gw_pet, 'GWPET', memory_path, 'GW_PET', &
508 memory_path, version)
509 call mem_alias_deprecated(this%ext_depth, 'EXTDP', memory_path, &
510 'EXT_DEPTH', memory_path, version)
511 call mem_alias_deprecated(this%ext_depth_uz, 'EXTDPUZ', memory_path, &
512 'EXT_DEPTH_UZ', memory_path, version)
513 call mem_alias_deprecated(this%water_table, 'WATAB', memory_path, &
514 'WATER_TABLE', memory_path, version)
515 call mem_alias_deprecated(this%water_table_old, 'WATABOLD', memory_path, &
516 'WATER_TABLE_OLD', memory_path, version)
517 call mem_alias_deprecated(this%surf_infil, 'SURFLUX', memory_path, &
518 'SURF_INFIL', memory_path, version)
519 call mem_alias_deprecated(this%surf_infil_below, 'SURFLUXBELOW', &
520 memory_path, 'SURF_INFIL_BELOW', memory_path, &
521 version)
522 call mem_alias_deprecated(this%surf_seep, 'SURFSEEP', memory_path, &
523 'SURF_SEEP', memory_path, version)
524 call mem_alias_deprecated(this%cell_below, 'IVERTCON', memory_path, &
525 'CELL_BELOW', memory_path, version)
526 end subroutine checkin_deprecated_names
527
528 !> @brief Deallocate uzf object variables
529 !<
530 subroutine dealloc(this)
531 ! -- modules
533 ! -- dummy
534 class(uzfcellgrouptype) :: this
535 !
536 call mem_deallocate(this%wave_depth)
537 call mem_deallocate(this%wave_theta)
538 call mem_deallocate(this%wave_flux)
539 call mem_deallocate(this%wave_speed)
540 call mem_deallocate(this%nwaves)
541 call mem_deallocate(this%nwaves_max)
542 call mem_deallocate(this%ntrailwaves)
543 call mem_deallocate(this%theta_res)
544 call mem_deallocate(this%theta_sat)
545 call mem_deallocate(this%theta_init)
546 call mem_deallocate(this%bc_eps)
547 call mem_deallocate(this%air_entry)
548 call mem_deallocate(this%root_pot)
549 call mem_deallocate(this%root_act)
550 call mem_deallocate(this%theta_ext)
551 call mem_deallocate(this%et_uz)
552 call mem_deallocate(this%flux_to_wt)
553 call mem_deallocate(this%finf_spec)
554 call mem_deallocate(this%finf)
555 call mem_deallocate(this%finf_rej)
556 call mem_deallocate(this%gwet)
557 call mem_deallocate(this%uzfarea)
558 call mem_deallocate(this%cellarea)
559 call mem_deallocate(this%celtop)
560 call mem_deallocate(this%celbot)
561 call mem_deallocate(this%landtop)
562 call mem_deallocate(this%water_table)
563 call mem_deallocate(this%water_table_old)
564 call mem_deallocate(this%surfdep)
565 call mem_deallocate(this%vks)
566 call mem_deallocate(this%surf_infil)
567 call mem_deallocate(this%surf_infil_below)
568 call mem_deallocate(this%surf_seep)
569 call mem_deallocate(this%gw_pet)
570 call mem_deallocate(this%pet)
571 call mem_deallocate(this%pet_max)
572 call mem_deallocate(this%ext_depth)
573 call mem_deallocate(this%ext_depth_uz)
574 call mem_deallocate(this%landflag)
575 call mem_deallocate(this%cell_below)
576 call mem_deallocate(this%wavsav%depth)
577 call mem_deallocate(this%wavsav%theta)
578 call mem_deallocate(this%wavsav%flux)
579 call mem_deallocate(this%wavsav%speed)
580 call mem_deallocate(this%wavsav%nwaves)
581 call mem_deallocate(this%etsav%depth)
582 call mem_deallocate(this%etsav%theta)
583 call mem_deallocate(this%etsav%flux)
584 call mem_deallocate(this%etsav%speed)
585 call mem_deallocate(this%etsav%nwaves)
586 call mem_deallocate(this%overtake_time)
587 call mem_deallocate(this%wave_merges)
588 end subroutine dealloc
589
590 !> @brief Set uzf object material properties
591 !<
592 subroutine setdata(this, icell, area, top, bot, surfdep, vks, thtr, thts, &
593 thti, eps, ntrail, landflag, ivertcon)
594 ! -- dummy
595 class(uzfcellgrouptype) :: this
596 integer(I4B), intent(in) :: icell
597 real(DP), intent(in) :: area
598 real(DP), intent(in) :: top
599 real(DP), intent(in) :: bot
600 real(DP), intent(in) :: surfdep
601 real(DP), intent(in) :: vks
602 real(DP), intent(in) :: thtr
603 real(DP), intent(in) :: thts
604 real(DP), intent(in) :: thti
605 real(DP), intent(in) :: eps
606 integer(I4B), intent(in) :: ntrail
607 integer(I4B), intent(in) :: landflag
608 integer(I4B), intent(in) :: ivertcon
609 !
610 ! -- set the values for uzf cell icell
611 this%landflag(icell) = landflag
612 this%cell_below(icell) = ivertcon
613 this%surfdep(icell) = surfdep
614 this%uzfarea(icell) = area
615 this%cellarea(icell) = area
616 if (this%landflag(icell) == 1) then
617 this%celtop(icell) = top - dhalf * this%surfdep(icell)
618 else
619 this%celtop(icell) = top
620 end if
621 this%celbot(icell) = bot
622 this%vks(icell) = vks
623 this%theta_res(icell) = thtr
624 this%theta_sat(icell) = thts
625 this%theta_init(icell) = thti
626 this%bc_eps(icell) = eps
627 this%ntrailwaves = ntrail
628 this%pet(icell) = dzero
629 this%ext_depth(icell) = dzero
630 this%theta_ext(icell) = dzero
631 this%air_entry(icell) = dzero
632 this%root_pot(icell) = dzero
633 end subroutine setdata
634
635 !> @brief Set initial head for uzf object
636 !<
637 subroutine sethead(this, icell, hgwf)
638 ! -- dummy
639 class(uzfcellgrouptype) :: this
640 integer(I4B), intent(in) :: icell
641 real(DP), intent(in) :: hgwf
642 !
643 ! -- set initial head
644 this%water_table(icell) = this%celbot(icell)
645 if (hgwf > this%celbot(icell)) this%water_table(icell) = hgwf
646 if (this%water_table(icell) > this%celtop(icell)) &
647 this%water_table(icell) = this%celtop(icell)
648 this%water_table_old(icell) = this%water_table(icell)
649 end subroutine sethead
650
651 !> @brief Set infiltration
652 !<
653 subroutine setdatafinf(this, icell, finf)
654 ! -- dummy
655 class(uzfcellgrouptype) :: this
656 integer(I4B), intent(in) :: icell
657 real(DP), intent(in) :: finf
658 !
659 if (this%landflag(icell) == 1) then
660 this%finf_spec(icell) = finf
661 this%finf(icell) = finf
662 else
663 this%finf_spec(icell) = dzero
664 this%finf(icell) = dzero
665 end if
666 this%finf_rej(icell) = dzero
667 this%surf_infil(icell) = dzero
668 this%surf_infil_below(icell) = dzero
669 end subroutine setdatafinf
670
671 !> @brief Set uzfarea using cellarea and areamult
672 !<
673 subroutine setdatauzfarea(this, icell, areamult)
674 ! -- dummy
675 class(uzfcellgrouptype) :: this
676 integer(I4B), intent(in) :: icell
677 real(DP), intent(in) :: areamult
678 !
679 ! -- set uzf area
680 this%uzfarea(icell) = this%cellarea(icell) * areamult
681 end subroutine setdatauzfarea
682
683 !> @brief Set unsaturated ET-related variables
684 !<
685 subroutine setdataet(this, icell, jbelow, pet, extdp)
686 ! -- dummy
687 class(uzfcellgrouptype) :: this
688 integer(I4B), intent(in) :: icell
689 integer(I4B), intent(in) :: jbelow
690 real(DP), intent(in) :: pet
691 real(DP), intent(in) :: extdp
692 ! -- local
693 real(DP) :: thick
694 !
695 if (this%landflag(icell) == 1) then
696 this%pet(icell) = pet
697 this%gw_pet(icell) = pet
698 else
699 this%pet(icell) = dzero
700 this%gw_pet(icell) = dzero
701 end if
702 thick = this%celtop(icell) - this%celbot(icell)
703 this%ext_depth(icell) = extdp
704 if (this%landflag(icell) > 0) then
705 this%landtop(icell) = this%celtop(icell)
706 this%pet_max(icell) = this%pet(icell)
707 end if
708 !
709 ! -- set uz extinction depth
710 if (this%landtop(icell) - this%ext_depth(icell) < this%celbot(icell)) then
711 this%ext_depth_uz(icell) = thick
712 else
713 this%ext_depth_uz(icell) = this%celtop(icell) - &
714 (this%landtop(icell) - this%ext_depth(icell))
715 end if
716 if (this%ext_depth_uz(icell) < dzero) this%ext_depth_uz(icell) = dzero
717 if (this%ext_depth_uz(icell) > dem7 .and. this%ext_depth(icell) < dem7) &
718 this%ext_depth(icell) = this%ext_depth_uz(icell)
719 !
720 ! -- set pet for underlying cell
721 if (jbelow > 0) then
722 this%landtop(jbelow) = this%landtop(icell)
723 this%pet_max(jbelow) = this%pet_max(icell)
724 end if
725 end subroutine setdataet
726
727 !> @brief Set extinction water content
728 !<
729 subroutine setdataetwc(this, icell, jbelow, extwc)
730 ! -- dummy
731 class(uzfcellgrouptype) :: this
732 integer(I4B), intent(in) :: icell
733 integer(I4B), intent(in) :: jbelow
734 real(DP), intent(in) :: extwc
735 !
736 ! -- set extinction water content
737 this%theta_ext(icell) = extwc
738 if (jbelow > 0) this%theta_ext(jbelow) = extwc
739 end subroutine setdataetwc
740
741 !> @brief Set variables for head-based unsaturated flow
742 !<
743 subroutine setdataetha(this, icell, jbelow, ha, hroot, rootact)
744 ! -- dummy
745 class(uzfcellgrouptype) :: this
746 integer(I4B), intent(in) :: icell
747 integer(I4B), intent(in) :: jbelow
748 real(DP), intent(in) :: ha
749 real(DP), intent(in) :: hroot
750 real(DP), intent(in) :: rootact
751 !
752 ! -- set variables
753 this%air_entry(icell) = ha
754 this%root_pot(icell) = hroot
755 this%root_act(icell) = rootact
756 if (jbelow > 0) then
757 this%air_entry(jbelow) = ha
758 this%root_pot(jbelow) = hroot
759 this%root_act(jbelow) = rootact
760 end if
761 end subroutine setdataetha
762
763 !> @brief Set variables to advance to new time step. nothing yet.
764 !<
765 subroutine advance(this, icell)
766 ! -- dummy
767 class(uzfcellgrouptype) :: this
768 integer(I4B), intent(in) :: icell
769 !
770 ! -- set variables
771 this%surf_seep(icell) = dzero
772 end subroutine advance
773
774 !> @brief Route water through one uzf cell and form its gwf equation terms
775 !!
776 !! With reset_state, the wave train is saved on entry and restored on exit, so
777 !! a trial solution leaves no trace; only the final call of the time step, with
778 !! reset_state false, commits the new waves through update_wav.
779 !<
780 subroutine solve(this, jbelow, icell, totfluxtot, ietflag, &
781 issflag, iseepflag, hgwf, qfrommvr, ierr, &
782 reset_state, trhs, thcof, deriv, watercontent)
783 ! -- modules
784 use tdismodule, only: delt
785 ! -- dummy
786 class(uzfcellgrouptype) :: this
787 integer(I4B), intent(in) :: jbelow !< number of underlying uzf object or 0 if none
788 integer(I4B), intent(in) :: icell !< number of this uzf object
789 real(DP), intent(inout) :: totfluxtot !<
790 integer(I4B), intent(in) :: ietflag !< et is off (0) or based one water content (1) or pressure (2)
791 integer(I4B), intent(in) :: issflag !< steady state flag
792 integer(I4B), intent(in) :: iseepflag !< discharge to land is active (1) or not (0)
793 real(DP), intent(in) :: hgwf !< head for cell icell
794 real(DP), intent(in) :: qfrommvr !< water inflow from mover
795 integer(I4B), intent(inout) :: ierr !< flag indicating not enough waves
796 logical, intent(in) :: reset_state !< flag indicating that waves should be reset after solution
797 real(DP), intent(inout), optional :: trhs !< total uzf rhs contribution to GWF model
798 real(DP), intent(inout), optional :: thcof !< total uzf hcof contribution to GWF model
799 real(DP), intent(inout), optional :: deriv !< derivate term for contribution to GWF model
800 real(DP), intent(inout), optional :: watercontent !< calculated water content
801 ! -- local
802 real(DP) :: test
803 real(DP) :: scale
804 real(DP) :: seep
805 real(DP) :: finfact
806 real(DP) :: derivfinf
807 real(DP) :: trhsfinf
808 real(DP) :: thcoffinf
809 real(DP) :: trhsseep
810 real(DP) :: thcofseep
811 real(DP) :: deriv1
812 real(DP) :: deriv2
813 !
814 ! -- initialize variables
815 totfluxtot = dzero
816 trhsfinf = dzero
817 thcoffinf = dzero
818 trhsseep = dzero
819 thcofseep = dzero
820 this%finf_rej(icell) = dzero
821 this%surf_infil(icell) = this%finf(icell) + qfrommvr / this%uzfarea(icell)
822 this%water_table(icell) = hgwf
823 this%surf_seep(icell) = dzero
824 seep = dzero
825 finfact = dzero
826 this%et_uz(icell) = dzero
827 this%surf_infil_below(icell) = dzero
828 if (this%cell_below(icell) > 0) then
829 this%finf(jbelow) = dzero
830 end if
831 if (this%water_table(icell) < this%celbot(icell)) &
832 this%water_table(icell) = this%celbot(icell)
833 !
834 ! -- initialize derivative variables
835 deriv1 = dzero
836 deriv2 = dzero
837 derivfinf = dzero
838 !
839 ! -- save wave states for resetting after iteration.
840 if (reset_state) then
841 call this%store_waves(icell, this%wavsav)
842 end if
843 !
844 if (this%water_table(icell) > this%celtop(icell)) &
845 this%water_table(icell) = this%celtop(icell)
846 !
847 ! -- add water from mover to applied infiltration.
848 if (this%surf_infil(icell) > this%vks(icell)) then
849 this%surf_infil(icell) = this%vks(icell)
850 end if
851 !
852 ! -- saturation excess rejected infiltration
853 if (this%landflag(icell) == 1) then
854 call this%rejfinf(icell, deriv1, hgwf, trhsfinf, thcoffinf, finfact)
855 this%surf_infil(icell) = finfact
856 end if
857 !
858 ! -- calculate rejected infiltration
859 this%finf_rej(icell) = this%finf(icell) + &
860 (qfrommvr / this%uzfarea(icell)) &
861 - this%surf_infil(icell)
862 !
863 ! -- calculate groundwater discharge
864 if (iseepflag > 0 .and. this%landflag(icell) == 1) then
865 call this%gwseep(icell, deriv2, scale, hgwf, trhsseep, thcofseep, seep)
866 this%surf_seep(icell) = seep
867 end if
868 !
869 ! -- route water through unsat zone, calc. storage change and recharge
870 test = this%water_table(icell)
871 if (this%water_table_old(icell) - test < -dem15) &
872 test = this%water_table_old(icell)
873 if (this%celtop(icell) - test > dem15) then
874 if (issflag == 0) then
875 call this%routewaves(totfluxtot, delt, ietflag, icell, ierr)
876 if (ierr > 0) then
877 if (reset_state) &
878 call this%load_waves(icell, this%wavsav)
879 return
880 end if
881 call this%uz_rise(icell, totfluxtot)
882 this%flux_to_wt(icell) = totfluxtot
883 if (this%cell_below(icell) > 0) then
884 call this%addrech(icell, jbelow, hgwf, trhsfinf, thcoffinf, &
885 derivfinf, delt)
886 end if
887 else
888 this%flux_to_wt(icell) = this%surf_infil(icell) * delt
889 totfluxtot = this%surf_infil(icell) * delt
890 end if
891 thcoffinf = dzero
892 trhsfinf = this%flux_to_wt(icell) * this%uzfarea(icell) / delt
893 if (.not. reset_state) then
894 call this%update_wav(icell, delt, issflag, 0)
895 end if
896 else
897 this%flux_to_wt(icell) = this%surf_infil(icell) * delt
898 totfluxtot = this%surf_infil(icell) * delt
899 if (.not. reset_state) then
900 call this%update_wav(icell, delt, issflag, 1)
901 end if
902 end if
903 !
904 ! -- If formulating, then these variables will be present
905 if (present(deriv)) deriv = deriv1 + deriv2 + derivfinf
906 if (present(trhs)) trhs = trhsfinf + trhsseep
907 if (present(thcof)) thcof = thcoffinf + thcofseep
908 !
909 ! -- Assign water content prior to resetting waves
910 if (present(watercontent)) then
911 watercontent = this%get_wcnew(icell)
912 end if
913 !
914 ! -- reset waves to previous state for next iteration
915 if (reset_state) then
916 call this%load_waves(icell, this%wavsav)
917 end if
918 end subroutine solve
919
920 !> @brief Add recharge or infiltration to cells
921 !<
922 subroutine addrech(this, icell, jbelow, hgwf, trhs, thcof, deriv, delt)
923 ! -- dummy
924 class(uzfcellgrouptype) :: this
925 integer(I4B), intent(in) :: icell
926 integer(I4B), intent(in) :: jbelow
927 real(DP), intent(inout) :: trhs
928 real(DP), intent(inout) :: thcof
929 real(DP), intent(inout) :: deriv
930 real(DP), intent(in) :: delt
931 real(DP), intent(in) :: hgwf
932 ! -- local
933 real(DP) :: fcheck
934 real(DP) :: x, scale, range
935 !
936 ! -- initialize
937 range = dem5
938 deriv = dzero
939 thcof = dzero
940 trhs = this%uzfarea(icell) * this%flux_to_wt(icell) / delt
941 if (this%flux_to_wt(icell) < dem14) return
942 scale = done
943 !
944 ! -- smoothly reduce flow between cells when head close to cell top
945 x = hgwf - (this%celbot(icell) - range)
946 call sscurve(x, range, deriv, scale)
947 deriv = this%uzfarea(icell) * deriv * this%flux_to_wt(icell) / delt
948 this%finf(jbelow) = (done - scale) * this%flux_to_wt(icell) / delt
949 fcheck = this%finf(jbelow) - this%vks(jbelow)
950 !
951 ! -- reduce flow between cells when vks is too small
952 if (fcheck < dem14) fcheck = dzero
953 this%finf(jbelow) = this%finf(jbelow) - fcheck
954 this%surf_infil_below(icell) = this%finf(jbelow)
955 this%flux_to_wt(icell) = scale * this%flux_to_wt(icell) + fcheck * delt
956 trhs = this%uzfarea(icell) * this%flux_to_wt(icell) / delt
957 end subroutine addrech
958
959 !> @brief Reject applied infiltration due to low vks
960 !<
961 subroutine rejfinf(this, icell, deriv, hgwf, trhs, thcof, finfact)
962 ! -- dummy
963 class(uzfcellgrouptype) :: this
964 integer(I4B), intent(in) :: icell
965 real(DP), intent(inout) :: deriv
966 real(DP), intent(inout) :: finfact
967 real(DP), intent(inout) :: thcof
968 real(DP), intent(inout) :: trhs
969 real(DP), intent(in) :: hgwf
970 ! -- local
971 real(DP) :: x, range, scale, q
972 !
973 range = this%surfdep(icell)
974 q = this%surf_infil(icell)
975 finfact = q
976 trhs = finfact * this%uzfarea(icell)
977 x = this%celtop(icell) - hgwf
978 call slinear(x, range, deriv, scale)
979 deriv = -q * deriv * this%uzfarea(icell) * scale
980 if (scale < done) then
981 finfact = q * scale
982 trhs = finfact * this%uzfarea(icell) * this%celtop(icell) / range
983 thcof = finfact * this%uzfarea(icell) / range
984 end if
985 end subroutine rejfinf
986
987 !> @brief Calculate groundwater discharge to land surface
988 !<
989 subroutine gwseep(this, icell, deriv, scale, hgwf, trhs, thcof, seep)
990 ! -- dummy
991 class(uzfcellgrouptype) :: this
992 integer(I4B), intent(in) :: icell
993 real(DP), intent(inout) :: deriv
994 real(DP), intent(inout) :: trhs
995 real(DP), intent(inout) :: thcof
996 real(DP), intent(inout) :: seep
997 real(DP), intent(out) :: scale
998 real(DP), intent(in) :: hgwf
999 ! -- local
1000 real(DP) :: x, range, y, deriv1, d1, d2, Q
1001 !
1002 seep = dzero
1003 deriv = dzero
1004 deriv1 = dzero
1005 d1 = dzero
1006 d2 = dzero
1007 scale = dzero
1008 q = this%uzfarea(icell) * this%vks(icell)
1009 range = this%surfdep(icell)
1010 x = hgwf - this%celtop(icell)
1011 call scubiclinear(x, range, deriv1, y)
1012 scale = y
1013 seep = scale * q * (hgwf - this%celtop(icell)) / range
1014 trhs = scale * q * this%celtop(icell) / range
1015 thcof = -scale * q / range
1016 d1 = -deriv1 * q * x / range
1017 d2 = -scale * q / range
1018 deriv = d1 + d2
1019 if (seep < dzero) then
1020 seep = dzero
1021 deriv = dzero
1022 trhs = dzero
1023 thcof = dzero
1024 end if
1025 end subroutine gwseep
1026
1027end module uzfcellgroupmodule
subroutine init()
This module contains simulation constants.
Definition Constants.f90:9
real(dp), parameter dem12
real constant 1e-12
real(dp), parameter dem20
real constant 1e-20
real(dp), parameter dem10
real constant 1e-10
real(dp), parameter dem7
real constant 1e-7
real(dp), parameter dep20
real constant 1e20
Definition Constants.f90:91
real(dp), parameter dem14
real constant 1e-14
real(dp), parameter dhalf
real constant 1/2
Definition Constants.f90:68
real(dp), parameter dem3
real constant 1e-3
real(dp), parameter dem4
real constant 1e-4
real(dp), parameter dem30
real constant 1e-30
real(dp), parameter dem6
real constant 1e-6
real(dp), parameter dzero
real constant zero
Definition Constants.f90:65
real(dp), parameter dem5
real constant 1e-5
real(dp), parameter dem9
real constant 1e-9
real(dp), parameter dem15
real constant 1e-15
real(dp), parameter dtwo
real constant 2
Definition Constants.f90:79
real(dp), parameter dthree
real constant 3
Definition Constants.f90:80
real(dp), parameter done
real constant 1
Definition Constants.f90:76
This module defines variable data types.
Definition kind.f90:8
Previous variable names checked in as deprecated aliases.
subroutine slinear(x, range, dydx, y)
sLinear
subroutine scubiclinear(x, range, dydx, y)
sCubicLinear
subroutine sscurve(x, range, dydx, y)
SCurve.
integer(i4b), pointer, public itmuni
flag indicating time units
Definition tdis.f90:25
integer(i4b), pointer, public kper
current stress period number
Definition tdis.f90:26
real(dp), pointer, public delt
length of the current time step
Definition tdis.f90:32
Unsaturated zone flow by the method of characteristics.
subroutine advance(this, icell)
Set variables to advance to new time step. nothing yet.
subroutine gwseep(this, icell, deriv, scale, hgwf, trhs, thcof, seep)
Calculate groundwater discharge to land surface.
subroutine sethead(this, icell, hgwf)
Set initial head for uzf object.
subroutine init(this, ncells, nwav, memory_path)
Allocate and set uzf object variables.
subroutine setdatauzfarea(this, icell, areamult)
Set uzfarea using cellarea and areamult.
subroutine setdataetha(this, icell, jbelow, ha, hroot, rootact)
Set variables for head-based unsaturated flow.
subroutine addrech(this, icell, jbelow, hgwf, trhs, thcof, deriv, delt)
Add recharge or infiltration to cells.
subroutine setdata(this, icell, area, top, bot, surfdep, vks, thtr, thts, thti, eps, ntrail, landflag, ivertcon)
Set uzf object material properties.
subroutine rejfinf(this, icell, deriv, hgwf, trhs, thcof, finfact)
Reject applied infiltration due to low vks.
subroutine solve(this, jbelow, icell, totfluxtot, ietflag, issflag, iseepflag, hgwf, qfrommvr, ierr, reset_state, trhs, thcof, deriv, watercontent)
Route water through one uzf cell and form its gwf equation terms.
subroutine setdataet(this, icell, jbelow, pet, extdp)
Set unsaturated ET-related variables.
subroutine dealloc(this)
Deallocate uzf object variables.
subroutine checkin_deprecated_names(this, memory_path)
Alias the previous names of the renamed uzf variables.
subroutine setdataetwc(this, icell, jbelow, extwc)
Set extinction water content.
subroutine setdatafinf(this, icell, finf)
Set infiltration.
real(dp) function, public etfunc_lin(efflndsrf, extdp, resid_pet, deriv_et, trhs, thcof, hgwf, celtop, celbot)
Calculate gwf ET using linear decay ET function from mf-2005.
Definition UzfEtUtil.f90:18
real(dp) function, public etfunc_nlin(efflndsrf, extdp, resid_pet, deriv_et, trhs, thcof, hgwf)
Calculate gwf ET using a square decay ET function with smoothing at the specified extinction depth.
Definition UzfEtUtil.f90:79
Snapshot of one cell's wave train.