52 integer(I4B),
pointer :: inewton => null()
53 integer(I4B),
pointer :: icellavg => null()
54 integer(I4B),
pointer :: ivarcv => null()
55 integer(I4B),
pointer :: idewatcv => null()
56 integer(I4B),
pointer :: ingnc => null()
58 integer(I4B),
pointer :: inmvr => null()
60 integer(I4B),
pointer :: inobs => null()
64 real(dp),
dimension(:),
pointer,
contiguous :: cond => null()
65 real(dp),
dimension(:),
pointer,
contiguous :: condsat => null()
66 integer(I4B),
dimension(:),
pointer,
contiguous :: idxglo => null()
67 integer(I4B),
dimension(:),
pointer,
contiguous :: idxsymglo => null()
68 real(dp),
pointer :: satomega => null()
69 real(dp),
dimension(:),
pointer,
contiguous :: simvals => null()
129 character(len=*),
intent(in) :: filename
130 character(len=*) :: name
131 integer(I4B),
intent(in) :: id
132 integer(I4B),
intent(in) :: m1_id
133 integer(I4B),
intent(in) :: m2_id
134 character(len=*),
intent(in) :: input_mempath
139 integer(I4B) :: m1_index, m2_index
143 baseexchange => exchange
150 exchange%input_mempath = input_mempath
153 call exchange%allocate_scalars()
154 exchange%filename = filename
155 exchange%typename =
'GWF-GWF'
159 if (m1_index > 0)
then
160 mb => getbasemodelfromlist(basemodellist, m1_index)
163 exchange%model1 => mb
164 exchange%gwfmodel1 => mb
168 exchange%is_datacopy = .not. exchange%v_model1%is_local
172 if (m2_index > 0)
then
173 mb => getbasemodelfromlist(basemodellist, m2_index)
176 exchange%model2 => mb
177 exchange%gwfmodel2 => mb
183 if (.not.
associated(exchange%gwfmodel1) .and. m1_index > 0)
then
184 write (
errmsg,
'(3a)')
'Problem with GWF-GWF exchange ', &
185 trim(exchange%name), &
186 '. First specified GWF Model does not appear to be of the correct type.'
191 if (.not.
associated(exchange%gwfmodel2) .and. m2_index > 0)
then
192 write (
errmsg,
'(3a)')
'Problem with GWF-GWF exchange ', &
193 trim(exchange%name), &
194 '. Second specified GWF Model does not appear to be of the correct type.'
199 call obs_cr(exchange%obs, exchange%inobs)
216 write (
iout,
'(/a,a)')
' Creating exchange: ', this%name
219 if (this%v_model1%idsoln%get() /= this%v_model2%idsoln%get())
then
220 call store_error(
'Two models are connected in a GWF '// &
221 'exchange but they are in different solutions. '// &
222 'GWF models must be in same solution: '// &
223 trim(this%v_model1%name)//
' '// &
224 trim(this%v_model2%name))
229 call this%source_options(
iout)
232 call this%source_dimensions(
iout)
235 call this%allocate_arrays()
238 call this%source_data(
iout)
241 if (
associated(this%gwfmodel1))
then
242 call this%gwfmodel1%npf%increase_edge_count(this%nexg)
244 if (
associated(this%gwfmodel2))
then
245 call this%gwfmodel2%npf%increase_edge_count(this%nexg)
249 if (this%ingnc > 0)
then
250 if (
associated(this%gwfmodel1) .and.
associated(this%gwfmodel2))
then
251 call gnc_cr(this%gnc, this%name, this%ingnc,
iout)
257 if (this%inmvr > 0)
then
258 call this%read_mvr(
iout)
262 call this%gwf_gwf_df_obs()
263 if (
associated(this%gwfmodel1))
then
264 call this%obs%obs_df(
iout, this%name,
'GWF-GWF', this%gwfmodel1%dis)
268 call this%validate_exchange()
277 logical(LGP) :: has_k22, has_spdis, has_vsc
280 if (this%v_model1 == this%v_model2)
then
281 if (this%ixt3d > 0)
then
282 write (
errmsg,
'(3a)')
'GWF-GWF exchange ', trim(this%name), &
283 ' is a periodic boundary condition which cannot'// &
284 ' be configured with XT3D'
290 if (this%ixt3d > 0 .and. this%ianglex == 0)
then
291 write (
errmsg,
'(3a)')
'GWF-GWF exchange ', trim(this%name), &
292 ' requires that ANGLDEGX be specified as an'// &
293 ' auxiliary variable because XT3D is enabled'
303 if (
associated(this%gwfmodel1))
then
304 has_k22 = (this%gwfmodel1%npf%ik22 /= 0)
305 has_spdis = (this%gwfmodel1%npf%icalcspdis /= 0)
306 has_vsc = (this%gwfmodel1%npf%invsc /= 0)
308 if (
associated(this%gwfmodel2))
then
309 has_k22 = has_k22 .or. (this%gwfmodel2%npf%ik22 /= 0)
310 has_spdis = has_spdis .or. (this%gwfmodel2%npf%icalcspdis /= 0)
311 has_vsc = has_vsc .or. (this%gwfmodel2%npf%invsc /= 0)
318 if (this%ianglex == 0)
then
319 write (
errmsg,
'(3a)')
'GWF-GWF exchange ', trim(this%name), &
320 ' requires that ANGLDEGX be specified as an'// &
321 ' auxiliary variable because K22 was specified'// &
322 ' in one or both groundwater models.'
331 if (this%ianglex == 0)
then
332 write (
errmsg,
'(3a)')
'GWF-GWF exchange ', trim(this%name), &
333 ' requires that ANGLDEGX be specified as an'// &
334 ' auxiliary variable because specific discharge'// &
335 ' is being calculated in one or both'// &
336 ' groundwater models.'
339 if (this%icdist == 0)
then
340 write (
errmsg,
'(3a)')
'GWF-GWF exchange ', trim(this%name), &
341 ' requires that CDIST be specified as an'// &
342 ' auxiliary variable because specific discharge'// &
343 ' is being calculated in one or both'// &
344 ' groundwater models.'
352 write (
errmsg,
'(3a)')
'GWF-GWF exchange ', trim(this%name), &
353 ' requires that the Viscosity Package is inactive'// &
354 ' in both of the connected models.'
370 integer(I4B) :: n, iglo, jglo
374 iglo = this%nodem1(n) + this%gwfmodel1%moffset
375 jglo = this%nodem2(n) + this%gwfmodel2%moffset
376 call sparse%addconnection(iglo, jglo, 1)
377 call sparse%addconnection(jglo, iglo, 1)
381 if (this%ingnc > 0)
then
382 call this%gnc%gnc_ac(sparse)
397 integer(I4B) :: n, iglo, jglo
401 iglo = this%nodem1(n) + this%gwfmodel1%moffset
402 jglo = this%nodem2(n) + this%gwfmodel2%moffset
403 this%idxglo(n) = matrix_sln%get_position(iglo, jglo)
404 this%idxsymglo(n) = matrix_sln%get_position(jglo, iglo)
408 if (this%ingnc > 0)
then
409 call this%gnc%gnc_mc(matrix_sln)
422 if (this%inmvr > 0)
call this%mvr%mvr_ar()
425 if (.not. this%use_interface_model())
call this%calc_cond_sat()
428 call this%obs%obs_ar()
445 if (this%inmvr > 0)
call this%mvr%mvr_rp()
448 call this%gwf_gwf_rp_obs()
460 if (this%inmvr > 0)
call this%mvr%mvr_ad()
463 call this%obs%obs_ad()
473 integer(I4B),
intent(in) :: kiter
477 if (this%inmvr > 0)
call this%mvr%xmvr_cf()
481 call this%rewet(kiter)
488 subroutine gwf_gwf_fc(this, kiter, matrix_sln, rhs_sln, inwtflag)
494 integer(I4B),
intent(in) :: kiter
496 real(DP),
dimension(:),
intent(inout) :: rhs_sln
497 integer(I4B),
optional,
intent(in) :: inwtflag
499 integer(I4B) :: inwt, iexg
500 integer(I4B) :: i, nodem1sln, nodem2sln
507 if (this%ingnc > 0)
then
508 do iexg = 1, this%nexg
509 this%gnc%cond(iexg) = this%cond(iexg)
515 call matrix_sln%set_value_pos(this%idxglo(i), this%cond(i))
516 call matrix_sln%set_value_pos(this%idxsymglo(i), this%cond(i))
518 nodem1sln = this%nodem1(i) + this%gwfmodel1%moffset
519 nodem2sln = this%nodem2(i) + this%gwfmodel2%moffset
520 call matrix_sln%add_diag_value(nodem1sln, -this%cond(i))
521 call matrix_sln%add_diag_value(nodem2sln, -this%cond(i))
525 if (this%ingnc > 0)
then
526 call this%gnc%gnc_fc(kiter, matrix_sln)
530 if (this%inmvr > 0)
call this%mvr%mvr_fc()
534 if (
present(inwtflag))
then
535 if (inwtflag == 0) inwt = 0
538 call this%exg_fn(kiter, matrix_sln)
542 if (this%ingnc > 0)
then
544 call this%gnc%gnc_fn(kiter, matrix_sln, this%condsat, &
545 ihc_opt=this%ihc, ivarcv_opt=this%ivarcv, &
546 ictm1_opt=this%gwfmodel1%npf%icelltype, &
547 ictm2_opt=this%gwfmodel2%npf%icelltype)
561 integer(I4B),
intent(in) :: kiter
567 integer(I4B) :: nodensln, nodemsln
568 integer(I4B) :: ibdn, ibdm
569 real(DP) :: topn, topm
570 real(DP) :: botn, botm
571 real(DP) :: topup, botup
579 do iexg = 1, this%nexg
580 n = this%nodem1(iexg)
581 m = this%nodem2(iexg)
582 nodensln = this%nodem1(iexg) + this%gwfmodel1%moffset
583 nodemsln = this%nodem2(iexg) + this%gwfmodel2%moffset
584 ibdn = this%gwfmodel1%ibound(n)
585 ibdm = this%gwfmodel2%ibound(m)
586 topn = this%gwfmodel1%dis%top(n)
587 topm = this%gwfmodel2%dis%top(m)
588 botn = this%gwfmodel1%dis%bot(n)
589 botm = this%gwfmodel2%dis%bot(m)
590 hn = this%gwfmodel1%x(n)
591 hm = this%gwfmodel2%x(m)
592 if (this%ihc(iexg) == 0)
then
597 if (hm < hn) nisup = .true.
614 if (this%gwfmodel1%npf%icelltype(n) == 0) cycle
616 if (this%gwfmodel2%npf%icelltype(m) == 0) cycle
620 if (this%ihc(iexg) == 2)
then
621 topup = min(topn, topm)
622 botup = max(botn, botm)
626 cond = this%condsat(iexg)
631 consterm = -cond * (hup - hdn)
636 term = consterm * derv
637 this%gwfmodel1%rhs(n) = this%gwfmodel1%rhs(n) + term * hn
638 this%gwfmodel2%rhs(m) = this%gwfmodel2%rhs(m) - term * hn
639 call matrix_sln%add_diag_value(nodensln, term)
641 call matrix_sln%add_value_pos(this%idxsymglo(iexg), -term)
646 term = -consterm * derv
647 this%gwfmodel1%rhs(n) = this%gwfmodel1%rhs(n) + term * hm
648 this%gwfmodel2%rhs(m) = this%gwfmodel2%rhs(m) - term * hm
649 call matrix_sln%add_diag_value(nodemsln, -term)
651 call matrix_sln%add_value_pos(this%idxglo(iexg), term)
663 subroutine gwf_gwf_cq(this, icnvg, isuppress_output, isolnid)
666 integer(I4B),
intent(inout) :: icnvg
667 integer(I4B),
intent(in) :: isuppress_output
668 integer(I4B),
intent(in) :: isolnid
671 call this%gwf_gwf_calc_simvals()
674 call this%gwf_gwf_set_flow_to_npf()
677 call this%gwf_gwf_add_to_flowja()
690 integer(I4B) :: n1, n2
691 integer(I4B) :: ibdn1, ibdn2
698 ibdn1 = this%gwfmodel1%ibound(n1)
699 ibdn2 = this%gwfmodel2%ibound(n2)
700 if (ibdn1 /= 0 .and. ibdn2 /= 0)
then
701 rrate = this%qcalc(i, n1, n2)
702 if (this%ingnc > 0)
then
703 rrate = rrate + this%gnc%deltaqgnc(i)
706 this%simvals(i) = rrate
719 integer(I4B) :: idiag
724 if (
associated(this%gwfmodel1))
then
726 if (this%gwfmodel1%ibound(n) > 0)
then
727 flow = this%simvals(i)
728 idiag = this%gwfmodel1%ia(n)
729 this%gwfmodel1%flowja(idiag) = this%gwfmodel1%flowja(idiag) + flow
733 if (
associated(this%gwfmodel2))
then
735 if (this%gwfmodel2%ibound(n) > 0)
then
736 flow = -this%simvals(i)
737 idiag = this%gwfmodel2%ia(n)
738 this%gwfmodel2%flowja(idiag) = this%gwfmodel2%flowja(idiag) + flow
755 integer(I4B) :: n1, n2
756 integer(I4B) :: ibdn1, ibdn2
757 integer(I4B) :: ictn1, ictn2
760 real(DP) :: topn1, topn2
761 real(DP) :: botn1, botn2
762 real(DP) :: satn1, satn2
773 if (this%gwfmodel1%npf%icalcspdis == 0 .and. &
774 this%gwfmodel2%npf%icalcspdis == 0)
return
779 rrate = this%simvals(i)
784 ibdn1 = this%gwfmodel1%ibound(n1)
785 ibdn2 = this%gwfmodel2%ibound(n2)
786 ictn1 = this%gwfmodel1%npf%icelltype(n1)
787 ictn2 = this%gwfmodel2%npf%icelltype(n2)
788 topn1 = this%gwfmodel1%dis%top(n1)
789 topn2 = this%gwfmodel2%dis%top(n2)
790 botn1 = this%gwfmodel1%dis%bot(n1)
791 botn2 = this%gwfmodel2%dis%bot(n2)
792 satn1 = this%gwfmodel1%npf%sat(n1)
793 satn2 = this%gwfmodel2%npf%sat(n2)
794 hn1 = this%gwfmodel1%x(n1)
795 hn2 = this%gwfmodel2%x(n2)
802 if (botn1 < botn2)
then
808 if (this%ianglex > 0)
then
809 angle = this%auxvar(this%ianglex, i) *
dpio180
814 call store_error(
'error in gwf_gwf_cq', terminate=.true.)
818 thksat =
thksatnm(ibdn1, ibdn2, ictn1, ictn2, this%inewton, ihc, &
819 hn1, hn2, satn1, satn2, &
820 topn1, topn2, botn1, botn2)
826 if (this%icdist > 0)
then
827 dltot = this%auxvar(this%icdist, i)
829 call store_error(
'error in gwf_gwf_cq', terminate=.true.)
831 distance = dltot * this%cl1(i) / (this%cl1(i) + this%cl2(i))
832 if (this%gwfmodel1%npf%icalcspdis == 1)
then
833 call this%gwfmodel1%npf%set_edge_properties(n1, ihc, rrate, area, &
839 if (this%icdist > 0)
then
840 dltot = this%auxvar(this%icdist, i)
842 call store_error(
'error in gwf_gwf_cq', terminate=.true.)
844 if (this%gwfmodel2%npf%icalcspdis == 1)
then
845 distance = dltot * this%cl2(i) / (this%cl1(i) + this%cl2(i))
846 if (ihc /= 0) rrate = -rrate
847 call this%gwfmodel2%npf%set_edge_properties(n2, ihc, rrate, area, &
858 subroutine gwf_gwf_bd(this, icnvg, isuppress_output, isolnid)
864 integer(I4B),
intent(inout) :: icnvg
865 integer(I4B),
intent(in) :: isuppress_output
866 integer(I4B),
intent(in) :: isolnid
868 character(len=LENBUDTXT),
dimension(1) :: budtxt
869 real(DP),
dimension(2, 1) :: budterm
870 real(DP) :: ratin, ratout
873 budtxt(1) =
' FLOW-JA-FACE'
879 if (
associated(this%gwfmodel1))
then
880 budterm(1, 1) = ratin
881 budterm(2, 1) = ratout
882 call this%gwfmodel1%model_bdentry(budterm, budtxt, this%name)
886 if (
associated(this%gwfmodel2))
then
887 budterm(1, 1) = ratout
888 budterm(2, 1) = ratin
889 call this%gwfmodel2%model_bdentry(budterm, budtxt, this%name)
894 call this%gwf_gwf_chd_bd()
897 if (this%inmvr > 0)
call this%mvr%mvr_bd()
911 character(len=LENBUDTXT),
dimension(1) :: budtxt
914 real(DP),
dimension(2, 1) :: budterm
915 real(DP) :: ratin, ratout
919 budtxt(1) =
'FLOW-JA-FACE-CHD'
922 if (
associated(this%gwfmodel1))
then
927 if (this%gwfmodel1%ibound(n) < 0)
then
936 budterm(1, 1) = ratin
937 budterm(2, 1) = ratout
938 call this%gwfmodel1%model_bdentry(budterm, budtxt, this%name)
942 if (
associated(this%gwfmodel2))
then
947 if (this%gwfmodel2%ibound(n) < 0)
then
957 budterm(1, 1) = ratin
958 budterm(2, 1) = ratout
959 call this%gwfmodel2%model_bdentry(budterm, budtxt, this%name)
971 integer(I4B) :: icbcfl, ibudfl
974 if (
associated(this%gwfmodel1))
then
975 call this%gwf_gwf_bdsav_model(this%gwfmodel1)
979 if (
associated(this%gwfmodel2))
then
980 call this%gwf_gwf_bdsav_model(this%gwfmodel2)
989 if (this%inmvr > 0)
call this%mvr%mvr_bdsav(icbcfl, ibudfl, 0)
992 if (this%inobs /= 0)
then
993 call this%gwf_gwf_save_simvals()
1005 character(len=LENPACKAGENAME + 4) :: packname
1006 character(len=LENBUDTXT),
dimension(1) :: budtxt
1009 character(len=20) :: nodestr
1010 character(len=LENBOUNDNAME) :: bname
1011 integer(I4B) :: ntabrows
1012 integer(I4B) :: nodeu
1013 integer(I4B) :: i, n1, n2, n1u, n2u
1014 integer(I4B) :: ibinun
1015 real(DP) :: ratin, ratout, rrate
1016 logical(LGP) :: is_for_model1
1017 real(DP),
dimension(this%naux) :: auxrow
1019 budtxt(1) =
' FLOW-JA-FACE'
1020 packname =
'EXG '//this%name
1021 packname = adjustr(packname)
1022 if (
associated(model, this%gwfmodel1))
then
1023 output_tab => this%outputtab1
1024 nbr_model => this%v_model2
1025 is_for_model1 = .true.
1027 output_tab => this%outputtab2
1028 nbr_model => this%v_model1
1029 is_for_model1 = .false.
1033 if (this%iprflow /= 0)
then
1036 if (model%oc%oc_save(
'BUDGET'))
then
1037 call output_tab%set_title(packname)
1041 call output_tab%set_kstpkper(
kstp,
kper)
1050 if (this%v_model1%ibound%get(n1) /= 0 .and. &
1051 this%v_model2%ibound%get(n2) /= 0)
then
1052 ntabrows = ntabrows + 1
1055 if (ntabrows > 0)
then
1056 call output_tab%set_maxbound(ntabrows)
1063 if (this%ipakcb /= 0)
then
1064 ibinun = model%oc%oc_save_unit(
'BUDGET')
1071 if (.not. model%oc%oc_save(
'BUDGET')) ibinun = 0
1074 if (ibinun /= 0)
then
1075 call model%dis%record_srcdst_list_header(budtxt(1), &
1080 this%naux, this%auxname, &
1081 ibinun, this%nexg, &
1093 if (this%inamedbound > 0)
then
1094 bname = this%boundname(i)
1105 if (this%v_model1%ibound%get(n1) /= 0 .and. &
1106 this%v_model2%ibound%get(n2) /= 0)
then
1107 rrate = this%simvals(i)
1110 if (this%iprflow /= 0)
then
1111 if (model%oc%oc_save(
'BUDGET'))
then
1114 if (is_for_model1)
then
1115 nodeu = model%dis%get_nodeuser(n1)
1116 call model%dis%nodeu_to_string(nodeu, nodestr)
1117 call output_tab%print_list_entry(i, trim(adjustl(nodestr)), &
1120 nodeu = model%dis%get_nodeuser(n2)
1121 call model%dis%nodeu_to_string(nodeu, nodestr)
1122 call output_tab%print_list_entry(i, trim(adjustl(nodestr)), &
1127 if (rrate <
dzero)
then
1128 ratout = ratout - rrate
1130 ratin = ratin + rrate
1135 n1u = this%v_model1%dis_get_nodeuser(n1)
1136 n2u = this%v_model2%dis_get_nodeuser(n2)
1137 if (ibinun /= 0)
then
1138 if (this%naux > 0)
then
1139 auxrow(:) = this%auxvar(:, i)
1141 if (is_for_model1)
then
1142 call model%dis%record_mf6_list_entry(ibinun, n1u, n2u, rrate, &
1143 this%naux, auxrow, &
1146 call model%dis%record_mf6_list_entry(ibinun, n2u, n1u, -rrate, &
1147 this%naux, auxrow, &
1166 integer(I4B) :: iexg, n1, n2
1167 integer(I4B) :: ibudfl
1168 real(DP) :: flow, deltaqgnc
1169 character(len=LINELENGTH) :: node1str, node2str
1171 character(len=*),
parameter :: fmtheader = &
1172 "(/1x, 'SUMMARY OF EXCHANGE RATES FOR EXCHANGE ', a, ' WITH ID ', i0, /, &
1173 &2a16, 5a16, /, 112('-'))"
1174 character(len=*),
parameter :: fmtheader2 = &
1175 "(/1x, 'SUMMARY OF EXCHANGE RATES FOR EXCHANGE ', a, ' WITH ID ', i0, /, &
1176 &2a16, 4a16, /, 96('-'))"
1177 character(len=*),
parameter :: fmtdata = &
1178 "(2a16, 5(1pg16.6))"
1181 call this%gwf_gwf_bdsav()
1187 if (this%iprflow /= 0)
then
1188 if (this%ingnc > 0)
then
1189 write (
iout, fmtheader) trim(adjustl(this%name)), this%id,
'NODEM1', &
1190 'NODEM2',
'COND',
'X_M1',
'X_M2',
'DELTAQGNC', &
1193 write (
iout, fmtheader2) trim(adjustl(this%name)), this%id,
'NODEM1', &
1194 'NODEM2',
'COND',
'X_M1',
'X_M2',
'FLOW'
1196 do iexg = 1, this%nexg
1197 n1 = this%nodem1(iexg)
1198 n2 = this%nodem2(iexg)
1199 flow = this%simvals(iexg)
1200 call this%v_model1%dis_noder_to_string(n1, node1str)
1201 call this%v_model2%dis_noder_to_string(n2, node2str)
1203 if (this%ingnc > 0)
then
1204 deltaqgnc = this%gnc%deltaqgnc(iexg)
1205 write (
iout, fmtdata) trim(adjustl(node1str)), &
1206 trim(adjustl(node2str)), &
1207 this%cond(iexg), this%v_model1%x%get(n1), &
1208 this%v_model2%x%get(n2), deltaqgnc, flow
1210 write (
iout, fmtdata) trim(adjustl(node1str)), &
1211 trim(adjustl(node2str)), &
1212 this%cond(iexg), this%v_model1%x%get(n1), &
1213 this%v_model2%x%get(n2), flow
1220 if (this%inmvr > 0)
call this%mvr%mvr_ot_bdsummary(ibudfl)
1223 call this%obs%obs_ot()
1240 integer(I4B),
intent(in) :: iout
1243 character(len=LENVARNAME),
dimension(3) :: cellavg_method = &
1244 &[character(len=LENVARNAME) ::
'HARMONIC',
'LOGARITHMIC',
'AMT-LMK']
1245 character(len=linelength) :: gnc_fname, mvr_fname
1248 call mem_set_value(this%icellavg,
'CELL_AVERAGING', this%input_mempath, &
1249 cellavg_method, found%cell_averaging)
1250 call mem_set_value(this%inewton,
'NEWTON', this%input_mempath, found%newton)
1251 call mem_set_value(this%ixt3d,
'XT3D', this%input_mempath, found%xt3d)
1252 call mem_set_value(this%ivarcv,
'VARIABLECV', this%input_mempath, &
1254 call mem_set_value(this%idewatcv,
'DEWATERED', this%input_mempath, &
1257 write (iout,
'(1x,a)')
'PROCESSING GWF-GWF EXCHANGE OPTIONS'
1260 call this%DisConnExchangeType%source_options(iout)
1262 if (found%cell_averaging)
then
1263 if (this%icellavg == 0)
then
1264 call store_error(
'Unrecognized input value for CELL_AVERAGING option.')
1268 this%icellavg = this%icellavg - 1
1269 write (iout,
'(4x,a,a)') &
1270 'CELL AVERAGING METHOD HAS BEEN SET TO: ', &
1271 trim(cellavg_method(this%icellavg + 1))
1275 if (found%newton)
then
1276 write (iout,
'(4x,a)') &
1277 'NEWTON-RAPHSON method used for unconfined cells'
1280 if (found%xt3d)
then
1281 write (iout,
'(4x,a)')
'XT3D WILL BE APPLIED ON THE INTERFACE'
1284 if (found%variablecv)
then
1285 write (iout,
'(4x,a)') &
1286 'VERTICAL CONDUCTANCE VARIES WITH WATER TABLE.'
1289 if (found%dewatered)
then
1290 write (iout,
'(4x,a)') &
1291 'VERTICAL CONDUCTANCE ACCOUNTS FOR DEWATERED PORTION OF '// &
1292 'AN UNDERLYING CELL.'
1296 if (
filein_fname(gnc_fname,
'GNC6_FILENAME', this%input_mempath, &
1297 this%filename))
then
1299 call openfile(this%ingnc, iout, gnc_fname,
'GNC')
1300 write (iout,
'(4x,a)') &
1301 'GHOST NODES WILL BE READ FROM ', trim(gnc_fname)
1305 if (
filein_fname(mvr_fname,
'MVR6_FILENAME', this%input_mempath, &
1306 this%filename))
then
1308 call openfile(this%inmvr, iout, mvr_fname,
'MVR')
1309 write (iout,
'(4x,a)') &
1310 'WATER MOVER INFORMATION WILL BE READ FROM ', trim(mvr_fname)
1314 if (.not. this%is_datacopy)
then
1315 if (
filein_fname(this%obs%inputFilename,
'OBS6_FILENAME', &
1316 this%input_mempath, this%filename))
then
1317 this%obs%active = .true.
1318 this%obs%inUnitObs =
getunit()
1319 call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename,
'OBS')
1323 write (iout,
'(1x,a)')
'END OF GWF-GWF EXCHANGE OPTIONS'
1326 if (this%inewton > 0)
then
1327 this%satomega =
dem6
1341 integer(I4B) :: i, nm1, nm2, nmgnc1, nmgnc2
1342 character(len=*),
parameter :: fmterr = &
1343 "('EXCHANGE NODES ', i0, ' AND ', i0,"// &
1344 "' NOT CONSISTENT WITH GNC NODES ', "// &
1349 call this%gnc%gnc_df(this%gwfmodel1, m2=this%gwfmodel2)
1352 if (.not. this%gnc%implicit .and. this%inewton /= 0)
then
1353 call store_error(
'GNC is explicit, but GWF exchange has active newton.')
1354 call store_error(
'Add implicit option to GNC or remove NEWTON from '// &
1360 if (this%nexg /= this%gnc%nexg)
then
1361 call store_error(
'Number of exchanges does not match number of GNCs')
1367 if (this%nodem1(i) /= this%gnc%nodem1(i) .or. &
1368 this%nodem2(i) /= this%gnc%nodem2(i))
then
1369 nm1 = this%gwfmodel1%dis%get_nodeuser(this%nodem1(i))
1370 nm2 = this%gwfmodel2%dis%get_nodeuser(this%nodem2(i))
1371 nmgnc1 = this%gwfmodel1%dis%get_nodeuser(this%gnc%nodem1(i))
1372 nmgnc2 = this%gwfmodel2%dis%get_nodeuser(this%gnc%nodem2(i))
1373 write (
errmsg, fmterr) nm1, nm2, nmgnc1, nmgnc2
1394 integer(I4B),
intent(in) :: iout
1405 if (this%v_model1%is_local)
then
1406 dis => this%gwfmodel1%dis
1407 else if (this%v_model2%is_local)
then
1408 dis => this%gwfmodel2%dis
1410 call exg_mvr_cr(this%mvr, this%name, this%inmvr, iout, dis)
1411 this%mvr%model1 => this%v_model1
1412 this%mvr%model2 => this%v_model2
1413 this%mvr%suppress_fileout = this%is_datacopy
1425 integer(I4B),
intent(in) :: kiter
1427 integer(I4B) :: iexg
1428 integer(I4B) :: n, m
1429 integer(I4B) :: ibdn, ibdm
1432 integer(I4B) :: irewet
1433 character(len=30) :: nodestrn, nodestrm
1434 character(len=*),
parameter :: fmtrwt = &
1435 "(1x, 'CELL ',A,' REWET FROM GWF MODEL ',A,' CELL ',A, &
1436 &' FOR ITER. ',I0, ' STEP ',I0, ' PERIOD ', I0)"
1439 do iexg = 1, this%nexg
1440 n = this%nodem1(iexg)
1441 m = this%nodem2(iexg)
1442 hn = this%gwfmodel1%x(n)
1443 hm = this%gwfmodel2%x(m)
1444 ibdn = this%gwfmodel1%ibound(n)
1445 ibdm = this%gwfmodel2%ibound(m)
1446 ihc = this%ihc(iexg)
1447 call this%gwfmodel1%npf%rewet_check(kiter, n, hm, ibdm, ihc, &
1448 this%gwfmodel1%x, irewet)
1449 if (irewet == 1)
then
1450 call this%gwfmodel1%dis%noder_to_string(n, nodestrn)
1451 call this%gwfmodel2%dis%noder_to_string(m, nodestrm)
1452 write (this%gwfmodel1%iout, fmtrwt) trim(nodestrn), &
1453 trim(this%gwfmodel2%name), trim(nodestrm), kiter,
kstp,
kper
1455 call this%gwfmodel2%npf%rewet_check(kiter, m, hn, ibdn, ihc, &
1456 this%gwfmodel2%x, irewet)
1457 if (irewet == 1)
then
1458 call this%gwfmodel1%dis%noder_to_string(n, nodestrm)
1459 call this%gwfmodel2%dis%noder_to_string(m, nodestrn)
1460 write (this%gwfmodel2%iout, fmtrwt) trim(nodestrn), &
1461 trim(this%gwfmodel1%name), trim(nodestrm), kiter,
kstp,
kper
1465 end subroutine rewet
1474 integer(I4B) :: iexg
1475 integer(I4B) :: n, m, ihc
1476 real(DP) :: topn, topm
1477 real(DP) :: botn, botm
1478 real(DP) :: satn, satm
1479 real(DP) :: thickn, thickm
1480 real(DP) :: angle, hyn, hym
1483 real(DP),
dimension(3) :: vg
1485 do iexg = 1, this%nexg
1487 ihc = this%ihc(iexg)
1488 n = this%nodem1(iexg)
1489 m = this%nodem2(iexg)
1490 topn = this%gwfmodel1%dis%top(n)
1491 topm = this%gwfmodel2%dis%top(m)
1492 botn = this%gwfmodel1%dis%bot(n)
1493 botm = this%gwfmodel2%dis%bot(m)
1494 satn = this%gwfmodel1%npf%sat(n)
1495 satm = this%gwfmodel2%npf%sat(m)
1496 thickn = (topn - botn) * satn
1497 thickm = (topm - botm) * satm
1506 hyn = this%gwfmodel1%npf%hy_eff(n, 0, ihc, vg=vg)
1507 hym = this%gwfmodel2%npf%hy_eff(m, 0, ihc, vg=vg)
1508 csat =
vcond(1, 1, 1, 1, 0, 1, 1,
done, &
1518 hyn = this%gwfmodel1%npf%k11(n)
1519 hym = this%gwfmodel2%npf%k11(m)
1522 if (this%ianglex > 0)
then
1523 angle = this%auxvar(this%ianglex, iexg) *
dpio180
1524 vg(1) = abs(cos(angle))
1525 vg(2) = abs(sin(angle))
1529 if (this%gwfmodel1%npf%ik22 /= 0)
then
1530 hyn = this%gwfmodel1%npf%hy_eff(n, 0, ihc, vg=vg)
1534 if (this%gwfmodel2%npf%ik22 /= 0)
then
1535 hym = this%gwfmodel2%npf%hy_eff(m, 0, ihc, vg=vg)
1539 fawidth = this%hwva(iexg)
1540 csat =
hcond(1, 1, 1, 1, 0, ihc, &
1541 this%icellavg,
done, &
1542 topn, topm, satn, satm, hyn, hym, &
1545 this%cl1(iexg), this%cl2(iexg), &
1550 this%condsat(iexg) = csat
1565 integer(I4B) :: iexg
1566 integer(I4B) :: n, m, ihc
1567 integer(I4B) :: ibdn, ibdm
1568 integer(I4B) :: ictn, ictm
1569 real(DP) :: topn, topm
1570 real(DP) :: botn, botm
1571 real(DP) :: satn, satm
1572 real(DP) :: hyn, hym
1577 real(DP),
dimension(3) :: vg
1580 do iexg = 1, this%nexg
1581 ihc = this%ihc(iexg)
1582 n = this%nodem1(iexg)
1583 m = this%nodem2(iexg)
1584 ibdn = this%gwfmodel1%ibound(n)
1585 ibdm = this%gwfmodel2%ibound(m)
1586 ictn = this%gwfmodel1%npf%icelltype(n)
1587 ictm = this%gwfmodel2%npf%icelltype(m)
1588 topn = this%gwfmodel1%dis%top(n)
1589 topm = this%gwfmodel2%dis%top(m)
1590 botn = this%gwfmodel1%dis%bot(n)
1591 botm = this%gwfmodel2%dis%bot(m)
1592 satn = this%gwfmodel1%npf%sat(n)
1593 satm = this%gwfmodel2%npf%sat(m)
1594 hn = this%gwfmodel1%x(n)
1595 hm = this%gwfmodel2%x(m)
1604 hyn = this%gwfmodel1%npf%hy_eff(n, 0, ihc, vg=vg)
1605 hym = this%gwfmodel2%npf%hy_eff(m, 0, ihc, vg=vg)
1606 cond =
vcond(ibdn, ibdm, ictn, ictm, this%inewton, this%ivarcv, &
1607 this%idewatcv, this%condsat(iexg), hn, hm, hyn, hym, &
1608 satn, satm, topn, topm, botn, botm, this%hwva(iexg))
1612 hyn = this%gwfmodel1%npf%k11(n)
1613 hym = this%gwfmodel2%npf%k11(m)
1616 if (this%ianglex > 0)
then
1617 angle = this%auxvar(this%ianglex, iexg)
1618 vg(1) = abs(cos(angle))
1619 vg(2) = abs(sin(angle))
1623 if (this%gwfmodel1%npf%ik22 /= 0)
then
1624 hyn = this%gwfmodel1%npf%hy_eff(n, 0, ihc, vg=vg)
1628 if (this%gwfmodel2%npf%ik22 /= 0)
then
1629 hym = this%gwfmodel2%npf%hy_eff(m, 0, ihc, vg=vg)
1633 fawidth = this%hwva(iexg)
1634 cond =
hcond(ibdn, ibdm, ictn, ictm, this%inewton, &
1635 this%ihc(iexg), this%icellavg, this%condsat(iexg), &
1636 hn, hm, satn, satm, hyn, hym, topn, topm, botn, botm, &
1637 this%cl1(iexg), this%cl2(iexg), fawidth)
1640 this%cond(iexg) = cond
1656 call this%DisConnExchangeType%allocate_scalars()
1658 call mem_allocate(this%icellavg,
'ICELLAVG', this%memoryPath)
1659 call mem_allocate(this%ivarcv,
'IVARCV', this%memoryPath)
1660 call mem_allocate(this%idewatcv,
'IDEWATCV', this%memoryPath)
1661 call mem_allocate(this%inewton,
'INEWTON', this%memoryPath)
1662 call mem_allocate(this%ingnc,
'INGNC', this%memoryPath)
1663 call mem_allocate(this%inmvr,
'INMVR', this%memoryPath)
1664 call mem_allocate(this%inobs,
'INOBS', this%memoryPath)
1665 call mem_allocate(this%satomega,
'SATOMEGA', this%memoryPath)
1673 this%satomega =
dzero
1687 if (this%ingnc > 0)
then
1688 call this%gnc%gnc_da()
1689 deallocate (this%gnc)
1691 if (this%inmvr > 0)
then
1692 call this%mvr%mvr_da()
1693 deallocate (this%mvr)
1695 call this%obs%obs_da()
1696 deallocate (this%obs)
1706 if (
associated(this%outputtab1))
then
1707 call this%outputtab1%table_da()
1708 deallocate (this%outputtab1)
1709 nullify (this%outputtab1)
1711 if (
associated(this%outputtab2))
then
1712 call this%outputtab2%table_da()
1713 deallocate (this%outputtab2)
1714 nullify (this%outputtab2)
1718 deallocate (this%filename)
1730 call this%DisConnExchangeType%disconnex_da()
1743 character(len=LINELENGTH) :: text
1744 integer(I4B) :: ntabcol, i
1746 call this%DisConnExchangeType%allocate_arrays()
1748 call mem_allocate(this%cond, this%nexg,
'COND', this%memoryPath)
1749 call mem_allocate(this%idxglo, this%nexg,
'IDXGLO', this%memoryPath)
1750 call mem_allocate(this%idxsymglo, this%nexg,
'IDXSYMGLO', this%memoryPath)
1751 call mem_allocate(this%condsat, this%nexg,
'CONDSAT', this%memoryPath)
1752 call mem_allocate(this%simvals, this%nexg,
'SIMVALS', this%memoryPath)
1760 if (this%iprflow /= 0)
then
1764 if (this%inamedbound > 0)
then
1765 ntabcol = ntabcol + 1
1770 if (this%v_model1%is_local)
then
1771 call table_cr(this%outputtab1, this%name,
' ')
1772 call this%outputtab1%table_df(this%nexg, ntabcol, this%gwfmodel1%iout, &
1775 call this%outputtab1%initialize_column(text, 10, alignment=
tabcenter)
1777 call this%outputtab1%initialize_column(text, 20, alignment=
tableft)
1779 call this%outputtab1%initialize_column(text, 15, alignment=
tabcenter)
1780 if (this%inamedbound > 0)
then
1782 call this%outputtab1%initialize_column(text, 20, alignment=
tableft)
1786 if (this%v_model2%is_local)
then
1787 call table_cr(this%outputtab2, this%name,
' ')
1788 call this%outputtab2%table_df(this%nexg, ntabcol, this%gwfmodel2%iout, &
1791 call this%outputtab2%initialize_column(text, 10, alignment=
tabcenter)
1793 call this%outputtab2%initialize_column(text, 20, alignment=
tableft)
1795 call this%outputtab2%initialize_column(text, 15, alignment=
tabcenter)
1796 if (this%inamedbound > 0)
then
1798 call this%outputtab2%initialize_column(text, 20, alignment=
tableft)
1812 integer(I4B) :: indx
1816 call this%obs%StoreObsType(
'flow-ja-face', .true., indx)
1833 character(len=LENBOUNDNAME) :: bname
1836 10
format(
'Exchange "', a,
'" for observation "', a, &
1837 '" is invalid in package "', a,
'"')
1838 20
format(
'Exchange id "', i0,
'" for observation "', a, &
1839 '" is invalid in package "', a,
'"')
1841 do i = 1, this%obs%npakobs
1842 obsrv => this%obs%pakobs(i)%obsrv
1847 call obsrv%ResetObsIndex()
1848 obsrv%BndFound = .false.
1850 bname = obsrv%FeatureName
1851 if (bname /=
'')
then
1857 if (this%boundname(j) == bname)
then
1859 obsrv%BndFound = .true.
1860 obsrv%CurrentTimeStepEndValue =
dzero
1861 call obsrv%AddObsIndex(j)
1864 if (.not. jfound)
then
1865 write (
errmsg, 10) trim(bname), trim(obsrv%ObsTypeId), trim(this%name)
1870 if (obsrv%intPak1 <= this%nexg .and. obsrv%intPak1 > 0)
then
1872 obsrv%BndFound = .true.
1873 obsrv%CurrentTimeStepEndValue =
dzero
1874 call obsrv%AddObsIndex(obsrv%intPak1)
1878 if (.not. jfound)
then
1879 write (
errmsg, 20) obsrv%intPak1, trim(obsrv%ObsTypeId), trim(this%name)
1909 integer(I4B),
intent(in) :: iexg
1910 integer(I4B),
intent(in) :: n1
1911 integer(I4B),
intent(in) :: n2
1915 qcalc = this%cond(iexg) * (this%gwfmodel2%x(n2) - this%gwfmodel1%x(n1))
1927 integer(I4B) :: iasym
1933 if (this%inewton /= 0) iasym = 1
1936 if (this%ingnc > 0)
then
1937 if (this%gnc%iasym /= 0) iasym = 1
1949 logical(LGP) :: is_connected
1951 is_connected = .false.
1956 if (
associated(this%gwfmodel1, model))
then
1957 is_connected = .true.
1958 else if (
associated(this%gwfmodel2, model))
then
1959 is_connected = .true.
1971 logical(LGP) :: use_im
1973 integer(I4B) :: inbuy_m1
1975 use_im = this%DisConnExchangeType%use_interface_model()
1976 use_im = use_im .or. (this%ixt3d > 0)
1979 select type (m => this%v_model1)
1981 inbuy_m1 = m%inbuy%get()
1983 use_im = use_im .or. (inbuy_m1 > 0)
2002 integer(I4B) :: iexg
2007 if (this%obs%npakobs > 0)
then
2008 call this%obs%obs_bd_clear()
2009 do i = 1, this%obs%npakobs
2010 obsrv => this%obs%pakobs(i)%obsrv
2011 do j = 1, obsrv%indxbnds_count
2012 iexg = obsrv%indxbnds(j)
2014 select case (obsrv%ObsTypeId)
2015 case (
'FLOW-JA-FACE')
2016 n1 = this%nodem1(iexg)
2017 n2 = this%nodem2(iexg)
2018 v = this%simvals(iexg)
2020 errmsg =
'Unrecognized observation type: '// &
2021 trim(obsrv%ObsTypeId)
2025 call this%obs%SaveOneSimval(obsrv, v)
2044 integer(I4B),
intent(in) :: inunitobs
2045 integer(I4B),
intent(in) :: iout
2047 integer(I4B) :: n, iexg, istat
2048 integer(I4B) :: icol, istart, istop
2050 character(len=LINELENGTH) :: string
2052 string = obsrv%IDstring
2055 call urword(string, icol, istart, istop, 1, n, r, iout, inunitobs)
2056 read (string(istart:istop),
'(i10)', iostat=istat) iexg
2057 if (istat == 0)
then
2058 obsrv%intPak1 = iexg
2062 obsrv%FeatureName = trim(adjustl(string))
2066 obsrv%intPak1 = namedboundflag
2077 class(*),
pointer,
intent(inout) :: obj
2082 if (.not.
associated(obj))
return
2097 type(
listtype),
intent(inout) :: list
2098 integer(I4B),
intent(in) :: idx
2102 class(*),
pointer :: obj
2104 obj => list%GetItem(idx)
subroutine, public addbaseexchangetolist(list, exchange)
Add the exchange object (BaseExchangeType) to a list.
class(basemodeltype) function, pointer, public getbasemodelfromlist(list, idx)
This module contains the BudgetModule.
subroutine, public rate_accumulator(flow, rin, rout)
@ brief Rate accumulator subroutine
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
@ tabcenter
centered table column
@ tableft
left justified table column
integer(i4b), parameter lenpackagename
maximum length of the package name
integer(i4b), parameter namedboundflag
named bound flag
real(dp), parameter dnodata
real no data constant
integer(i4b), parameter lenvarname
maximum length of a variable name
real(dp), parameter dhalf
real constant 1/2
integer(i4b), parameter lenauxname
maximum length of a aux variable
integer(i4b), parameter lenboundname
maximum length of a bound name
real(dp), parameter dpio180
real constant
real(dp), parameter dem6
real constant 1e-6
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, public gnc_cr(gncobj, name_parent, inunit, iout)
Create new GNC exchange object.
This module contains stateless conductance functions.
real(dp) function, public thksatnm(ibdn, ibdm, ictn, ictm, iupstream, ihc, hn, hm, satn, satm, topn, topm, botn, botm)
Calculate wetted cell thickness at interface between two cells.
real(dp) function, public condmean(k1, k2, thick1, thick2, cl1, cl2, width, iavgmeth)
Calculate the conductance between two cells.
real(dp) function, public hcond(ibdn, ibdm, ictn, ictm, iupstream, ihc, icellavg, condsat, hn, hm, satn, satm, hkn, hkm, topn, topm, botn, botm, cln, clm, fawidth)
Horizontal conductance between two cells.
real(dp) function, public vcond(ibdn, ibdm, ictn, ictm, inewton, ivarcv, idewatcv, condsat, hn, hm, vkn, vkm, satn, satm, topn, topm, botn, botm, flowarea)
Vertical conductance between two cells.
subroutine, public exg_mvr_cr(exg_mvr, name_parent, inunit, iout, dis)
This module contains the GwfGwfExchangeModule Module.
integer(i4b) function gwf_gwf_get_iasym(this)
@ brief Set symmetric flag
subroutine gwf_gwf_fp(this)
@ brief Final processing
subroutine gwf_gwf_cq(this, icnvg, isuppress_output, isolnid)
@ brief Calculate flow
class(gwfexchangetype) function, pointer, public getgwfexchangefromlist(list, idx)
@ brief Get exchange from list
subroutine gwf_gwf_process_obsid(obsrv, dis, inunitobs, iout)
@ brief Obs ID processor
subroutine rewet(this, kiter)
@ brief Rewet
subroutine gwf_gwf_add_to_flowja(this)
Add exchange flow to each model flowja diagonal position so that residual is calculated correctly.
subroutine gwf_gwf_ac(this, sparse)
@ brief Add connections
subroutine gwf_gwf_save_simvals(this)
@ brief Save simulated flow observations
subroutine calc_cond_sat(this)
logical(lgp) function use_interface_model(this)
Should interface model be used for this exchange.
subroutine gwf_gwf_ar(this)
@ brief Allocate and read
subroutine gwf_gwf_bdsav(this)
@ brief Budget save
subroutine gwf_gwf_ad(this)
@ brief Advance
subroutine gwf_gwf_fn(this, kiter, matrix_sln)
@ brief Fill Newton
subroutine gwf_gwf_fc(this, kiter, matrix_sln, rhs_sln, inwtflag)
@ brief Fill coefficients
subroutine gwf_gwf_bd(this, icnvg, isuppress_output, isolnid)
@ brief Budget
subroutine allocate_scalars(this)
@ brief Allocate scalars
subroutine gwf_gwf_da(this)
@ brief Deallocate
subroutine gwf_gwf_rp(this)
@ brief Read and prepare
real(dp) function qcalc(this, iexg, n1, n2)
@ brief Calculate flow
subroutine gwf_gwf_df(this)
@ brief Define GWF GWF exchange
subroutine gwf_gwf_df_obs(this)
@ brief Define observations
logical(lgp) function gwf_gwf_connects_model(this, model)
Return true when this exchange provides matrix coefficients for solving.
subroutine gwf_gwf_set_flow_to_npf(this)
Set flow rates to the edges in the models.
subroutine gwf_gwf_ot(this)
@ brief Output
subroutine allocate_arrays(this)
@ brief Allocate arrays
subroutine validate_exchange(this)
validate exchange data after reading
class(gwfexchangetype) function, pointer, public castasgwfexchange(obj)
@ brief Cast polymorphic object as exchange
subroutine gwf_gwf_rp_obs(this)
@ brief Read and prepare observations
subroutine, public gwfexchange_create(filename, name, id, m1_id, m2_id, input_mempath)
@ brief Create GWF GWF exchange
subroutine gwf_gwf_mc(this, matrix_sln)
@ brief Map connections
subroutine gwf_gwf_cf(this, kiter)
@ brief Calculate coefficients
subroutine gwf_gwf_bdsav_model(this, model)
subroutine gwf_gwf_calc_simvals(this)
Calculate flow rates for the exchanges and store them in a member array.
subroutine gwf_gwf_chd_bd(this)
@ brief gwf-gwf-chd-bd
subroutine read_mvr(this, iout)
@ brief Read mover
subroutine condcalc(this)
@ brief Calculate the conductance
subroutine read_gnc(this)
@ brief Read ghost nodes
subroutine source_options(this, iout)
@ brief Source options
This module defines variable data types.
type(listtype), public basemodellist
type(listtype), public baseexchangelist
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains the derived types ObserveType and ObsDataType.
This module contains the derived type ObsType.
subroutine, public obs_cr(obs, inobs)
@ brief Create a new ObsType object
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.
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
integer(i4b), dimension(:), allocatable model_loc_idx
equals the local index into the basemodel list (-1 when not available)
integer(i4b) iout
file unit number for simulation output
real(dp) function squadraticsaturationderivative(top, bot, x, eps)
@ brief Derivative of the quadratic saturation function
This module contains the SourceCommonModule.
logical(lgp) function, public filein_fname(filename, tagname, input_mempath, input_fname)
enforce and set a single input filename provided via FILEIN keyword
subroutine, public table_cr(this, name, title)
logical(lgp), pointer, public readnewdata
flag indicating time to read new data
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
Highest level model type. All models extend this parent type.
This class is used to store a single deferred-length character string. It was designed to work in an ...
Exchange based on connection between discretizations of DisBaseType. The data specifies the connectio...
Extends model mover for exchanges to also handle the.
Derived type for GwfExchangeType.
A generic heterogeneous doubly-linked list.