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
171 character(len=LINELENGTH) :: errmsg
172 class(
bndtype),
pointer :: packobj
173 integer(I4B) :: ip, icount
174 integer(I4B) :: nbudterm
184 if (this%fmi%flows_from_file)
then
185 call this%fmi%set_aptbudobj_pointer(this%flowpackagename, this%flowbudptr)
186 if (
associated(this%flowbudptr)) found = .true.
189 if (
associated(this%fmi%gwfbndlist))
then
192 do ip = 1, this%fmi%gwfbndlist%Count()
194 if (packobj%packName == this%flowpackagename)
then
199 this%flowpackagebnd => packobj
200 select type (packobj)
202 this%flowbudptr => packobj%budobj
211 if (.not. found)
then
212 write (errmsg,
'(a)')
'COULD NOT FIND FLOW PACKAGE WITH NAME '&
213 &//trim(adjustl(this%flowpackagename))//
'.'
215 call this%parser%StoreErrorUnit()
220 nbudterm = this%flowbudptr%nbudterm
221 call mem_allocate(this%idxbudssm, nbudterm,
'IDXBUDSSM', this%memoryPath)
224 write (this%iout,
'(/, a, a)') &
225 'PROCESSING '//
ftype//
' INFORMATION FOR ', this%packName
226 write (this%iout,
'(a)')
' IDENTIFYING FLOW TERMS IN '//
flowtype//
' PACKAGE'
227 write (this%iout,
'(a, i0)') &
228 ' NUMBER OF '//
flowtype//
' = ', this%flowbudptr%ncv
230 do ip = 1, this%flowbudptr%nbudterm
231 select case (trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)))
232 case (
'FLOW-JA-FACE')
234 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
268 this%idxbudssm(ip) = 0
273 this%idxbudssm(ip) = icount
276 write (this%iout,
'(a, i0, " = ", a,/, a, i0)') &
277 ' TERM ', ip, trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)), &
278 ' MAX NO. OF ENTRIES = ', this%flowbudptr%budterm(ip)%maxlist
280 write (this%iout,
'(a, //)')
'DONE PROCESSING '//
ftype//
' INFORMATION'
294 real(DP),
dimension(:),
intent(inout) :: rhs
295 integer(I4B),
dimension(:),
intent(in) :: ia
296 integer(I4B),
dimension(:),
intent(in) :: idxglo
299 integer(I4B) :: j, n, n1, n2
301 integer(I4B) :: iposd, iposoffd
302 integer(I4B) :: ipossymd, ipossymoffd
303 integer(I4B) :: auxpos
313 if (this%idxbudrain /= 0)
then
314 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
315 call this%lke_rain_term(j, n1, n2, rrate, rhsval, hcofval)
316 iloc = this%idxlocnode(n1)
317 iposd = this%idxpakdiag(n1)
318 call matrix_sln%add_value_pos(iposd, hcofval)
319 rhs(iloc) = rhs(iloc) + rhsval
324 if (this%idxbudevap /= 0)
then
325 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
326 call this%lke_evap_term(j, n1, n2, rrate, rhsval, hcofval)
327 iloc = this%idxlocnode(n1)
328 iposd = this%idxpakdiag(n1)
329 call matrix_sln%add_value_pos(iposd, hcofval)
330 rhs(iloc) = rhs(iloc) + rhsval
335 if (this%idxbudroff /= 0)
then
336 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
337 call this%lke_roff_term(j, n1, n2, rrate, rhsval, hcofval)
338 iloc = this%idxlocnode(n1)
339 iposd = this%idxpakdiag(n1)
340 call matrix_sln%add_value_pos(iposd, hcofval)
341 rhs(iloc) = rhs(iloc) + rhsval
346 if (this%idxbudiflw /= 0)
then
347 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
348 call this%lke_iflw_term(j, n1, n2, rrate, rhsval, hcofval)
349 iloc = this%idxlocnode(n1)
350 iposd = this%idxpakdiag(n1)
351 call matrix_sln%add_value_pos(iposd, hcofval)
352 rhs(iloc) = rhs(iloc) + rhsval
357 if (this%idxbudwdrl /= 0)
then
358 do j = 1, this%flowbudptr%budterm(this%idxbudwdrl)%nlist
359 call this%lke_wdrl_term(j, n1, n2, rrate, rhsval, hcofval)
360 iloc = this%idxlocnode(n1)
361 iposd = this%idxpakdiag(n1)
362 call matrix_sln%add_value_pos(iposd, hcofval)
363 rhs(iloc) = rhs(iloc) + rhsval
368 if (this%idxbudoutf /= 0)
then
369 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
370 call this%lke_outf_term(j, n1, n2, rrate, rhsval, hcofval)
371 iloc = this%idxlocnode(n1)
372 iposd = this%idxpakdiag(n1)
373 call matrix_sln%add_value_pos(iposd, hcofval)
374 rhs(iloc) = rhs(iloc) + rhsval
379 do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
382 n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
383 if (this%iboundpak(n) /= 0)
then
386 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
387 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
390 ctherm = ktf * wa / s
393 iposd = this%idxdglo(j)
394 iposoffd = this%idxoffdglo(j)
395 call matrix_sln%add_value_pos(iposd, -ctherm)
396 call matrix_sln%add_value_pos(iposoffd, ctherm)
399 ipossymd = this%idxsymdglo(j)
400 ipossymoffd = this%idxsymoffdglo(j)
401 call matrix_sln%add_value_pos(ipossymd, -ctherm)
402 call matrix_sln%add_value_pos(ipossymoffd, ctherm)
417 integer(I4B) :: n1, n2
421 if (this%idxbudrain /= 0)
then
422 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
423 call this%lke_rain_term(j, n1, n2, rrate)
424 this%dbuff(n1) = this%dbuff(n1) + rrate
429 if (this%idxbudevap /= 0)
then
430 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
431 call this%lke_evap_term(j, n1, n2, rrate)
432 this%dbuff(n1) = this%dbuff(n1) + rrate
437 if (this%idxbudroff /= 0)
then
438 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
439 call this%lke_roff_term(j, n1, n2, rrate)
440 this%dbuff(n1) = this%dbuff(n1) + rrate
445 if (this%idxbudiflw /= 0)
then
446 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
447 call this%lke_iflw_term(j, n1, n2, rrate)
448 this%dbuff(n1) = this%dbuff(n1) + rrate
453 if (this%idxbudwdrl /= 0)
then
454 do j = 1, this%flowbudptr%budterm(this%idxbudwdrl)%nlist
455 call this%lke_wdrl_term(j, n1, n2, rrate)
456 this%dbuff(n1) = this%dbuff(n1) + rrate
461 if (this%idxbudoutf /= 0)
then
462 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
463 call this%lke_outf_term(j, n1, n2, rrate)
464 this%dbuff(n1) = this%dbuff(n1) + rrate
480 integer(I4B) :: nbudterms
504 integer(I4B),
intent(inout) :: idx
506 integer(I4B) :: n, n1, n2
507 integer(I4B) :: maxlist, naux
509 character(len=LENBUDTXT) :: text
514 maxlist = this%flowbudptr%budterm(this%idxbudrain)%maxlist
516 call this%budobj%budterm(idx)%initialize(text, &
521 maxlist, .false., .false., &
525 text =
' EVAPORATION'
527 maxlist = this%flowbudptr%budterm(this%idxbudevap)%maxlist
529 call this%budobj%budterm(idx)%initialize(text, &
534 maxlist, .false., .false., &
540 maxlist = this%flowbudptr%budterm(this%idxbudroff)%maxlist
542 call this%budobj%budterm(idx)%initialize(text, &
547 maxlist, .false., .false., &
553 maxlist = this%flowbudptr%budterm(this%idxbudiflw)%maxlist
555 call this%budobj%budterm(idx)%initialize(text, &
560 maxlist, .false., .false., &
566 maxlist = this%flowbudptr%budterm(this%idxbudwdrl)%maxlist
568 call this%budobj%budterm(idx)%initialize(text, &
573 maxlist, .false., .false., &
578 text =
' EXT-OUTFLOW'
580 maxlist = this%flowbudptr%budterm(this%idxbudoutf)%maxlist
582 call this%budobj%budterm(idx)%initialize(text, &
587 maxlist, .false., .false., &
591 text =
' LAKEBED-COND'
593 maxlist = this%flowbudptr%budterm(this%idxbudlbcd)%maxlist
595 call this%budobj%budterm(idx)%initialize(text, &
600 maxlist, .false., .false., &
602 call this%budobj%budterm(idx)%reset(maxlist)
605 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(n)
606 n2 = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
607 call this%budobj%budterm(idx)%update_term(n1, n2, q)
619 integer(I4B),
intent(inout) :: idx
620 real(DP),
dimension(:),
intent(in) :: x
621 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
622 real(DP),
intent(inout) :: ccratin
623 real(DP),
intent(inout) :: ccratout
625 integer(I4B) :: j, n1, n2
626 integer(I4B) :: nlist
627 integer(I4B) :: igwfnode
628 integer(I4B) :: idiag
629 integer(I4B) :: auxpos
638 nlist = this%flowbudptr%budterm(this%idxbudrain)%nlist
639 call this%budobj%budterm(idx)%reset(nlist)
641 call this%lke_rain_term(j, n1, n2, q)
642 call this%budobj%budterm(idx)%update_term(n1, n2, q)
643 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
648 nlist = this%flowbudptr%budterm(this%idxbudevap)%nlist
649 call this%budobj%budterm(idx)%reset(nlist)
651 call this%lke_evap_term(j, n1, n2, q)
652 call this%budobj%budterm(idx)%update_term(n1, n2, q)
653 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
658 nlist = this%flowbudptr%budterm(this%idxbudroff)%nlist
659 call this%budobj%budterm(idx)%reset(nlist)
661 call this%lke_roff_term(j, n1, n2, q)
662 call this%budobj%budterm(idx)%update_term(n1, n2, q)
663 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
668 nlist = this%flowbudptr%budterm(this%idxbudiflw)%nlist
669 call this%budobj%budterm(idx)%reset(nlist)
671 call this%lke_iflw_term(j, n1, n2, q)
672 call this%budobj%budterm(idx)%update_term(n1, n2, q)
673 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
678 nlist = this%flowbudptr%budterm(this%idxbudwdrl)%nlist
679 call this%budobj%budterm(idx)%reset(nlist)
681 call this%lke_wdrl_term(j, n1, n2, q)
682 call this%budobj%budterm(idx)%update_term(n1, n2, q)
683 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
688 nlist = this%flowbudptr%budterm(this%idxbudoutf)%nlist
689 call this%budobj%budterm(idx)%reset(nlist)
691 call this%lke_outf_term(j, n1, n2, q)
692 call this%budobj%budterm(idx)%update_term(n1, n2, q)
693 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
698 call this%budobj%budterm(idx)%reset(this%maxbound)
699 do j = 1, this%flowbudptr%budterm(this%idxbudlbcd)%nlist
701 n1 = this%flowbudptr%budterm(this%idxbudlbcd)%id1(j)
702 if (this%iboundpak(n1) /= 0)
then
703 igwfnode = this%flowbudptr%budterm(this%idxbudlbcd)%id2(j)
704 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
705 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
707 s = this%rfeatthk(n1)
708 ctherm = ktf * wa / s
709 q = ctherm * (x(igwfnode) - this%xnewpak(n1))
711 call this%budobj%budterm(idx)%update_term(n1, igwfnode, q)
712 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
713 if (this%iboundpak(n1) /= 0)
then
715 this%simvals(n1) = this%simvals(n1) - q
716 idiag = this%dis%con%ia(igwfnode)
717 flowja(idiag) = flowja(idiag) - q
735 call this%TspAptType%allocate_scalars()
738 call mem_allocate(this%idxbudrain,
'IDXBUDRAIN', this%memoryPath)
739 call mem_allocate(this%idxbudevap,
'IDXBUDEVAP', this%memoryPath)
740 call mem_allocate(this%idxbudroff,
'IDXBUDROFF', this%memoryPath)
741 call mem_allocate(this%idxbudiflw,
'IDXBUDIFLW', this%memoryPath)
742 call mem_allocate(this%idxbudwdrl,
'IDXBUDWDRL', this%memoryPath)
743 call mem_allocate(this%idxbudoutf,
'IDXBUDOUTF', this%memoryPath)
744 call mem_allocate(this%idxbudlbcd,
'IDXBUDLBCD', this%memoryPath)
771 call mem_allocate(this%temprain, this%ncv,
'TEMPRAIN', this%memoryPath)
772 call mem_allocate(this%tempevap, this%ncv,
'TEMPEVAP', this%memoryPath)
773 call mem_allocate(this%temproff, this%ncv,
'TEMPROFF', this%memoryPath)
774 call mem_allocate(this%tempiflw, this%ncv,
'TEMPIFLW', this%memoryPath)
777 call this%TspAptType%apt_allocate_arrays()
781 this%temprain(n) =
dzero
782 this%tempevap(n) =
dzero
783 this%temproff(n) =
dzero
784 this%tempiflw(n) =
dzero
816 call this%TspAptType%bnd_da()
828 integer(I4B),
intent(in) :: ientry
829 integer(I4B),
intent(inout) :: n1
830 integer(I4B),
intent(inout) :: n2
831 real(DP),
intent(inout),
optional :: rrate
832 real(DP),
intent(inout),
optional :: rhsval
833 real(DP),
intent(inout),
optional :: hcofval
838 n1 = this%flowbudptr%budterm(this%idxbudrain)%id1(ientry)
839 n2 = this%flowbudptr%budterm(this%idxbudrain)%id2(ientry)
840 qbnd = this%flowbudptr%budterm(this%idxbudrain)%flow(ientry)
841 ctmp = this%temprain(n1)
842 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
843 if (
present(rhsval)) rhsval = -rrate
844 if (
present(hcofval)) hcofval =
dzero
856 integer(I4B),
intent(in) :: ientry
857 integer(I4B),
intent(inout) :: n1
858 integer(I4B),
intent(inout) :: n2
859 real(DP),
intent(inout),
optional :: rrate
860 real(DP),
intent(inout),
optional :: rhsval
861 real(DP),
intent(inout),
optional :: hcofval
866 n1 = this%flowbudptr%budterm(this%idxbudevap)%id1(ientry)
867 n2 = this%flowbudptr%budterm(this%idxbudevap)%id2(ientry)
869 qbnd = this%flowbudptr%budterm(this%idxbudevap)%flow(ientry)
870 heatlat = this%gwecommon%gwerhow * this%gwecommon%gwelatheatvap
871 if (
present(rrate)) rrate = qbnd * heatlat
872 if (
present(rhsval)) rhsval = -rrate
873 if (
present(hcofval)) hcofval =
dzero
885 integer(I4B),
intent(in) :: ientry
886 integer(I4B),
intent(inout) :: n1
887 integer(I4B),
intent(inout) :: n2
888 real(DP),
intent(inout),
optional :: rrate
889 real(DP),
intent(inout),
optional :: rhsval
890 real(DP),
intent(inout),
optional :: hcofval
895 n1 = this%flowbudptr%budterm(this%idxbudroff)%id1(ientry)
896 n2 = this%flowbudptr%budterm(this%idxbudroff)%id2(ientry)
897 qbnd = this%flowbudptr%budterm(this%idxbudroff)%flow(ientry)
898 ctmp = this%temproff(n1)
899 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
900 if (
present(rhsval)) rhsval = -rrate
901 if (
present(hcofval)) hcofval =
dzero
916 integer(I4B),
intent(in) :: ientry
917 integer(I4B),
intent(inout) :: n1
918 integer(I4B),
intent(inout) :: n2
919 real(DP),
intent(inout),
optional :: rrate
920 real(DP),
intent(inout),
optional :: rhsval
921 real(DP),
intent(inout),
optional :: hcofval
926 n1 = this%flowbudptr%budterm(this%idxbudiflw)%id1(ientry)
927 n2 = this%flowbudptr%budterm(this%idxbudiflw)%id2(ientry)
928 qbnd = this%flowbudptr%budterm(this%idxbudiflw)%flow(ientry)
929 ctmp = this%tempiflw(n1)
930 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
931 if (
present(rhsval)) rhsval = -rrate
932 if (
present(hcofval)) hcofval =
dzero
947 integer(I4B),
intent(in) :: ientry
948 integer(I4B),
intent(inout) :: n1
949 integer(I4B),
intent(inout) :: n2
950 real(DP),
intent(inout),
optional :: rrate
951 real(DP),
intent(inout),
optional :: rhsval
952 real(DP),
intent(inout),
optional :: hcofval
957 n1 = this%flowbudptr%budterm(this%idxbudwdrl)%id1(ientry)
958 n2 = this%flowbudptr%budterm(this%idxbudwdrl)%id2(ientry)
959 qbnd = this%flowbudptr%budterm(this%idxbudwdrl)%flow(ientry)
960 ctmp = this%xnewpak(n1)
961 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
962 if (
present(rhsval)) rhsval =
dzero
963 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
978 integer(I4B),
intent(in) :: ientry
979 integer(I4B),
intent(inout) :: n1
980 integer(I4B),
intent(inout) :: n2
981 real(DP),
intent(inout),
optional :: rrate
982 real(DP),
intent(inout),
optional :: rhsval
983 real(DP),
intent(inout),
optional :: hcofval
988 n1 = this%flowbudptr%budterm(this%idxbudoutf)%id1(ientry)
989 n2 = this%flowbudptr%budterm(this%idxbudoutf)%id2(ientry)
990 qbnd = this%flowbudptr%budterm(this%idxbudoutf)%flow(ientry)
991 ctmp = this%xnewpak(n1)
992 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
993 if (
present(rhsval)) rhsval =
dzero
994 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
1009 integer(I4B) :: indx
1013 call this%obs%StoreObsType(
'temperature', .false., indx)
1018 call this%obs%StoreObsType(
'flow-ja-face', .true., indx)
1023 call this%obs%StoreObsType(
'from-mvr', .true., indx)
1028 call this%obs%StoreObsType(
'to-mvr', .true., indx)
1033 call this%obs%StoreObsType(
'storage', .true., indx)
1038 call this%obs%StoreObsType(
'constant', .true., indx)
1043 call this%obs%StoreObsType(
'lke', .true., indx)
1048 call this%obs%StoreObsType(
'rainfall', .true., indx)
1053 call this%obs%StoreObsType(
'evaporation', .true., indx)
1058 call this%obs%StoreObsType(
'runoff', .true., indx)
1063 call this%obs%StoreObsType(
'ext-inflow', .true., indx)
1068 call this%obs%StoreObsType(
'withdrawal', .true., indx)
1073 call this%obs%StoreObsType(
'ext-outflow', .true., indx)
1088 logical,
intent(inout) :: found
1091 select case (obsrv%ObsTypeId)
1093 call this%rp_obs_byfeature(obsrv)
1094 case (
'EVAPORATION')
1095 call this%rp_obs_byfeature(obsrv)
1097 call this%rp_obs_byfeature(obsrv)
1099 call this%rp_obs_byfeature(obsrv)
1101 call this%rp_obs_byfeature(obsrv)
1102 case (
'EXT-OUTFLOW')
1103 call this%rp_obs_byfeature(obsrv)
1105 call this%rp_obs_budterm(obsrv, &
1106 this%flowbudptr%budterm(this%idxbudtmvr))
1120 character(len=*),
intent(in) :: obstypeid
1121 real(DP),
intent(inout) :: v
1122 integer(I4B),
intent(in) :: jj
1123 logical,
intent(inout) :: found
1125 integer(I4B) :: n1, n2
1128 select case (obstypeid)
1130 if (this%iboundpak(jj) /= 0)
then
1131 call this%lke_rain_term(jj, n1, n2, v)
1133 case (
'EVAPORATION')
1134 if (this%iboundpak(jj) /= 0)
then
1135 call this%lke_evap_term(jj, n1, n2, v)
1138 if (this%iboundpak(jj) /= 0)
then
1139 call this%lke_roff_term(jj, n1, n2, v)
1142 if (this%iboundpak(jj) /= 0)
then
1143 call this%lke_iflw_term(jj, n1, n2, v)
1146 if (this%iboundpak(jj) /= 0)
then
1147 call this%lke_wdrl_term(jj, n1, n2, v)
1149 case (
'EXT-OUTFLOW')
1150 if (this%iboundpak(jj) /= 0)
then
1151 call this%lke_outf_term(jj, n1, n2, v)
1168 integer(I4B),
intent(in) :: itemno
1169 character(len=*),
intent(in) :: keyword
1170 logical,
intent(inout) :: found
1172 character(len=LINELENGTH) :: text
1173 integer(I4B) :: ierr
1175 real(DP),
pointer :: bndElem => null()
1184 select case (keyword)
1186 ierr = this%apt_check_valid(itemno)
1190 call this%parser%GetString(text)
1192 bndelem => this%temprain(itemno)
1194 this%packName,
'BND', this%tsManager, &
1195 this%iprpak,
'RAINFALL')
1196 case (
'EVAPORATION')
1197 ierr = this%apt_check_valid(itemno)
1201 call this%parser%GetString(text)
1203 bndelem => this%tempevap(itemno)
1205 this%packName,
'BND', this%tsManager, &
1206 this%iprpak,
'EVAPORATION')
1208 ierr = this%apt_check_valid(itemno)
1212 call this%parser%GetString(text)
1214 bndelem => this%temproff(itemno)
1216 this%packName,
'BND', this%tsManager, &
1217 this%iprpak,
'RUNOFF')
1219 ierr = this%apt_check_valid(itemno)
1223 call this%parser%GetString(text)
1225 bndelem => this%tempiflw(itemno)
1227 this%packName,
'BND', this%tsManager, &
1228 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.