52 character(len=*),
parameter ::
ftype =
'LKE'
53 character(len=*),
parameter ::
flowtype =
'LAK'
54 character(len=16) ::
text =
' LKE'
60 integer(I4B),
pointer :: idxbudrain => null()
61 integer(I4B),
pointer :: idxbudevap => null()
62 integer(I4B),
pointer :: idxbudroff => null()
63 integer(I4B),
pointer :: idxbudiflw => null()
64 integer(I4B),
pointer :: idxbudwdrl => null()
65 integer(I4B),
pointer :: idxbudoutf => null()
66 integer(I4B),
pointer :: idxbudlbcd => null()
68 real(dp),
dimension(:),
pointer,
contiguous :: temprain => null()
69 real(dp),
dimension(:),
pointer,
contiguous :: tempevap => null()
70 real(dp),
dimension(:),
pointer,
contiguous :: temproff => null()
71 real(dp),
dimension(:),
pointer,
contiguous :: tempiflw => null()
101 subroutine lke_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
102 fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
104 class(
bndtype),
pointer :: packobj
105 integer(I4B),
intent(in) :: id
106 integer(I4B),
intent(in) :: ibcnum
107 integer(I4B),
intent(in) :: inunit
108 integer(I4B),
intent(in) :: iout
109 character(len=*),
intent(in) :: namemodel
110 character(len=*),
intent(in) :: pakname
112 real(dp),
intent(in),
pointer :: eqnsclfac
114 character(len=*),
intent(in) :: dvt
115 character(len=*),
intent(in) :: dvu
116 character(len=*),
intent(in) :: dvua
125 call packobj%set_names(ibcnum, namemodel, pakname,
ftype)
129 call lkeobj%allocate_scalars()
132 call packobj%pack_initialize()
134 packobj%inunit = inunit
137 packobj%ibcnum = ibcnum
147 lkeobj%eqnsclfac => eqnsclfac
152 lkeobj%gwecommon => gwecommon
155 lkeobj%depvartype = dvt
156 lkeobj%depvarunit = dvu
157 lkeobj%depvarunitabbrev = dvua
168 character(len=LINELENGTH) :: errmsg
169 class(
bndtype),
pointer :: packobj
170 integer(I4B) :: ip, icount
171 integer(I4B) :: nbudterm
181 if (this%fmi%flows_from_file)
then
182 call this%fmi%set_aptbudobj_pointer(this%flowpackagename, this%flowbudptr)
183 if (
associated(this%flowbudptr)) found = .true.
186 if (
associated(this%fmi%gwfbndlist))
then
189 do ip = 1, this%fmi%gwfbndlist%Count()
191 if (packobj%packName == this%flowpackagename)
then
196 this%flowpackagebnd => packobj
197 select type (packobj)
199 this%flowbudptr => packobj%budobj
208 if (.not. found)
then
209 write (errmsg,
'(a)')
'Could not find flow package with name '&
210 &//trim(adjustl(this%flowpackagename))//
'.'
212 call this%parser%StoreErrorUnit()
217 nbudterm = this%flowbudptr%nbudterm
218 call mem_allocate(this%idxbudssm, nbudterm,
'IDXBUDSSM', this%memoryPath)
221 write (this%iout,
'(/, a, a)') &
222 'PROCESSING '//
ftype//
' INFORMATION FOR ', this%packName
223 write (this%iout,
'(a)')
' IDENTIFYING FLOW TERMS IN '//
flowtype//
' PACKAGE'
224 write (this%iout,
'(a, i0)') &
225 ' NUMBER OF '//
flowtype//
' = ', this%flowbudptr%ncv
227 do ip = 1, this%flowbudptr%nbudterm
228 select case (trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)))
229 case (
'FLOW-JA-FACE')
231 this%idxbudssm(ip) = 0
235 this%idxbudssm(ip) = 0
238 this%idxbudssm(ip) = 0
241 this%idxbudssm(ip) = 0
244 this%idxbudssm(ip) = 0
247 this%idxbudssm(ip) = 0
250 this%idxbudssm(ip) = 0
253 this%idxbudssm(ip) = 0
256 this%idxbudssm(ip) = 0
259 this%idxbudssm(ip) = 0
262 this%idxbudssm(ip) = 0
265 this%idxbudssm(ip) = 0
270 this%idxbudssm(ip) = icount
273 write (this%iout,
'(a, i0, " = ", a,/, a, i0)') &
274 ' TERM ', ip, trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)), &
275 ' MAX NO. OF ENTRIES = ', this%flowbudptr%budterm(ip)%maxlist
277 write (this%iout,
'(a, //)')
'DONE PROCESSING '//
ftype//
' INFORMATION'
288 real(DP),
dimension(:),
intent(inout) :: rhs
289 integer(I4B),
dimension(:),
intent(in) :: ia
290 integer(I4B),
dimension(:),
intent(in) :: idxglo
293 integer(I4B) :: j, n, n1, n2
295 integer(I4B) :: iposd, iposoffd
296 integer(I4B) :: ipossymd, ipossymoffd
297 integer(I4B) :: auxpos
307 if (this%idxbudrain /= 0)
then
308 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
309 call this%lke_rain_term(j, n1, n2, rrate, rhsval, hcofval)
310 iloc = this%idxlocnode(n1)
311 iposd = this%idxpakdiag(n1)
312 call matrix_sln%add_value_pos(iposd, hcofval)
313 rhs(iloc) = rhs(iloc) + rhsval
318 if (this%idxbudevap /= 0)
then
319 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
320 call this%lke_evap_term(j, n1, n2, rrate, rhsval, hcofval)
321 iloc = this%idxlocnode(n1)
322 iposd = this%idxpakdiag(n1)
323 call matrix_sln%add_value_pos(iposd, hcofval)
324 rhs(iloc) = rhs(iloc) + rhsval
329 if (this%idxbudroff /= 0)
then
330 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
331 call this%lke_roff_term(j, n1, n2, rrate, rhsval, hcofval)
332 iloc = this%idxlocnode(n1)
333 iposd = this%idxpakdiag(n1)
334 call matrix_sln%add_value_pos(iposd, hcofval)
335 rhs(iloc) = rhs(iloc) + rhsval
340 if (this%idxbudiflw /= 0)
then
341 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
342 call this%lke_iflw_term(j, n1, n2, rrate, rhsval, hcofval)
343 iloc = this%idxlocnode(n1)
344 iposd = this%idxpakdiag(n1)
345 call matrix_sln%add_value_pos(iposd, hcofval)
346 rhs(iloc) = rhs(iloc) + rhsval
351 if (this%idxbudwdrl /= 0)
then
352 do j = 1, this%flowbudptr%budterm(this%idxbudwdrl)%nlist
353 call this%lke_wdrl_term(j, n1, n2, rrate, rhsval, hcofval)
354 iloc = this%idxlocnode(n1)
355 iposd = this%idxpakdiag(n1)
356 call matrix_sln%add_value_pos(iposd, hcofval)
357 rhs(iloc) = rhs(iloc) + rhsval
362 if (this%idxbudoutf /= 0)
then
363 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
364 call this%lke_outf_term(j, n1, n2, rrate, rhsval, hcofval)
365 iloc = this%idxlocnode(n1)
366 iposd = this%idxpakdiag(n1)
367 call matrix_sln%add_value_pos(iposd, hcofval)
368 rhs(iloc) = rhs(iloc) + rhsval
373 do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
376 n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
377 if (this%iboundpak(n) /= 0)
then
380 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
381 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
384 ctherm = ktf * wa / s
387 iposd = this%idxdglo(j)
388 iposoffd = this%idxoffdglo(j)
389 call matrix_sln%add_value_pos(iposd, -ctherm)
390 call matrix_sln%add_value_pos(iposoffd, ctherm)
393 ipossymd = this%idxsymdglo(j)
394 ipossymoffd = this%idxsymoffdglo(j)
395 call matrix_sln%add_value_pos(ipossymd, -ctherm)
396 call matrix_sln%add_value_pos(ipossymoffd, ctherm)
408 integer(I4B) :: n1, n2
412 if (this%idxbudrain /= 0)
then
413 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
414 call this%lke_rain_term(j, n1, n2, rrate)
415 this%dbuff(n1) = this%dbuff(n1) + rrate
420 if (this%idxbudevap /= 0)
then
421 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
422 call this%lke_evap_term(j, n1, n2, rrate)
423 this%dbuff(n1) = this%dbuff(n1) + rrate
428 if (this%idxbudroff /= 0)
then
429 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
430 call this%lke_roff_term(j, n1, n2, rrate)
431 this%dbuff(n1) = this%dbuff(n1) + rrate
436 if (this%idxbudiflw /= 0)
then
437 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
438 call this%lke_iflw_term(j, n1, n2, rrate)
439 this%dbuff(n1) = this%dbuff(n1) + rrate
444 if (this%idxbudwdrl /= 0)
then
445 do j = 1, this%flowbudptr%budterm(this%idxbudwdrl)%nlist
446 call this%lke_wdrl_term(j, n1, n2, rrate)
447 this%dbuff(n1) = this%dbuff(n1) + rrate
452 if (this%idxbudoutf /= 0)
then
453 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
454 call this%lke_outf_term(j, n1, n2, rrate)
455 this%dbuff(n1) = this%dbuff(n1) + rrate
468 integer(I4B) :: nbudterms
489 integer(I4B),
intent(inout) :: idx
491 integer(I4B) :: n, n1, n2
492 integer(I4B) :: maxlist, naux
494 character(len=LENBUDTXT) :: text
499 maxlist = this%flowbudptr%budterm(this%idxbudrain)%maxlist
501 call this%budobj%budterm(idx)%initialize(text, &
506 maxlist, .false., .false., &
510 text =
' EVAPORATION'
512 maxlist = this%flowbudptr%budterm(this%idxbudevap)%maxlist
514 call this%budobj%budterm(idx)%initialize(text, &
519 maxlist, .false., .false., &
525 maxlist = this%flowbudptr%budterm(this%idxbudroff)%maxlist
527 call this%budobj%budterm(idx)%initialize(text, &
532 maxlist, .false., .false., &
538 maxlist = this%flowbudptr%budterm(this%idxbudiflw)%maxlist
540 call this%budobj%budterm(idx)%initialize(text, &
545 maxlist, .false., .false., &
551 maxlist = this%flowbudptr%budterm(this%idxbudwdrl)%maxlist
553 call this%budobj%budterm(idx)%initialize(text, &
558 maxlist, .false., .false., &
563 text =
' EXT-OUTFLOW'
565 maxlist = this%flowbudptr%budterm(this%idxbudoutf)%maxlist
567 call this%budobj%budterm(idx)%initialize(text, &
572 maxlist, .false., .false., &
576 text =
' LAKEBED-COND'
578 maxlist = this%flowbudptr%budterm(this%idxbudlbcd)%maxlist
580 call this%budobj%budterm(idx)%initialize(text, &
585 maxlist, .false., .false., &
587 call this%budobj%budterm(idx)%reset(maxlist)
590 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(n)
591 n2 = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
592 call this%budobj%budterm(idx)%update_term(n1, n2, q)
601 integer(I4B),
intent(inout) :: idx
602 real(DP),
dimension(:),
intent(in) :: x
603 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
604 real(DP),
intent(inout) :: ccratin
605 real(DP),
intent(inout) :: ccratout
607 integer(I4B) :: j, n1, n2
608 integer(I4B) :: nlist
609 integer(I4B) :: igwfnode
610 integer(I4B) :: idiag
611 integer(I4B) :: auxpos
620 nlist = this%flowbudptr%budterm(this%idxbudrain)%nlist
621 call this%budobj%budterm(idx)%reset(nlist)
623 call this%lke_rain_term(j, n1, n2, q)
624 call this%budobj%budterm(idx)%update_term(n1, n2, q)
625 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
630 nlist = this%flowbudptr%budterm(this%idxbudevap)%nlist
631 call this%budobj%budterm(idx)%reset(nlist)
633 call this%lke_evap_term(j, n1, n2, q)
634 call this%budobj%budterm(idx)%update_term(n1, n2, q)
635 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
640 nlist = this%flowbudptr%budterm(this%idxbudroff)%nlist
641 call this%budobj%budterm(idx)%reset(nlist)
643 call this%lke_roff_term(j, n1, n2, q)
644 call this%budobj%budterm(idx)%update_term(n1, n2, q)
645 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
650 nlist = this%flowbudptr%budterm(this%idxbudiflw)%nlist
651 call this%budobj%budterm(idx)%reset(nlist)
653 call this%lke_iflw_term(j, n1, n2, q)
654 call this%budobj%budterm(idx)%update_term(n1, n2, q)
655 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
660 nlist = this%flowbudptr%budterm(this%idxbudwdrl)%nlist
661 call this%budobj%budterm(idx)%reset(nlist)
663 call this%lke_wdrl_term(j, n1, n2, q)
664 call this%budobj%budterm(idx)%update_term(n1, n2, q)
665 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
670 nlist = this%flowbudptr%budterm(this%idxbudoutf)%nlist
671 call this%budobj%budterm(idx)%reset(nlist)
673 call this%lke_outf_term(j, n1, n2, q)
674 call this%budobj%budterm(idx)%update_term(n1, n2, q)
675 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
680 call this%budobj%budterm(idx)%reset(this%maxbound)
681 do j = 1, this%flowbudptr%budterm(this%idxbudlbcd)%nlist
683 n1 = this%flowbudptr%budterm(this%idxbudlbcd)%id1(j)
684 if (this%iboundpak(n1) /= 0)
then
685 igwfnode = this%flowbudptr%budterm(this%idxbudlbcd)%id2(j)
686 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
687 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
689 s = this%rfeatthk(n1)
690 ctherm = ktf * wa / s
691 q = ctherm * (x(igwfnode) - this%xnewpak(n1))
693 call this%budobj%budterm(idx)%update_term(n1, igwfnode, q)
694 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
695 if (this%iboundpak(n1) /= 0)
then
697 this%simvals(n1) = this%simvals(n1) - q
698 idiag = this%dis%con%ia(igwfnode)
699 flowja(idiag) = flowja(idiag) - q
714 call this%TspAptType%allocate_scalars()
717 call mem_allocate(this%idxbudrain,
'IDXBUDRAIN', this%memoryPath)
718 call mem_allocate(this%idxbudevap,
'IDXBUDEVAP', this%memoryPath)
719 call mem_allocate(this%idxbudroff,
'IDXBUDROFF', this%memoryPath)
720 call mem_allocate(this%idxbudiflw,
'IDXBUDIFLW', this%memoryPath)
721 call mem_allocate(this%idxbudwdrl,
'IDXBUDWDRL', this%memoryPath)
722 call mem_allocate(this%idxbudoutf,
'IDXBUDOUTF', this%memoryPath)
723 call mem_allocate(this%idxbudlbcd,
'IDXBUDLBCD', this%memoryPath)
747 call mem_allocate(this%temprain, this%ncv,
'TEMPRAIN', this%memoryPath)
748 call mem_allocate(this%tempevap, this%ncv,
'TEMPEVAP', this%memoryPath)
749 call mem_allocate(this%temproff, this%ncv,
'TEMPROFF', this%memoryPath)
750 call mem_allocate(this%tempiflw, this%ncv,
'TEMPIFLW', this%memoryPath)
753 call this%TspAptType%apt_allocate_arrays()
757 this%temprain(n) =
dzero
758 this%tempevap(n) =
dzero
759 this%temproff(n) =
dzero
760 this%tempiflw(n) =
dzero
789 call this%TspAptType%bnd_da()
798 integer(I4B),
intent(in) :: ientry
799 integer(I4B),
intent(inout) :: n1
800 integer(I4B),
intent(inout) :: n2
801 real(DP),
intent(inout),
optional :: rrate
802 real(DP),
intent(inout),
optional :: rhsval
803 real(DP),
intent(inout),
optional :: hcofval
808 n1 = this%flowbudptr%budterm(this%idxbudrain)%id1(ientry)
809 n2 = this%flowbudptr%budterm(this%idxbudrain)%id2(ientry)
810 qbnd = this%flowbudptr%budterm(this%idxbudrain)%flow(ientry)
811 ctmp = this%temprain(n1)
812 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
813 if (
present(rhsval)) rhsval = -rrate
814 if (
present(hcofval)) hcofval =
dzero
823 integer(I4B),
intent(in) :: ientry
824 integer(I4B),
intent(inout) :: n1
825 integer(I4B),
intent(inout) :: n2
826 real(DP),
intent(inout),
optional :: rrate
827 real(DP),
intent(inout),
optional :: rhsval
828 real(DP),
intent(inout),
optional :: hcofval
833 n1 = this%flowbudptr%budterm(this%idxbudevap)%id1(ientry)
834 n2 = this%flowbudptr%budterm(this%idxbudevap)%id2(ientry)
836 qbnd = this%flowbudptr%budterm(this%idxbudevap)%flow(ientry)
837 heatlat = this%gwecommon%gwerhow * this%gwecommon%gwelatheatvap
838 if (
present(rrate)) rrate = qbnd * heatlat
839 if (
present(rhsval)) rhsval = -rrate
840 if (
present(hcofval)) hcofval =
dzero
849 integer(I4B),
intent(in) :: ientry
850 integer(I4B),
intent(inout) :: n1
851 integer(I4B),
intent(inout) :: n2
852 real(DP),
intent(inout),
optional :: rrate
853 real(DP),
intent(inout),
optional :: rhsval
854 real(DP),
intent(inout),
optional :: hcofval
859 n1 = this%flowbudptr%budterm(this%idxbudroff)%id1(ientry)
860 n2 = this%flowbudptr%budterm(this%idxbudroff)%id2(ientry)
861 qbnd = this%flowbudptr%budterm(this%idxbudroff)%flow(ientry)
862 ctmp = this%temproff(n1)
863 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
864 if (
present(rhsval)) rhsval = -rrate
865 if (
present(hcofval)) hcofval =
dzero
877 integer(I4B),
intent(in) :: ientry
878 integer(I4B),
intent(inout) :: n1
879 integer(I4B),
intent(inout) :: n2
880 real(DP),
intent(inout),
optional :: rrate
881 real(DP),
intent(inout),
optional :: rhsval
882 real(DP),
intent(inout),
optional :: hcofval
887 n1 = this%flowbudptr%budterm(this%idxbudiflw)%id1(ientry)
888 n2 = this%flowbudptr%budterm(this%idxbudiflw)%id2(ientry)
889 qbnd = this%flowbudptr%budterm(this%idxbudiflw)%flow(ientry)
890 ctmp = this%tempiflw(n1)
891 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
892 if (
present(rhsval)) rhsval = -rrate
893 if (
present(hcofval)) hcofval =
dzero
905 integer(I4B),
intent(in) :: ientry
906 integer(I4B),
intent(inout) :: n1
907 integer(I4B),
intent(inout) :: n2
908 real(DP),
intent(inout),
optional :: rrate
909 real(DP),
intent(inout),
optional :: rhsval
910 real(DP),
intent(inout),
optional :: hcofval
915 n1 = this%flowbudptr%budterm(this%idxbudwdrl)%id1(ientry)
916 n2 = this%flowbudptr%budterm(this%idxbudwdrl)%id2(ientry)
917 qbnd = this%flowbudptr%budterm(this%idxbudwdrl)%flow(ientry)
918 ctmp = this%xnewpak(n1)
919 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
920 if (
present(rhsval)) rhsval =
dzero
921 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
933 integer(I4B),
intent(in) :: ientry
934 integer(I4B),
intent(inout) :: n1
935 integer(I4B),
intent(inout) :: n2
936 real(DP),
intent(inout),
optional :: rrate
937 real(DP),
intent(inout),
optional :: rhsval
938 real(DP),
intent(inout),
optional :: hcofval
943 n1 = this%flowbudptr%budterm(this%idxbudoutf)%id1(ientry)
944 n2 = this%flowbudptr%budterm(this%idxbudoutf)%id2(ientry)
945 qbnd = this%flowbudptr%budterm(this%idxbudoutf)%flow(ientry)
946 ctmp = this%xnewpak(n1)
947 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
948 if (
present(rhsval)) rhsval =
dzero
949 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
965 call this%obs%StoreObsType(
'temperature', .false., indx)
970 call this%obs%StoreObsType(
'flow-ja-face', .true., indx)
975 call this%obs%StoreObsType(
'from-mvr', .true., indx)
980 call this%obs%StoreObsType(
'to-mvr', .true., indx)
985 call this%obs%StoreObsType(
'storage', .true., indx)
990 call this%obs%StoreObsType(
'constant', .true., indx)
995 call this%obs%StoreObsType(
'lke', .true., indx)
1000 call this%obs%StoreObsType(
'rainfall', .true., indx)
1005 call this%obs%StoreObsType(
'evaporation', .true., indx)
1010 call this%obs%StoreObsType(
'runoff', .true., indx)
1015 call this%obs%StoreObsType(
'ext-inflow', .true., indx)
1020 call this%obs%StoreObsType(
'withdrawal', .true., indx)
1025 call this%obs%StoreObsType(
'ext-outflow', .true., indx)
1037 logical,
intent(inout) :: found
1040 select case (obsrv%ObsTypeId)
1042 call this%rp_obs_byfeature(obsrv)
1043 case (
'EVAPORATION')
1044 call this%rp_obs_byfeature(obsrv)
1046 call this%rp_obs_byfeature(obsrv)
1048 call this%rp_obs_byfeature(obsrv)
1050 call this%rp_obs_byfeature(obsrv)
1051 case (
'EXT-OUTFLOW')
1052 call this%rp_obs_byfeature(obsrv)
1054 call this%rp_obs_budterm(obsrv, &
1055 this%flowbudptr%budterm(this%idxbudtmvr))
1066 character(len=*),
intent(in) :: obstypeid
1067 real(DP),
intent(inout) :: v
1068 integer(I4B),
intent(in) :: jj
1069 logical,
intent(inout) :: found
1071 integer(I4B) :: n1, n2
1074 select case (obstypeid)
1076 if (this%iboundpak(jj) /= 0)
then
1077 call this%lke_rain_term(jj, n1, n2, v)
1079 case (
'EVAPORATION')
1080 if (this%iboundpak(jj) /= 0)
then
1081 call this%lke_evap_term(jj, n1, n2, v)
1084 if (this%iboundpak(jj) /= 0)
then
1085 call this%lke_roff_term(jj, n1, n2, v)
1088 if (this%iboundpak(jj) /= 0)
then
1089 call this%lke_iflw_term(jj, n1, n2, v)
1092 if (this%iboundpak(jj) /= 0)
then
1093 call this%lke_wdrl_term(jj, n1, n2, v)
1095 case (
'EXT-OUTFLOW')
1096 if (this%iboundpak(jj) /= 0)
then
1097 call this%lke_outf_term(jj, n1, n2, v)
1111 integer(I4B),
intent(in) :: itemno
1112 character(len=*),
intent(in) :: keyword
1113 logical,
intent(inout) :: found
1115 character(len=LINELENGTH) :: text
1116 integer(I4B) :: ierr
1118 real(DP),
pointer :: bndElem => null()
1127 select case (keyword)
1129 ierr = this%apt_check_valid(itemno)
1133 call this%parser%GetString(text)
1135 bndelem => this%temprain(itemno)
1137 this%packName,
'BND', this%tsManager, &
1138 this%iprpak,
'RAINFALL')
1139 case (
'EVAPORATION')
1140 ierr = this%apt_check_valid(itemno)
1144 call this%parser%GetString(text)
1146 bndelem => this%tempevap(itemno)
1148 this%packName,
'BND', this%tsManager, &
1149 this%iprpak,
'EVAPORATION')
1151 ierr = this%apt_check_valid(itemno)
1155 call this%parser%GetString(text)
1157 bndelem => this%temproff(itemno)
1159 this%packName,
'BND', this%tsManager, &
1160 this%iprpak,
'RUNOFF')
1162 ierr = this%apt_check_valid(itemno)
1166 call this%parser%GetString(text)
1168 bndelem => this%tempiflw(itemno)
1170 this%packName,
'BND', this%tsManager, &
1171 this%iprpak,
'EXT-INFLOW')
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.
integer(i4b), parameter linelength
maximum length of a standard line
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
real(dp), parameter done
real constant 1
subroutine lke_rain_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Rain term.
subroutine lke_iflw_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Inflow Term.
subroutine lke_roff_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Runoff term.
character(len= *), parameter ftype
subroutine lke_solve(this)
Add terms specific to lakes to the explicit lake solve.
subroutine lke_outf_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Outflow term.
subroutine lke_setup_budobj(this, idx)
Set up the budget object that stores all the lake flows.
subroutine lke_wdrl_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Specified withdrawal term.
subroutine lke_bd_obs(this, obstypeid, jj, v, found)
Calculate observation value and pass it back to APT.
subroutine lke_allocate_arrays(this)
Allocate arrays specific to the lake energy transport (LKE) package.
subroutine allocate_scalars(this)
Allocate scalars specific to the lake energy transport (LKE) package.
subroutine lke_set_stressperiod(this, itemno, keyword, found)
Sets the stress period attributes for keyword use.
subroutine lke_fill_budobj(this, idx, x, flowja, ccratin, ccratout)
Copy flow terms into thisbudobj.
subroutine, public lke_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
Create a new lke package.
subroutine find_lke_package(this)
Find corresponding lke package.
subroutine lke_rp_obs(this, obsrv, found)
Process package specific obs.
subroutine lke_fc_expanded(this, rhs, ia, idxglo, matrix_sln)
Add matrix terms related to LKE.
character(len= *), parameter flowtype
subroutine lke_evap_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Evaporative term.
subroutine lke_df_obs(this)
Defined observation types.
integer(i4b) function lke_get_nbudterms(this)
Function to return the number of budget terms just for this package.
subroutine lke_da(this)
Deallocate memory.
This module defines variable data types.
This module contains the derived types ObserveType and ObsDataType.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
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.
subroutine, public apt_process_obsid12(obsrv, dis, inunitobs, iout)
Process observation IDs for a package.