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
1264 this%icellavg = this%icellavg - 1
1265 write (iout,
'(4x,a,a)') &
1266 'CELL AVERAGING METHOD HAS BEEN SET TO: ', &
1267 trim(cellavg_method(this%icellavg + 1))
1270 if (found%newton)
then
1271 write (iout,
'(4x,a)') &
1272 'NEWTON-RAPHSON method used for unconfined cells'
1275 if (found%xt3d)
then
1276 write (iout,
'(4x,a)')
'XT3D WILL BE APPLIED ON THE INTERFACE'
1279 if (found%variablecv)
then
1280 write (iout,
'(4x,a)') &
1281 'VERTICAL CONDUCTANCE VARIES WITH WATER TABLE.'
1284 if (found%dewatered)
then
1285 write (iout,
'(4x,a)') &
1286 'VERTICAL CONDUCTANCE ACCOUNTS FOR DEWATERED PORTION OF '// &
1287 'AN UNDERLYING CELL.'
1291 if (
filein_fname(gnc_fname,
'GNC6_FILENAME', this%input_mempath, &
1292 this%filename))
then
1294 call openfile(this%ingnc, iout, gnc_fname,
'GNC')
1295 write (iout,
'(4x,a)') &
1296 'GHOST NODES WILL BE READ FROM ', trim(gnc_fname)
1300 if (
filein_fname(mvr_fname,
'MVR6_FILENAME', this%input_mempath, &
1301 this%filename))
then
1303 call openfile(this%inmvr, iout, mvr_fname,
'MVR')
1304 write (iout,
'(4x,a)') &
1305 'WATER MOVER INFORMATION WILL BE READ FROM ', trim(mvr_fname)
1309 if (.not. this%is_datacopy)
then
1310 if (
filein_fname(this%obs%inputFilename,
'OBS6_FILENAME', &
1311 this%input_mempath, this%filename))
then
1312 this%obs%active = .true.
1313 this%obs%inUnitObs =
getunit()
1314 call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename,
'OBS')
1318 write (iout,
'(1x,a)')
'END OF GWF-GWF EXCHANGE OPTIONS'
1321 if (this%inewton > 0)
then
1322 this%satomega =
dem6
1336 integer(I4B) :: i, nm1, nm2, nmgnc1, nmgnc2
1337 character(len=*),
parameter :: fmterr = &
1338 "('EXCHANGE NODES ', i0, ' AND ', i0,"// &
1339 "' NOT CONSISTENT WITH GNC NODES ', "// &
1344 call this%gnc%gnc_df(this%gwfmodel1, m2=this%gwfmodel2)
1347 if (.not. this%gnc%implicit .and. this%inewton /= 0)
then
1348 call store_error(
'GNC is explicit, but GWF exchange has active newton.')
1349 call store_error(
'Add implicit option to GNC or remove NEWTON from '// &
1355 if (this%nexg /= this%gnc%nexg)
then
1356 call store_error(
'Number of exchanges does not match number of GNCs')
1362 if (this%nodem1(i) /= this%gnc%nodem1(i) .or. &
1363 this%nodem2(i) /= this%gnc%nodem2(i))
then
1364 nm1 = this%gwfmodel1%dis%get_nodeuser(this%nodem1(i))
1365 nm2 = this%gwfmodel2%dis%get_nodeuser(this%nodem2(i))
1366 nmgnc1 = this%gwfmodel1%dis%get_nodeuser(this%gnc%nodem1(i))
1367 nmgnc2 = this%gwfmodel2%dis%get_nodeuser(this%gnc%nodem2(i))
1368 write (
errmsg, fmterr) nm1, nm2, nmgnc1, nmgnc2
1389 integer(I4B),
intent(in) :: iout
1400 if (this%v_model1%is_local)
then
1401 dis => this%gwfmodel1%dis
1402 else if (this%v_model2%is_local)
then
1403 dis => this%gwfmodel2%dis
1405 call exg_mvr_cr(this%mvr, this%name, this%inmvr, iout, dis)
1406 this%mvr%model1 => this%v_model1
1407 this%mvr%model2 => this%v_model2
1408 this%mvr%suppress_fileout = this%is_datacopy
1420 integer(I4B),
intent(in) :: kiter
1422 integer(I4B) :: iexg
1423 integer(I4B) :: n, m
1424 integer(I4B) :: ibdn, ibdm
1427 integer(I4B) :: irewet
1428 character(len=30) :: nodestrn, nodestrm
1429 character(len=*),
parameter :: fmtrwt = &
1430 "(1x, 'CELL ',A,' REWET FROM GWF MODEL ',A,' CELL ',A, &
1431 &' FOR ITER. ',I0, ' STEP ',I0, ' PERIOD ', I0)"
1434 do iexg = 1, this%nexg
1435 n = this%nodem1(iexg)
1436 m = this%nodem2(iexg)
1437 hn = this%gwfmodel1%x(n)
1438 hm = this%gwfmodel2%x(m)
1439 ibdn = this%gwfmodel1%ibound(n)
1440 ibdm = this%gwfmodel2%ibound(m)
1441 ihc = this%ihc(iexg)
1442 call this%gwfmodel1%npf%rewet_check(kiter, n, hm, ibdm, ihc, &
1443 this%gwfmodel1%x, irewet)
1444 if (irewet == 1)
then
1445 call this%gwfmodel1%dis%noder_to_string(n, nodestrn)
1446 call this%gwfmodel2%dis%noder_to_string(m, nodestrm)
1447 write (this%gwfmodel1%iout, fmtrwt) trim(nodestrn), &
1448 trim(this%gwfmodel2%name), trim(nodestrm), kiter,
kstp,
kper
1450 call this%gwfmodel2%npf%rewet_check(kiter, m, hn, ibdn, ihc, &
1451 this%gwfmodel2%x, irewet)
1452 if (irewet == 1)
then
1453 call this%gwfmodel1%dis%noder_to_string(n, nodestrm)
1454 call this%gwfmodel2%dis%noder_to_string(m, nodestrn)
1455 write (this%gwfmodel2%iout, fmtrwt) trim(nodestrn), &
1456 trim(this%gwfmodel1%name), trim(nodestrm), kiter,
kstp,
kper
1460 end subroutine rewet
1469 integer(I4B) :: iexg
1470 integer(I4B) :: n, m, ihc
1471 real(DP) :: topn, topm
1472 real(DP) :: botn, botm
1473 real(DP) :: satn, satm
1474 real(DP) :: thickn, thickm
1475 real(DP) :: angle, hyn, hym
1478 real(DP),
dimension(3) :: vg
1480 do iexg = 1, this%nexg
1482 ihc = this%ihc(iexg)
1483 n = this%nodem1(iexg)
1484 m = this%nodem2(iexg)
1485 topn = this%gwfmodel1%dis%top(n)
1486 topm = this%gwfmodel2%dis%top(m)
1487 botn = this%gwfmodel1%dis%bot(n)
1488 botm = this%gwfmodel2%dis%bot(m)
1489 satn = this%gwfmodel1%npf%sat(n)
1490 satm = this%gwfmodel2%npf%sat(m)
1491 thickn = (topn - botn) * satn
1492 thickm = (topm - botm) * satm
1501 hyn = this%gwfmodel1%npf%hy_eff(n, 0, ihc, vg=vg)
1502 hym = this%gwfmodel2%npf%hy_eff(m, 0, ihc, vg=vg)
1503 csat =
vcond(1, 1, 1, 1, 0, 1, 1,
done, &
1513 hyn = this%gwfmodel1%npf%k11(n)
1514 hym = this%gwfmodel2%npf%k11(m)
1517 if (this%ianglex > 0)
then
1518 angle = this%auxvar(this%ianglex, iexg) *
dpio180
1519 vg(1) = abs(cos(angle))
1520 vg(2) = abs(sin(angle))
1524 if (this%gwfmodel1%npf%ik22 /= 0)
then
1525 hyn = this%gwfmodel1%npf%hy_eff(n, 0, ihc, vg=vg)
1529 if (this%gwfmodel2%npf%ik22 /= 0)
then
1530 hym = this%gwfmodel2%npf%hy_eff(m, 0, ihc, vg=vg)
1534 fawidth = this%hwva(iexg)
1535 csat =
hcond(1, 1, 1, 1, 0, ihc, &
1536 this%icellavg,
done, &
1537 topn, topm, satn, satm, hyn, hym, &
1540 this%cl1(iexg), this%cl2(iexg), &
1545 this%condsat(iexg) = csat
1560 integer(I4B) :: iexg
1561 integer(I4B) :: n, m, ihc
1562 integer(I4B) :: ibdn, ibdm
1563 integer(I4B) :: ictn, ictm
1564 real(DP) :: topn, topm
1565 real(DP) :: botn, botm
1566 real(DP) :: satn, satm
1567 real(DP) :: hyn, hym
1572 real(DP),
dimension(3) :: vg
1575 do iexg = 1, this%nexg
1576 ihc = this%ihc(iexg)
1577 n = this%nodem1(iexg)
1578 m = this%nodem2(iexg)
1579 ibdn = this%gwfmodel1%ibound(n)
1580 ibdm = this%gwfmodel2%ibound(m)
1581 ictn = this%gwfmodel1%npf%icelltype(n)
1582 ictm = this%gwfmodel2%npf%icelltype(m)
1583 topn = this%gwfmodel1%dis%top(n)
1584 topm = this%gwfmodel2%dis%top(m)
1585 botn = this%gwfmodel1%dis%bot(n)
1586 botm = this%gwfmodel2%dis%bot(m)
1587 satn = this%gwfmodel1%npf%sat(n)
1588 satm = this%gwfmodel2%npf%sat(m)
1589 hn = this%gwfmodel1%x(n)
1590 hm = this%gwfmodel2%x(m)
1599 hyn = this%gwfmodel1%npf%hy_eff(n, 0, ihc, vg=vg)
1600 hym = this%gwfmodel2%npf%hy_eff(m, 0, ihc, vg=vg)
1601 cond =
vcond(ibdn, ibdm, ictn, ictm, this%inewton, this%ivarcv, &
1602 this%idewatcv, this%condsat(iexg), hn, hm, hyn, hym, &
1603 satn, satm, topn, topm, botn, botm, this%hwva(iexg))
1607 hyn = this%gwfmodel1%npf%k11(n)
1608 hym = this%gwfmodel2%npf%k11(m)
1611 if (this%ianglex > 0)
then
1612 angle = this%auxvar(this%ianglex, iexg)
1613 vg(1) = abs(cos(angle))
1614 vg(2) = abs(sin(angle))
1618 if (this%gwfmodel1%npf%ik22 /= 0)
then
1619 hyn = this%gwfmodel1%npf%hy_eff(n, 0, ihc, vg=vg)
1623 if (this%gwfmodel2%npf%ik22 /= 0)
then
1624 hym = this%gwfmodel2%npf%hy_eff(m, 0, ihc, vg=vg)
1628 fawidth = this%hwva(iexg)
1629 cond =
hcond(ibdn, ibdm, ictn, ictm, this%inewton, &
1630 this%ihc(iexg), this%icellavg, this%condsat(iexg), &
1631 hn, hm, satn, satm, hyn, hym, topn, topm, botn, botm, &
1632 this%cl1(iexg), this%cl2(iexg), fawidth)
1635 this%cond(iexg) = cond
1651 call this%DisConnExchangeType%allocate_scalars()
1653 call mem_allocate(this%icellavg,
'ICELLAVG', this%memoryPath)
1654 call mem_allocate(this%ivarcv,
'IVARCV', this%memoryPath)
1655 call mem_allocate(this%idewatcv,
'IDEWATCV', this%memoryPath)
1656 call mem_allocate(this%inewton,
'INEWTON', this%memoryPath)
1657 call mem_allocate(this%ingnc,
'INGNC', this%memoryPath)
1658 call mem_allocate(this%inmvr,
'INMVR', this%memoryPath)
1659 call mem_allocate(this%inobs,
'INOBS', this%memoryPath)
1660 call mem_allocate(this%satomega,
'SATOMEGA', this%memoryPath)
1668 this%satomega =
dzero
1682 if (this%ingnc > 0)
then
1683 call this%gnc%gnc_da()
1684 deallocate (this%gnc)
1686 if (this%inmvr > 0)
then
1687 call this%mvr%mvr_da()
1688 deallocate (this%mvr)
1690 call this%obs%obs_da()
1691 deallocate (this%obs)
1701 if (
associated(this%outputtab1))
then
1702 call this%outputtab1%table_da()
1703 deallocate (this%outputtab1)
1704 nullify (this%outputtab1)
1706 if (
associated(this%outputtab2))
then
1707 call this%outputtab2%table_da()
1708 deallocate (this%outputtab2)
1709 nullify (this%outputtab2)
1713 deallocate (this%filename)
1725 call this%DisConnExchangeType%disconnex_da()
1738 character(len=LINELENGTH) :: text
1739 integer(I4B) :: ntabcol, i
1741 call this%DisConnExchangeType%allocate_arrays()
1743 call mem_allocate(this%cond, this%nexg,
'COND', this%memoryPath)
1744 call mem_allocate(this%idxglo, this%nexg,
'IDXGLO', this%memoryPath)
1745 call mem_allocate(this%idxsymglo, this%nexg,
'IDXSYMGLO', this%memoryPath)
1746 call mem_allocate(this%condsat, this%nexg,
'CONDSAT', this%memoryPath)
1747 call mem_allocate(this%simvals, this%nexg,
'SIMVALS', this%memoryPath)
1755 if (this%iprflow /= 0)
then
1759 if (this%inamedbound > 0)
then
1760 ntabcol = ntabcol + 1
1765 if (this%v_model1%is_local)
then
1766 call table_cr(this%outputtab1, this%name,
' ')
1767 call this%outputtab1%table_df(this%nexg, ntabcol, this%gwfmodel1%iout, &
1770 call this%outputtab1%initialize_column(text, 10, alignment=
tabcenter)
1772 call this%outputtab1%initialize_column(text, 20, alignment=
tableft)
1774 call this%outputtab1%initialize_column(text, 15, alignment=
tabcenter)
1775 if (this%inamedbound > 0)
then
1777 call this%outputtab1%initialize_column(text, 20, alignment=
tableft)
1781 if (this%v_model2%is_local)
then
1782 call table_cr(this%outputtab2, this%name,
' ')
1783 call this%outputtab2%table_df(this%nexg, ntabcol, this%gwfmodel2%iout, &
1786 call this%outputtab2%initialize_column(text, 10, alignment=
tabcenter)
1788 call this%outputtab2%initialize_column(text, 20, alignment=
tableft)
1790 call this%outputtab2%initialize_column(text, 15, alignment=
tabcenter)
1791 if (this%inamedbound > 0)
then
1793 call this%outputtab2%initialize_column(text, 20, alignment=
tableft)
1807 integer(I4B) :: indx
1811 call this%obs%StoreObsType(
'flow-ja-face', .true., indx)
1828 character(len=LENBOUNDNAME) :: bname
1831 10
format(
'Exchange "', a,
'" for observation "', a, &
1832 '" is invalid in package "', a,
'"')
1833 20
format(
'Exchange id "', i0,
'" for observation "', a, &
1834 '" is invalid in package "', a,
'"')
1836 do i = 1, this%obs%npakobs
1837 obsrv => this%obs%pakobs(i)%obsrv
1842 call obsrv%ResetObsIndex()
1843 obsrv%BndFound = .false.
1845 bname = obsrv%FeatureName
1846 if (bname /=
'')
then
1852 if (this%boundname(j) == bname)
then
1854 obsrv%BndFound = .true.
1855 obsrv%CurrentTimeStepEndValue =
dzero
1856 call obsrv%AddObsIndex(j)
1859 if (.not. jfound)
then
1860 write (
errmsg, 10) trim(bname), trim(obsrv%ObsTypeId), trim(this%name)
1865 if (obsrv%intPak1 <= this%nexg .and. obsrv%intPak1 > 0)
then
1867 obsrv%BndFound = .true.
1868 obsrv%CurrentTimeStepEndValue =
dzero
1869 call obsrv%AddObsIndex(obsrv%intPak1)
1873 if (.not. jfound)
then
1874 write (
errmsg, 20) obsrv%intPak1, trim(obsrv%ObsTypeId), trim(this%name)
1904 integer(I4B),
intent(in) :: iexg
1905 integer(I4B),
intent(in) :: n1
1906 integer(I4B),
intent(in) :: n2
1910 qcalc = this%cond(iexg) * (this%gwfmodel2%x(n2) - this%gwfmodel1%x(n1))
1922 integer(I4B) :: iasym
1928 if (this%inewton /= 0) iasym = 1
1931 if (this%ingnc > 0)
then
1932 if (this%gnc%iasym /= 0) iasym = 1
1944 logical(LGP) :: is_connected
1946 is_connected = .false.
1951 if (
associated(this%gwfmodel1, model))
then
1952 is_connected = .true.
1953 else if (
associated(this%gwfmodel2, model))
then
1954 is_connected = .true.
1966 logical(LGP) :: use_im
1968 integer(I4B) :: inbuy_m1
1970 use_im = this%DisConnExchangeType%use_interface_model()
1971 use_im = use_im .or. (this%ixt3d > 0)
1974 select type (m => this%v_model1)
1976 inbuy_m1 = m%inbuy%get()
1978 use_im = use_im .or. (inbuy_m1 > 0)
1997 integer(I4B) :: iexg
2002 if (this%obs%npakobs > 0)
then
2003 call this%obs%obs_bd_clear()
2004 do i = 1, this%obs%npakobs
2005 obsrv => this%obs%pakobs(i)%obsrv
2006 do j = 1, obsrv%indxbnds_count
2007 iexg = obsrv%indxbnds(j)
2009 select case (obsrv%ObsTypeId)
2010 case (
'FLOW-JA-FACE')
2011 n1 = this%nodem1(iexg)
2012 n2 = this%nodem2(iexg)
2013 v = this%simvals(iexg)
2015 errmsg =
'Unrecognized observation type: '// &
2016 trim(obsrv%ObsTypeId)
2020 call this%obs%SaveOneSimval(obsrv, v)
2039 integer(I4B),
intent(in) :: inunitobs
2040 integer(I4B),
intent(in) :: iout
2042 integer(I4B) :: n, iexg, istat
2043 integer(I4B) :: icol, istart, istop
2045 character(len=LINELENGTH) :: string
2047 string = obsrv%IDstring
2050 call urword(string, icol, istart, istop, 1, n, r, iout, inunitobs)
2051 read (string(istart:istop),
'(i10)', iostat=istat) iexg
2052 if (istat == 0)
then
2053 obsrv%intPak1 = iexg
2057 obsrv%FeatureName = trim(adjustl(string))
2061 obsrv%intPak1 = namedboundflag
2072 class(*),
pointer,
intent(inout) :: obj
2077 if (.not.
associated(obj))
return
2092 type(
listtype),
intent(inout) :: list
2093 integer(I4B),
intent(in) :: idx
2097 class(*),
pointer :: obj
2099 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.