60 character(len=*),
parameter ::
ftype =
'SFE'
61 character(len=*),
parameter ::
flowtype =
'SFR'
62 character(len=16) ::
text =
' SFE'
68 integer(I4B),
pointer :: idxbudrain => null()
69 integer(I4B),
pointer :: idxbudevap => null()
70 integer(I4B),
pointer :: idxbudroff => null()
71 integer(I4B),
pointer :: idxbudiflw => null()
72 integer(I4B),
pointer :: idxbudoutf => null()
74 real(dp),
dimension(:),
pointer,
contiguous :: temprain => null()
75 real(dp),
dimension(:),
pointer,
contiguous :: tempevap => null()
76 real(dp),
dimension(:),
pointer,
contiguous :: temproff => null()
77 real(dp),
dimension(:),
pointer,
contiguous :: tempiflw => null()
78 real(dp),
dimension(:),
pointer,
contiguous :: vnew => null()
79 real(dp),
dimension(:),
pointer,
contiguous :: vold => null()
80 real(dp),
dimension(:),
pointer,
contiguous :: ktf => null()
81 real(dp),
dimension(:),
pointer,
contiguous :: rfeatthk => null()
114 subroutine sfe_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
115 mempath, fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
117 class(
bndtype),
pointer :: packobj
118 integer(I4B),
intent(in) :: id
119 integer(I4B),
intent(in) :: ibcnum
120 integer(I4B),
intent(in) :: inunit
121 integer(I4B),
intent(in) :: iout
122 character(len=*),
intent(in) :: namemodel
123 character(len=*),
intent(in) :: pakname
124 character(len=*),
intent(in) :: mempath
126 real(dp),
intent(in),
pointer :: eqnsclfac
128 character(len=*),
intent(in) :: dvt
129 character(len=*),
intent(in) :: dvu
130 character(len=*),
intent(in) :: dvua
139 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
143 call sfeobj%allocate_scalars()
146 call packobj%pack_initialize()
148 packobj%inunit = inunit
151 packobj%ibcnum = ibcnum
162 sfeobj%eqnsclfac => eqnsclfac
167 sfeobj%gwecommon => gwecommon
170 sfeobj%depvartype = dvt
171 sfeobj%depvarunit = dvu
172 sfeobj%depvarunitabbrev = dvua
183 character(len=LINELENGTH) :: errmsg
184 class(
bndtype),
pointer :: packobj
185 integer(I4B) :: ip, icount
186 integer(I4B) :: nbudterm
196 if (this%fmi%flows_from_file)
then
197 call this%fmi%set_aptbudobj_pointer(this%flowpackagename, this%flowbudptr)
198 if (
associated(this%flowbudptr)) found = .true.
201 if (
associated(this%fmi%gwfbndlist))
then
204 do ip = 1, this%fmi%gwfbndlist%Count()
206 if (packobj%packName == this%flowpackagename)
then
211 this%flowpackagebnd => packobj
212 select type (packobj)
214 this%flowbudptr => packobj%budobj
223 if (.not. found)
then
224 write (errmsg,
'(a)')
'Could not find flow package with name '&
225 &//trim(adjustl(this%flowpackagename))//
'.'
227 call store_error_filename(this%input_fname)
232 nbudterm = this%flowbudptr%nbudterm
233 call mem_allocate(this%idxbudssm, nbudterm,
'IDXBUDSSM', this%memoryPath)
236 write (this%iout,
'(/, a, a)') &
237 'PROCESSING '//
ftype//
' INFORMATION FOR ', this%packName
238 write (this%iout,
'(a)')
' IDENTIFYING FLOW TERMS IN '//
flowtype//
' PACKAGE'
239 write (this%iout,
'(a, i0)') &
240 ' NUMBER OF '//
flowtype//
' = ', this%flowbudptr%ncv
242 do ip = 1, this%flowbudptr%nbudterm
243 select case (trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)))
244 case (
'FLOW-JA-FACE')
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, n1, n2
331 integer(I4B) :: iposd, iposoffd
332 integer(I4B) :: ipossymd, ipossymoffd
338 if (this%idxbudrain /= 0)
then
339 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
340 call this%sfe_rain_term(j, n1, n2, rrate, rhsval, hcofval)
341 iloc = this%idxlocnode(n1)
342 iposd = this%idxpakdiag(n1)
343 call matrix_sln%add_value_pos(iposd, hcofval)
344 rhs(iloc) = rhs(iloc) + rhsval
349 if (this%idxbudevap /= 0)
then
350 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
351 call this%sfe_evap_term(j, n1, n2, rrate, rhsval, hcofval)
352 iloc = this%idxlocnode(n1)
353 iposd = this%idxpakdiag(n1)
354 call matrix_sln%add_value_pos(iposd, hcofval)
355 rhs(iloc) = rhs(iloc) + rhsval
360 if (this%idxbudroff /= 0)
then
361 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
362 call this%sfe_roff_term(j, n1, n2, rrate, rhsval, hcofval)
363 iloc = this%idxlocnode(n1)
364 iposd = this%idxpakdiag(n1)
365 call matrix_sln%add_value_pos(iposd, hcofval)
366 rhs(iloc) = rhs(iloc) + rhsval
371 if (this%idxbudiflw /= 0)
then
372 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
373 call this%sfe_iflw_term(j, n1, n2, rrate, rhsval, hcofval)
374 iloc = this%idxlocnode(n1)
375 iposd = this%idxpakdiag(n1)
376 call matrix_sln%add_value_pos(iposd, hcofval)
377 rhs(iloc) = rhs(iloc) + rhsval
382 if (this%idxbudoutf /= 0)
then
383 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
384 call this%sfe_outf_term(j, n1, n2, rrate, rhsval, hcofval)
385 iloc = this%idxlocnode(n1)
386 iposd = this%idxpakdiag(n1)
387 call matrix_sln%add_value_pos(iposd, hcofval)
388 rhs(iloc) = rhs(iloc) + rhsval
393 do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
396 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
397 if (this%iboundpak(n1) /= 0)
then
399 call this%sfe_sbcd_term(j, n1, n2, rrate, rhsval, hcofval)
402 iposd = this%idxdglo(j)
403 iposoffd = this%idxoffdglo(j)
404 call matrix_sln%add_value_pos(iposd, -hcofval)
405 call matrix_sln%add_value_pos(iposoffd, hcofval)
408 ipossymd = this%idxsymdglo(j)
409 ipossymoffd = this%idxsymoffdglo(j)
410 call matrix_sln%add_value_pos(ipossymd, -hcofval)
411 call matrix_sln%add_value_pos(ipossymoffd, hcofval)
423 integer(I4B) :: n1, n2
427 if (this%idxbudrain /= 0)
then
428 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
429 call this%sfe_rain_term(j, n1, n2, rrate)
430 this%dbuff(n1) = this%dbuff(n1) + rrate
435 if (this%idxbudevap /= 0)
then
436 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
437 call this%sfe_evap_term(j, n1, n2, rrate)
438 this%dbuff(n1) = this%dbuff(n1) + rrate
443 if (this%idxbudroff /= 0)
then
444 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
445 call this%sfe_roff_term(j, n1, n2, rrate)
446 this%dbuff(n1) = this%dbuff(n1) + rrate
451 if (this%idxbudiflw /= 0)
then
452 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
453 call this%sfe_iflw_term(j, n1, n2, rrate)
454 this%dbuff(n1) = this%dbuff(n1) + rrate
459 if (this%idxbudoutf /= 0)
then
460 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
461 call this%sfe_outf_term(j, n1, n2, rrate)
462 this%dbuff(n1) = this%dbuff(n1) + rrate
477 integer(I4B) :: nbudterms
496 integer(I4B),
intent(inout) :: idx
498 integer(I4B) :: n, n1, n2
499 integer(I4B) :: maxlist, naux
501 character(len=LENBUDTXT) :: text
506 maxlist = this%flowbudptr%budterm(this%idxbudrain)%maxlist
508 call this%budobj%budterm(idx)%initialize(text, &
513 maxlist, .false., .false., &
517 text =
' EVAPORATION'
519 maxlist = this%flowbudptr%budterm(this%idxbudevap)%maxlist
521 call this%budobj%budterm(idx)%initialize(text, &
526 maxlist, .false., .false., &
532 maxlist = this%flowbudptr%budterm(this%idxbudroff)%maxlist
534 call this%budobj%budterm(idx)%initialize(text, &
539 maxlist, .false., .false., &
545 maxlist = this%flowbudptr%budterm(this%idxbudiflw)%maxlist
547 call this%budobj%budterm(idx)%initialize(text, &
552 maxlist, .false., .false., &
556 text =
' EXT-OUTFLOW'
558 maxlist = this%flowbudptr%budterm(this%idxbudoutf)%maxlist
560 call this%budobj%budterm(idx)%initialize(text, &
565 maxlist, .false., .false., &
569 text =
' STRMBD-COND'
571 maxlist = this%flowbudptr%budterm(this%idxbudgwf)%maxlist
573 call this%budobj%budterm(idx)%initialize(text, &
578 maxlist, .false., .false., &
580 call this%budobj%budterm(idx)%reset(maxlist)
583 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(n)
584 n2 = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
585 call this%budobj%budterm(idx)%update_term(n1, n2, q)
594 integer(I4B),
intent(inout) :: idx
595 real(DP),
dimension(:),
intent(in) :: x
596 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
597 real(DP),
intent(inout) :: ccratin
598 real(DP),
intent(inout) :: ccratout
600 integer(I4B) :: j, n1, n2
601 integer(I4B) :: igwfnode
602 integer(I4B) :: nlist
603 integer(I4B) :: idiag
608 nlist = this%flowbudptr%budterm(this%idxbudrain)%nlist
609 call this%budobj%budterm(idx)%reset(nlist)
611 call this%sfe_rain_term(j, n1, n2, q)
612 call this%budobj%budterm(idx)%update_term(n1, n2, q)
613 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
618 nlist = this%flowbudptr%budterm(this%idxbudevap)%nlist
619 call this%budobj%budterm(idx)%reset(nlist)
621 call this%sfe_evap_term(j, n1, n2, q)
622 call this%budobj%budterm(idx)%update_term(n1, n2, q)
623 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
628 nlist = this%flowbudptr%budterm(this%idxbudroff)%nlist
629 call this%budobj%budterm(idx)%reset(nlist)
631 call this%sfe_roff_term(j, n1, n2, q)
632 call this%budobj%budterm(idx)%update_term(n1, n2, q)
633 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
638 nlist = this%flowbudptr%budterm(this%idxbudiflw)%nlist
639 call this%budobj%budterm(idx)%reset(nlist)
641 call this%sfe_iflw_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%idxbudoutf)%nlist
649 call this%budobj%budterm(idx)%reset(nlist)
651 call this%sfe_outf_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)
659 nlist = this%flowbudptr%budterm(this%idxbudgwf)%nlist
660 call this%budobj%budterm(idx)%reset(nlist)
662 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
663 if (this%iboundpak(n1) /= 0)
then
666 call this%sfe_sbcd_term(j, n1, igwfnode, q)
667 call this%budobj%budterm(idx)%update_term(n1, igwfnode, q)
668 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
671 this%simvals(n1) = this%simvals(n1) - q
672 idiag = this%dis%con%ia(igwfnode)
673 flowja(idiag) = flowja(idiag) - q
688 call this%TspAptType%allocate_scalars()
691 call mem_allocate(this%idxbudrain,
'IDXBUDRAIN', this%memoryPath)
692 call mem_allocate(this%idxbudevap,
'IDXBUDEVAP', this%memoryPath)
693 call mem_allocate(this%idxbudroff,
'IDXBUDROFF', this%memoryPath)
694 call mem_allocate(this%idxbudiflw,
'IDXBUDIFLW', this%memoryPath)
695 call mem_allocate(this%idxbudoutf,
'IDXBUDOUTF', this%memoryPath)
718 call mem_setptr(this%temprain,
'RAINFALL', this%input_mempath)
719 call mem_setptr(this%tempevap,
'EVAPORATION', this%input_mempath)
720 call mem_setptr(this%temproff,
'RUNOFF', this%input_mempath)
721 call mem_setptr(this%tempiflw,
'INFLOW', this%input_mempath)
723 call mem_allocate(this%vnew, this%ncv,
'VNEW', this%memoryPath)
724 call mem_allocate(this%vold, this%ncv,
'VOLD', this%memoryPath)
727 call this%TspAptType%apt_allocate_arrays()
746 call this%BndExtType%bnd_ad()
747 call this%apt_ad_resync()
751 this%vold(n) = this%vnew(n)
772 nullify (this%temprain)
773 nullify (this%tempevap)
774 nullify (this%temproff)
775 nullify (this%tempiflw)
785 call this%TspAptType%bnd_da()
793 integer(I4B),
intent(in) :: ientry
794 integer(I4B),
intent(inout) :: n1
795 integer(I4B),
intent(inout) :: n2
796 real(DP),
intent(inout),
optional :: rrate
797 real(DP),
intent(inout),
optional :: rhsval
798 real(DP),
intent(inout),
optional :: hcofval
803 n1 = this%flowbudptr%budterm(this%idxbudrain)%id1(ientry)
804 n2 = this%flowbudptr%budterm(this%idxbudrain)%id2(ientry)
805 qbnd = this%flowbudptr%budterm(this%idxbudrain)%flow(ientry)
806 ctmp = this%temprain(n1)
807 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
808 if (
present(rhsval)) rhsval = -rrate
809 if (
present(hcofval)) hcofval =
dzero
817 integer(I4B),
intent(in) :: ientry
818 integer(I4B),
intent(inout) :: n1
819 integer(I4B),
intent(inout) :: n2
820 real(DP),
intent(inout),
optional :: rrate
821 real(DP),
intent(inout),
optional :: rhsval
822 real(DP),
intent(inout),
optional :: hcofval
827 n1 = this%flowbudptr%budterm(this%idxbudevap)%id1(ientry)
828 n2 = this%flowbudptr%budterm(this%idxbudevap)%id2(ientry)
830 qbnd = this%flowbudptr%budterm(this%idxbudevap)%flow(ientry)
831 heatlat = this%gwecommon%gwerhow * this%gwecommon%gwelatheatvap
832 if (
present(rrate)) rrate = qbnd * heatlat
833 if (
present(rhsval)) rhsval = -rrate
834 if (
present(hcofval)) hcofval =
dzero
842 integer(I4B),
intent(in) :: ientry
843 integer(I4B),
intent(inout) :: n1
844 integer(I4B),
intent(inout) :: n2
845 real(DP),
intent(inout),
optional :: rrate
846 real(DP),
intent(inout),
optional :: rhsval
847 real(DP),
intent(inout),
optional :: hcofval
852 n1 = this%flowbudptr%budterm(this%idxbudroff)%id1(ientry)
853 n2 = this%flowbudptr%budterm(this%idxbudroff)%id2(ientry)
854 qbnd = this%flowbudptr%budterm(this%idxbudroff)%flow(ientry)
855 ctmp = this%temproff(n1)
856 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
857 if (
present(rhsval)) rhsval = -rrate
858 if (
present(hcofval)) hcofval =
dzero
870 integer(I4B),
intent(in) :: ientry
871 integer(I4B),
intent(inout) :: n1
872 integer(I4B),
intent(inout) :: n2
873 real(DP),
intent(inout),
optional :: rrate
874 real(DP),
intent(inout),
optional :: rhsval
875 real(DP),
intent(inout),
optional :: hcofval
880 n1 = this%flowbudptr%budterm(this%idxbudiflw)%id1(ientry)
881 n2 = this%flowbudptr%budterm(this%idxbudiflw)%id2(ientry)
882 qbnd = this%flowbudptr%budterm(this%idxbudiflw)%flow(ientry)
883 ctmp = this%tempiflw(n1)
884 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
885 if (
present(rhsval)) rhsval = -rrate
886 if (
present(hcofval)) hcofval =
dzero
897 integer(I4B),
intent(in) :: ientry
898 integer(I4B),
intent(inout) :: n1
899 integer(I4B),
intent(inout) :: n2
900 real(DP),
intent(inout),
optional :: rrate
901 real(DP),
intent(inout),
optional :: rhsval
902 real(DP),
intent(inout),
optional :: hcofval
907 n1 = this%flowbudptr%budterm(this%idxbudoutf)%id1(ientry)
908 n2 = this%flowbudptr%budterm(this%idxbudoutf)%id2(ientry)
909 qbnd = this%flowbudptr%budterm(this%idxbudoutf)%flow(ientry)
910 ctmp = this%xnewpak(n1)
911 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
912 if (
present(rhsval)) rhsval =
dzero
913 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
921 subroutine sfe_sbcd_term(this, ientry, n1, igwfnode, rrate, rhsval, hcofval)
924 integer(I4B),
intent(in) :: ientry
925 integer(I4B),
intent(inout) :: n1
926 integer(I4B),
intent(inout) :: igwfnode
927 real(DP),
intent(inout),
optional :: rrate
928 real(DP),
intent(inout),
optional :: rhsval
929 real(DP),
intent(inout),
optional :: hcofval
931 integer(I4B) :: auxpos
938 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(ientry)
941 igwfnode = this%flowbudptr%budterm(this%idxbudgwf)%id2(ientry)
943 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
944 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, ientry)
946 s = this%rfeatthk(n1)
947 ctherm = ktf * wa / s
950 if (
present(rrate)) rrate = ctherm * (this%xnew(igwfnode) - this%xnewpak(n1))
951 if (
present(rhsval)) rhsval =
dzero
952 if (
present(hcofval)) hcofval = ctherm
969 call this%obs%StoreObsType(
'temperature', .false., indx)
974 call this%obs%StoreObsType(
'flow-ja-face', .true., indx)
979 call this%obs%StoreObsType(
'from-mvr', .true., indx)
984 call this%obs%StoreObsType(
'to-mvr', .true., indx)
989 call this%obs%StoreObsType(
'storage', .true., indx)
994 call this%obs%StoreObsType(
'constant', .true., indx)
999 call this%obs%StoreObsType(
'sfe', .true., indx)
1004 call this%obs%StoreObsType(
'rainfall', .true., indx)
1009 call this%obs%StoreObsType(
'evaporation', .true., indx)
1014 call this%obs%StoreObsType(
'runoff', .true., indx)
1019 call this%obs%StoreObsType(
'ext-inflow', .true., indx)
1024 call this%obs%StoreObsType(
'ext-outflow', .true., indx)
1029 call this%obs%StoreObsType(
'strmbd-cond', .true., indx)
1041 logical,
intent(inout) :: found
1045 select case (obsrv%ObsTypeId)
1047 call this%rp_obs_byfeature(obsrv)
1048 case (
'EVAPORATION')
1049 call this%rp_obs_byfeature(obsrv)
1051 call this%rp_obs_byfeature(obsrv)
1053 call this%rp_obs_byfeature(obsrv)
1054 case (
'EXT-OUTFLOW')
1055 call this%rp_obs_byfeature(obsrv)
1057 call this%rp_obs_byfeature(obsrv)
1058 case (
'STRMBD-COND')
1059 call this%rp_obs_byfeature(obsrv)
1070 character(len=*),
intent(in) :: obstypeid
1071 real(DP),
intent(inout) :: v
1072 integer(I4B),
intent(in) :: jj
1073 logical,
intent(inout) :: found
1075 integer(I4B) :: n1, n2
1078 select case (obstypeid)
1080 if (this%iboundpak(jj) /= 0)
then
1081 call this%sfe_rain_term(jj, n1, n2, v)
1083 case (
'EVAPORATION')
1084 if (this%iboundpak(jj) /= 0)
then
1085 call this%sfe_evap_term(jj, n1, n2, v)
1088 if (this%iboundpak(jj) /= 0)
then
1089 call this%sfe_roff_term(jj, n1, n2, v)
1092 if (this%iboundpak(jj) /= 0)
then
1093 call this%sfe_iflw_term(jj, n1, n2, v)
1095 case (
'EXT-OUTFLOW')
1096 if (this%iboundpak(jj) /= 0)
then
1097 call this%sfe_outf_term(jj, n1, n2, v)
1099 case (
'STRMBD-COND')
1100 if (this%iboundpak(jj) /= 0)
then
1101 call this%sfe_sbcd_term(jj, n1, n2, v)
1114 integer(I4B) :: n, ifeat
1115 real(DP),
dimension(:),
pointer,
contiguous :: ktf_ptr => null()
1116 real(DP),
dimension(:),
pointer,
contiguous :: rbthcnd_ptr => null()
1117 call this%TspAptType%apt_source_cvs()
1118 call mem_allocate(this%ktf, this%ncv,
'KTF', this%memoryPath)
1119 call mem_allocate(this%rfeatthk, this%ncv,
'RFEATTHK', this%memoryPath)
1120 call mem_setptr(ktf_ptr,
'KTF', this%input_mempath)
1121 call mem_setptr(rbthcnd_ptr,
'RBTHCND', this%input_mempath)
1122 do n = 1,
size(this%pkg_ifno)
1123 ifeat = this%pkg_ifno(n)
1124 if (ifeat < 1 .or. ifeat > this%ncv) cycle
1125 this%ktf(ifeat) = ktf_ptr(n)
1126 this%rfeatthk(ifeat) = rbthcnd_ptr(n)
1127 if (this%rfeatthk(ifeat) <=
dzero)
then
1128 write (
errmsg,
'(4x,a)') &
1129 '****ERROR. Specified thickness used for thermal '// &
1130 'conduction MUST BE > 0 else divide by zero error occurs'
1135 call store_error_filename(this%input_fname)
1146 integer(I4B),
intent(in) :: icv
1147 real(DP),
intent(inout) :: vnew, vold
1148 real(DP),
intent(in) :: delt
1155 if (this%idxbudsto /= 0)
then
1156 qss = this%flowbudptr%budterm(this%idxbudsto)%flow(icv)
1157 vnew = this%flowbudptr%budterm(this%idxbudsto)%auxvar(1, icv)
1158 this%vnew(icv) = vnew
1159 if (qss /=
dzero)
then
1160 vold = vnew + qss * delt
1162 if (vnew ==
dzero)
then
1165 vold = this%vold(icv)
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 sfe_bd_obs(this, obstypeid, jj, v, found)
Calculate observation value and pass it back to APT.
character(len= *), parameter flowtype
real(dp) function sfe_setting_value(this, itemno, key)
Value for a package-specific PERIOD setting.
subroutine sfe_df_obs(this)
Observations.
subroutine allocate_scalars(this)
Allocate scalars specific to the streamflow energy transport (SFE) package.
subroutine sfe_setup_budobj(this, idx)
Set up the budget object that stores all the sfe flows.
integer(i4b) function sfe_get_nbudterms(this)
Function to return the number of budget terms just for this package.
subroutine sfe_outf_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Outflow term.
subroutine sfe_iflw_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Inflow Term.
subroutine sfe_rp_obs(this, obsrv, found)
Process package specific obs.
subroutine sfe_fill_budobj(this, idx, x, flowja, ccratin, ccratout)
Copy flow terms into thisbudobj.
subroutine sfe_sbcd_term(this, ientry, n1, igwfnode, rrate, rhsval, hcofval)
Streambed conduction term.
subroutine sfe_rain_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Rain term.
subroutine sfe_get_volumes(this, icv, vnew, vold, delt)
Return the sfr new volume and old volume.
subroutine sfe_evap_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Evaporative term.
character(len= *), parameter ftype
subroutine sfe_solve(this)
@ brief Add terms specific to sfr to the explicit sfe solve
subroutine, public sfe_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath, fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
Create a new sfe package.
subroutine sfe_allocate_arrays(this)
Allocate arrays specific to the streamflow energy transport (SFE) package.
subroutine sfe_roff_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
Runoff term.
subroutine sfe_read_cvs(this)
Source SFE PACKAGEDATA, including thermal conduction fields.
subroutine sfe_fc_expanded(this, rhs, ia, idxglo, matrix_sln)
Add matrix terms related to SFE.
subroutine sfe_da(this)
Deallocate memory.
subroutine sfe_ad(this)
Advance sfe package routine.
subroutine find_sfe_package(this)
Find corresponding sfe package.
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 the SFR package methods.
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 ...