17 class(GwfCsubType),
intent(inout) :: this
19 integer(I4B),
pointer :: ibs
21 integer(I4B),
pointer :: iei_smoothing
22 integer(I4B),
pointer :: istrict
23 character(len=LINELENGTH) :: csv_interbed, csv_coarse
24 character(len=LINELENGTH) :: cmp_fn, ecmp_fn, iecmp_fn, ibcmp_fn, cmpcoarse_fn
25 character(len=LINELENGTH) :: zdisp_fn, pkg_converge_fn
26 type(GwfCsubParamFoundType) :: found
27 logical(LGP) :: warn_estress_lag = .false.
34 call mem_set_value(this%inamedbound,
'BOUNDNAMES', this%input_mempath, &
36 call mem_set_value(this%iprpak,
'PRINT_INPUT', this%input_mempath, &
38 call mem_set_value(this%ipakcb,
'SAVE_FLOWS', this%input_mempath, &
40 call mem_set_value(this%gammaw,
'GAMMAW', this%input_mempath, found%gammaw)
41 call mem_set_value(this%beta,
'BETA', this%input_mempath, found%beta)
43 allocate (iei_smoothing)
46 this%input_mempath, found%ei_smoothing)
47 if (found%ei_smoothing)
then
50 deallocate (iei_smoothing)
54 call mem_set_value(istrict,
'STRICT_STRESS', this%input_mempath, &
56 if (found%strict_stress)
then
57 this%istrict_stress = 1
60 call mem_set_value(this%ipch,
'HEAD_BASED', this%input_mempath, &
62 call mem_set_value(this%ipch,
'PRECON_HEAD', this%input_mempath, &
64 call mem_set_value(this%ndelaycells,
'NDELAYCELLS', this%input_mempath, &
66 call mem_set_value(this%istoragec,
'ICOMPRESS', this%input_mempath, &
68 call mem_set_value(this%iupdatematprop,
'MATPROP', this%input_mempath, &
70 call mem_set_value(this%icellf,
'CELL_FRACTION', this%input_mempath, &
72 call mem_set_value(ibs,
'INTERBED_STATE', this%input_mempath, &
74 call mem_set_value(this%ispecified_pcs,
'PRECON_STRESS', this%input_mempath, &
76 call mem_set_value(this%ispecified_dbh,
'DELAY_HEAD', this%input_mempath, &
78 call mem_set_value(this%ieslag,
'STRESS_LAG', this%input_mempath, &
80 call mem_set_value(csv_interbed,
'INTERBEDSTRAINFN', this%input_mempath, &
81 found%interbedstrainfn)
82 call mem_set_value(csv_coarse,
'COARSESTRAINFN', this%input_mempath, &
84 call mem_set_value(cmp_fn,
'CMPFN', this%input_mempath, found%cmpfn)
85 call mem_set_value(ecmp_fn,
'ELASTICCMPFN', this%input_mempath, &
87 call mem_set_value(iecmp_fn,
'INELASTICCMPFN', this%input_mempath, &
89 call mem_set_value(ibcmp_fn,
'INTERBEDCMPFN', this%input_mempath, &
91 call mem_set_value(cmpcoarse_fn,
'CMPCOARSEFN', this%input_mempath, &
93 call mem_set_value(zdisp_fn,
'ZDISPFN', this%input_mempath, found%zdispfn)
94 call mem_set_value(pkg_converge_fn,
'PKGCONVERGEFN', this%input_mempath, &
98 if (
filein_fname(this%obs%inputFilename,
'OBS6_FILENAME', &
99 this%input_mempath, this%input_fname))
then
100 this%obs%active = .true.
102 call openfile(inobs, this%iout, this%obs%inputFilename,
'OBS')
103 this%obs%inUnitObs = inobs
104 this%inobspkg = inobs
105 call this%obs%obs_df(this%iout, this%packName, this%filtyp, this%dis)
106 call this%csub_df_obs()
110 if (found%save_flows) this%ipakcb = -1
111 if (found%head_based)
then
112 this%lhead_based = .true.
113 if (this%ieslag /= 0)
then
115 warn_estress_lag = .true.
118 if (found%icompress) this%istoragec = 0
119 if (found%interbed_state)
then
120 this%ispecified_pcs = 1
121 this%ispecified_dbh = 1
123 if (found%gammaw .or. found%beta)
then
124 this%brg = this%gammaw * this%beta
128 if (found%interbedstrainfn)
then
130 call openfile(this%istrainib, this%iout, csv_interbed,
'CSV_OUTPUT', &
131 filstat_opt=
'REPLACE', mode_opt=
mnormal)
133 if (found%coarsestrainfn)
then
135 call openfile(this%istrainsk, this%iout, csv_coarse,
'CSV_OUTPUT', &
136 filstat_opt=
'REPLACE', mode_opt=
mnormal)
138 if (found%cmpfn)
then
140 call openfile(this%ioutcomp, this%iout, cmp_fn,
'DATA(BINARY)', &
143 if (found%elasticcmpfn)
then
145 call openfile(this%ioutcompe, this%iout, ecmp_fn, &
149 if (found%inelasticcmpfn)
then
151 call openfile(this%ioutcompi, this%iout, iecmp_fn, &
155 if (found%interbedcmpfn)
then
157 call openfile(this%ioutcompib, this%iout, ibcmp_fn, &
161 if (found%cmpcoarsefn)
then
163 call openfile(this%ioutcomps, this%iout, cmpcoarse_fn, &
167 if (found%zdispfn)
then
169 call openfile(this%ioutzdisp, this%iout, zdisp_fn, &
173 if (found%pkgconvergefn)
then
175 call openfile(this%ipakcsv, this%iout, pkg_converge_fn,
'CSV', &
176 filstat_opt=
'REPLACE', mode_opt=
mnormal)
180 call this%log_options(warn_estress_lag)
187 module subroutine
log_options(this, warn_estress_lag)
190 class(GwfCsubType),
intent(inout) :: this
191 logical(LGP),
intent(in) :: warn_estress_lag
194 character(len=*),
parameter :: fmtts = &
195 &
"(4x,'TIME-SERIES DATA WILL BE READ FROM FILE: ',a)"
196 character(len=*),
parameter :: fmtflow = &
197 &
"(4x,'FLOWS WILL BE SAVED TO FILE: ',a,/4x,'OPENED ON UNIT: ',I7)"
198 character(len=*),
parameter :: fmtflow2 = &
199 &
"(4x,'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL')"
200 character(len=*),
parameter :: fmtssessv = &
201 &
"(4x,'USING SSE AND SSV INSTEAD OF CR AND CC.')"
202 character(len=*),
parameter :: fmtoffset = &
203 &
"(4x,'INITIAL_STRESS TREATED AS AN OFFSET.')"
204 character(len=*),
parameter :: fmtopt = &
206 character(len=*),
parameter :: fmtopti = &
208 character(len=*),
parameter :: fmtoptr = &
210 character(len=*),
parameter :: fmtfileout = &
211 "(4x,'CSUB ',1x,a,1x,' WILL BE SAVED TO FILE: ',a,/4x,&
212 &'OPENED ON UNIT: ',I7)"
215 write (this%iout,
'(//2(1X,A))') trim(adjustl(this%packName)), &
217 write (this%iout, fmtopti)
'NUMBER OF DELAY CELLS =', &
219 if (this%lhead_based .EQV. .true.)
then
220 write (this%iout,
'(4x,a)') &
221 'HEAD-BASED FORMULATION'
223 write (this%iout,
'(4x,a)') &
224 'EFFECTIVE-STRESS FORMULATION'
226 if (this%istoragec == 0)
then
227 write (this%iout,
'(4x,a,1(/,6x,a))') &
228 'COMPRESSION INDICES WILL BE SPECIFIED INSTEAD OF ELASTIC AND', &
229 'INELASTIC SPECIFIC STORAGE COEFFICIENTS'
231 write (this%iout,
'(4x,a,1(/,6x,a))') &
232 'ELASTIC AND INELASTIC SPECIFIC STORAGE COEFFICIENTS WILL BE ', &
235 if (this%iupdatematprop /= 1)
then
236 write (this%iout,
'(4x,a,1(/,6x,a))') &
237 'THICKNESS AND VOID RATIO WILL NOT BE ADJUSTED DURING THE', &
240 write (this%iout,
'(4x,a)') &
241 'THICKNESS AND VOID RATIO WILL BE ADJUSTED DURING THE SIMULATION'
243 if (this%icellf /= 1)
then
244 write (this%iout,
'(4x,a)') &
245 'INTERBED THICKNESS WILL BE SPECIFIED AS A THICKNESS'
247 write (this%iout,
'(4x,a,1(/,6x,a))') &
248 'INTERBED THICKNESS WILL BE SPECIFIED AS A AS A CELL FRACTION'
250 if (this%ispecified_pcs /= 1)
then
251 if (this%ipch /= 0)
then
252 write (this%iout,
'(4x,a,1(/,6x,a))') &
253 'PRECONSOLIDATION HEAD WILL BE SPECIFIED RELATIVE TO INITIAL', &
256 write (this%iout,
'(4x,a,1(/,6x,a))') &
257 'PRECONSOLIDATION STRESS WILL BE SPECIFIED RELATIVE TO INITIAL', &
261 if (this%ipch /= 0)
then
262 write (this%iout,
'(4x,a,1(/,6x,a))') &
263 'PRECONSOLIDATION HEAD WILL BE SPECIFIED AS ABSOLUTE VALUES', &
264 'INSTEAD OF RELATIVE TO INITIAL HEAD CONDITIONS'
266 write (this%iout,
'(4x,a,1(/,6x,a))') &
267 'PRECONSOLIDATION STRESS WILL BE SPECIFIED AS ABSOLUTE VALUES', &
268 'INSTEAD OF RELATIVE TO INITIAL STRESS CONDITIONS'
271 if (this%ispecified_dbh /= 1)
then
272 write (this%iout,
'(4x,a,1(/,6x,a))') &
273 'DELAY INTERBED HEADS WILL BE SPECIFIED RELATIVE TO INITIAL ', &
276 write (this%iout,
'(4x,a,1(/,6x,a))') &
277 'DELAY INTERBED HEADS WILL BE SPECIFIED AS ABSOLUTE VALUES INSTEAD', &
278 'OF RELATIVE TO INITIAL GWF HEADS'
281 if (this%lhead_based .EQV. .false.)
then
282 if (this%ieslag /= 0)
then
283 write (this%iout,
'(4x,a,1(/,6x,a))') &
284 'SPECIFIC STORAGE VALUES WILL BE CALCULATED USING THE EFFECTIVE', &
285 'STRESS FROM THE PREVIOUS TIME STEP'
287 write (this%iout,
'(4x,a,1(/,6x,a))') &
288 'SPECIFIC STORAGE VALUES WILL BE CALCULATED USING THE CURRENT', &
291 if (this%istrict_stress == 0)
then
292 write (this%iout,
'(4x,a,1(/,6x,a))') &
293 'SMALL OR NEGATIVE EFFECTIVE STRESS WILL BE REGULARIZED BY FLOORING', &
294 'THE EFFECTIVE STRESS USED TO CALCULATE THE SPECIFIC STORAGE'
296 write (this%iout,
'(4x,a,1(/,6x,a))') &
297 'SMALL OR NEGATIVE EFFECTIVE STRESS WILL TERMINATE THE SIMULATION', &
298 '(STRICT_EFFECTIVE_STRESS SPECIFIED)'
300 else if (warn_estress_lag)
then
301 write (this%iout,
'(4x,a,2(/,6x,a))') &
302 'EFFECTIVE_STRESS_LAG HAS BEEN SPECIFIED BUT HAS NO EFFECT WHEN', &
303 'USING THE HEAD-BASED FORMULATION (HEAD_BASED HAS BEEN SPECIFIED', &
304 'IN THE OPTIONS BLOCK)'
307 write (this%iout, fmtoptr)
'GAMMAW =', this%gammaw
308 write (this%iout, fmtoptr)
'BETA =', this%beta
309 write (this%iout, fmtoptr)
'GAMMAW * BETA =', this%brg
310 write (this%iout,
'((1X,A))')
'END PACKAGE SETTINGS'
314 module subroutine csub_source_dimensions(this)
319 class(GwfCsubType),
intent(inout) :: this
321 type(GwfCsubParamFoundType) :: found
327 call mem_set_value(this%ninterbeds,
'NINTERBEDS', this%input_mempath, &
329 call mem_set_value(this%maxsig0,
'MAXBOUND', this%input_mempath, &
333 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%packName))// &
335 write (this%iout,
'(4x,a,i0)')
'NINTERBEDS = ', this%ninterbeds
336 write (this%iout,
'(4x,a,i0)')
'MAXSIG0 = ', this%maxsig0
337 write (this%iout,
'(1x,a)') &
338 'END OF '//trim(adjustl(this%packName))//
' DIMENSIONS'
341 if (.not. found%ninterbeds)
then
342 write (errmsg,
'(a)') &
343 'NINTERBEDS is a required dimension.'
344 call store_error(errmsg)
345 call store_error_filename(this%input_mempath)
350 call this%define_listlabel()
351 end subroutine csub_source_dimensions
354 module subroutine csub_source_griddata(this)
359 class(GwfCsubType),
intent(inout) :: this
362 type(GwfCsubParamFoundType) :: found
363 integer(I4B),
dimension(:),
pointer,
contiguous :: map
367 if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser
370 call mem_set_value(this%cg_ske_cr,
'CG_SKE_CR', this%input_mempath, &
371 map, found%cg_ske_cr)
372 call mem_set_value(this%cg_thetaini,
'CG_THETA', this%input_mempath, &
374 call mem_set_value(this%sgm,
'SGM', this%input_mempath, map, found%sgm)
375 call mem_set_value(this%sgs,
'SGS', this%input_mempath, map, found%sgs)
378 if (.not. found%cg_ske_cr)
then
379 call store_error(
'CG_SKE GRIDDATA must be specified.')
380 call store_error_filename(this%input_fname)
382 if (.not. found%cg_theta)
then
383 call store_error(
'CG_THETA GRIDDATA must be specified.')
384 call store_error_filename(this%input_fname)
388 if (.not. found%sgm)
then
389 do node = 1, this%dis%nodes
390 this%sgm(node) = 1.7d0
393 if (.not. found%sgs)
then
394 do node = 1, this%dis%nodes
395 this%sgs(node) = 2.0d0
398 end subroutine csub_source_griddata
401 module subroutine csub_source_packagedata(this)
407 class(GwfCsubType),
intent(inout) :: this
408 integer(I4B),
dimension(:),
pointer,
contiguous :: icsubno
409 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid_pkgdata
410 integer(I4B),
dimension(:),
pointer :: cellid
411 type(CharacterStringType),
dimension(:),
pointer, &
413 type(CharacterStringType),
dimension(:),
pointer, &
414 contiguous :: boundname
415 real(DP),
dimension(:),
pointer,
contiguous :: pcs, thick_frac, rnb
416 real(DP),
dimension(:),
pointer,
contiguous :: ssv_cc, sse_cr, theta, kv, h0
417 character(len=LINELENGTH) :: cdelaystr
418 character(len=LENBOUNDNAME) :: bndname
419 character(len=20) :: cellidstr
420 real(DP) :: top, botm, baq, q, thick, rval
421 integer(I4B) :: idelay, ndelaybeds, csubno
422 integer(I4B) :: ib, n, nodeu, noder
425 call mem_setptr(icsubno,
'ICSUBNO', this%input_mempath)
426 call mem_setptr(cellid_pkgdata,
'CELLID_PKGDATA', this%input_mempath)
427 call mem_setptr(cdelay,
'CDELAY', this%input_mempath)
428 call mem_setptr(pcs,
'PCS0', this%input_mempath)
429 call mem_setptr(thick_frac,
'THICK_FRAC', this%input_mempath)
430 call mem_setptr(rnb,
'RNB', this%input_mempath)
431 call mem_setptr(ssv_cc,
'SSV_CC', this%input_mempath)
432 call mem_setptr(sse_cr,
'SSE_CR', this%input_mempath)
433 call mem_setptr(theta,
'THETA', this%input_mempath)
436 call mem_setptr(boundname,
'BOUNDNAME', this%input_mempath)
442 do n = 1,
size(icsubno)
448 if (csubno < 1 .or. csubno > this%ninterbeds)
then
449 write (errmsg,
'(a,1x,i0,2(1x,a),1x,i0,a)') &
450 'Interbed number (', csubno,
') must be greater than 0 and ', &
451 'less than or equal to', this%ninterbeds,
'.'
452 call store_error(errmsg)
457 cellid => cellid_pkgdata(:, n)
460 if (this%dis%ndim == 1)
then
462 elseif (this%dis%ndim == 2)
then
463 nodeu = get_node(cellid(1), 1, cellid(2), &
464 this%dis%mshape(1), 1, &
467 nodeu = get_node(cellid(1), cellid(2), cellid(3), &
468 this%dis%mshape(1), &
469 this%dis%mshape(2), &
474 noder = this%dis%get_nodenumber(nodeu, 1)
476 call this%dis%nodeu_to_string(nodeu, cellidstr)
477 write (errmsg,
'(a)') &
478 'CSUB configured for inactive cell: '// &
479 trim(adjustl(cellidstr))//
'.'
480 call store_error(errmsg)
485 this%nodelist(csubno) = noder
486 this%unodelist(csubno) = nodeu
489 top = this%dis%top(noder)
490 botm = this%dis%bot(noder)
494 cdelaystr = cdelay(n)
495 select case (cdelaystr)
499 ndelaybeds = ndelaybeds + 1
502 write (errmsg,
'(a,1x,a,1x,i0,1x,a)') &
503 'Invalid CDELAY ', trim(adjustl(cdelaystr)), &
504 'for packagedata entry', csubno,
'.'
505 call store_error(errmsg)
508 this%idelay(csubno) = idelay
511 this%pcs(csubno) = pcs(n)
514 if (this%icellf == 0)
then
515 if (thick_frac(n) < dzero .or. thick_frac(n) > baq)
then
516 write (errmsg,
'(a,g0,2(a,1x),g0,1x,a,1x,i0,a)') &
517 'THICK (', thick_frac(n),
') MUST BE greater than or equal to 0 ', &
518 'and less than or equal to than', baq, &
519 'for packagedata entry', csubno,
'.'
520 call store_error(errmsg)
522 thick = thick_frac(n)
524 if (thick_frac(n) < dzero .or. thick_frac(n) > done)
then
525 write (errmsg,
'(a,1x,a,1x,i0,a)') &
526 'FRAC MUST BE greater than 0 and less than or equal to 1', &
527 'for packagedata entry', csubno,
'.'
528 call store_error(errmsg)
530 thick = thick_frac(n) * baq
532 this%thickini(csubno) = thick
533 if (this%iupdatematprop /= 0)
then
534 this%thick(csubno) = thick
539 if (rnb(n) < done)
then
540 write (errmsg,
'(a,g0,a,1x,a,1x,i0,a)') &
541 'RNB (', rnb(n),
') must be greater than or equal to 1', &
542 'for packagedata entry', csubno,
'.'
543 call store_error(errmsg)
545 this%rnb(csubno) = rnb(n)
547 this%rnb(csubno) = done
551 if (ssv_cc(n) < dzero)
then
552 write (errmsg,
'(2(a,1x),i0,a)') &
553 '(SKV,CI) must be greater than or equal to 0', &
554 'for packagedata entry', csubno,
'.'
555 call store_error(errmsg)
557 this%ci(csubno) = ssv_cc(n)
560 if (sse_cr(n) < dzero)
then
561 write (errmsg,
'(2(a,1x),i0,a)') &
562 '(SKE,RCI) must be greater than or equal to 0', &
563 'for packagedata entry', csubno,
'.'
564 call store_error(errmsg)
566 this%rci(csubno) = sse_cr(n)
569 if (this%ci(csubno) == this%rci(csubno))
then
570 this%ielastic(csubno) = 1
572 this%ielastic(csubno) = 0
576 if (theta(n) <= dzero .or. theta(n) > done)
then
577 write (errmsg,
'(a,1x,a,1x,i0,a)') &
578 'THETA must be greater than 0 and less than or equal to 1', &
579 'for packagedata entry', csubno,
'.'
580 call store_error(errmsg)
582 this%thetaini(csubno) = theta(n)
583 if (this%iupdatematprop /= 0)
then
584 this%theta(csubno) = theta(n)
589 if (kv(n) <= 0.0)
then
590 write (errmsg,
'(a,1x,i0,a)') &
591 'KV must be greater than 0 for packagedata entry', csubno,
'.'
592 call store_error(errmsg)
595 this%kv(csubno) = kv(n)
598 this%h0(csubno) = h0(n)
601 if (this%inamedbound /= 0)
then
602 bndname = boundname(n)
603 if (len_trim(bndname) < 1)
then
604 write (errmsg,
'(a,1x,i0,a)') &
605 'BOUNDNAME must be specified for packagedata entry', csubno,
'.'
606 call store_error(errmsg)
608 this%boundname(csubno) = bndname
614 this%ndelaybeds = ndelaybeds
617 if (ndelaybeds > 0)
then
621 'IDB_NCONV_COUNT', trim(this%memoryPath))
622 call mem_allocate(this%idbconvert, this%ndelaycells, ndelaybeds, &
623 'IDBCONVERT', trim(this%memoryPath))
625 'DBDHMAX', trim(this%memoryPath))
626 call mem_allocate(this%dbz, this%ndelaycells, ndelaybeds, &
627 'DBZ', trim(this%memoryPath))
628 call mem_allocate(this%dbrelz, this%ndelaycells, ndelaybeds, &
629 'DBRELZ', trim(this%memoryPath))
630 call mem_allocate(this%dbh, this%ndelaycells, ndelaybeds, &
631 'DBH', trim(this%memoryPath))
632 call mem_allocate(this%dbh0, this%ndelaycells, ndelaybeds, &
633 'DBH0', trim(this%memoryPath))
634 call mem_allocate(this%dbgeo, this%ndelaycells, ndelaybeds, &
635 'DBGEO', trim(this%memoryPath))
636 call mem_allocate(this%dbes, this%ndelaycells, ndelaybeds, &
637 'DBES', trim(this%memoryPath))
638 call mem_allocate(this%dbes0, this%ndelaycells, ndelaybeds, &
639 'DBES0', trim(this%memoryPath))
640 call mem_allocate(this%dbpcs, this%ndelaycells, ndelaybeds, &
641 'DBPCS', trim(this%memoryPath))
643 'DBFLOWTOP', trim(this%memoryPath))
645 'DBFLOWBOT', trim(this%memoryPath))
646 call mem_allocate(this%dbdzini, this%ndelaycells, ndelaybeds, &
647 'DBDZINI', trim(this%memoryPath))
648 call mem_allocate(this%dbthetaini, this%ndelaycells, ndelaybeds, &
649 'DBTHETAINI', trim(this%memoryPath))
650 call mem_allocate(this%dbcomp, this%ndelaycells, ndelaybeds, &
651 'DBCOMP', trim(this%memoryPath))
652 call mem_allocate(this%dbtcomp, this%ndelaycells, ndelaybeds, &
653 'DBTCOMP', trim(this%memoryPath))
656 if (this%iupdatematprop == 0)
then
657 call mem_setptr(this%dbdz,
'DBDZINI', trim(this%memoryPath))
658 call mem_setptr(this%dbdz0,
'DBDZINI', trim(this%memoryPath))
659 call mem_setptr(this%dbtheta,
'DBTHETAINI', trim(this%memoryPath))
660 call mem_setptr(this%dbtheta0,
'DBTHETAINI', trim(this%memoryPath))
662 call mem_allocate(this%dbdz, this%ndelaycells, ndelaybeds, &
663 'DBDZ', trim(this%memoryPath))
664 call mem_allocate(this%dbdz0, this%ndelaycells, ndelaybeds, &
665 'DBDZ0', trim(this%memoryPath))
666 call mem_allocate(this%dbtheta, this%ndelaycells, ndelaybeds, &
667 'DBTHETA', trim(this%memoryPath))
668 call mem_allocate(this%dbtheta0, this%ndelaycells, ndelaybeds, &
669 'DBTHETA0', trim(this%memoryPath))
674 'DBAL', trim(this%memoryPath))
676 'DBAD', trim(this%memoryPath))
678 'DBAU', trim(this%memoryPath))
680 'DBRHS', trim(this%memoryPath))
682 'DBDH', trim(this%memoryPath))
684 'DBAW', trim(this%memoryPath))
688 this%idb_nconv_count(n) = 0
692 do ib = 1, this%ninterbeds
693 idelay = this%idelay(ib)
694 if (idelay == 0)
then
699 do n = 1, this%ndelaycells
700 rval = this%thickini(ib) / real(this%ndelaycells, dp)
701 this%dbdzini(n, idelay) = rval
702 this%dbh(n, idelay) = this%h0(ib)
703 this%dbh0(n, idelay) = this%h0(ib)
704 this%dbthetaini(n, idelay) = this%thetaini(ib)
705 this%dbgeo(n, idelay) = dzero
706 this%dbes(n, idelay) = dzero
707 this%dbes0(n, idelay) = dzero
708 this%dbpcs(n, idelay) = this%pcs(ib)
709 this%dbcomp(n, idelay) = dzero
710 this%dbtcomp(n, idelay) = dzero
711 if (this%iupdatematprop /= 0)
then
712 this%dbdz(n, idelay) = this%dbdzini(n, idelay)
713 this%dbdz0(n, idelay) = this%dbdzini(n, idelay)
714 this%dbtheta(n, idelay) = this%theta(ib)
715 this%dbtheta0(n, idelay) = this%theta(ib)
720 call this%csub_delay_init_zcell(ib)
724 do n = 1, this%ndelaycells
728 this%dbrhs(n) = dzero
736 if (ndelaybeds > 0)
then
737 q = mod(real(this%ndelaycells, dp), dtwo)
739 write (errmsg,
'(a,i0,a,1x,a)') &
740 'NDELAYCELLS (', this%ndelaycells,
') must be an', &
741 'odd number when using the effective stress formulation.'
742 call store_error(errmsg)
746 if (this%iprpak /= 0)
then
747 call this%csub_print_packagedata()
751 if (count_errors() > 0)
then
752 call store_error_filename(this%input_fname)
767 end subroutine csub_source_packagedata
770 module subroutine csub_print_packagedata(this)
772 class(GwfCsubType) :: this
774 character(len=LINELENGTH) :: title
775 character(len=LINELENGTH) :: tag
776 character(len=10) :: ctype
777 character(len=20) :: cellid
778 integer(I4B) :: ntabrows
779 integer(I4B) :: ntabcols
781 integer(I4b) :: idelay
785 title =
'CSUB'//
' PACKAGE ('// &
786 trim(adjustl(this%packName))//
') INTERBED DATA'
789 ntabrows = this%ninterbeds
791 if (this%inamedbound /= 0)
then
792 ntabcols = ntabcols + 1
796 call table_cr(this%inputtab, this%packName, title)
797 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
802 tag =
'INTERBED NUMBER'
803 call this%inputtab%initialize_column(tag, 10, alignment=tabcenter)
805 call this%inputtab%initialize_column(tag, 20, alignment=tableft)
806 tag =
'INTERBED TYPE'
807 call this%inputtab%initialize_column(tag, 10, alignment=tabcenter)
809 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
811 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
813 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
814 tag =
'INTERBED THICKNESS'
815 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
816 tag =
'CELL THICKNESS'
817 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
819 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
821 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
823 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
825 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
827 call this%inputtab%initialize_column(tag, 12, alignment=tabcenter)
828 if (this%inamedbound /= 0)
then
830 call this%inputtab%initialize_column(tag, 40, alignment=tableft)
833 do ib = 1, this%ninterbeds
834 idelay = this%idelay(ib)
835 node = this%nodelist(ib)
836 call this%dis%noder_to_string(node, cellid)
837 if (idelay == 0)
then
844 call this%inputtab%add_term(ib)
845 call this%inputtab%add_term(cellid)
846 call this%inputtab%add_term(ctype)
847 call this%inputtab%add_term(this%pcs(ib))
848 call this%inputtab%add_term(this%thickini(ib))
849 call this%inputtab%add_term(this%rnb(ib))
850 call this%inputtab%add_term(this%thickini(ib) * this%rnb(ib))
851 call this%inputtab%add_term(this%dis%top(node) - this%dis%bot(node))
852 call this%inputtab%add_term(this%ci(ib))
853 call this%inputtab%add_term(this%rci(ib))
854 call this%inputtab%add_term(this%theta(ib))
855 if (idelay == 0)
then
856 call this%inputtab%add_term(
"--")
857 call this%inputtab%add_term(
"--")
859 call this%inputtab%add_term(this%kv(ib))
860 call this%inputtab%add_term(this%h0(ib))
862 if (this%inamedbound /= 0)
then
863 call this%inputtab%add_term(this%boundname(ib))
867 end subroutine csub_print_packagedata
870 module subroutine csub_initialize_tables(this)
872 class(GwfCsubType) :: this
874 character(len=LINELENGTH) :: tag
875 integer(I4B) :: ntabrows
876 integer(I4B) :: ntabcols
878 if (this%ipakcsv > 0)
then
879 if (this%ndelaybeds < 1)
then
880 write (warnmsg,
'(a,1x,3a)') &
881 'Package convergence data is requested but delay interbeds', &
882 'are not included in package (', &
883 trim(adjustl(this%packName)),
').'
884 call store_warning(warnmsg)
891 call table_cr(this%pakcsvtab, this%packName,
'')
892 call this%pakcsvtab%table_df(ntabrows, ntabcols, this%ipakcsv, &
893 lineseparator=.false., separator=
',', &
897 tag =
'total_inner_iterations'
898 call this%pakcsvtab%initialize_column(tag, 10, alignment=tableft)
900 call this%pakcsvtab%initialize_column(tag, 10, alignment=tableft)
902 call this%pakcsvtab%initialize_column(tag, 10, alignment=tableft)
904 call this%pakcsvtab%initialize_column(tag, 10, alignment=tableft)
906 call this%pakcsvtab%initialize_column(tag, 10, alignment=tableft)
908 call this%pakcsvtab%initialize_column(tag, 15, alignment=tableft)
910 call this%pakcsvtab%initialize_column(tag, 15, alignment=tableft)
912 call this%pakcsvtab%initialize_column(tag, 15, alignment=tableft)
913 tag =
'dstoragemax_loc'
914 call this%pakcsvtab%initialize_column(tag, 15, alignment=tableft)
917 end subroutine csub_initialize_tables
920 module subroutine define_listlabel(this)
922 class(GwfCsubType),
intent(inout) :: this
925 this%listlabel = trim(this%filtyp)//
' NO.'
926 if (this%dis%ndim == 3)
then
927 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
928 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
929 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
930 elseif (this%dis%ndim == 2)
then
931 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
932 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
934 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
936 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'SIG0'
937 if (this%inamedbound == 1)
then
938 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
940 end subroutine define_listlabel
942end submodule gwfcsubmoduleinput
subroutine source_options(this, iout)
Source options.
This module contains simulation constants.
@ mnormal
normal output mode
real(dp), parameter dem3
real constant 1e-3
real(dp), parameter dzero
real constant zero
integer(i4b), parameter maxcharlen
maximum length of char string
This module contains the CSUB package methods.
subroutine, public memorystore_release(varname, memory_path)
Release a single variable from the memory store.
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
This class is used to store a single deferred-length character string. It was designed to work in an ...
subroutine log_options(this, found)
Write user options to list file.