MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
gwe-sfe.f90
Go to the documentation of this file.
1 ! -- Stream Energy Transport Module
2 ! -- todo: Temperature decay?
3 ! -- todo: save the sfe temperature into the sfr aux variable? (perhaps needed for GWT-GWE exchanges)
4 ! -- todo: calculate the sfr VISC aux variable using temperature?
5 !
6 ! SFR flows (sfrbudptr) index var SFE term Transport Type
7 !---------------------------------------------------------------------------------
8 
9 ! -- terms from SFR that will be handled by parent APT Package
10 ! FLOW-JA-FACE idxbudfjf FLOW-JA-FACE cv2cv
11 ! GWF (aux FLOW-AREA) idxbudgwf GWF cv2gwf
12 ! STORAGE (aux VOLUME) idxbudsto none used for cv volumes
13 ! FROM-MVR idxbudfmvr FROM-MVR q * tmpext = this%qfrommvr(:) ! kluge note: include rhow*cpw in comments for various terms
14 ! TO-MVR idxbudtmvr TO-MVR q * tfeat
15 
16 ! -- SFR terms
17 ! RAINFALL idxbudrain RAINFALL q * train
18 ! EVAPORATION idxbudevap EVAPORATION tfeat<tevap: q*tfeat, else: q*tevap (latent heat will likely need to modify these calcs in the future) ! kluge note
19 ! RUNOFF idxbudroff RUNOFF q * troff
20 ! EXT-INFLOW idxbudiflw EXT-INFLOW q * tiflw
21 ! EXT-OUTFLOW idxbudoutf EXT-OUTFLOW q * tfeat
22 ! STRMBD-COND idxbudsbcd STRMBD-COND ! kluge note: expression for this
23 
24 ! -- terms from a flow file that should be skipped
25 ! CONSTANT none none none
26 ! AUXILIARY none none none
27 
28 ! -- terms that are written to the transport budget file
29 ! none none STORAGE (aux MASS) dE/dt
30 ! none none AUXILIARY none
31 ! none none CONSTANT accumulate
32 !
33 !
35 
36  use kindmodule, only: dp, i4b
38  use simmodule, only: store_error
39  use bndmodule, only: bndtype, getbndfromlist
40  use tspfmimodule, only: tspfmitype
41  use sfrmodule, only: sfrtype
42  use observemodule, only: observetype
47  !
48  implicit none
49  !
50  private
51  public :: sfe_create
52  !
53  character(len=*), parameter :: ftype = 'SFE'
54  character(len=*), parameter :: flowtype = 'SFR'
55  character(len=16) :: text = ' SFE'
56 
57  type, extends(tspapttype) :: gwesfetype
58 
59  type(gweinputdatatype), pointer :: gwecommon => null() !< pointer to shared gwe data used by multiple packages but set in mst
60 
61  integer(I4B), pointer :: idxbudrain => null() !< index of rainfall terms in flowbudptr
62  integer(I4B), pointer :: idxbudevap => null() !< index of evaporation terms in flowbudptr
63  integer(I4B), pointer :: idxbudroff => null() !< index of runoff terms in flowbudptr
64  integer(I4B), pointer :: idxbudiflw => null() !< index of inflow terms in flowbudptr
65  integer(I4B), pointer :: idxbudoutf => null() !< index of outflow terms in flowbudptr
66  integer(I4B), pointer :: idxbudsbcd => null() !< index of streambed conduction terms in flowbudptr
67 
68  real(dp), dimension(:), pointer, contiguous :: temprain => null() !< rainfall temperature
69  real(dp), dimension(:), pointer, contiguous :: tempevap => null() !< evaporation temperature
70  real(dp), dimension(:), pointer, contiguous :: temproff => null() !< runoff temperature
71  real(dp), dimension(:), pointer, contiguous :: tempiflw => null() !< inflow temperature
72 
73  contains
74 
75  procedure :: bnd_da => sfe_da
76  procedure :: allocate_scalars
77  procedure :: apt_allocate_arrays => sfe_allocate_arrays
78  procedure :: find_apt_package => find_sfe_package
79  procedure :: pak_fc_expanded => sfe_fc_expanded
80  procedure :: pak_solve => sfe_solve
81  procedure :: pak_get_nbudterms => sfe_get_nbudterms
82  procedure :: pak_setup_budobj => sfe_setup_budobj
83  procedure :: pak_fill_budobj => sfe_fill_budobj
84  procedure :: sfe_rain_term
85  procedure :: sfe_evap_term
86  procedure :: sfe_roff_term
87  procedure :: sfe_iflw_term
88  procedure :: sfe_outf_term
89  procedure :: pak_df_obs => sfe_df_obs
90  procedure :: pak_rp_obs => sfe_rp_obs
91  procedure :: pak_bd_obs => sfe_bd_obs
92  procedure :: pak_set_stressperiod => sfe_set_stressperiod
93 
94  end type gwesfetype
95 
96 contains
97 
98  !> @brief Create a new sfe package
99  !<
100  subroutine sfe_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
101  fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
102  ! -- dummy
103  class(bndtype), pointer :: packobj
104  integer(I4B), intent(in) :: id
105  integer(I4B), intent(in) :: ibcnum
106  integer(I4B), intent(in) :: inunit
107  integer(I4B), intent(in) :: iout
108  character(len=*), intent(in) :: namemodel
109  character(len=*), intent(in) :: pakname
110  type(tspfmitype), pointer :: fmi
111  real(dp), intent(in), pointer :: eqnsclfac !< Governing equation scale factor
112  type(gweinputdatatype), intent(in), target :: gwecommon !< Shared data container for use by multiple GWE packages
113  character(len=*), intent(in) :: dvt !< For GWE, set to "TEMPERATURE" in TspAptType
114  character(len=*), intent(in) :: dvu !< For GWE, set to "energy" in TspAptType
115  character(len=*), intent(in) :: dvua !< For GWE, set to "E" in TspAptType
116  ! -- local
117  type(gwesfetype), pointer :: sfeobj
118  !
119  ! -- Allocate the object and assign values to object variables
120  allocate (sfeobj)
121  packobj => sfeobj
122  !
123  ! -- Create name and memory path
124  call packobj%set_names(ibcnum, namemodel, pakname, ftype)
125  packobj%text = text
126  !
127  ! -- Allocate scalars
128  call sfeobj%allocate_scalars()
129  !
130  ! -- Initialize package
131  call packobj%pack_initialize()
132  !
133  packobj%inunit = inunit
134  packobj%iout = iout
135  packobj%id = id
136  packobj%ibcnum = ibcnum
137  packobj%ncolbnd = 1
138  packobj%iscloc = 1
139  !
140  ! -- Store pointer to flow model interface. When the GwfGwt exchange is
141  ! created, it sets fmi%bndlist so that the GWT model has access to all
142  ! the flow packages
143  sfeobj%fmi => fmi
144  !
145  ! -- Store pointer to governing equation scale factor
146  sfeobj%eqnsclfac => eqnsclfac
147  !
148  ! -- Store pointer to shared data module for accessing cpw, rhow
149  ! for the budget calculations, and for accessing the latent heat of
150  ! vaporization for evaporative cooling.
151  sfeobj%gwecommon => gwecommon
152  !
153  ! -- Set labels that will be used in generalized APT class
154  sfeobj%depvartype = dvt
155  sfeobj%depvarunit = dvu
156  sfeobj%depvarunitabbrev = dvua
157  end subroutine sfe_create
158 
159  !> @brief Find corresponding sfe package
160  !<
161  subroutine find_sfe_package(this)
162  ! -- modules
164  ! -- dummy
165  class(gwesfetype) :: this
166  ! -- local
167  character(len=LINELENGTH) :: errmsg
168  class(bndtype), pointer :: packobj
169  integer(I4B) :: ip, icount
170  integer(I4B) :: nbudterm
171  logical :: found
172  !
173  ! -- Initialize found to false, and error later if flow package cannot
174  ! be found
175  found = .false.
176  !
177  ! -- If user is specifying flows in a binary budget file, then set up
178  ! the budget file reader, otherwise set a pointer to the flow package
179  ! budobj
180  if (this%fmi%flows_from_file) then
181  call this%fmi%set_aptbudobj_pointer(this%flowpackagename, this%flowbudptr)
182  if (associated(this%flowbudptr)) found = .true.
183  !
184  else
185  if (associated(this%fmi%gwfbndlist)) then
186  ! -- Look through gwfbndlist for a flow package with the same name as
187  ! this transport package name
188  do ip = 1, this%fmi%gwfbndlist%Count()
189  packobj => getbndfromlist(this%fmi%gwfbndlist, ip)
190  if (packobj%packName == this%flowpackagename) then
191  found = .true.
192  !
193  ! -- Store BndType pointer to packobj, and then
194  ! use the select type to point to the budobj in flow package
195  this%flowpackagebnd => packobj
196  select type (packobj)
197  type is (sfrtype)
198  this%flowbudptr => packobj%budobj
199  end select
200  end if
201  if (found) exit
202  end do
203  end if
204  end if
205  !
206  ! -- Error if flow package not found
207  if (.not. found) then
208  write (errmsg, '(a)') 'Could not find flow package with name '&
209  &//trim(adjustl(this%flowpackagename))//'.'
210  call store_error(errmsg)
211  call this%parser%StoreErrorUnit()
212  end if
213  !
214  ! -- Allocate space for idxbudssm, which indicates whether this is a
215  ! special budget term or one that is a general source and sink
216  nbudterm = this%flowbudptr%nbudterm
217  call mem_allocate(this%idxbudssm, nbudterm, 'IDXBUDSSM', this%memoryPath)
218  !
219  ! -- Process budget terms and identify special budget terms
220  write (this%iout, '(/, a, a)') &
221  'PROCESSING '//ftype//' INFORMATION FOR ', this%packName
222  write (this%iout, '(a)') ' IDENTIFYING FLOW TERMS IN '//flowtype//' PACKAGE'
223  write (this%iout, '(a, i0)') &
224  ' NUMBER OF '//flowtype//' = ', this%flowbudptr%ncv
225  icount = 1
226  do ip = 1, this%flowbudptr%nbudterm
227  select case (trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)))
228  case ('FLOW-JA-FACE')
229  this%idxbudfjf = ip
230  this%idxbudssm(ip) = 0
231  case ('GWF')
232  this%idxbudgwf = ip
233  this%idxbudssm(ip) = 0
234  case ('STORAGE')
235  this%idxbudsto = ip
236  this%idxbudssm(ip) = 0
237  case ('RAINFALL')
238  this%idxbudrain = ip
239  this%idxbudssm(ip) = 0
240  case ('EVAPORATION')
241  this%idxbudevap = ip
242  this%idxbudssm(ip) = 0
243  case ('RUNOFF')
244  this%idxbudroff = ip
245  this%idxbudssm(ip) = 0
246  case ('EXT-INFLOW')
247  this%idxbudiflw = ip
248  this%idxbudssm(ip) = 0
249  case ('EXT-OUTFLOW')
250  this%idxbudoutf = ip
251  this%idxbudssm(ip) = 0
252  case ('TO-MVR')
253  this%idxbudtmvr = ip
254  this%idxbudssm(ip) = 0
255  case ('FROM-MVR')
256  this%idxbudfmvr = ip
257  this%idxbudssm(ip) = 0
258  case ('AUXILIARY')
259  this%idxbudaux = ip
260  this%idxbudssm(ip) = 0
261  case default
262  !
263  ! -- Set idxbudssm equal to a column index for where the temperatures
264  ! are stored in the concbud(nbudssm, ncv) array
265  this%idxbudssm(ip) = icount
266  icount = icount + 1
267  end select
268  write (this%iout, '(a, i0, " = ", a,/, a, i0)') &
269  ' TERM ', ip, trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)), &
270  ' MAX NO. OF ENTRIES = ', this%flowbudptr%budterm(ip)%maxlist
271  end do
272  write (this%iout, '(a, //)') 'DONE PROCESSING '//ftype//' INFORMATION'
273  !
274  ! -- Streambed conduction term
275  this%idxbudsbcd = this%idxbudgwf
276  end subroutine find_sfe_package
277 
278  !> @brief Add matrix terms related to SFE
279  !!
280  !! This will be called from TspAptType%apt_fc_expanded()
281  !! in order to add matrix terms specifically for SFE
282  !<
283  subroutine sfe_fc_expanded(this, rhs, ia, idxglo, matrix_sln)
284  ! -- dummy
285  class(gwesfetype) :: this
286  real(DP), dimension(:), intent(inout) :: rhs
287  integer(I4B), dimension(:), intent(in) :: ia
288  integer(I4B), dimension(:), intent(in) :: idxglo
289  class(matrixbasetype), pointer :: matrix_sln
290  ! -- local
291  integer(I4B) :: j, n, n1, n2
292  integer(I4B) :: iloc
293  integer(I4B) :: iposd, iposoffd
294  integer(I4B) :: ipossymd, ipossymoffd
295  integer(I4B) :: auxpos
296  real(DP) :: rrate
297  real(DP) :: rhsval
298  real(DP) :: hcofval
299  real(DP) :: ctherm
300  real(DP) :: wa !< wetted area
301  real(DP) :: ktf !< thermal conductivity of streambed material
302  real(DP) :: s !< thickness of conductive streambed material
303  !
304  ! -- Add rainfall contribution
305  if (this%idxbudrain /= 0) then
306  do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
307  call this%sfe_rain_term(j, n1, n2, rrate, rhsval, hcofval)
308  iloc = this%idxlocnode(n1)
309  iposd = this%idxpakdiag(n1)
310  call matrix_sln%add_value_pos(iposd, hcofval)
311  rhs(iloc) = rhs(iloc) + rhsval
312  end do
313  end if
314  !
315  ! -- Add evaporation contribution
316  if (this%idxbudevap /= 0) then
317  do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
318  call this%sfe_evap_term(j, n1, n2, rrate, rhsval, hcofval)
319  iloc = this%idxlocnode(n1)
320  iposd = this%idxpakdiag(n1)
321  call matrix_sln%add_value_pos(iposd, hcofval)
322  rhs(iloc) = rhs(iloc) + rhsval
323  end do
324  end if
325  !
326  ! -- Add runoff contribution
327  if (this%idxbudroff /= 0) then
328  do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
329  call this%sfe_roff_term(j, n1, n2, rrate, rhsval, hcofval)
330  iloc = this%idxlocnode(n1)
331  iposd = this%idxpakdiag(n1)
332  call matrix_sln%add_value_pos(iposd, hcofval)
333  rhs(iloc) = rhs(iloc) + rhsval
334  end do
335  end if
336  !
337  ! -- Add inflow contribution
338  if (this%idxbudiflw /= 0) then
339  do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
340  call this%sfe_iflw_term(j, n1, n2, rrate, rhsval, hcofval)
341  iloc = this%idxlocnode(n1)
342  iposd = this%idxpakdiag(n1)
343  call matrix_sln%add_value_pos(iposd, hcofval)
344  rhs(iloc) = rhs(iloc) + rhsval
345  end do
346  end if
347  !
348  ! -- Add outflow contribution
349  if (this%idxbudoutf /= 0) then
350  do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
351  call this%sfe_outf_term(j, n1, n2, rrate, rhsval, hcofval)
352  iloc = this%idxlocnode(n1)
353  iposd = this%idxpakdiag(n1)
354  call matrix_sln%add_value_pos(iposd, hcofval)
355  rhs(iloc) = rhs(iloc) + rhsval
356  end do
357  end if
358  !
359  ! -- Add streambed conduction contribution
360  do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
361  !
362  ! -- Set n to feature number and process if active feature
363  n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
364  if (this%iboundpak(n) /= 0) then
365  !
366  ! -- Set acoef and rhs to negative so they are relative to sfe and not gwe
367  auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
368  wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
369  ktf = this%ktf(n)
370  s = this%rfeatthk(n)
371  ctherm = ktf * wa / s
372  !
373  ! -- Add to sfe row
374  iposd = this%idxdglo(j)
375  iposoffd = this%idxoffdglo(j)
376  call matrix_sln%add_value_pos(iposd, -ctherm)
377  call matrix_sln%add_value_pos(iposoffd, ctherm)
378  !
379  ! -- Add to gwe row for sfe connection
380  ipossymd = this%idxsymdglo(j)
381  ipossymoffd = this%idxsymoffdglo(j)
382  call matrix_sln%add_value_pos(ipossymd, -ctherm)
383  call matrix_sln%add_value_pos(ipossymoffd, ctherm)
384  end if
385  end do
386  end subroutine sfe_fc_expanded
387 
388  !> @ brief Add terms specific to sfr to the explicit sfe solve
389  !<
390  subroutine sfe_solve(this)
391  ! -- dummy
392  class(gwesfetype) :: this
393  ! -- local
394  integer(I4B) :: j
395  integer(I4B) :: n1, n2
396  real(DP) :: rrate
397  !
398  ! -- Add rainfall contribution
399  if (this%idxbudrain /= 0) then
400  do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
401  call this%sfe_rain_term(j, n1, n2, rrate)
402  this%dbuff(n1) = this%dbuff(n1) + rrate
403  end do
404  end if
405  !
406  ! -- Add evaporation contribution
407  if (this%idxbudevap /= 0) then
408  do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
409  call this%sfe_evap_term(j, n1, n2, rrate)
410  this%dbuff(n1) = this%dbuff(n1) + rrate
411  end do
412  end if
413  !
414  ! -- Add runoff contribution
415  if (this%idxbudroff /= 0) then
416  do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
417  call this%sfe_roff_term(j, n1, n2, rrate)
418  this%dbuff(n1) = this%dbuff(n1) + rrate
419  end do
420  end if
421  !
422  ! -- Add inflow contribution
423  if (this%idxbudiflw /= 0) then
424  do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
425  call this%sfe_iflw_term(j, n1, n2, rrate)
426  this%dbuff(n1) = this%dbuff(n1) + rrate
427  end do
428  end if
429  !
430  ! -- Add outflow contribution
431  if (this%idxbudoutf /= 0) then
432  do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
433  call this%sfe_outf_term(j, n1, n2, rrate)
434  this%dbuff(n1) = this%dbuff(n1) + rrate
435  end do
436  end if
437  !
438  ! Note: explicit streambed conduction terms???
439  end subroutine sfe_solve
440 
441  !> @brief Function to return the number of budget terms just for this package.
442  !!
443  !! This overrides a function in the parent class.
444  !<
445  function sfe_get_nbudterms(this) result(nbudterms)
446  ! -- dummy
447  class(gwesfetype) :: this
448  ! -- return
449  integer(I4B) :: nbudterms
450  !
451  ! -- Number of budget terms is 6:
452  ! 1. rainfall
453  ! 2. evaporation
454  ! 3. runoff
455  ! 4. ext-inflow
456  ! 5. ext-outflow
457  ! 6. streambed-cond
458  nbudterms = 6
459  end function sfe_get_nbudterms
460 
461  !> @brief Set up the budget object that stores all the sfe flows
462  !<
463  subroutine sfe_setup_budobj(this, idx)
464  ! -- modules
465  use constantsmodule, only: lenbudtxt
466  ! -- dummy
467  class(gwesfetype) :: this
468  integer(I4B), intent(inout) :: idx
469  ! -- local
470  integer(I4B) :: n, n1, n2
471  integer(I4B) :: maxlist, naux
472  real(DP) :: q
473  character(len=LENBUDTXT) :: text
474  !
475  ! --
476  text = ' RAINFALL'
477  idx = idx + 1
478  maxlist = this%flowbudptr%budterm(this%idxbudrain)%maxlist
479  naux = 0
480  call this%budobj%budterm(idx)%initialize(text, &
481  this%name_model, &
482  this%packName, &
483  this%name_model, &
484  this%packName, &
485  maxlist, .false., .false., &
486  naux)
487  !
488  ! --
489  text = ' EVAPORATION'
490  idx = idx + 1
491  maxlist = this%flowbudptr%budterm(this%idxbudevap)%maxlist
492  naux = 0
493  call this%budobj%budterm(idx)%initialize(text, &
494  this%name_model, &
495  this%packName, &
496  this%name_model, &
497  this%packName, &
498  maxlist, .false., .false., &
499  naux)
500  !
501  ! --
502  text = ' RUNOFF'
503  idx = idx + 1
504  maxlist = this%flowbudptr%budterm(this%idxbudroff)%maxlist
505  naux = 0
506  call this%budobj%budterm(idx)%initialize(text, &
507  this%name_model, &
508  this%packName, &
509  this%name_model, &
510  this%packName, &
511  maxlist, .false., .false., &
512  naux)
513  !
514  ! --
515  text = ' EXT-INFLOW'
516  idx = idx + 1
517  maxlist = this%flowbudptr%budterm(this%idxbudiflw)%maxlist
518  naux = 0
519  call this%budobj%budterm(idx)%initialize(text, &
520  this%name_model, &
521  this%packName, &
522  this%name_model, &
523  this%packName, &
524  maxlist, .false., .false., &
525  naux)
526  !
527  ! --
528  text = ' EXT-OUTFLOW'
529  idx = idx + 1
530  maxlist = this%flowbudptr%budterm(this%idxbudoutf)%maxlist
531  naux = 0
532  call this%budobj%budterm(idx)%initialize(text, &
533  this%name_model, &
534  this%packName, &
535  this%name_model, &
536  this%packName, &
537  maxlist, .false., .false., &
538  naux)
539  !
540  ! -- Conduction through the wetted streambed
541  text = ' STREAMBED-COND'
542  idx = idx + 1
543  maxlist = this%flowbudptr%budterm(this%idxbudsbcd)%maxlist
544  naux = 0
545  call this%budobj%budterm(idx)%initialize(text, &
546  this%name_model, &
547  this%packName, &
548  this%name_model, &
549  this%packName, &
550  maxlist, .false., .false., &
551  naux)
552  call this%budobj%budterm(idx)%reset(maxlist)
553  q = dzero
554  do n = 1, maxlist
555  n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(n)
556  n2 = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
557  call this%budobj%budterm(idx)%update_term(n1, n2, q)
558  end do
559  end subroutine sfe_setup_budobj
560 
561  !> @brief Copy flow terms into this%budobj
562  !<
563  subroutine sfe_fill_budobj(this, idx, x, flowja, ccratin, ccratout)
564  ! -- dummy
565  class(gwesfetype) :: this
566  integer(I4B), intent(inout) :: idx
567  real(DP), dimension(:), intent(in) :: x
568  real(DP), dimension(:), contiguous, intent(inout) :: flowja
569  real(DP), intent(inout) :: ccratin
570  real(DP), intent(inout) :: ccratout
571  ! -- local
572  integer(I4B) :: j, n1, n2
573  integer(I4B) :: nlist
574  integer(I4B) :: igwfnode
575  integer(I4B) :: idiag
576  integer(I4B) :: auxpos
577  real(DP) :: q
578  real(DP) :: ctherm
579  real(DP) :: wa !< wetted area
580  real(DP) :: ktf !< thermal conductivity of streambed material
581  real(DP) :: s !< thickness of conductive streambed materia
582  !
583  ! -- Rain
584  idx = idx + 1
585  nlist = this%flowbudptr%budterm(this%idxbudrain)%nlist
586  call this%budobj%budterm(idx)%reset(nlist)
587  do j = 1, nlist
588  call this%sfe_rain_term(j, n1, n2, q)
589  call this%budobj%budterm(idx)%update_term(n1, n2, q)
590  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
591  end do
592  !
593  ! -- Evaporation
594  idx = idx + 1
595  nlist = this%flowbudptr%budterm(this%idxbudevap)%nlist
596  call this%budobj%budterm(idx)%reset(nlist)
597  do j = 1, nlist
598  call this%sfe_evap_term(j, n1, n2, q)
599  call this%budobj%budterm(idx)%update_term(n1, n2, q)
600  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
601  end do
602  !
603  ! -- Runoff
604  idx = idx + 1
605  nlist = this%flowbudptr%budterm(this%idxbudroff)%nlist
606  call this%budobj%budterm(idx)%reset(nlist)
607  do j = 1, nlist
608  call this%sfe_roff_term(j, n1, n2, q)
609  call this%budobj%budterm(idx)%update_term(n1, n2, q)
610  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
611  end do
612  !
613  ! -- Ext-inflow
614  idx = idx + 1
615  nlist = this%flowbudptr%budterm(this%idxbudiflw)%nlist
616  call this%budobj%budterm(idx)%reset(nlist)
617  do j = 1, nlist
618  call this%sfe_iflw_term(j, n1, n2, q)
619  call this%budobj%budterm(idx)%update_term(n1, n2, q)
620  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
621  end do
622  !
623  ! -- Ext-outflow
624  idx = idx + 1
625  nlist = this%flowbudptr%budterm(this%idxbudoutf)%nlist
626  call this%budobj%budterm(idx)%reset(nlist)
627  do j = 1, nlist
628  call this%sfe_outf_term(j, n1, n2, q)
629  call this%budobj%budterm(idx)%update_term(n1, n2, q)
630  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
631  end do
632  !
633  ! -- Strmbd-cond
634  idx = idx + 1
635  call this%budobj%budterm(idx)%reset(this%maxbound)
636  do j = 1, this%flowbudptr%budterm(this%idxbudsbcd)%nlist
637  q = dzero
638  n1 = this%flowbudptr%budterm(this%idxbudsbcd)%id1(j)
639  if (this%iboundpak(n1) /= 0) then
640  igwfnode = this%flowbudptr%budterm(this%idxbudsbcd)%id2(j)
641  ! -- For now, there is only 1 aux variable under 'GWF'
642  auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
643  wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
644  ktf = this%ktf(n1)
645  s = this%rfeatthk(n1)
646  ctherm = ktf * wa / s
647  q = ctherm * (x(igwfnode) - this%xnewpak(n1))
648  end if
649  call this%budobj%budterm(idx)%update_term(n1, igwfnode, q)
650  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
651  if (this%iboundpak(n1) /= 0) then
652  ! -- Contribution to gwe cell budget
653  this%simvals(n1) = this%simvals(n1) - q
654  idiag = this%dis%con%ia(igwfnode)
655  flowja(idiag) = flowja(idiag) - q
656  end if
657  end do
658  end subroutine sfe_fill_budobj
659 
660  !> @brief Allocate scalars specific to the streamflow energy transport (SFE)
661  !! package.
662  !<
663  subroutine allocate_scalars(this)
664  ! -- modules
666  ! -- dummy
667  class(gwesfetype) :: this
668  !
669  ! -- Allocate scalars in TspAptType
670  call this%TspAptType%allocate_scalars()
671  !
672  ! -- Allocate
673  call mem_allocate(this%idxbudrain, 'IDXBUDRAIN', this%memoryPath)
674  call mem_allocate(this%idxbudevap, 'IDXBUDEVAP', this%memoryPath)
675  call mem_allocate(this%idxbudroff, 'IDXBUDROFF', this%memoryPath)
676  call mem_allocate(this%idxbudiflw, 'IDXBUDIFLW', this%memoryPath)
677  call mem_allocate(this%idxbudoutf, 'IDXBUDOUTF', this%memoryPath)
678  call mem_allocate(this%idxbudsbcd, 'IDXBUDSBCD', this%memoryPath)
679  !
680  ! -- Initialize
681  this%idxbudrain = 0
682  this%idxbudevap = 0
683  this%idxbudroff = 0
684  this%idxbudiflw = 0
685  this%idxbudoutf = 0
686  this%idxbudsbcd = 0
687  end subroutine allocate_scalars
688 
689  !> @brief Allocate arrays specific to the streamflow energy transport (SFE)
690  !! package.
691  !<
692  subroutine sfe_allocate_arrays(this)
693  ! -- modules
695  ! -- dummy
696  class(gwesfetype), intent(inout) :: this
697  ! -- local
698  integer(I4B) :: n
699  !
700  ! -- Time series
701  call mem_allocate(this%temprain, this%ncv, 'TEMPRAIN', this%memoryPath)
702  call mem_allocate(this%tempevap, this%ncv, 'TEMPEVAP', this%memoryPath)
703  call mem_allocate(this%temproff, this%ncv, 'TEMPROFF', this%memoryPath)
704  call mem_allocate(this%tempiflw, this%ncv, 'TEMPIFLW', this%memoryPath)
705  !
706  ! -- Call standard TspAptType allocate arrays
707  call this%TspAptType%apt_allocate_arrays()
708  !
709  ! -- Initialize
710  do n = 1, this%ncv
711  this%temprain(n) = dzero
712  this%tempevap(n) = dzero
713  this%temproff(n) = dzero
714  this%tempiflw(n) = dzero
715  end do
716  end subroutine sfe_allocate_arrays
717 
718  !> @brief Deallocate memory
719  !<
720  subroutine sfe_da(this)
721  ! -- modules
723  ! -- dummy
724  class(gwesfetype) :: this
725  !
726  ! -- Deallocate scalars
727  call mem_deallocate(this%idxbudrain)
728  call mem_deallocate(this%idxbudevap)
729  call mem_deallocate(this%idxbudroff)
730  call mem_deallocate(this%idxbudiflw)
731  call mem_deallocate(this%idxbudoutf)
732  call mem_deallocate(this%idxbudsbcd)
733  !
734  ! -- Deallocate time series
735  call mem_deallocate(this%temprain)
736  call mem_deallocate(this%tempevap)
737  call mem_deallocate(this%temproff)
738  call mem_deallocate(this%tempiflw)
739  !
740  ! -- Deallocate scalars in TspAptType
741  call this%TspAptType%bnd_da()
742  end subroutine sfe_da
743 
744  !> @brief Rain term
745  !<
746  subroutine sfe_rain_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
747  ! -- dummy
748  class(gwesfetype) :: this
749  integer(I4B), intent(in) :: ientry
750  integer(I4B), intent(inout) :: n1
751  integer(I4B), intent(inout) :: n2
752  real(DP), intent(inout), optional :: rrate
753  real(DP), intent(inout), optional :: rhsval
754  real(DP), intent(inout), optional :: hcofval
755  ! -- local
756  real(DP) :: qbnd
757  real(DP) :: ctmp
758  !
759  n1 = this%flowbudptr%budterm(this%idxbudrain)%id1(ientry)
760  n2 = this%flowbudptr%budterm(this%idxbudrain)%id2(ientry)
761  qbnd = this%flowbudptr%budterm(this%idxbudrain)%flow(ientry)
762  ctmp = this%temprain(n1)
763  if (present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac ! kluge note: think about budget / sensible heat issue
764  if (present(rhsval)) rhsval = -rrate
765  if (present(hcofval)) hcofval = dzero
766  end subroutine sfe_rain_term
767 
768  !> @brief Evaporative term
769  !<
770  subroutine sfe_evap_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
771  ! -- dummy
772  class(gwesfetype) :: this
773  integer(I4B), intent(in) :: ientry
774  integer(I4B), intent(inout) :: n1
775  integer(I4B), intent(inout) :: n2
776  real(DP), intent(inout), optional :: rrate
777  real(DP), intent(inout), optional :: rhsval
778  real(DP), intent(inout), optional :: hcofval
779  ! -- local
780  real(DP) :: qbnd
781  real(DP) :: heatlat
782  !
783  n1 = this%flowbudptr%budterm(this%idxbudevap)%id1(ientry)
784  n2 = this%flowbudptr%budterm(this%idxbudevap)%id2(ientry)
785  ! -- note that qbnd is negative for evap
786  qbnd = this%flowbudptr%budterm(this%idxbudevap)%flow(ientry)
787  heatlat = this%gwecommon%gwerhow * this%gwecommon%gwelatheatvap
788  if (present(rrate)) rrate = qbnd * heatlat
789  !!if (present(rhsval)) rhsval = -rrate / this%eqnsclfac ! kluge note: divided by eqnsclfac for fc purposes because rrate is in terms of energy
790  if (present(rhsval)) rhsval = -rrate
791  if (present(hcofval)) hcofval = dzero
792  end subroutine sfe_evap_term
793 
794  !> @brief Runoff term
795  !<
796  subroutine sfe_roff_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
797  ! -- dummy
798  class(gwesfetype) :: this
799  integer(I4B), intent(in) :: ientry
800  integer(I4B), intent(inout) :: n1
801  integer(I4B), intent(inout) :: n2
802  real(DP), intent(inout), optional :: rrate
803  real(DP), intent(inout), optional :: rhsval
804  real(DP), intent(inout), optional :: hcofval
805  ! -- local
806  real(DP) :: qbnd
807  real(DP) :: ctmp
808  !
809  n1 = this%flowbudptr%budterm(this%idxbudroff)%id1(ientry)
810  n2 = this%flowbudptr%budterm(this%idxbudroff)%id2(ientry)
811  qbnd = this%flowbudptr%budterm(this%idxbudroff)%flow(ientry)
812  ctmp = this%temproff(n1)
813  if (present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
814  if (present(rhsval)) rhsval = -rrate
815  if (present(hcofval)) hcofval = dzero
816  end subroutine sfe_roff_term
817 
818  !> @brief Inflow Term
819  !!
820  !! Accounts for energy added via streamflow entering into a stream channel;
821  !! for example, energy entering the model domain via a specified flow in a
822  !! stream channel.
823  !<
824  subroutine sfe_iflw_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
825  ! -- dummy
826  class(gwesfetype) :: this
827  integer(I4B), intent(in) :: ientry
828  integer(I4B), intent(inout) :: n1
829  integer(I4B), intent(inout) :: n2
830  real(DP), intent(inout), optional :: rrate
831  real(DP), intent(inout), optional :: rhsval
832  real(DP), intent(inout), optional :: hcofval
833  ! -- local
834  real(DP) :: qbnd
835  real(DP) :: ctmp
836  !
837  n1 = this%flowbudptr%budterm(this%idxbudiflw)%id1(ientry)
838  n2 = this%flowbudptr%budterm(this%idxbudiflw)%id2(ientry)
839  qbnd = this%flowbudptr%budterm(this%idxbudiflw)%flow(ientry)
840  ctmp = this%tempiflw(n1)
841  if (present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
842  if (present(rhsval)) rhsval = -rrate
843  if (present(hcofval)) hcofval = dzero
844  end subroutine sfe_iflw_term
845 
846  !> @brief Outflow term
847  !!
848  !! Accounts for the energy leaving a stream channel, for example, energy exiting the
849  !! model domain via a flow in a stream channel flowing out of the active domain.
850  !<
851  subroutine sfe_outf_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
852  ! -- dummy
853  class(gwesfetype) :: this
854  integer(I4B), intent(in) :: ientry
855  integer(I4B), intent(inout) :: n1
856  integer(I4B), intent(inout) :: n2
857  real(DP), intent(inout), optional :: rrate
858  real(DP), intent(inout), optional :: rhsval
859  real(DP), intent(inout), optional :: hcofval
860  ! -- local
861  real(DP) :: qbnd
862  real(DP) :: ctmp
863  !
864  n1 = this%flowbudptr%budterm(this%idxbudoutf)%id1(ientry)
865  n2 = this%flowbudptr%budterm(this%idxbudoutf)%id2(ientry)
866  qbnd = this%flowbudptr%budterm(this%idxbudoutf)%flow(ientry)
867  ctmp = this%xnewpak(n1)
868  if (present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
869  if (present(rhsval)) rhsval = dzero
870  if (present(hcofval)) hcofval = qbnd * this%eqnsclfac
871  end subroutine sfe_outf_term
872 
873  !> @brief Observations
874  !!
875  !! Store the observation type supported by the APT package and override
876  !! BndType%bnd_df_obs
877  !<
878  subroutine sfe_df_obs(this)
879  ! -- modules
880  ! -- dummy
881  class(gwesfetype) :: this
882  ! -- local
883  integer(I4B) :: indx
884  !
885  ! -- Store obs type and assign procedure pointer
886  ! for temperature observation type.
887  call this%obs%StoreObsType('temperature', .false., indx)
888  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
889  !
890  ! -- Store obs type and assign procedure pointer
891  ! for flow between reaches.
892  call this%obs%StoreObsType('flow-ja-face', .true., indx)
893  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid12
894  !
895  ! -- Store obs type and assign procedure pointer
896  ! for from-mvr observation type.
897  call this%obs%StoreObsType('from-mvr', .true., indx)
898  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
899  !
900  ! -- Store obs type and assign procedure pointer
901  ! for to-mvr observation type.
902  call this%obs%StoreObsType('to-mvr', .true., indx)
903  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
904  !
905  ! -- Store obs type and assign procedure pointer
906  ! for storage observation type.
907  call this%obs%StoreObsType('storage', .true., indx)
908  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
909  !
910  ! -- Store obs type and assign procedure pointer
911  ! for constant observation type.
912  call this%obs%StoreObsType('constant', .true., indx)
913  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
914  !
915  ! -- Store obs type and assign procedure pointer
916  ! for observation type: sfe
917  call this%obs%StoreObsType('sfe', .true., indx)
918  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
919  !
920  ! -- Store obs type and assign procedure pointer
921  ! for rainfall observation type.
922  call this%obs%StoreObsType('rainfall', .true., indx)
923  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
924  !
925  ! -- Store obs type and assign procedure pointer
926  ! for evaporation observation type.
927  call this%obs%StoreObsType('evaporation', .true., indx)
928  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
929  !
930  ! -- Store obs type and assign procedure pointer
931  ! for runoff observation type.
932  call this%obs%StoreObsType('runoff', .true., indx)
933  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
934  !
935  ! -- Store obs type and assign procedure pointer
936  ! for inflow observation type.
937  call this%obs%StoreObsType('ext-inflow', .true., indx)
938  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
939  !
940  ! -- Store obs type and assign procedure pointer
941  ! for ext-outflow observation type.
942  call this%obs%StoreObsType('ext-outflow', .true., indx)
943  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
944  end subroutine sfe_df_obs
945 
946  !> @brief Process package specific obs
947  !!
948  !! Method to process specific observations for this package.
949  !<
950  subroutine sfe_rp_obs(this, obsrv, found)
951  ! -- dummy
952  class(gwesfetype), intent(inout) :: this !< package class
953  type(observetype), intent(inout) :: obsrv !< observation object
954  logical, intent(inout) :: found !< indicate whether observation was found
955  ! -- local
956  !
957  found = .true.
958  select case (obsrv%ObsTypeId)
959  case ('RAINFALL')
960  call this%rp_obs_byfeature(obsrv)
961  case ('EVAPORATION')
962  call this%rp_obs_byfeature(obsrv)
963  case ('RUNOFF')
964  call this%rp_obs_byfeature(obsrv)
965  case ('EXT-INFLOW')
966  call this%rp_obs_byfeature(obsrv)
967  case ('EXT-OUTFLOW')
968  call this%rp_obs_byfeature(obsrv)
969  case ('TO-MVR')
970  call this%rp_obs_byfeature(obsrv)
971  case default
972  found = .false.
973  end select
974  end subroutine sfe_rp_obs
975 
976  !> @brief Calculate observation value and pass it back to APT
977  !<
978  subroutine sfe_bd_obs(this, obstypeid, jj, v, found)
979  ! -- dummy
980  class(gwesfetype), intent(inout) :: this
981  character(len=*), intent(in) :: obstypeid
982  real(DP), intent(inout) :: v
983  integer(I4B), intent(in) :: jj
984  logical, intent(inout) :: found
985  ! -- local
986  integer(I4B) :: n1, n2
987  !
988  found = .true.
989  select case (obstypeid)
990  case ('RAINFALL')
991  if (this%iboundpak(jj) /= 0) then
992  call this%sfe_rain_term(jj, n1, n2, v)
993  end if
994  case ('EVAPORATION')
995  if (this%iboundpak(jj) /= 0) then
996  call this%sfe_evap_term(jj, n1, n2, v)
997  end if
998  case ('RUNOFF')
999  if (this%iboundpak(jj) /= 0) then
1000  call this%sfe_roff_term(jj, n1, n2, v)
1001  end if
1002  case ('EXT-INFLOW')
1003  if (this%iboundpak(jj) /= 0) then
1004  call this%sfe_iflw_term(jj, n1, n2, v)
1005  end if
1006  case ('EXT-OUTFLOW')
1007  if (this%iboundpak(jj) /= 0) then
1008  call this%sfe_outf_term(jj, n1, n2, v)
1009  end if
1010  case default
1011  found = .false.
1012  end select
1013  end subroutine sfe_bd_obs
1014 
1015  !> @brief Sets the stress period attributes for keyword use.
1016  !<
1017  subroutine sfe_set_stressperiod(this, itemno, keyword, found)
1018  ! -- modules
1020  ! -- dummy
1021  class(gwesfetype), intent(inout) :: this
1022  integer(I4B), intent(in) :: itemno
1023  character(len=*), intent(in) :: keyword
1024  logical, intent(inout) :: found
1025  ! -- local
1026  character(len=LINELENGTH) :: text
1027  integer(I4B) :: ierr
1028  integer(I4B) :: jj
1029  real(DP), pointer :: bndElem => null()
1030  !
1031  ! RAINFALL <rainfall>
1032  ! EVAPORATION <evaporation>
1033  ! RUNOFF <runoff>
1034  ! INFLOW <inflow>
1035  ! WITHDRAWAL <withdrawal>
1036  !
1037  found = .true.
1038  select case (keyword)
1039  case ('RAINFALL')
1040  ierr = this%apt_check_valid(itemno)
1041  if (ierr /= 0) then
1042  goto 999
1043  end if
1044  call this%parser%GetString(text)
1045  jj = 1
1046  bndelem => this%temprain(itemno)
1047  call read_value_or_time_series_adv(text, itemno, jj, bndelem, &
1048  this%packName, 'BND', this%tsManager, &
1049  this%iprpak, 'RAINFALL')
1050  case ('EVAPORATION')
1051  ierr = this%apt_check_valid(itemno)
1052  if (ierr /= 0) then
1053  goto 999
1054  end if
1055  call this%parser%GetString(text)
1056  jj = 1
1057  bndelem => this%tempevap(itemno)
1058  call read_value_or_time_series_adv(text, itemno, jj, bndelem, &
1059  this%packName, 'BND', this%tsManager, &
1060  this%iprpak, 'EVAPORATION')
1061  case ('RUNOFF')
1062  ierr = this%apt_check_valid(itemno)
1063  if (ierr /= 0) then
1064  goto 999
1065  end if
1066  call this%parser%GetString(text)
1067  jj = 1
1068  bndelem => this%temproff(itemno)
1069  call read_value_or_time_series_adv(text, itemno, jj, bndelem, &
1070  this%packName, 'BND', this%tsManager, &
1071  this%iprpak, 'RUNOFF')
1072  case ('INFLOW')
1073  ierr = this%apt_check_valid(itemno)
1074  if (ierr /= 0) then
1075  goto 999
1076  end if
1077  call this%parser%GetString(text)
1078  jj = 1
1079  bndelem => this%tempiflw(itemno)
1080  call read_value_or_time_series_adv(text, itemno, jj, bndelem, &
1081  this%packName, 'BND', this%tsManager, &
1082  this%iprpak, 'INFLOW')
1083  case default
1084  !
1085  ! -- Keyword not recognized so return to caller with found = .false.
1086  found = .false.
1087  end select
1088  !
1089 999 continue
1090  end subroutine sfe_set_stressperiod
1091 
1092 end module gwesfemodule
This module contains the base boundary package.
class(bndtype) function, pointer, public getbndfromlist(list, idx)
Get boundary from package list.
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:65
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
Definition: Constants.f90:37
real(dp), parameter done
real constant 1
Definition: Constants.f90:76
subroutine sfe_bd_obs(this, obstypeid, jj, v, found)
Calculate observation value and pass it back to APT.
Definition: gwe-sfe.f90:979
character(len= *), parameter flowtype
Definition: gwe-sfe.f90:54
subroutine sfe_df_obs(this)
Observations.
Definition: gwe-sfe.f90:879
subroutine allocate_scalars(this)
Allocate scalars specific to the streamflow energy transport (SFE) package.
Definition: gwe-sfe.f90:664
subroutine sfe_setup_budobj(this, idx)
Set up the budget object that stores all the sfe flows.
Definition: gwe-sfe.f90:464
integer(i4b) function sfe_get_nbudterms(this)
Function to return the number of budget terms just for this package.
Definition: gwe-sfe.f90:446
subroutine sfe_outf_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Outflow term.
Definition: gwe-sfe.f90:852
subroutine sfe_iflw_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Inflow Term.
Definition: gwe-sfe.f90:825
subroutine sfe_set_stressperiod(this, itemno, keyword, found)
Sets the stress period attributes for keyword use.
Definition: gwe-sfe.f90:1018
character(len=16) text
Definition: gwe-sfe.f90:55
subroutine sfe_rp_obs(this, obsrv, found)
Process package specific obs.
Definition: gwe-sfe.f90:951
subroutine sfe_fill_budobj(this, idx, x, flowja, ccratin, ccratout)
Copy flow terms into thisbudobj.
Definition: gwe-sfe.f90:564
subroutine, public sfe_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
Create a new sfe package.
Definition: gwe-sfe.f90:102
subroutine sfe_rain_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Rain term.
Definition: gwe-sfe.f90:747
subroutine sfe_evap_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Evaporative term.
Definition: gwe-sfe.f90:771
character(len= *), parameter ftype
Definition: gwe-sfe.f90:53
subroutine sfe_solve(this)
@ brief Add terms specific to sfr to the explicit sfe solve
Definition: gwe-sfe.f90:391
subroutine sfe_allocate_arrays(this)
Allocate arrays specific to the streamflow energy transport (SFE) package.
Definition: gwe-sfe.f90:693
subroutine sfe_roff_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Runoff term.
Definition: gwe-sfe.f90:797
subroutine sfe_fc_expanded(this, rhs, ia, idxglo, matrix_sln)
Add matrix terms related to SFE.
Definition: gwe-sfe.f90:284
subroutine sfe_da(this)
Deallocate memory.
Definition: gwe-sfe.f90:721
subroutine find_sfe_package(this)
Find corresponding sfe package.
Definition: gwe-sfe.f90:162
This module defines variable data types.
Definition: kind.f90:8
This module contains the derived types ObserveType and ObsDataType.
Definition: Observe.f90:15
This module contains the SFR package methods.
Definition: gwf-sfr.f90:7
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition: Sim.f90:92
subroutine, public read_value_or_time_series_adv(textInput, ii, jj, bndElem, pkgName, auxOrBnd, tsManager, iprpak, varName)
Call this subroutine from advanced packages to define timeseries link for a variable (varName).
subroutine, public apt_process_obsid(obsrv, dis, inunitobs, iout)
Process observation IDs for an advanced package.
Definition: tsp-apt.f90:2841
subroutine, public apt_process_obsid12(obsrv, dis, inunitobs, iout)
Process observation IDs for a package.
Definition: tsp-apt.f90:2884
@ brief BndType
Data for sharing among multiple packages. Originally read in from.