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()
115 subroutine sfe_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
116 mempath, fmi, eqnsclfac, gwecommon, dvt, dvu, dvua)
118 class(
bndtype),
pointer :: packobj
119 integer(I4B),
intent(in) :: id
120 integer(I4B),
intent(in) :: ibcnum
121 integer(I4B),
intent(in) :: inunit
122 integer(I4B),
intent(in) :: iout
123 character(len=*),
intent(in) :: namemodel
124 character(len=*),
intent(in) :: pakname
125 character(len=*),
intent(in) :: mempath
127 real(dp),
intent(in),
pointer :: eqnsclfac
129 character(len=*),
intent(in) :: dvt
130 character(len=*),
intent(in) :: dvu
131 character(len=*),
intent(in) :: dvua
140 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
144 call sfeobj%allocate_scalars()
147 call packobj%pack_initialize()
149 packobj%inunit = inunit
152 packobj%ibcnum = ibcnum
163 sfeobj%eqnsclfac => eqnsclfac
168 sfeobj%gwecommon => gwecommon
171 sfeobj%depvartype = dvt
172 sfeobj%depvarunit = dvu
173 sfeobj%depvarunitabbrev = dvua
184 character(len=LINELENGTH) :: errmsg
185 class(
bndtype),
pointer :: packobj
186 integer(I4B) :: ip, icount
187 integer(I4B) :: nbudterm
197 if (this%fmi%flows_from_file)
then
198 call this%fmi%set_aptbudobj_pointer(this%flowpackagename, this%flowbudptr)
199 if (
associated(this%flowbudptr)) found = .true.
202 if (
associated(this%fmi%gwfbndlist))
then
205 do ip = 1, this%fmi%gwfbndlist%Count()
207 if (packobj%packName == this%flowpackagename)
then
212 this%flowpackagebnd => packobj
213 select type (packobj)
215 this%flowbudptr => packobj%budobj
224 if (.not. found)
then
225 write (errmsg,
'(a)')
'Could not find flow package with name '&
226 &//trim(adjustl(this%flowpackagename))//
'.'
228 call store_error_filename(this%input_fname)
233 nbudterm = this%flowbudptr%nbudterm
234 call mem_allocate(this%idxbudssm, nbudterm,
'IDXBUDSSM', this%memoryPath)
237 write (this%iout,
'(/, a, a)') &
238 'PROCESSING '//
ftype//
' INFORMATION FOR ', this%packName
239 write (this%iout,
'(a)')
' IDENTIFYING FLOW TERMS IN '//
flowtype//
' PACKAGE'
240 write (this%iout,
'(a, i0)') &
241 ' NUMBER OF '//
flowtype//
' = ', this%flowbudptr%ncv
243 do ip = 1, this%flowbudptr%nbudterm
244 select case (trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)))
245 case (
'FLOW-JA-FACE')
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
271 this%idxbudssm(ip) = 0
274 this%idxbudssm(ip) = 0
277 this%idxbudssm(ip) = 0
282 this%idxbudssm(ip) = icount
285 write (this%iout,
'(a, i0, " = ", a,/, a, i0)') &
286 ' TERM ', ip, trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)), &
287 ' MAX NO. OF ENTRIES = ', this%flowbudptr%budterm(ip)%maxlist
289 write (this%iout,
'(a, //)')
'DONE PROCESSING '//
ftype//
' INFORMATION'
300 integer(I4B),
intent(in) :: itemno
301 character(len=*),
intent(in) :: key
305 select case (trim(key))
307 val = this%temprain(itemno)
309 val = this%tempevap(itemno)
311 val = this%temproff(itemno)
313 val = this%tempiflw(itemno)
325 real(DP),
dimension(:),
intent(inout) :: rhs
326 integer(I4B),
dimension(:),
intent(in) :: ia
327 integer(I4B),
dimension(:),
intent(in) :: idxglo
330 integer(I4B) :: j, n1, n2
332 integer(I4B) :: iposd, iposoffd
333 integer(I4B) :: ipossymd, ipossymoffd
339 if (this%idxbudrain /= 0)
then
340 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
341 call this%sfe_rain_term(j, n1, n2, rrate, rhsval, hcofval)
342 iloc = this%idxlocnode(n1)
343 iposd = this%idxpakdiag(n1)
344 call matrix_sln%add_value_pos(iposd, hcofval)
345 rhs(iloc) = rhs(iloc) + rhsval
350 if (this%idxbudevap /= 0)
then
351 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
352 call this%sfe_evap_term(j, n1, n2, rrate, rhsval, hcofval)
353 iloc = this%idxlocnode(n1)
354 iposd = this%idxpakdiag(n1)
355 call matrix_sln%add_value_pos(iposd, hcofval)
356 rhs(iloc) = rhs(iloc) + rhsval
361 if (this%idxbudroff /= 0)
then
362 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
363 call this%sfe_roff_term(j, n1, n2, rrate, rhsval, hcofval)
364 iloc = this%idxlocnode(n1)
365 iposd = this%idxpakdiag(n1)
366 call matrix_sln%add_value_pos(iposd, hcofval)
367 rhs(iloc) = rhs(iloc) + rhsval
372 if (this%idxbudiflw /= 0)
then
373 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
374 call this%sfe_iflw_term(j, n1, n2, rrate, rhsval, hcofval)
375 iloc = this%idxlocnode(n1)
376 iposd = this%idxpakdiag(n1)
377 call matrix_sln%add_value_pos(iposd, hcofval)
378 rhs(iloc) = rhs(iloc) + rhsval
383 if (this%idxbudoutf /= 0)
then
384 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
385 call this%sfe_outf_term(j, n1, n2, rrate, rhsval, hcofval)
386 iloc = this%idxlocnode(n1)
387 iposd = this%idxpakdiag(n1)
388 call matrix_sln%add_value_pos(iposd, hcofval)
389 rhs(iloc) = rhs(iloc) + rhsval
394 do j = 1, this%flowbudptr%budterm(this%idxbudgwf)%nlist
397 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
398 if (this%iboundpak(n1) /= 0)
then
400 call this%sfe_sbcd_term(j, n1, n2, rrate, rhsval, hcofval)
403 iposd = this%idxdglo(j)
404 iposoffd = this%idxoffdglo(j)
405 call matrix_sln%add_value_pos(iposd, -hcofval)
406 call matrix_sln%add_value_pos(iposoffd, hcofval)
409 ipossymd = this%idxsymdglo(j)
410 ipossymoffd = this%idxsymoffdglo(j)
411 call matrix_sln%add_value_pos(ipossymd, -hcofval)
412 call matrix_sln%add_value_pos(ipossymoffd, hcofval)
424 integer(I4B) :: n1, n2
428 if (this%idxbudrain /= 0)
then
429 do j = 1, this%flowbudptr%budterm(this%idxbudrain)%nlist
430 call this%sfe_rain_term(j, n1, n2, rrate)
431 this%dbuff(n1) = this%dbuff(n1) + rrate
436 if (this%idxbudevap /= 0)
then
437 do j = 1, this%flowbudptr%budterm(this%idxbudevap)%nlist
438 call this%sfe_evap_term(j, n1, n2, rrate)
439 this%dbuff(n1) = this%dbuff(n1) + rrate
444 if (this%idxbudroff /= 0)
then
445 do j = 1, this%flowbudptr%budterm(this%idxbudroff)%nlist
446 call this%sfe_roff_term(j, n1, n2, rrate)
447 this%dbuff(n1) = this%dbuff(n1) + rrate
452 if (this%idxbudiflw /= 0)
then
453 do j = 1, this%flowbudptr%budterm(this%idxbudiflw)%nlist
454 call this%sfe_iflw_term(j, n1, n2, rrate)
455 this%dbuff(n1) = this%dbuff(n1) + rrate
460 if (this%idxbudoutf /= 0)
then
461 do j = 1, this%flowbudptr%budterm(this%idxbudoutf)%nlist
462 call this%sfe_outf_term(j, n1, n2, rrate)
463 this%dbuff(n1) = this%dbuff(n1) + rrate
478 integer(I4B) :: nbudterms
497 integer(I4B),
intent(inout) :: idx
499 integer(I4B) :: n, n1, n2
500 integer(I4B) :: maxlist, naux
502 character(len=LENBUDTXT) :: text
507 maxlist = this%flowbudptr%budterm(this%idxbudrain)%maxlist
509 call this%budobj%budterm(idx)%initialize(text, &
514 maxlist, .false., .false., &
518 text =
' EVAPORATION'
520 maxlist = this%flowbudptr%budterm(this%idxbudevap)%maxlist
522 call this%budobj%budterm(idx)%initialize(text, &
527 maxlist, .false., .false., &
533 maxlist = this%flowbudptr%budterm(this%idxbudroff)%maxlist
535 call this%budobj%budterm(idx)%initialize(text, &
540 maxlist, .false., .false., &
546 maxlist = this%flowbudptr%budterm(this%idxbudiflw)%maxlist
548 call this%budobj%budterm(idx)%initialize(text, &
553 maxlist, .false., .false., &
557 text =
' EXT-OUTFLOW'
559 maxlist = this%flowbudptr%budterm(this%idxbudoutf)%maxlist
561 call this%budobj%budterm(idx)%initialize(text, &
566 maxlist, .false., .false., &
570 text =
' STRMBD-COND'
572 maxlist = this%flowbudptr%budterm(this%idxbudgwf)%maxlist
574 call this%budobj%budterm(idx)%initialize(text, &
579 maxlist, .false., .false., &
581 call this%budobj%budterm(idx)%reset(maxlist)
584 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(n)
585 n2 = this%flowbudptr%budterm(this%idxbudgwf)%id2(n)
586 call this%budobj%budterm(idx)%update_term(n1, n2, q)
595 integer(I4B),
intent(inout) :: idx
596 real(DP),
dimension(:),
intent(in) :: x
597 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
598 real(DP),
intent(inout) :: ccratin
599 real(DP),
intent(inout) :: ccratout
601 integer(I4B) :: j, n1, n2
602 integer(I4B) :: igwfnode
603 integer(I4B) :: nlist
604 integer(I4B) :: idiag
609 nlist = this%flowbudptr%budterm(this%idxbudrain)%nlist
610 call this%budobj%budterm(idx)%reset(nlist)
612 call this%sfe_rain_term(j, n1, n2, q)
613 call this%budobj%budterm(idx)%update_term(n1, n2, q)
614 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
619 nlist = this%flowbudptr%budterm(this%idxbudevap)%nlist
620 call this%budobj%budterm(idx)%reset(nlist)
622 call this%sfe_evap_term(j, n1, n2, q)
623 call this%budobj%budterm(idx)%update_term(n1, n2, q)
624 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
629 nlist = this%flowbudptr%budterm(this%idxbudroff)%nlist
630 call this%budobj%budterm(idx)%reset(nlist)
632 call this%sfe_roff_term(j, n1, n2, q)
633 call this%budobj%budterm(idx)%update_term(n1, n2, q)
634 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
639 nlist = this%flowbudptr%budterm(this%idxbudiflw)%nlist
640 call this%budobj%budterm(idx)%reset(nlist)
642 call this%sfe_iflw_term(j, n1, n2, q)
643 call this%budobj%budterm(idx)%update_term(n1, n2, q)
644 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
649 nlist = this%flowbudptr%budterm(this%idxbudoutf)%nlist
650 call this%budobj%budterm(idx)%reset(nlist)
652 call this%sfe_outf_term(j, n1, n2, q)
653 call this%budobj%budterm(idx)%update_term(n1, n2, q)
654 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
660 nlist = this%flowbudptr%budterm(this%idxbudgwf)%nlist
661 call this%budobj%budterm(idx)%reset(nlist)
663 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(j)
664 if (this%iboundpak(n1) /= 0)
then
667 call this%sfe_sbcd_term(j, n1, igwfnode, q)
668 call this%budobj%budterm(idx)%update_term(n1, igwfnode, q)
669 call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
672 this%simvals(n1) = this%simvals(n1) - q
673 idiag = this%dis%con%ia(igwfnode)
674 flowja(idiag) = flowja(idiag) - q
689 call this%TspAptType%allocate_scalars()
692 call mem_allocate(this%idxbudrain,
'IDXBUDRAIN', this%memoryPath)
693 call mem_allocate(this%idxbudevap,
'IDXBUDEVAP', this%memoryPath)
694 call mem_allocate(this%idxbudroff,
'IDXBUDROFF', this%memoryPath)
695 call mem_allocate(this%idxbudiflw,
'IDXBUDIFLW', this%memoryPath)
696 call mem_allocate(this%idxbudoutf,
'IDXBUDOUTF', this%memoryPath)
719 call mem_setptr(this%temprain,
'RAINFALL', this%input_mempath)
720 call mem_setptr(this%tempevap,
'EVAPORATION', this%input_mempath)
721 call mem_setptr(this%temproff,
'RUNOFF', this%input_mempath)
722 call mem_setptr(this%tempiflw,
'INFLOW', this%input_mempath)
724 call mem_allocate(this%vnew, this%ncv,
'VNEW', this%memoryPath)
725 call mem_allocate(this%vold, this%ncv,
'VOLD', this%memoryPath)
728 call this%TspAptType%apt_allocate_arrays()
747 call this%TspAptType%apt_checkin_deprecated_names()
750 'RAINFALL', this%input_mempath,
'6.8.2')
752 'EVAPORATION', this%input_mempath,
'6.8.2')
754 'RUNOFF', this%input_mempath,
'6.8.2')
756 'INFLOW', this%input_mempath,
'6.8.2')
769 call this%BndExtType%bnd_ad()
770 call this%apt_ad_resync()
774 this%vold(n) = this%vnew(n)
795 nullify (this%temprain)
796 nullify (this%tempevap)
797 nullify (this%temproff)
798 nullify (this%tempiflw)
808 call this%TspAptType%bnd_da()
816 integer(I4B),
intent(in) :: ientry
817 integer(I4B),
intent(inout) :: n1
818 integer(I4B),
intent(inout) :: n2
819 real(DP),
intent(inout),
optional :: rrate
820 real(DP),
intent(inout),
optional :: rhsval
821 real(DP),
intent(inout),
optional :: hcofval
826 n1 = this%flowbudptr%budterm(this%idxbudrain)%id1(ientry)
827 n2 = this%flowbudptr%budterm(this%idxbudrain)%id2(ientry)
828 qbnd = this%flowbudptr%budterm(this%idxbudrain)%flow(ientry)
829 ctmp = this%temprain(n1)
830 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
831 if (
present(rhsval)) rhsval = -rrate
832 if (
present(hcofval)) hcofval =
dzero
840 integer(I4B),
intent(in) :: ientry
841 integer(I4B),
intent(inout) :: n1
842 integer(I4B),
intent(inout) :: n2
843 real(DP),
intent(inout),
optional :: rrate
844 real(DP),
intent(inout),
optional :: rhsval
845 real(DP),
intent(inout),
optional :: hcofval
850 n1 = this%flowbudptr%budterm(this%idxbudevap)%id1(ientry)
851 n2 = this%flowbudptr%budterm(this%idxbudevap)%id2(ientry)
853 qbnd = this%flowbudptr%budterm(this%idxbudevap)%flow(ientry)
854 heatlat = this%gwecommon%gwerhow * this%gwecommon%gwelatheatvap
855 if (
present(rrate)) rrate = qbnd * heatlat
856 if (
present(rhsval)) rhsval = -rrate
857 if (
present(hcofval)) hcofval =
dzero
865 integer(I4B),
intent(in) :: ientry
866 integer(I4B),
intent(inout) :: n1
867 integer(I4B),
intent(inout) :: n2
868 real(DP),
intent(inout),
optional :: rrate
869 real(DP),
intent(inout),
optional :: rhsval
870 real(DP),
intent(inout),
optional :: hcofval
875 n1 = this%flowbudptr%budterm(this%idxbudroff)%id1(ientry)
876 n2 = this%flowbudptr%budterm(this%idxbudroff)%id2(ientry)
877 qbnd = this%flowbudptr%budterm(this%idxbudroff)%flow(ientry)
878 ctmp = this%temproff(n1)
879 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
880 if (
present(rhsval)) rhsval = -rrate
881 if (
present(hcofval)) hcofval =
dzero
893 integer(I4B),
intent(in) :: ientry
894 integer(I4B),
intent(inout) :: n1
895 integer(I4B),
intent(inout) :: n2
896 real(DP),
intent(inout),
optional :: rrate
897 real(DP),
intent(inout),
optional :: rhsval
898 real(DP),
intent(inout),
optional :: hcofval
903 n1 = this%flowbudptr%budterm(this%idxbudiflw)%id1(ientry)
904 n2 = this%flowbudptr%budterm(this%idxbudiflw)%id2(ientry)
905 qbnd = this%flowbudptr%budterm(this%idxbudiflw)%flow(ientry)
906 ctmp = this%tempiflw(n1)
907 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
908 if (
present(rhsval)) rhsval = -rrate
909 if (
present(hcofval)) hcofval =
dzero
920 integer(I4B),
intent(in) :: ientry
921 integer(I4B),
intent(inout) :: n1
922 integer(I4B),
intent(inout) :: n2
923 real(DP),
intent(inout),
optional :: rrate
924 real(DP),
intent(inout),
optional :: rhsval
925 real(DP),
intent(inout),
optional :: hcofval
930 n1 = this%flowbudptr%budterm(this%idxbudoutf)%id1(ientry)
931 n2 = this%flowbudptr%budterm(this%idxbudoutf)%id2(ientry)
932 qbnd = this%flowbudptr%budterm(this%idxbudoutf)%flow(ientry)
933 ctmp = this%xnewpak(n1)
934 if (
present(rrate)) rrate = ctmp * qbnd * this%eqnsclfac
935 if (
present(rhsval)) rhsval =
dzero
936 if (
present(hcofval)) hcofval = qbnd * this%eqnsclfac
944 subroutine sfe_sbcd_term(this, ientry, n1, igwfnode, rrate, rhsval, hcofval)
947 integer(I4B),
intent(in) :: ientry
948 integer(I4B),
intent(inout) :: n1
949 integer(I4B),
intent(inout) :: igwfnode
950 real(DP),
intent(inout),
optional :: rrate
951 real(DP),
intent(inout),
optional :: rhsval
952 real(DP),
intent(inout),
optional :: hcofval
954 integer(I4B) :: auxpos
961 n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(ientry)
964 igwfnode = this%flowbudptr%budterm(this%idxbudgwf)%id2(ientry)
966 auxpos = this%flowbudptr%budterm(this%idxbudgwf)%naux
967 wa = this%flowbudptr%budterm(this%idxbudgwf)%auxvar(auxpos, ientry)
969 s = this%rfeatthk(n1)
970 ctherm = ktf * wa / s
973 if (
present(rrate)) rrate = ctherm * (this%xnew(igwfnode) - this%xnewpak(n1))
974 if (
present(rhsval)) rhsval =
dzero
975 if (
present(hcofval)) hcofval = ctherm
992 call this%obs%StoreObsType(
'temperature', .false., indx)
997 call this%obs%StoreObsType(
'flow-ja-face', .true., indx)
1002 call this%obs%StoreObsType(
'from-mvr', .true., indx)
1007 call this%obs%StoreObsType(
'to-mvr', .true., indx)
1012 call this%obs%StoreObsType(
'storage', .true., indx)
1017 call this%obs%StoreObsType(
'constant', .true., indx)
1022 call this%obs%StoreObsType(
'sfe', .true., indx)
1027 call this%obs%StoreObsType(
'rainfall', .true., indx)
1032 call this%obs%StoreObsType(
'evaporation', .true., indx)
1037 call this%obs%StoreObsType(
'runoff', .true., indx)
1042 call this%obs%StoreObsType(
'ext-inflow', .true., indx)
1047 call this%obs%StoreObsType(
'ext-outflow', .true., indx)
1052 call this%obs%StoreObsType(
'strmbd-cond', .true., indx)
1064 logical,
intent(inout) :: found
1068 select case (obsrv%ObsTypeId)
1070 call this%rp_obs_byfeature(obsrv)
1071 case (
'EVAPORATION')
1072 call this%rp_obs_byfeature(obsrv)
1074 call this%rp_obs_byfeature(obsrv)
1076 call this%rp_obs_byfeature(obsrv)
1077 case (
'EXT-OUTFLOW')
1078 call this%rp_obs_byfeature(obsrv)
1080 call this%rp_obs_byfeature(obsrv)
1081 case (
'STRMBD-COND')
1082 call this%rp_obs_byfeature(obsrv)
1093 character(len=*),
intent(in) :: obstypeid
1094 real(DP),
intent(inout) :: v
1095 integer(I4B),
intent(in) :: jj
1096 logical,
intent(inout) :: found
1098 integer(I4B) :: n1, n2
1101 select case (obstypeid)
1103 if (this%iboundpak(jj) /= 0)
then
1104 call this%sfe_rain_term(jj, n1, n2, v)
1106 case (
'EVAPORATION')
1107 if (this%iboundpak(jj) /= 0)
then
1108 call this%sfe_evap_term(jj, n1, n2, v)
1111 if (this%iboundpak(jj) /= 0)
then
1112 call this%sfe_roff_term(jj, n1, n2, v)
1115 if (this%iboundpak(jj) /= 0)
then
1116 call this%sfe_iflw_term(jj, n1, n2, v)
1118 case (
'EXT-OUTFLOW')
1119 if (this%iboundpak(jj) /= 0)
then
1120 call this%sfe_outf_term(jj, n1, n2, v)
1122 case (
'STRMBD-COND')
1123 if (this%iboundpak(jj) /= 0)
then
1124 call this%sfe_sbcd_term(jj, n1, n2, v)
1137 integer(I4B) :: n, ifeat
1138 real(DP),
dimension(:),
pointer,
contiguous :: ktf_ptr => null()
1139 real(DP),
dimension(:),
pointer,
contiguous :: rbthcnd_ptr => null()
1140 call this%TspAptType%apt_source_cvs()
1141 call mem_allocate(this%ktf, this%ncv,
'KTF', this%memoryPath)
1142 call mem_allocate(this%rfeatthk, this%ncv,
'RFEATTHK', this%memoryPath)
1143 call mem_setptr(ktf_ptr,
'KTF', this%input_mempath)
1144 call mem_setptr(rbthcnd_ptr,
'RBTHCND', this%input_mempath)
1145 do n = 1,
size(this%pkg_ifno)
1146 ifeat = this%pkg_ifno(n)
1147 if (ifeat < 1 .or. ifeat > this%ncv) cycle
1148 this%ktf(ifeat) = ktf_ptr(n)
1149 this%rfeatthk(ifeat) = rbthcnd_ptr(n)
1150 if (this%rfeatthk(ifeat) <=
dzero)
then
1151 write (
errmsg,
'(4x,a)') &
1152 '****ERROR. Specified thickness used for thermal '// &
1153 'conduction MUST BE > 0 else divide by zero error occurs'
1158 call store_error_filename(this%input_fname)
1169 integer(I4B),
intent(in) :: icv
1170 real(DP),
intent(inout) :: vnew, vold
1171 real(DP),
intent(in) :: delt
1178 if (this%idxbudsto /= 0)
then
1179 qss = this%flowbudptr%budterm(this%idxbudsto)%flow(icv)
1180 vnew = this%flowbudptr%budterm(this%idxbudsto)%auxvar(1, icv)
1181 this%vnew(icv) = vnew
1182 if (qss /=
dzero)
then
1183 vold = vnew + qss * delt
1185 if (vnew ==
dzero)
then
1188 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_checkin_deprecated_names(this)
Alias deprecated SFE variable names to their current storage.
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.
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 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 ...