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()
110 subroutine lke_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
111 mempath, fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
113 class(
bndtype),
pointer :: packobj
114 integer(I4B),
intent(in) :: id
115 integer(I4B),
intent(in) :: ibcnum
116 integer(I4B),
intent(in) :: inunit
117 integer(I4B),
intent(in) :: iout
118 character(len=*),
intent(in) :: namemodel
119 character(len=*),
intent(in) :: pakname
120 character(len=*),
intent(in) :: mempath
122 real(dp),
intent(in),
pointer :: eqnsclfac
124 character(len=*),
intent(in) :: dvt
125 character(len=*),
intent(in) :: dvu
126 character(len=*),
intent(in) :: dvua
135 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
139 call lkeobj%allocate_scalars()
142 call packobj%pack_initialize()
144 packobj%inunit = inunit
147 packobj%ibcnum = ibcnum
158 lkeobj%eqnsclfac => eqnsclfac
163 lkeobj%gwecommon => gwecommon
166 lkeobj%depvartype = dvt
167 lkeobj%depvarunit = dvu
168 lkeobj%depvarunitabbrev = dvua
179 character(len=LINELENGTH) :: errmsg
180 class(
bndtype),
pointer :: packobj
181 integer(I4B) :: ip, icount
182 integer(I4B) :: nbudterm
192 if (this%fmi%flows_from_file)
then
193 call this%fmi%set_aptbudobj_pointer(this%flowpackagename, this%flowbudptr)
194 if (
associated(this%flowbudptr)) found = .true.
197 if (
associated(this%fmi%gwfbndlist))
then
200 do ip = 1, this%fmi%gwfbndlist%Count()
202 if (packobj%packName == this%flowpackagename)
then
207 this%flowpackagebnd => packobj
208 select type (packobj)
210 this%flowbudptr => packobj%budobj
219 if (.not. found)
then
220 write (errmsg,
'(a)')
'Could not find flow package with name '&
221 &//trim(adjustl(this%flowpackagename))//
'.'
223 call store_error_filename(this%input_fname)
228 nbudterm = this%flowbudptr%nbudterm
229 call mem_allocate(this%idxbudssm, nbudterm,
'IDXBUDSSM', this%memoryPath)
232 write (this%iout,
'(/, a, a)') &
233 'PROCESSING '//
ftype//
' INFORMATION FOR ', this%packName
234 write (this%iout,
'(a)')
' IDENTIFYING FLOW TERMS IN '//
flowtype//
' PACKAGE'
235 write (this%iout,
'(a, i0)') &
236 ' NUMBER OF '//
flowtype//
' = ', this%flowbudptr%ncv
238 do ip = 1, this%flowbudptr%nbudterm
239 select case (trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)))
240 case (
'FLOW-JA-FACE')
242 this%idxbudssm(ip) = 0
246 this%idxbudssm(ip) = 0
249 this%idxbudssm(ip) = 0
252 this%idxbudssm(ip) = 0
255 this%idxbudssm(ip) = 0
258 this%idxbudssm(ip) = 0
261 this%idxbudssm(ip) = 0
264 this%idxbudssm(ip) = 0
267 this%idxbudssm(ip) = 0
270 this%idxbudssm(ip) = 0
273 this%idxbudssm(ip) = 0
276 this%idxbudssm(ip) = 0
281 this%idxbudssm(ip) = icount
284 write (this%iout,
'(a, i0, " = ", a,/, a, i0)') &
285 ' TERM ', ip, trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)), &
286 ' MAX NO. OF ENTRIES = ', this%flowbudptr%budterm(ip)%maxlist
288 write (this%iout,
'(a, //)')
'DONE PROCESSING '//
ftype//
' INFORMATION'
299 integer(I4B),
intent(in) :: itemno
300 character(len=*),
intent(in) :: key
304 select case (trim(key))
306 val = this%temprain(itemno)
308 val = this%tempevap(itemno)
310 val = this%temproff(itemno)
312 val = this%tempiflw(itemno)
324 real(DP),
dimension(:),
intent(inout) :: rhs
325 integer(I4B),
dimension(:),
intent(in) :: ia
326 integer(I4B),
dimension(:),
intent(in) :: idxglo
329 integer(I4B) :: j, n, n1, n2
331 integer(I4B) :: iposd, iposoffd
332 integer(I4B) :: ipossymd, ipossymoffd
333 integer(I4B) :: auxpos
343 if (this%idxbudrain /= 0)
then
344 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
345 call this%lke_rain_term(j, n1, n2, rrate, rhsval, hcofval)
346 iloc = this%idxlocnode(n1)
347 iposd = this%idxpakdiag(n1)
348 call matrix_sln%add_value_pos(iposd, hcofval)
349 rhs(iloc) = rhs(iloc) + rhsval
354 if (this%idxbudevap /= 0)
then
355 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
356 call this%lke_evap_term(j, n1, n2, rrate, rhsval, hcofval)
357 iloc = this%idxlocnode(n1)
358 iposd = this%idxpakdiag(n1)
359 call matrix_sln%add_value_pos(iposd, hcofval)
360 rhs(iloc) = rhs(iloc) + rhsval
365 if (this%idxbudroff /= 0)
then
366 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
367 call this%lke_roff_term(j, n1, n2, rrate, rhsval, hcofval)
368 iloc = this%idxlocnode(n1)
369 iposd = this%idxpakdiag(n1)
370 call matrix_sln%add_value_pos(iposd, hcofval)
371 rhs(iloc) = rhs(iloc) + rhsval
376 if (this%idxbudiflw /= 0)
then
377 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
378 call this%lke_iflw_term(j, n1, n2, rrate, rhsval, hcofval)
379 iloc = this%idxlocnode(n1)
380 iposd = this%idxpakdiag(n1)
381 call matrix_sln%add_value_pos(iposd, hcofval)
382 rhs(iloc) = rhs(iloc) + rhsval
387 if (this%idxbudwdrl /= 0)
then
388 do j = 1, this%flowbudptr%budterm(this%idxbudwdrl)%nlist
389 call this%lke_wdrl_term(j, n1, n2, rrate, rhsval, hcofval)
390 iloc = this%idxlocnode(n1)
391 iposd = this%idxpakdiag(n1)
392 call matrix_sln%add_value_pos(iposd, hcofval)
393 rhs(iloc) = rhs(iloc) + rhsval
398 if (this%idxbudoutf /= 0)
then
399 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
400 call this%lke_outf_term(j, n1, n2, rrate, rhsval, hcofval)
401 iloc = this%idxlocnode(n1)
402 iposd = this%idxpakdiag(n1)
403 call matrix_sln%add_value_pos(iposd, hcofval)
404 rhs(iloc) = rhs(iloc) + rhsval
409 do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
412 n = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
413 if (this%iboundpak(n) /= 0)
then
416 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
417 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
420 ctherm = ktf * wa / s
423 iposd = this%idxdglo(j)
424 iposoffd = this%idxoffdglo(j)
425 call matrix_sln%add_value_pos(iposd, -ctherm)
426 call matrix_sln%add_value_pos(iposoffd, ctherm)
429 ipossymd = this%idxsymdglo(j)
430 ipossymoffd = this%idxsymoffdglo(j)
431 call matrix_sln%add_value_pos(ipossymd, -ctherm)
432 call matrix_sln%add_value_pos(ipossymoffd, ctherm)
444 integer(I4B) :: n1, n2
448 if (this%idxbudrain /= 0)
then
449 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
450 call this%lke_rain_term(j, n1, n2, rrate)
451 this%dbuff(n1) = this%dbuff(n1) + rrate
456 if (this%idxbudevap /= 0)
then
457 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
458 call this%lke_evap_term(j, n1, n2, rrate)
459 this%dbuff(n1) = this%dbuff(n1) + rrate
464 if (this%idxbudroff /= 0)
then
465 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
466 call this%lke_roff_term(j, n1, n2, rrate)
467 this%dbuff(n1) = this%dbuff(n1) + rrate
472 if (this%idxbudiflw /= 0)
then
473 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
474 call this%lke_iflw_term(j, n1, n2, rrate)
475 this%dbuff(n1) = this%dbuff(n1) + rrate
480 if (this%idxbudwdrl /= 0)
then
481 do j = 1, this%flowbudptr%budterm(this%idxbudwdrl)%nlist
482 call this%lke_wdrl_term(j, n1, n2, rrate)
483 this%dbuff(n1) = this%dbuff(n1) + rrate
488 if (this%idxbudoutf /= 0)
then
489 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
490 call this%lke_outf_term(j, n1, n2, rrate)
491 this%dbuff(n1) = this%dbuff(n1) + rrate
504 integer(I4B) :: nbudterms
525 integer(I4B),
intent(inout) :: idx
527 integer(I4B) :: n, n1, n2
528 integer(I4B) :: maxlist, naux
530 character(len=LENBUDTXT) :: text
535 maxlist = this%flowbudptr%budterm(this%idxbudrain)%maxlist
537 call this%budobj%budterm(idx)%initialize(text, &
542 maxlist, .false., .false., &
546 text =
' EVAPORATION'
548 maxlist = this%flowbudptr%budterm(this%idxbudevap)%maxlist
550 call this%budobj%budterm(idx)%initialize(text, &
555 maxlist, .false., .false., &
561 maxlist = this%flowbudptr%budterm(this%idxbudroff)%maxlist
563 call this%budobj%budterm(idx)%initialize(text, &
568 maxlist, .false., .false., &
574 maxlist = this%flowbudptr%budterm(this%idxbudiflw)%maxlist
576 call this%budobj%budterm(idx)%initialize(text, &
581 maxlist, .false., .false., &
587 maxlist = this%flowbudptr%budterm(this%idxbudwdrl)%maxlist
589 call this%budobj%budterm(idx)%initialize(text, &
594 maxlist, .false., .false., &
599 text =
' EXT-OUTFLOW'
601 maxlist = this%flowbudptr%budterm(this%idxbudoutf)%maxlist
603 call this%budobj%budterm(idx)%initialize(text, &
608 maxlist, .false., .false., &
612 text =
' LAKEBED-COND'
614 maxlist = this%flowbudptr%budterm(this%idxbudlbcd)%maxlist
616 call this%budobj%budterm(idx)%initialize(text, &
621 maxlist, .false., .false., &
623 call this%budobj%budterm(idx)%reset(maxlist)
626 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(n)
627 n2 = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
628 call this%budobj%budterm(idx)%update_term(n1, n2, q)
637 integer(I4B),
intent(inout) :: idx
638 real(DP),
dimension(:),
intent(in) :: x
639 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
640 real(DP),
intent(inout) :: ccratin
641 real(DP),
intent(inout) :: ccratout
643 integer(I4B) :: j, n1, n2
644 integer(I4B) :: nlist
645 integer(I4B) :: igwfnode
646 integer(I4B) :: idiag
647 integer(I4B) :: auxpos
656 nlist = this%flowbudptr%budterm(this%idxbudrain)%nlist
657 call this%budobj%budterm(idx)%reset(nlist)
659 call this%lke_rain_term(j, n1, n2, q)
660 call this%budobj%budterm(idx)%update_term(n1, n2, q)
661 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
666 nlist = this%flowbudptr%budterm(this%idxbudevap)%nlist
667 call this%budobj%budterm(idx)%reset(nlist)
669 call this%lke_evap_term(j, n1, n2, q)
670 call this%budobj%budterm(idx)%update_term(n1, n2, q)
671 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
676 nlist = this%flowbudptr%budterm(this%idxbudroff)%nlist
677 call this%budobj%budterm(idx)%reset(nlist)
679 call this%lke_roff_term(j, n1, n2, q)
680 call this%budobj%budterm(idx)%update_term(n1, n2, q)
681 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
686 nlist = this%flowbudptr%budterm(this%idxbudiflw)%nlist
687 call this%budobj%budterm(idx)%reset(nlist)
689 call this%lke_iflw_term(j, n1, n2, q)
690 call this%budobj%budterm(idx)%update_term(n1, n2, q)
691 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
696 nlist = this%flowbudptr%budterm(this%idxbudwdrl)%nlist
697 call this%budobj%budterm(idx)%reset(nlist)
699 call this%lke_wdrl_term(j, n1, n2, q)
700 call this%budobj%budterm(idx)%update_term(n1, n2, q)
701 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
706 nlist = this%flowbudptr%budterm(this%idxbudoutf)%nlist
707 call this%budobj%budterm(idx)%reset(nlist)
709 call this%lke_outf_term(j, n1, n2, q)
710 call this%budobj%budterm(idx)%update_term(n1, n2, q)
711 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
716 call this%budobj%budterm(idx)%reset(this%maxbound)
717 do j = 1, this%flowbudptr%budterm(this%idxbudlbcd)%nlist
719 n1 = this%flowbudptr%budterm(this%idxbudlbcd)%id1(j)
720 igwfnode = this%flowbudptr%budterm(this%idxbudlbcd)%id2(j)
721 if (this%iboundpak(n1) /= 0)
then
722 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
723 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, j)
725 s = this%rfeatthk(n1)
726 ctherm = ktf * wa / s
727 q = ctherm * (x(igwfnode) - this%xnewpak(n1))
729 call this%budobj%budterm(idx)%update_term(n1, igwfnode, q)
730 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
731 if (this%iboundpak(n1) /= 0)
then
733 this%simvals(n1) = this%simvals(n1) - q
734 idiag = this%dis%con%ia(igwfnode)
735 flowja(idiag) = flowja(idiag) - q
750 call this%TspAptType%allocate_scalars()
753 call mem_allocate(this%idxbudrain,
'IDXBUDRAIN', this%memoryPath)
754 call mem_allocate(this%idxbudevap,
'IDXBUDEVAP', this%memoryPath)
755 call mem_allocate(this%idxbudroff,
'IDXBUDROFF', this%memoryPath)
756 call mem_allocate(this%idxbudiflw,
'IDXBUDIFLW', this%memoryPath)
757 call mem_allocate(this%idxbudwdrl,
'IDXBUDWDRL', this%memoryPath)
758 call mem_allocate(this%idxbudoutf,
'IDXBUDOUTF', this%memoryPath)
759 call mem_allocate(this%idxbudlbcd,
'IDXBUDLBCD', this%memoryPath)
782 call mem_setptr(this%temprain,
'RAINFALL', this%input_mempath)
783 call mem_setptr(this%tempevap,
'EVAPORATION', this%input_mempath)
784 call mem_setptr(this%temproff,
'RUNOFF', this%input_mempath)
785 call mem_setptr(this%tempiflw,
'EXT_INFLOW', this%input_mempath)
788 call this%TspAptType%apt_allocate_arrays()
802 call this%TspAptType%apt_checkin_deprecated_names()
805 'RAINFALL', this%input_mempath,
'6.8.2')
807 'EVAPORATION', this%input_mempath,
'6.8.2')
809 'RUNOFF', this%input_mempath,
'6.8.2')
811 'EXT_INFLOW', this%input_mempath,
'6.8.2')
832 nullify (this%temprain)
833 nullify (this%tempevap)
834 nullify (this%temproff)
835 nullify (this%tempiflw)
842 call this%TspAptType%bnd_da()
851 integer(I4B),
intent(in) :: ientry
852 integer(I4B),
intent(inout) :: n1
853 integer(I4B),
intent(inout) :: n2
854 real(DP),
intent(inout),
optional :: rrate
855 real(DP),
intent(inout),
optional :: rhsval
856 real(DP),
intent(inout),
optional :: hcofval
861 n1 = this%flowbudptr%budterm(this%idxbudrain)%id1(ientry)
862 n2 = this%flowbudptr%budterm(this%idxbudrain)%id2(ientry)
863 qbnd = this%flowbudptr%budterm(this%idxbudrain)%flow(ientry)
864 ctmp = this%temprain(n1)
865 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
866 if (
present(rhsval)) rhsval = -rrate
867 if (
present(hcofval)) hcofval =
dzero
876 integer(I4B),
intent(in) :: ientry
877 integer(I4B),
intent(inout) :: n1
878 integer(I4B),
intent(inout) :: n2
879 real(DP),
intent(inout),
optional :: rrate
880 real(DP),
intent(inout),
optional :: rhsval
881 real(DP),
intent(inout),
optional :: hcofval
886 n1 = this%flowbudptr%budterm(this%idxbudevap)%id1(ientry)
887 n2 = this%flowbudptr%budterm(this%idxbudevap)%id2(ientry)
889 qbnd = this%flowbudptr%budterm(this%idxbudevap)%flow(ientry)
890 heatlat = this%gwecommon%gwerhow * this%gwecommon%gwelatheatvap
891 if (
present(rrate)) rrate = qbnd * heatlat
892 if (
present(rhsval)) rhsval = -rrate
893 if (
present(hcofval)) hcofval =
dzero
902 integer(I4B),
intent(in) :: ientry
903 integer(I4B),
intent(inout) :: n1
904 integer(I4B),
intent(inout) :: n2
905 real(DP),
intent(inout),
optional :: rrate
906 real(DP),
intent(inout),
optional :: rhsval
907 real(DP),
intent(inout),
optional :: hcofval
912 n1 = this%flowbudptr%budterm(this%idxbudroff)%id1(ientry)
913 n2 = this%flowbudptr%budterm(this%idxbudroff)%id2(ientry)
914 qbnd = this%flowbudptr%budterm(this%idxbudroff)%flow(ientry)
915 ctmp = this%temproff(n1)
916 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
917 if (
present(rhsval)) rhsval = -rrate
918 if (
present(hcofval)) hcofval =
dzero
930 integer(I4B),
intent(in) :: ientry
931 integer(I4B),
intent(inout) :: n1
932 integer(I4B),
intent(inout) :: n2
933 real(DP),
intent(inout),
optional :: rrate
934 real(DP),
intent(inout),
optional :: rhsval
935 real(DP),
intent(inout),
optional :: hcofval
940 n1 = this%flowbudptr%budterm(this%idxbudiflw)%id1(ientry)
941 n2 = this%flowbudptr%budterm(this%idxbudiflw)%id2(ientry)
942 qbnd = this%flowbudptr%budterm(this%idxbudiflw)%flow(ientry)
943 ctmp = this%tempiflw(n1)
944 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
945 if (
present(rhsval)) rhsval = -rrate
946 if (
present(hcofval)) hcofval =
dzero
958 integer(I4B),
intent(in) :: ientry
959 integer(I4B),
intent(inout) :: n1
960 integer(I4B),
intent(inout) :: n2
961 real(DP),
intent(inout),
optional :: rrate
962 real(DP),
intent(inout),
optional :: rhsval
963 real(DP),
intent(inout),
optional :: hcofval
968 n1 = this%flowbudptr%budterm(this%idxbudwdrl)%id1(ientry)
969 n2 = this%flowbudptr%budterm(this%idxbudwdrl)%id2(ientry)
970 qbnd = this%flowbudptr%budterm(this%idxbudwdrl)%flow(ientry)
971 ctmp = this%xnewpak(n1)
972 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
973 if (
present(rhsval)) rhsval =
dzero
974 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
986 integer(I4B),
intent(in) :: ientry
987 integer(I4B),
intent(inout) :: n1
988 integer(I4B),
intent(inout) :: n2
989 real(DP),
intent(inout),
optional :: rrate
990 real(DP),
intent(inout),
optional :: rhsval
991 real(DP),
intent(inout),
optional :: hcofval
996 n1 = this%flowbudptr%budterm(this%idxbudoutf)%id1(ientry)
997 n2 = this%flowbudptr%budterm(this%idxbudoutf)%id2(ientry)
998 qbnd = this%flowbudptr%budterm(this%idxbudoutf)%flow(ientry)
999 ctmp = this%xnewpak(n1)
1000 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
1001 if (
present(rhsval)) rhsval =
dzero
1002 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
1014 integer(I4B) :: indx
1018 call this%obs%StoreObsType(
'temperature', .false., indx)
1023 call this%obs%StoreObsType(
'flow-ja-face', .true., indx)
1028 call this%obs%StoreObsType(
'from-mvr', .true., indx)
1033 call this%obs%StoreObsType(
'to-mvr', .true., indx)
1038 call this%obs%StoreObsType(
'storage', .true., indx)
1043 call this%obs%StoreObsType(
'constant', .true., indx)
1048 call this%obs%StoreObsType(
'lke', .true., indx)
1053 call this%obs%StoreObsType(
'rainfall', .true., indx)
1058 call this%obs%StoreObsType(
'evaporation', .true., indx)
1063 call this%obs%StoreObsType(
'runoff', .true., indx)
1068 call this%obs%StoreObsType(
'ext-inflow', .true., indx)
1073 call this%obs%StoreObsType(
'withdrawal', .true., indx)
1078 call this%obs%StoreObsType(
'ext-outflow', .true., indx)
1090 logical,
intent(inout) :: found
1093 select case (obsrv%ObsTypeId)
1095 call this%rp_obs_byfeature(obsrv)
1096 case (
'EVAPORATION')
1097 call this%rp_obs_byfeature(obsrv)
1099 call this%rp_obs_byfeature(obsrv)
1101 call this%rp_obs_byfeature(obsrv)
1103 call this%rp_obs_byfeature(obsrv)
1104 case (
'EXT-OUTFLOW')
1105 call this%rp_obs_byfeature(obsrv)
1107 call this%rp_obs_budterm(obsrv, &
1108 this%flowbudptr%budterm(this%idxbudtmvr))
1119 character(len=*),
intent(in) :: obstypeid
1120 real(DP),
intent(inout) :: v
1121 integer(I4B),
intent(in) :: jj
1122 logical,
intent(inout) :: found
1124 integer(I4B) :: n1, n2
1127 select case (obstypeid)
1129 if (this%iboundpak(jj) /= 0)
then
1130 call this%lke_rain_term(jj, n1, n2, v)
1132 case (
'EVAPORATION')
1133 if (this%iboundpak(jj) /= 0)
then
1134 call this%lke_evap_term(jj, n1, n2, v)
1137 if (this%iboundpak(jj) /= 0)
then
1138 call this%lke_roff_term(jj, n1, n2, v)
1141 if (this%iboundpak(jj) /= 0)
then
1142 call this%lke_iflw_term(jj, n1, n2, v)
1145 if (this%iboundpak(jj) /= 0)
then
1146 call this%lke_wdrl_term(jj, n1, n2, v)
1148 case (
'EXT-OUTFLOW')
1149 if (this%iboundpak(jj) /= 0)
then
1150 call this%lke_outf_term(jj, n1, n2, v)
1163 integer(I4B) :: n, ifeat
1164 real(DP),
dimension(:),
pointer,
contiguous :: ktf_ptr => null()
1165 real(DP),
dimension(:),
pointer,
contiguous :: rbthcnd_ptr => null()
1168 call this%TspAptType%apt_source_cvs()
1171 call mem_allocate(this%ktf, this%ncv,
'KTF', this%memoryPath)
1172 call mem_allocate(this%rfeatthk, this%ncv,
'RFEATTHK', this%memoryPath)
1175 call mem_setptr(ktf_ptr,
'KTF', this%input_mempath)
1176 call mem_setptr(rbthcnd_ptr,
'RBTHCND', this%input_mempath)
1177 do n = 1,
size(this%pkg_ifno)
1178 ifeat = this%pkg_ifno(n)
1179 if (ifeat < 1 .or. ifeat > this%ncv) cycle
1180 this%ktf(ifeat) = ktf_ptr(n)
1181 this%rfeatthk(ifeat) = rbthcnd_ptr(n)
1182 if (this%rfeatthk(ifeat) <=
dzero)
then
1183 write (
errmsg,
'(4x,a)') &
1184 '****ERROR. Specified thickness used for thermal '// &
1185 'conduction MUST BE > 0 else divide by zero error occurs'
1190 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_checkin_deprecated_names(this)
Alias deprecated LKE variable names to their current storage.
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.
Previous variable names checked in as deprecated aliases.
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 ...