57 character(len=*),
parameter ::
ftype =
'LKE'
58 character(len=*),
parameter ::
flowtype =
'LAK'
59 character(len=16) ::
text =
' LKE'
65 integer(I4B),
pointer :: idxbudrain => null()
66 integer(I4B),
pointer :: idxbudevap => null()
67 integer(I4B),
pointer :: idxbudroff => null()
68 integer(I4B),
pointer :: idxbudiflw => null()
69 integer(I4B),
pointer :: idxbudwdrl => null()
70 integer(I4B),
pointer :: idxbudoutf => null()
71 integer(I4B),
pointer :: idxbudlbcd => null()
73 real(dp),
dimension(:),
pointer,
contiguous :: temprain => null()
74 real(dp),
dimension(:),
pointer,
contiguous :: tempevap => null()
75 real(dp),
dimension(:),
pointer,
contiguous :: temproff => null()
76 real(dp),
dimension(:),
pointer,
contiguous :: tempiflw => null()
77 real(dp),
dimension(:),
pointer,
contiguous :: ktf => null()
78 real(dp),
dimension(:),
pointer,
contiguous :: rfeatthk => null()
109 subroutine lke_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
110 mempath, fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
112 class(
bndtype),
pointer :: packobj
113 integer(I4B),
intent(in) :: id
114 integer(I4B),
intent(in) :: ibcnum
115 integer(I4B),
intent(in) :: inunit
116 integer(I4B),
intent(in) :: iout
117 character(len=*),
intent(in) :: namemodel
118 character(len=*),
intent(in) :: pakname
119 character(len=*),
intent(in) :: mempath
121 real(dp),
intent(in),
pointer :: eqnsclfac
123 character(len=*),
intent(in) :: dvt
124 character(len=*),
intent(in) :: dvu
125 character(len=*),
intent(in) :: dvua
134 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
138 call lkeobj%allocate_scalars()
141 call packobj%pack_initialize()
143 packobj%inunit = inunit
146 packobj%ibcnum = ibcnum
157 lkeobj%eqnsclfac => eqnsclfac
162 lkeobj%gwecommon => gwecommon
165 lkeobj%depvartype = dvt
166 lkeobj%depvarunit = dvu
167 lkeobj%depvarunitabbrev = dvua
178 character(len=LINELENGTH) :: errmsg
179 class(
bndtype),
pointer :: packobj
180 integer(I4B) :: ip, icount
181 integer(I4B) :: nbudterm
191 if (this%fmi%flows_from_file)
then
192 call this%fmi%set_aptbudobj_pointer(this%flowpackagename, this%flowbudptr)
193 if (
associated(this%flowbudptr)) found = .true.
196 if (
associated(this%fmi%gwfbndlist))
then
199 do ip = 1, this%fmi%gwfbndlist%Count()
201 if (packobj%packName == this%flowpackagename)
then
206 this%flowpackagebnd => packobj
207 select type (packobj)
209 this%flowbudptr => packobj%budobj
218 if (.not. found)
then
219 write (errmsg,
'(a)')
'Could not find flow package with name '&
220 &//trim(adjustl(this%flowpackagename))//
'.'
222 call store_error_filename(this%input_fname)
227 nbudterm = this%flowbudptr%nbudterm
228 call mem_allocate(this%idxbudssm, nbudterm,
'IDXBUDSSM', this%memoryPath)
231 write (this%iout,
'(/, a, a)') &
232 'PROCESSING '//
ftype//
' INFORMATION FOR ', this%packName
233 write (this%iout,
'(a)')
' IDENTIFYING FLOW TERMS IN '//
flowtype//
' PACKAGE'
234 write (this%iout,
'(a, i0)') &
235 ' NUMBER OF '//
flowtype//
' = ', this%flowbudptr%ncv
237 do ip = 1, this%flowbudptr%nbudterm
238 select case (trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)))
239 case (
'FLOW-JA-FACE')
241 this%idxbudssm(ip) = 0
245 this%idxbudssm(ip) = 0
248 this%idxbudssm(ip) = 0
251 this%idxbudssm(ip) = 0
254 this%idxbudssm(ip) = 0
257 this%idxbudssm(ip) = 0
260 this%idxbudssm(ip) = 0
263 this%idxbudssm(ip) = 0
266 this%idxbudssm(ip) = 0
269 this%idxbudssm(ip) = 0
272 this%idxbudssm(ip) = 0
275 this%idxbudssm(ip) = 0
280 this%idxbudssm(ip) = icount
283 write (this%iout,
'(a, i0, " = ", a,/, a, i0)') &
284 ' TERM ', ip, trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)), &
285 ' MAX NO. OF ENTRIES = ', this%flowbudptr%budterm(ip)%maxlist
287 write (this%iout,
'(a, //)')
'DONE PROCESSING '//
ftype//
' INFORMATION'
298 integer(I4B),
intent(in) :: itemno
299 character(len=*),
intent(in) :: key
303 select case (trim(key))
305 val = this%temprain(itemno)
307 val = this%tempevap(itemno)
309 val = this%temproff(itemno)
311 val = this%tempiflw(itemno)
323 real(DP),
dimension(:),
intent(inout) :: rhs
324 integer(I4B),
dimension(:),
intent(in) :: ia
325 integer(I4B),
dimension(:),
intent(in) :: idxglo
328 integer(I4B) :: j, n, n1, n2
330 integer(I4B) :: iposd, iposoffd
331 integer(I4B) :: ipossymd, ipossymoffd
332 integer(I4B) :: auxpos
342 if (this%idxbudrain /= 0)
then
343 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
344 call this%lke_rain_term(j, n1, n2, rrate, rhsval, hcofval)
345 iloc = this%idxlocnode(n1)
346 iposd = this%idxpakdiag(n1)
347 call matrix_sln%add_value_pos(iposd, hcofval)
348 rhs(iloc) = rhs(iloc) + rhsval
353 if (this%idxbudevap /= 0)
then
354 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
355 call this%lke_evap_term(j, n1, n2, rrate, rhsval, hcofval)
356 iloc = this%idxlocnode(n1)
357 iposd = this%idxpakdiag(n1)
358 call matrix_sln%add_value_pos(iposd, hcofval)
359 rhs(iloc) = rhs(iloc) + rhsval
364 if (this%idxbudroff /= 0)
then
365 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
366 call this%lke_roff_term(j, n1, n2, rrate, rhsval, hcofval)
367 iloc = this%idxlocnode(n1)
368 iposd = this%idxpakdiag(n1)
369 call matrix_sln%add_value_pos(iposd, hcofval)
370 rhs(iloc) = rhs(iloc) + rhsval
375 if (this%idxbudiflw /= 0)
then
376 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
377 call this%lke_iflw_term(j, n1, n2, rrate, rhsval, hcofval)
378 iloc = this%idxlocnode(n1)
379 iposd = this%idxpakdiag(n1)
380 call matrix_sln%add_value_pos(iposd, hcofval)
381 rhs(iloc) = rhs(iloc) + rhsval
386 if (this%idxbudwdrl /= 0)
then
387 do j = 1, this%flowbudptr%budterm(this%idxbudwdrl)%nlist
388 call this%lke_wdrl_term(j, n1, n2, rrate, rhsval, hcofval)
389 iloc = this%idxlocnode(n1)
390 iposd = this%idxpakdiag(n1)
391 call matrix_sln%add_value_pos(iposd, hcofval)
392 rhs(iloc) = rhs(iloc) + rhsval
397 if (this%idxbudoutf /= 0)
then
398 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
399 call this%lke_outf_term(j, n1, n2, rrate, rhsval, hcofval)
400 iloc = this%idxlocnode(n1)
401 iposd = this%idxpakdiag(n1)
402 call matrix_sln%add_value_pos(iposd, hcofval)
403 rhs(iloc) = rhs(iloc) + rhsval
408 do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
411 n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
412 if (this%iboundpak(n) /= 0)
then
415 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
416 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
419 ctherm = ktf * wa / s
422 iposd = this%idxdglo(j)
423 iposoffd = this%idxoffdglo(j)
424 call matrix_sln%add_value_pos(iposd, -ctherm)
425 call matrix_sln%add_value_pos(iposoffd, ctherm)
428 ipossymd = this%idxsymdglo(j)
429 ipossymoffd = this%idxsymoffdglo(j)
430 call matrix_sln%add_value_pos(ipossymd, -ctherm)
431 call matrix_sln%add_value_pos(ipossymoffd, ctherm)
443 integer(I4B) :: n1, n2
447 if (this%idxbudrain /= 0)
then
448 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
449 call this%lke_rain_term(j, n1, n2, rrate)
450 this%dbuff(n1) = this%dbuff(n1) + rrate
455 if (this%idxbudevap /= 0)
then
456 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
457 call this%lke_evap_term(j, n1, n2, rrate)
458 this%dbuff(n1) = this%dbuff(n1) + rrate
463 if (this%idxbudroff /= 0)
then
464 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
465 call this%lke_roff_term(j, n1, n2, rrate)
466 this%dbuff(n1) = this%dbuff(n1) + rrate
471 if (this%idxbudiflw /= 0)
then
472 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
473 call this%lke_iflw_term(j, n1, n2, rrate)
474 this%dbuff(n1) = this%dbuff(n1) + rrate
479 if (this%idxbudwdrl /= 0)
then
480 do j = 1, this%flowbudptr%budterm(this%idxbudwdrl)%nlist
481 call this%lke_wdrl_term(j, n1, n2, rrate)
482 this%dbuff(n1) = this%dbuff(n1) + rrate
487 if (this%idxbudoutf /= 0)
then
488 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
489 call this%lke_outf_term(j, n1, n2, rrate)
490 this%dbuff(n1) = this%dbuff(n1) + rrate
503 integer(I4B) :: nbudterms
524 integer(I4B),
intent(inout) :: idx
526 integer(I4B) :: n, n1, n2
527 integer(I4B) :: maxlist, naux
529 character(len=LENBUDTXT) :: text
534 maxlist = this%flowbudptr%budterm(this%idxbudrain)%maxlist
536 call this%budobj%budterm(idx)%initialize(text, &
541 maxlist, .false., .false., &
545 text =
' EVAPORATION'
547 maxlist = this%flowbudptr%budterm(this%idxbudevap)%maxlist
549 call this%budobj%budterm(idx)%initialize(text, &
554 maxlist, .false., .false., &
560 maxlist = this%flowbudptr%budterm(this%idxbudroff)%maxlist
562 call this%budobj%budterm(idx)%initialize(text, &
567 maxlist, .false., .false., &
573 maxlist = this%flowbudptr%budterm(this%idxbudiflw)%maxlist
575 call this%budobj%budterm(idx)%initialize(text, &
580 maxlist, .false., .false., &
586 maxlist = this%flowbudptr%budterm(this%idxbudwdrl)%maxlist
588 call this%budobj%budterm(idx)%initialize(text, &
593 maxlist, .false., .false., &
598 text =
' EXT-OUTFLOW'
600 maxlist = this%flowbudptr%budterm(this%idxbudoutf)%maxlist
602 call this%budobj%budterm(idx)%initialize(text, &
607 maxlist, .false., .false., &
611 text =
' LAKEBED-COND'
613 maxlist = this%flowbudptr%budterm(this%idxbudlbcd)%maxlist
615 call this%budobj%budterm(idx)%initialize(text, &
620 maxlist, .false., .false., &
622 call this%budobj%budterm(idx)%reset(maxlist)
625 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(n)
626 n2 = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
627 call this%budobj%budterm(idx)%update_term(n1, n2, q)
636 integer(I4B),
intent(inout) :: idx
637 real(DP),
dimension(:),
intent(in) :: x
638 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
639 real(DP),
intent(inout) :: ccratin
640 real(DP),
intent(inout) :: ccratout
642 integer(I4B) :: j, n1, n2
643 integer(I4B) :: nlist
644 integer(I4B) :: igwfnode
645 integer(I4B) :: idiag
646 integer(I4B) :: auxpos
655 nlist = this%flowbudptr%budterm(this%idxbudrain)%nlist
656 call this%budobj%budterm(idx)%reset(nlist)
658 call this%lke_rain_term(j, n1, n2, q)
659 call this%budobj%budterm(idx)%update_term(n1, n2, q)
660 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
665 nlist = this%flowbudptr%budterm(this%idxbudevap)%nlist
666 call this%budobj%budterm(idx)%reset(nlist)
668 call this%lke_evap_term(j, n1, n2, q)
669 call this%budobj%budterm(idx)%update_term(n1, n2, q)
670 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
675 nlist = this%flowbudptr%budterm(this%idxbudroff)%nlist
676 call this%budobj%budterm(idx)%reset(nlist)
678 call this%lke_roff_term(j, n1, n2, q)
679 call this%budobj%budterm(idx)%update_term(n1, n2, q)
680 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
685 nlist = this%flowbudptr%budterm(this%idxbudiflw)%nlist
686 call this%budobj%budterm(idx)%reset(nlist)
688 call this%lke_iflw_term(j, n1, n2, q)
689 call this%budobj%budterm(idx)%update_term(n1, n2, q)
690 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
695 nlist = this%flowbudptr%budterm(this%idxbudwdrl)%nlist
696 call this%budobj%budterm(idx)%reset(nlist)
698 call this%lke_wdrl_term(j, n1, n2, q)
699 call this%budobj%budterm(idx)%update_term(n1, n2, q)
700 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
705 nlist = this%flowbudptr%budterm(this%idxbudoutf)%nlist
706 call this%budobj%budterm(idx)%reset(nlist)
708 call this%lke_outf_term(j, n1, n2, q)
709 call this%budobj%budterm(idx)%update_term(n1, n2, q)
710 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
715 call this%budobj%budterm(idx)%reset(this%maxbound)
716 do j = 1, this%flowbudptr%budterm(this%idxbudlbcd)%nlist
718 n1 = this%flowbudptr%budterm(this%idxbudlbcd)%id1(j)
719 igwfnode = this%flowbudptr%budterm(this%idxbudlbcd)%id2(j)
720 if (this%iboundpak(n1) /= 0)
then
721 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
722 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
724 s = this%rfeatthk(n1)
725 ctherm = ktf * wa / s
726 q = ctherm * (x(igwfnode) - this%xnewpak(n1))
728 call this%budobj%budterm(idx)%update_term(n1, igwfnode, q)
729 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
730 if (this%iboundpak(n1) /= 0)
then
732 this%simvals(n1) = this%simvals(n1) - q
733 idiag = this%dis%con%ia(igwfnode)
734 flowja(idiag) = flowja(idiag) - q
749 call this%TspAptType%allocate_scalars()
752 call mem_allocate(this%idxbudrain,
'IDXBUDRAIN', this%memoryPath)
753 call mem_allocate(this%idxbudevap,
'IDXBUDEVAP', this%memoryPath)
754 call mem_allocate(this%idxbudroff,
'IDXBUDROFF', this%memoryPath)
755 call mem_allocate(this%idxbudiflw,
'IDXBUDIFLW', this%memoryPath)
756 call mem_allocate(this%idxbudwdrl,
'IDXBUDWDRL', this%memoryPath)
757 call mem_allocate(this%idxbudoutf,
'IDXBUDOUTF', this%memoryPath)
758 call mem_allocate(this%idxbudlbcd,
'IDXBUDLBCD', this%memoryPath)
781 call mem_setptr(this%temprain,
'RAINFALL', this%input_mempath)
782 call mem_setptr(this%tempevap,
'EVAPORATION', this%input_mempath)
783 call mem_setptr(this%temproff,
'RUNOFF', this%input_mempath)
784 call mem_setptr(this%tempiflw,
'EXT_INFLOW', this%input_mempath)
787 call this%TspAptType%apt_allocate_arrays()
809 nullify (this%temprain)
810 nullify (this%tempevap)
811 nullify (this%temproff)
812 nullify (this%tempiflw)
819 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
853 integer(I4B),
intent(in) :: ientry
854 integer(I4B),
intent(inout) :: n1
855 integer(I4B),
intent(inout) :: n2
856 real(DP),
intent(inout),
optional :: rrate
857 real(DP),
intent(inout),
optional :: rhsval
858 real(DP),
intent(inout),
optional :: hcofval
863 n1 = this%flowbudptr%budterm(this%idxbudevap)%id1(ientry)
864 n2 = this%flowbudptr%budterm(this%idxbudevap)%id2(ientry)
866 qbnd = this%flowbudptr%budterm(this%idxbudevap)%flow(ientry)
867 heatlat = this%gwecommon%gwerhow * this%gwecommon%gwelatheatvap
868 if (
present(rrate)) rrate = qbnd * heatlat
869 if (
present(rhsval)) rhsval = -rrate
870 if (
present(hcofval)) hcofval =
dzero
879 integer(I4B),
intent(in) :: ientry
880 integer(I4B),
intent(inout) :: n1
881 integer(I4B),
intent(inout) :: n2
882 real(DP),
intent(inout),
optional :: rrate
883 real(DP),
intent(inout),
optional :: rhsval
884 real(DP),
intent(inout),
optional :: hcofval
889 n1 = this%flowbudptr%budterm(this%idxbudroff)%id1(ientry)
890 n2 = this%flowbudptr%budterm(this%idxbudroff)%id2(ientry)
891 qbnd = this%flowbudptr%budterm(this%idxbudroff)%flow(ientry)
892 ctmp = this%temproff(n1)
893 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
894 if (
present(rhsval)) rhsval = -rrate
895 if (
present(hcofval)) hcofval =
dzero
907 integer(I4B),
intent(in) :: ientry
908 integer(I4B),
intent(inout) :: n1
909 integer(I4B),
intent(inout) :: n2
910 real(DP),
intent(inout),
optional :: rrate
911 real(DP),
intent(inout),
optional :: rhsval
912 real(DP),
intent(inout),
optional :: hcofval
917 n1 = this%flowbudptr%budterm(this%idxbudiflw)%id1(ientry)
918 n2 = this%flowbudptr%budterm(this%idxbudiflw)%id2(ientry)
919 qbnd = this%flowbudptr%budterm(this%idxbudiflw)%flow(ientry)
920 ctmp = this%tempiflw(n1)
921 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
922 if (
present(rhsval)) rhsval = -rrate
923 if (
present(hcofval)) hcofval =
dzero
935 integer(I4B),
intent(in) :: ientry
936 integer(I4B),
intent(inout) :: n1
937 integer(I4B),
intent(inout) :: n2
938 real(DP),
intent(inout),
optional :: rrate
939 real(DP),
intent(inout),
optional :: rhsval
940 real(DP),
intent(inout),
optional :: hcofval
945 n1 = this%flowbudptr%budterm(this%idxbudwdrl)%id1(ientry)
946 n2 = this%flowbudptr%budterm(this%idxbudwdrl)%id2(ientry)
947 qbnd = this%flowbudptr%budterm(this%idxbudwdrl)%flow(ientry)
948 ctmp = this%xnewpak(n1)
949 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
950 if (
present(rhsval)) rhsval =
dzero
951 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
963 integer(I4B),
intent(in) :: ientry
964 integer(I4B),
intent(inout) :: n1
965 integer(I4B),
intent(inout) :: n2
966 real(DP),
intent(inout),
optional :: rrate
967 real(DP),
intent(inout),
optional :: rhsval
968 real(DP),
intent(inout),
optional :: hcofval
973 n1 = this%flowbudptr%budterm(this%idxbudoutf)%id1(ientry)
974 n2 = this%flowbudptr%budterm(this%idxbudoutf)%id2(ientry)
975 qbnd = this%flowbudptr%budterm(this%idxbudoutf)%flow(ientry)
976 ctmp = this%xnewpak(n1)
977 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
978 if (
present(rhsval)) rhsval =
dzero
979 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
995 call this%obs%StoreObsType(
'temperature', .false., indx)
1000 call this%obs%StoreObsType(
'flow-ja-face', .true., indx)
1005 call this%obs%StoreObsType(
'from-mvr', .true., indx)
1010 call this%obs%StoreObsType(
'to-mvr', .true., indx)
1015 call this%obs%StoreObsType(
'storage', .true., indx)
1020 call this%obs%StoreObsType(
'constant', .true., indx)
1025 call this%obs%StoreObsType(
'lke', .true., indx)
1030 call this%obs%StoreObsType(
'rainfall', .true., indx)
1035 call this%obs%StoreObsType(
'evaporation', .true., indx)
1040 call this%obs%StoreObsType(
'runoff', .true., indx)
1045 call this%obs%StoreObsType(
'ext-inflow', .true., indx)
1050 call this%obs%StoreObsType(
'withdrawal', .true., indx)
1055 call this%obs%StoreObsType(
'ext-outflow', .true., indx)
1067 logical,
intent(inout) :: found
1070 select case (obsrv%ObsTypeId)
1072 call this%rp_obs_byfeature(obsrv)
1073 case (
'EVAPORATION')
1074 call this%rp_obs_byfeature(obsrv)
1076 call this%rp_obs_byfeature(obsrv)
1078 call this%rp_obs_byfeature(obsrv)
1080 call this%rp_obs_byfeature(obsrv)
1081 case (
'EXT-OUTFLOW')
1082 call this%rp_obs_byfeature(obsrv)
1084 call this%rp_obs_budterm(obsrv, &
1085 this%flowbudptr%budterm(this%idxbudtmvr))
1096 character(len=*),
intent(in) :: obstypeid
1097 real(DP),
intent(inout) :: v
1098 integer(I4B),
intent(in) :: jj
1099 logical,
intent(inout) :: found
1101 integer(I4B) :: n1, n2
1104 select case (obstypeid)
1106 if (this%iboundpak(jj) /= 0)
then
1107 call this%lke_rain_term(jj, n1, n2, v)
1109 case (
'EVAPORATION')
1110 if (this%iboundpak(jj) /= 0)
then
1111 call this%lke_evap_term(jj, n1, n2, v)
1114 if (this%iboundpak(jj) /= 0)
then
1115 call this%lke_roff_term(jj, n1, n2, v)
1118 if (this%iboundpak(jj) /= 0)
then
1119 call this%lke_iflw_term(jj, n1, n2, v)
1122 if (this%iboundpak(jj) /= 0)
then
1123 call this%lke_wdrl_term(jj, n1, n2, v)
1125 case (
'EXT-OUTFLOW')
1126 if (this%iboundpak(jj) /= 0)
then
1127 call this%lke_outf_term(jj, n1, n2, v)
1140 integer(I4B) :: n, ifeat
1141 real(DP),
dimension(:),
pointer,
contiguous :: ktf_ptr => null()
1142 real(DP),
dimension(:),
pointer,
contiguous :: rbthcnd_ptr => null()
1145 call this%TspAptType%apt_source_cvs()
1148 call mem_allocate(this%ktf, this%ncv,
'KTF', this%memoryPath)
1149 call mem_allocate(this%rfeatthk, this%ncv,
'RFEATTHK', this%memoryPath)
1152 call mem_setptr(ktf_ptr,
'KTF', this%input_mempath)
1153 call mem_setptr(rbthcnd_ptr,
'RBTHCND', this%input_mempath)
1154 do n = 1,
size(this%pkg_ifno)
1155 ifeat = this%pkg_ifno(n)
1156 if (ifeat < 1 .or. ifeat > this%ncv) cycle
1157 this%ktf(ifeat) = ktf_ptr(n)
1158 this%rfeatthk(ifeat) = rbthcnd_ptr(n)
1159 if (this%rfeatthk(ifeat) <=
dzero)
then
1160 write (
errmsg,
'(4x,a)') &
1161 '****ERROR. Specified thickness used for thermal '// &
1162 'conduction MUST BE > 0 else divide by zero error occurs'
1167 call store_error_filename(this%input_fname)
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 dnodata
real no data constant
real(dp), parameter dep20
real constant 1e20
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenboundname
maximum length of a bound name
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_read_cvs(this)
Source LKE PACKAGEDATA, including thermal conduction fields.
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_fill_budobj(this, idx, x, flowja, ccratin, ccratout)
Copy flow terms into thisbudobj.
subroutine find_lke_package(this)
Find corresponding lke package.
subroutine lke_rp_obs(this, obsrv, found)
Process package specific obs.
subroutine, public lke_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath, fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
Create a new lke package.
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.
real(dp) function lke_setting_value(this, itemno, key)
Value for a package-specific PERIOD setting.
This module defines variable data types.
subroutine, public memorystore_release(varname, memory_path)
Release a single variable from the memory store.
This module contains the derived types ObserveType and ObsDataType.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
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.
This class is used to store a single deferred-length character string. It was designed to work in an ...