49 character(len=LENBUDTXT),
dimension(4) ::
budtxt = & !< text labels for budget terms
54 character(len=LENBUDTXT),
dimension(6) ::
comptxt = & !< text labels for compaction terms
69 character(len=LENLISTLABEL),
pointer :: listlabel => null()
70 character(len=LENMEMPATH),
pointer :: stomempath => null()
72 character(len=LENBOUNDNAME),
dimension(:), &
73 pointer,
contiguous :: boundname => null()
74 character(len=LENAUXNAME),
dimension(:), &
75 pointer,
contiguous :: auxname => null()
77 logical(LGP),
pointer :: lhead_based => null()
79 integer(I4B),
pointer :: istounit => null()
80 integer(I4B),
pointer :: istrainib => null()
81 integer(I4B),
pointer :: istrainsk => null()
82 integer(I4B),
pointer :: ioutcomp => null()
83 integer(I4B),
pointer :: ioutcompi => null()
84 integer(I4B),
pointer :: ioutcompe => null()
85 integer(I4B),
pointer :: ioutcompib => null()
86 integer(I4B),
pointer :: ioutcomps => null()
87 integer(I4B),
pointer :: ioutzdisp => null()
88 integer(I4B),
pointer :: ipakcsv => null()
89 integer(I4B),
pointer :: iupdatematprop => null()
90 integer(I4B),
pointer :: istoragec => null()
91 integer(I4B),
pointer :: icellf => null()
92 integer(I4B),
pointer :: ispecified_pcs => null()
93 integer(I4B),
pointer :: ispecified_dbh => null()
94 integer(I4B),
pointer :: inamedbound => null()
95 integer(I4B),
pointer :: iconvchk => null()
96 integer(I4B),
pointer :: naux => null()
97 integer(I4B),
pointer :: ninterbeds => null()
98 integer(I4B),
pointer :: maxsig0 => null()
99 integer(I4B),
pointer :: nbound => null()
100 integer(I4B),
pointer :: iscloc => null()
101 integer(I4B),
pointer :: iauxmultcol => null()
102 integer(I4B),
pointer :: ndelaycells => null()
103 integer(I4B),
pointer :: ndelaybeds => null()
104 integer(I4B),
pointer :: initialized => null()
105 integer(I4B),
pointer :: ieslag => null()
106 integer(I4B),
pointer :: ipch => null()
107 integer(I4B),
pointer :: iupdatestress => null()
109 real(dp),
pointer :: epsilon => null()
110 real(dp),
pointer :: cc_crit => null()
111 real(dp),
pointer :: gammaw => null()
112 real(dp),
pointer :: beta => null()
113 real(dp),
pointer :: brg => null()
114 real(dp),
pointer :: satomega => null()
116 integer(I4B),
pointer :: gwfiss => null()
117 integer(I4B),
pointer :: gwfiss0 => null()
119 integer(I4B),
dimension(:),
pointer,
contiguous :: ibound => null()
120 integer(I4B),
dimension(:),
pointer,
contiguous :: stoiconv => null()
122 real(dp),
dimension(:),
pointer,
contiguous :: stoss => null()
123 real(dp),
dimension(:),
pointer,
contiguous :: buff => null()
124 real(dp),
dimension(:),
pointer,
contiguous :: buffusr => null()
125 integer,
dimension(:),
pointer,
contiguous :: nodelist => null()
126 integer,
dimension(:),
pointer,
contiguous :: unodelist => null()
129 real(dp),
dimension(:),
pointer,
contiguous :: sgm => null()
130 real(dp),
dimension(:),
pointer,
contiguous :: sgs => null()
131 real(dp),
dimension(:),
pointer,
contiguous :: cg_ske_cr => null()
132 real(dp),
dimension(:),
pointer,
contiguous :: cg_gs => null()
133 real(dp),
dimension(:),
pointer,
contiguous :: cg_es => null()
134 real(dp),
dimension(:),
pointer,
contiguous :: cg_es0 => null()
135 real(dp),
dimension(:),
pointer,
contiguous :: cg_pcs => null()
136 real(dp),
dimension(:),
pointer,
contiguous :: cg_comp => null()
137 real(dp),
dimension(:),
pointer,
contiguous :: cg_tcomp => null()
138 real(dp),
dimension(:),
pointer,
contiguous :: cg_stor => null()
139 real(dp),
dimension(:),
pointer,
contiguous :: cg_ske => null()
140 real(dp),
dimension(:),
pointer,
contiguous :: cg_sk => null()
141 real(dp),
dimension(:),
pointer,
contiguous :: cg_thickini => null()
142 real(dp),
dimension(:),
pointer,
contiguous :: cg_thetaini => null()
143 real(dp),
dimension(:),
pointer,
contiguous :: cg_thick => null()
144 real(dp),
dimension(:),
pointer,
contiguous :: cg_thick0 => null()
145 real(dp),
dimension(:),
pointer,
contiguous :: cg_theta => null()
146 real(dp),
dimension(:),
pointer,
contiguous :: cg_theta0 => null()
149 real(dp),
dimension(:),
pointer,
contiguous :: cell_wcstor => null()
150 real(dp),
dimension(:),
pointer,
contiguous :: cell_thick => null()
153 integer(I4B),
dimension(:),
pointer,
contiguous :: idelay => null()
154 integer(I4B),
dimension(:),
pointer,
contiguous :: ielastic => null()
155 integer(I4B),
dimension(:),
pointer,
contiguous :: iconvert => null()
156 real(dp),
dimension(:),
pointer,
contiguous :: ci => null()
157 real(dp),
dimension(:),
pointer,
contiguous :: rci => null()
158 real(dp),
dimension(:),
pointer,
contiguous :: pcs => null()
159 real(dp),
dimension(:),
pointer,
contiguous :: rnb => null()
160 real(dp),
dimension(:),
pointer,
contiguous :: kv => null()
161 real(dp),
dimension(:),
pointer,
contiguous :: h0 => null()
162 real(dp),
dimension(:),
pointer,
contiguous :: comp => null()
163 real(dp),
dimension(:),
pointer,
contiguous :: tcomp => null()
164 real(dp),
dimension(:),
pointer,
contiguous :: tcompi => null()
165 real(dp),
dimension(:),
pointer,
contiguous :: tcompe => null()
166 real(dp),
dimension(:),
pointer,
contiguous :: storagee => null()
167 real(dp),
dimension(:),
pointer,
contiguous :: storagei => null()
168 real(dp),
dimension(:),
pointer,
contiguous :: ske => null()
169 real(dp),
dimension(:),
pointer,
contiguous :: sk => null()
170 real(dp),
dimension(:),
pointer,
contiguous :: thickini => null()
171 real(dp),
dimension(:),
pointer,
contiguous :: thetaini => null()
172 real(dp),
dimension(:),
pointer,
contiguous :: thick => null()
173 real(dp),
dimension(:),
pointer,
contiguous :: thick0 => null()
174 real(dp),
dimension(:),
pointer,
contiguous :: theta => null()
175 real(dp),
dimension(:),
pointer,
contiguous :: theta0 => null()
176 real(dp),
dimension(:, :),
pointer,
contiguous :: auxvar => null()
179 integer(I4B),
dimension(:),
pointer,
contiguous :: idb_nconv_count => null()
180 integer(I4B),
dimension(:, :),
pointer,
contiguous :: idbconvert => null()
181 real(dp),
dimension(:),
pointer,
contiguous :: dbdhmax => null()
182 real(dp),
dimension(:, :),
pointer,
contiguous :: dbz => null()
183 real(dp),
dimension(:, :),
pointer,
contiguous :: dbrelz => null()
184 real(dp),
dimension(:, :),
pointer,
contiguous :: dbh => null()
185 real(dp),
dimension(:, :),
pointer,
contiguous :: dbh0 => null()
186 real(dp),
dimension(:, :),
pointer,
contiguous :: dbgeo => null()
187 real(dp),
dimension(:, :),
pointer,
contiguous :: dbes => null()
188 real(dp),
dimension(:, :),
pointer,
contiguous :: dbes0 => null()
189 real(dp),
dimension(:, :),
pointer,
contiguous :: dbpcs => null()
190 real(dp),
dimension(:),
pointer,
contiguous :: dbflowtop => null()
191 real(dp),
dimension(:),
pointer,
contiguous :: dbflowbot => null()
192 real(dp),
dimension(:, :),
pointer,
contiguous :: dbdzini => null()
193 real(dp),
dimension(:, :),
pointer,
contiguous :: dbthetaini => null()
194 real(dp),
dimension(:, :),
pointer,
contiguous :: dbdz => null()
195 real(dp),
dimension(:, :),
pointer,
contiguous :: dbdz0 => null()
196 real(dp),
dimension(:, :),
pointer,
contiguous :: dbtheta => null()
197 real(dp),
dimension(:, :),
pointer,
contiguous :: dbtheta0 => null()
198 real(dp),
dimension(:, :),
pointer,
contiguous :: dbcomp => null()
199 real(dp),
dimension(:, :),
pointer,
contiguous :: dbtcomp => null()
202 real(dp),
dimension(:),
pointer,
contiguous :: dbal => null()
203 real(dp),
dimension(:),
pointer,
contiguous :: dbad => null()
204 real(dp),
dimension(:),
pointer,
contiguous :: dbau => null()
205 real(dp),
dimension(:),
pointer,
contiguous :: dbrhs => null()
206 real(dp),
dimension(:),
pointer,
contiguous :: dbdh => null()
207 real(dp),
dimension(:),
pointer,
contiguous :: dbaw => null()
210 integer(I4B),
dimension(:),
pointer,
contiguous :: nodelistsig0 => null()
211 real(dp),
dimension(:),
pointer,
contiguous :: sig0 => null()
214 integer(I4B),
pointer :: inobspkg => null()
318 subroutine csub_cr(csubobj, name_model, mempath, istounit, stoPckName, inunit, &
322 character(len=*),
intent(in) :: name_model
323 character(len=*),
intent(in) :: mempath
324 integer(I4B),
intent(in) :: inunit
325 integer(I4B),
intent(in) :: istounit
326 character(len=*),
intent(in) :: stopckname
327 integer(I4B),
intent(in) :: iout
334 call csubobj%set_names(1, name_model,
'CSUB',
'CSUB', mempath)
337 call csubobj%csub_allocate_scalars()
343 csubobj%istounit = istounit
344 csubobj%inunit = inunit
361 integer(I4B),
dimension(:),
pointer,
contiguous :: ibound
363 character(len=20) :: cellid
364 integer(I4B) :: idelay
367 integer(I4B) :: istoerr
371 real(DP) :: cg_ske_cr
376 character(len=*),
parameter :: fmtcsub = &
377 "(1x,/1x,'CSUB -- COMPACTION PACKAGE, VERSION 1, 12/15/2019', &
378 &' INPUT READ FROM MEMPATH: ', A, /)"
381 write (this%iout, fmtcsub) this%input_mempath
385 this%ibound => ibound
388 call obs_cr(this%obs, this%inobspkg)
391 call this%source_options()
394 call this%source_dimensions()
397 call this%obs%obs_ar()
405 call this%csub_allocate_arrays()
408 call this%csub_source_griddata()
414 do node = 1, this%dis%nodes
415 call this%dis%noder_to_string(node, cellid)
416 cg_ske_cr = this%cg_ske_cr(node)
417 theta = this%cg_thetaini(node)
420 if (cg_ske_cr < dzero)
then
421 write (
errmsg,
'(a,g0,a,1x,a,1x,a,a)') &
422 'Coarse-grained material CG_SKE_CR (', cg_ske_cr,
') is less', &
423 'than zero in cell', trim(adjustl(cellid)),
'.'
427 if (this%stoss(node) /= dzero)
then
432 if (theta > done .or. theta < dzero)
then
433 write (
errmsg,
'(a,g0,a,1x,a,1x,a,a)') &
434 'Coarse-grained material THETA (', theta,
') is less', &
435 'than zero or greater than 1 in cell', trim(adjustl(cellid)),
'.'
441 if (istoerr /= 0)
then
442 write (
errmsg,
'(a,3(1x,a))') &
443 'Specific storage values in the storage (STO) package must', &
444 'be zero in all active cells when using the', &
445 trim(adjustl(this%packName)), &
451 if (this%ninterbeds > 0)
then
452 call this%csub_source_packagedata()
456 call this%csub_initialize_tables()
459 do node = 1, this%dis%nodes
460 top = this%dis%top(node)
461 bot = this%dis%bot(node)
462 this%cg_thickini(node) = top - bot
463 this%cell_thick(node) = top - bot
467 do ib = 1, this%ninterbeds
468 node = this%nodelist(ib)
469 idelay = this%idelay(ib)
470 if (idelay == 0)
then
471 v = this%thickini(ib)
473 v = this%rnb(ib) * this%thickini(ib)
475 this%cg_thickini(node) = this%cg_thickini(node) - v
479 do node = 1, this%dis%nodes
480 thick = this%cg_thickini(node)
481 if (thick < dzero)
then
482 call this%dis%noder_to_string(node, cellid)
483 write (
errmsg,
'(a,g0,a,1x,a,a)') &
484 'Coarse grained material thickness is less than zero (', &
485 thick,
') in cell', trim(adjustl(cellid)),
'. Interbed thicknesses:'
488 do ib = 1, this%ninterbeds
489 if (node /= this%nodelist(ib))
then
492 idelay = this%idelay(ib)
493 v = this%thickini(ib)
494 if (idelay /= 0)
then
498 write (
errmsg,
'(a,1x,a,i0,a,g0)') &
500 'icbno(', ib,
')=', v
502 write (
errmsg,
'(a,a,g0,a)') &
504 '. Total interbed thickness=', vtot,
'.'
517 if (this%iupdatematprop /= 0)
then
518 do node = 1, this%dis%nodes
519 this%cg_thick(node) = this%cg_thickini(node)
520 this%cg_theta(node) = this%cg_thetaini(node)
542 integer(I4B),
pointer :: ibs
543 integer(I4B) :: inobs
544 character(len=LINELENGTH) :: csv_interbed, csv_coarse
545 character(len=LINELENGTH) :: cmp_fn, ecmp_fn, iecmp_fn, ibcmp_fn, cmpcoarse_fn
546 character(len=LINELENGTH) :: zdisp_fn, pkg_converge_fn
548 logical(LGP) :: warn_estress_lag = .false.
555 call mem_set_value(this%inamedbound,
'BOUNDNAMES', this%input_mempath, &
557 call mem_set_value(this%iprpak,
'PRINT_INPUT', this%input_mempath, &
559 call mem_set_value(this%ipakcb,
'SAVE_FLOWS', this%input_mempath, &
561 call mem_set_value(this%gammaw,
'GAMMAW', this%input_mempath, found%gammaw)
562 call mem_set_value(this%beta,
'BETA', this%input_mempath, found%beta)
563 call mem_set_value(this%ipch,
'HEAD_BASED', this%input_mempath, &
565 call mem_set_value(this%ipch,
'PRECON_HEAD', this%input_mempath, &
567 call mem_set_value(this%ndelaycells,
'NDELAYCELLS', this%input_mempath, &
569 call mem_set_value(this%istoragec,
'ICOMPRESS', this%input_mempath, &
571 call mem_set_value(this%iupdatematprop,
'MATPROP', this%input_mempath, &
573 call mem_set_value(this%icellf,
'CELL_FRACTION', this%input_mempath, &
575 call mem_set_value(ibs,
'INTERBED_STATE', this%input_mempath, &
576 found%interbed_state)
577 call mem_set_value(this%ispecified_pcs,
'PRECON_STRESS', this%input_mempath, &
579 call mem_set_value(this%ispecified_dbh,
'DELAY_HEAD', this%input_mempath, &
581 call mem_set_value(this%ieslag,
'STRESS_LAG', this%input_mempath, &
583 call mem_set_value(csv_interbed,
'INTERBEDSTRAINFN', this%input_mempath, &
584 found%interbedstrainfn)
585 call mem_set_value(csv_coarse,
'COARSESTRAINFN', this%input_mempath, &
586 found%coarsestrainfn)
587 call mem_set_value(cmp_fn,
'CMPFN', this%input_mempath, found%cmpfn)
588 call mem_set_value(ecmp_fn,
'ELASTICCMPFN', this%input_mempath, &
590 call mem_set_value(iecmp_fn,
'INELASTICCMPFN', this%input_mempath, &
591 found%inelasticcmpfn)
592 call mem_set_value(ibcmp_fn,
'INTERBEDCMPFN', this%input_mempath, &
594 call mem_set_value(cmpcoarse_fn,
'CMPCOARSEFN', this%input_mempath, &
596 call mem_set_value(zdisp_fn,
'ZDISPFN', this%input_mempath, found%zdispfn)
597 call mem_set_value(pkg_converge_fn,
'PKGCONVERGEFN', this%input_mempath, &
601 if (
filein_fname(this%obs%inputFilename,
'OBS6_FILENAME', &
602 this%input_mempath, this%input_fname))
then
603 this%obs%active = .true.
605 call openfile(inobs, this%iout, this%obs%inputFilename,
'OBS')
606 this%obs%inUnitObs = inobs
607 this%inobspkg = inobs
608 call this%obs%obs_df(this%iout, this%packName, this%filtyp, this%dis)
609 call this%csub_df_obs()
613 if (found%save_flows) this%ipakcb = -1
614 if (found%head_based)
then
615 this%lhead_based = .true.
616 if (this%ieslag /= 0)
then
618 warn_estress_lag = .true.
621 if (found%icompress) this%istoragec = 0
622 if (found%interbed_state)
then
623 this%ispecified_pcs = 1
624 this%ispecified_dbh = 1
626 if (found%gammaw .or. found%beta)
then
627 this%brg = this%gammaw * this%beta
631 if (found%interbedstrainfn)
then
633 call openfile(this%istrainib, this%iout, csv_interbed,
'CSV_OUTPUT', &
634 filstat_opt=
'REPLACE', mode_opt=
mnormal)
636 if (found%coarsestrainfn)
then
638 call openfile(this%istrainsk, this%iout, csv_coarse,
'CSV_OUTPUT', &
639 filstat_opt=
'REPLACE', mode_opt=
mnormal)
641 if (found%cmpfn)
then
643 call openfile(this%ioutcomp, this%iout, cmp_fn,
'DATA(BINARY)', &
646 if (found%elasticcmpfn)
then
648 call openfile(this%ioutcompe, this%iout, ecmp_fn, &
652 if (found%inelasticcmpfn)
then
654 call openfile(this%ioutcompi, this%iout, iecmp_fn, &
658 if (found%interbedcmpfn)
then
660 call openfile(this%ioutcompib, this%iout, ibcmp_fn, &
664 if (found%cmpcoarsefn)
then
666 call openfile(this%ioutcomps, this%iout, cmpcoarse_fn, &
670 if (found%zdispfn)
then
672 call openfile(this%ioutzdisp, this%iout, zdisp_fn, &
676 if (found%pkgconvergefn)
then
678 call openfile(this%ipakcsv, this%iout, pkg_converge_fn,
'CSV', &
679 filstat_opt=
'REPLACE', mode_opt=
mnormal)
683 call this%log_options(warn_estress_lag)
698 logical(LGP),
intent(in) :: warn_estress_lag
701 character(len=*),
parameter :: fmtts = &
702 &
"(4x,'TIME-SERIES DATA WILL BE READ FROM FILE: ',a)"
703 character(len=*),
parameter :: fmtflow = &
704 &
"(4x,'FLOWS WILL BE SAVED TO FILE: ',a,/4x,'OPENED ON UNIT: ',I7)"
705 character(len=*),
parameter :: fmtflow2 = &
706 &
"(4x,'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL')"
707 character(len=*),
parameter :: fmtssessv = &
708 &
"(4x,'USING SSE AND SSV INSTEAD OF CR AND CC.')"
709 character(len=*),
parameter :: fmtoffset = &
710 &
"(4x,'INITIAL_STRESS TREATED AS AN OFFSET.')"
711 character(len=*),
parameter :: fmtopt = &
713 character(len=*),
parameter :: fmtopti = &
715 character(len=*),
parameter :: fmtoptr = &
717 character(len=*),
parameter :: fmtfileout = &
718 "(4x,'CSUB ',1x,a,1x,' WILL BE SAVED TO FILE: ',a,/4x,&
719 &'OPENED ON UNIT: ',I7)"
722 write (this%iout,
'(//2(1X,A))') trim(adjustl(this%packName)), &
724 write (this%iout, fmtopti)
'NUMBER OF DELAY CELLS =', &
726 if (this%lhead_based .EQV. .true.)
then
727 write (this%iout,
'(4x,a)') &
728 'HEAD-BASED FORMULATION'
730 write (this%iout,
'(4x,a)') &
731 'EFFECTIVE-STRESS FORMULATION'
733 if (this%istoragec == 0)
then
734 write (this%iout,
'(4x,a,1(/,6x,a))') &
735 'COMPRESSION INDICES WILL BE SPECIFIED INSTEAD OF ELASTIC AND', &
736 'INELASTIC SPECIFIC STORAGE COEFFICIENTS'
738 write (this%iout,
'(4x,a,1(/,6x,a))') &
739 'ELASTIC AND INELASTIC SPECIFIC STORAGE COEFFICIENTS WILL BE ', &
742 if (this%iupdatematprop /= 1)
then
743 write (this%iout,
'(4x,a,1(/,6x,a))') &
744 'THICKNESS AND VOID RATIO WILL NOT BE ADJUSTED DURING THE', &
747 write (this%iout,
'(4x,a)') &
748 'THICKNESS AND VOID RATIO WILL BE ADJUSTED DURING THE SIMULATION'
750 if (this%icellf /= 1)
then
751 write (this%iout,
'(4x,a)') &
752 'INTERBED THICKNESS WILL BE SPECIFIED AS A THICKNESS'
754 write (this%iout,
'(4x,a,1(/,6x,a))') &
755 'INTERBED THICKNESS WILL BE SPECIFIED AS A AS A CELL FRACTION'
757 if (this%ispecified_pcs /= 1)
then
758 if (this%ipch /= 0)
then
759 write (this%iout,
'(4x,a,1(/,6x,a))') &
760 'PRECONSOLIDATION HEAD WILL BE SPECIFIED RELATIVE TO INITIAL', &
763 write (this%iout,
'(4x,a,1(/,6x,a))') &
764 'PRECONSOLIDATION STRESS WILL BE SPECIFIED RELATIVE TO INITIAL', &
768 if (this%ipch /= 0)
then
769 write (this%iout,
'(4x,a,1(/,6x,a))') &
770 'PRECONSOLIDATION HEAD WILL BE SPECIFIED AS ABSOLUTE VALUES', &
771 'INSTEAD OF RELATIVE TO INITIAL HEAD CONDITIONS'
773 write (this%iout,
'(4x,a,1(/,6x,a))') &
774 'PRECONSOLIDATION STRESS WILL BE SPECIFIED AS ABSOLUTE VALUES', &
775 'INSTEAD OF RELATIVE TO INITIAL STRESS CONDITIONS'
778 if (this%ispecified_dbh /= 1)
then
779 write (this%iout,
'(4x,a,1(/,6x,a))') &
780 'DELAY INTERBED HEADS WILL BE SPECIFIED RELATIVE TO INITIAL ', &
783 write (this%iout,
'(4x,a,1(/,6x,a))') &
784 'DELAY INTERBED HEADS WILL BE SPECIFIED AS ABSOLUTE VALUES INSTEAD', &
785 'OF RELATIVE TO INITIAL GWF HEADS'
788 if (this%lhead_based .EQV. .false.)
then
789 if (this%ieslag /= 0)
then
790 write (this%iout,
'(4x,a,1(/,6x,a))') &
791 'SPECIFIC STORAGE VALUES WILL BE CALCULATED USING THE EFFECTIVE', &
792 'STRESS FROM THE PREVIOUS TIME STEP'
794 write (this%iout,
'(4x,a,1(/,6x,a))') &
795 'SPECIFIC STORAGE VALUES WILL BE CALCULATED USING THE CURRENT', &
798 else if (warn_estress_lag)
then
799 write (this%iout,
'(4x,a,2(/,6x,a))') &
800 'EFFECTIVE_STRESS_LAG HAS BEEN SPECIFIED BUT HAS NO EFFECT WHEN', &
801 'USING THE HEAD-BASED FORMULATION (HEAD_BASED HAS BEEN SPECIFIED', &
802 'IN THE OPTIONS BLOCK)'
805 write (this%iout, fmtoptr)
'GAMMAW =', this%gammaw
806 write (this%iout, fmtoptr)
'BETA =', this%beta
807 write (this%iout, fmtoptr)
'GAMMAW * BETA =', this%brg
808 write (this%iout,
'((1X,A))')
'END PACKAGE SETTINGS'
830 call mem_set_value(this%ninterbeds,
'NINTERBEDS', this%input_mempath, &
832 call mem_set_value(this%maxsig0,
'MAXBOUND', this%input_mempath, &
836 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%packName))// &
838 write (this%iout,
'(4x,a,i0)')
'NINTERBEDS = ', this%ninterbeds
839 write (this%iout,
'(4x,a,i0)')
'MAXSIG0 = ', this%maxsig0
840 write (this%iout,
'(1x,a)') &
841 'END OF '//trim(adjustl(this%packName))//
' DIMENSIONS'
844 if (.not. found%ninterbeds)
then
846 'NINTERBEDS is a required dimension.'
853 call this%define_listlabel()
869 call this%NumericalPackageType%allocate_scalars()
876 call mem_allocate(this%istounit,
'ISTOUNIT', this%memoryPath)
877 call mem_allocate(this%inobspkg,
'INOBSPKG', this%memoryPath)
878 call mem_allocate(this%ninterbeds,
'NINTERBEDS', this%memoryPath)
879 call mem_allocate(this%maxsig0,
'MAXSIG0', this%memoryPath)
880 call mem_allocate(this%nbound,
'NBOUND', this%memoryPath)
881 call mem_allocate(this%iscloc,
'ISCLOC', this%memoryPath)
882 call mem_allocate(this%iauxmultcol,
'IAUXMULTCOL', this%memoryPath)
883 call mem_allocate(this%ndelaycells,
'NDELAYCELLS', this%memoryPath)
884 call mem_allocate(this%ndelaybeds,
'NDELAYBEDS', this%memoryPath)
885 call mem_allocate(this%initialized,
'INITIALIZED', this%memoryPath)
886 call mem_allocate(this%ieslag,
'IESLAG', this%memoryPath)
888 call mem_allocate(this%lhead_based,
'LHEAD_BASED', this%memoryPath)
889 call mem_allocate(this%iupdatestress,
'IUPDATESTRESS', this%memoryPath)
890 call mem_allocate(this%ispecified_pcs,
'ISPECIFIED_PCS', this%memoryPath)
891 call mem_allocate(this%ispecified_dbh,
'ISPECIFIED_DBH', this%memoryPath)
892 call mem_allocate(this%inamedbound,
'INAMEDBOUND', this%memoryPath)
893 call mem_allocate(this%iconvchk,
'ICONVCHK', this%memoryPath)
895 call mem_allocate(this%istoragec,
'ISTORAGEC', this%memoryPath)
896 call mem_allocate(this%istrainib,
'ISTRAINIB', this%memoryPath)
897 call mem_allocate(this%istrainsk,
'ISTRAINSK', this%memoryPath)
898 call mem_allocate(this%ioutcomp,
'IOUTCOMP', this%memoryPath)
899 call mem_allocate(this%ioutcompi,
'IOUTCOMPI', this%memoryPath)
900 call mem_allocate(this%ioutcompe,
'IOUTCOMPE', this%memoryPath)
901 call mem_allocate(this%ioutcompib,
'IOUTCOMPIB', this%memoryPath)
902 call mem_allocate(this%ioutcomps,
'IOUTCOMPS', this%memoryPath)
903 call mem_allocate(this%ioutzdisp,
'IOUTZDISP', this%memoryPath)
904 call mem_allocate(this%ipakcsv,
'IPAKCSV', this%memoryPath)
905 call mem_allocate(this%iupdatematprop,
'IUPDATEMATPROP', this%memoryPath)
906 call mem_allocate(this%epsilon,
'EPSILON', this%memoryPath)
907 call mem_allocate(this%cc_crit,
'CC_CRIT', this%memoryPath)
908 call mem_allocate(this%gammaw,
'GAMMAW', this%memoryPath)
911 call mem_allocate(this%satomega,
'SATOMEGA', this%memoryPath)
912 call mem_allocate(this%icellf,
'ICELLF', this%memoryPath)
913 call mem_allocate(this%gwfiss0,
'GWFISS0', this%memoryPath)
926 this%ndelaycells = 19
931 this%lhead_based = .false.
932 this%iupdatestress = 1
933 this%ispecified_pcs = 0
934 this%ispecified_dbh = 0
948 this%iupdatematprop = 0
952 this%beta = 4.6512e-10_dp
953 this%brg = this%gammaw * this%beta
956 if (this%inewton /= 0)
then
960 this%satomega =
dzero
980 integer(I4B) :: iblen
984 if (this%ioutcomp == 0 .and. this%ioutcompi == 0 .and. &
985 this%ioutcompe == 0 .and. this%ioutcompib == 0 .and. &
986 this%ioutcomps == 0 .and. this%ioutzdisp == 0)
then
987 call mem_allocate(this%buff, 1,
'BUFF', trim(this%memoryPath))
989 call mem_allocate(this%buff, this%dis%nodes,
'BUFF', trim(this%memoryPath))
991 if (this%ioutcomp == 0 .and. this%ioutzdisp == 0)
then
992 call mem_allocate(this%buffusr, 1,
'BUFFUSR', trim(this%memoryPath))
994 call mem_allocate(this%buffusr, this%dis%nodesuser,
'BUFFUSR', &
995 trim(this%memoryPath))
997 call mem_allocate(this%sgm, this%dis%nodes,
'SGM', trim(this%memoryPath))
998 call mem_allocate(this%sgs, this%dis%nodes,
'SGS', trim(this%memoryPath))
999 call mem_allocate(this%cg_ske_cr, this%dis%nodes,
'CG_SKE_CR', &
1000 trim(this%memoryPath))
1001 call mem_allocate(this%cg_es, this%dis%nodes,
'CG_ES', &
1002 trim(this%memoryPath))
1003 call mem_allocate(this%cg_es0, this%dis%nodes,
'CG_ES0', &
1004 trim(this%memoryPath))
1005 call mem_allocate(this%cg_pcs, this%dis%nodes,
'CG_PCS', &
1006 trim(this%memoryPath))
1007 call mem_allocate(this%cg_comp, this%dis%nodes,
'CG_COMP', &
1008 trim(this%memoryPath))
1009 call mem_allocate(this%cg_tcomp, this%dis%nodes,
'CG_TCOMP', &
1010 trim(this%memoryPath))
1011 call mem_allocate(this%cg_stor, this%dis%nodes,
'CG_STOR', &
1012 trim(this%memoryPath))
1013 call mem_allocate(this%cg_ske, this%dis%nodes,
'CG_SKE', &
1014 trim(this%memoryPath))
1015 call mem_allocate(this%cg_sk, this%dis%nodes,
'CG_SK', &
1016 trim(this%memoryPath))
1017 call mem_allocate(this%cg_thickini, this%dis%nodes,
'CG_THICKINI', &
1018 trim(this%memoryPath))
1019 call mem_allocate(this%cg_thetaini, this%dis%nodes,
'CG_THETAINI', &
1020 trim(this%memoryPath))
1021 if (this%iupdatematprop == 0)
then
1022 call mem_setptr(this%cg_thick,
'CG_THICKINI', trim(this%memoryPath))
1023 call mem_setptr(this%cg_thick0,
'CG_THICKINI', trim(this%memoryPath))
1024 call mem_setptr(this%cg_theta,
'CG_THETAINI', trim(this%memoryPath))
1025 call mem_setptr(this%cg_theta0,
'CG_THETAINI', trim(this%memoryPath))
1027 call mem_allocate(this%cg_thick, this%dis%nodes,
'CG_THICK', &
1028 trim(this%memoryPath))
1029 call mem_allocate(this%cg_thick0, this%dis%nodes,
'CG_THICK0', &
1030 trim(this%memoryPath))
1031 call mem_allocate(this%cg_theta, this%dis%nodes,
'CG_THETA', &
1032 trim(this%memoryPath))
1033 call mem_allocate(this%cg_theta0, this%dis%nodes,
'CG_THETA0', &
1034 trim(this%memoryPath))
1038 call mem_allocate(this%cell_wcstor, this%dis%nodes,
'CELL_WCSTOR', &
1039 trim(this%memoryPath))
1040 call mem_allocate(this%cell_thick, this%dis%nodes,
'CELL_THICK', &
1041 trim(this%memoryPath))
1045 if (this%ninterbeds > 0)
then
1046 iblen = this%ninterbeds
1049 if (this%naux > 0)
then
1052 call mem_allocate(this%auxvar, naux, iblen,
'AUXVAR', this%memoryPath)
1055 this%auxvar(j, n) =
dzero
1058 call mem_allocate(this%unodelist, iblen,
'UNODELIST', trim(this%memoryPath))
1059 call mem_allocate(this%nodelist, iblen,
'NODELIST', trim(this%memoryPath))
1060 call mem_allocate(this%cg_gs, this%dis%nodes,
'CG_GS', trim(this%memoryPath))
1061 call mem_allocate(this%pcs, iblen,
'PCS', trim(this%memoryPath))
1062 call mem_allocate(this%rnb, iblen,
'RNB', trim(this%memoryPath))
1063 call mem_allocate(this%kv, iblen,
'KV', trim(this%memoryPath))
1064 call mem_allocate(this%h0, iblen,
'H0', trim(this%memoryPath))
1065 call mem_allocate(this%ci, iblen,
'CI', trim(this%memoryPath))
1066 call mem_allocate(this%rci, iblen,
'RCI', trim(this%memoryPath))
1067 call mem_allocate(this%idelay, iblen,
'IDELAY', trim(this%memoryPath))
1068 call mem_allocate(this%ielastic, iblen,
'IELASTIC', trim(this%memoryPath))
1069 call mem_allocate(this%iconvert, iblen,
'ICONVERT', trim(this%memoryPath))
1070 call mem_allocate(this%comp, iblen,
'COMP', trim(this%memoryPath))
1071 call mem_allocate(this%tcomp, iblen,
'TCOMP', trim(this%memoryPath))
1072 call mem_allocate(this%tcompi, iblen,
'TCOMPI', trim(this%memoryPath))
1073 call mem_allocate(this%tcompe, iblen,
'TCOMPE', trim(this%memoryPath))
1074 call mem_allocate(this%storagee, iblen,
'STORAGEE', trim(this%memoryPath))
1075 call mem_allocate(this%storagei, iblen,
'STORAGEI', trim(this%memoryPath))
1076 call mem_allocate(this%ske, iblen,
'SKE', trim(this%memoryPath))
1077 call mem_allocate(this%sk, iblen,
'SK', trim(this%memoryPath))
1078 call mem_allocate(this%thickini, iblen,
'THICKINI', trim(this%memoryPath))
1079 call mem_allocate(this%thetaini, iblen,
'THETAINI', trim(this%memoryPath))
1080 if (this%iupdatematprop == 0)
then
1081 call mem_setptr(this%thick,
'THICKINI', trim(this%memoryPath))
1082 call mem_setptr(this%thick0,
'THICKINI', trim(this%memoryPath))
1083 call mem_setptr(this%theta,
'THETAINI', trim(this%memoryPath))
1084 call mem_setptr(this%theta0,
'THETAINI', trim(this%memoryPath))
1086 call mem_allocate(this%thick, iblen,
'THICK', trim(this%memoryPath))
1087 call mem_allocate(this%thick0, iblen,
'THICK0', trim(this%memoryPath))
1088 call mem_allocate(this%theta, iblen,
'THETA', trim(this%memoryPath))
1089 call mem_allocate(this%theta0, iblen,
'THETA0', trim(this%memoryPath))
1096 if (this%inamedbound /= 0)
then
1098 'BOUNDNAME', trim(this%memoryPath))
1101 'BOUNDNAME', trim(this%memoryPath))
1106 call mem_allocate(this%nodelistsig0, this%maxsig0,
'NODELISTSIG0', &
1110 call mem_setptr(this%sig0,
'SIG0', this%input_mempath)
1111 call mem_checkin(this%sig0,
'SIG0', this%memoryPath, &
1112 'SIG0', this%input_mempath)
1115 call mem_setptr(this%gwfiss,
'ISS', trim(this%name_model))
1118 call mem_setptr(this%stoiconv,
'ICONVERT', this%stoMemPath)
1119 call mem_setptr(this%stoss,
'SS', this%stoMemPath)
1122 do n = 1, this%dis%nodes
1123 this%cg_gs(n) =
dzero
1124 this%cg_es(n) =
dzero
1125 this%cg_comp(n) =
dzero
1126 this%cg_tcomp(n) =
dzero
1127 this%cell_wcstor(n) =
dzero
1129 do n = 1, this%ninterbeds
1130 this%theta(n) =
dzero
1131 this%tcomp(n) =
dzero
1132 this%tcompi(n) =
dzero
1133 this%tcompe(n) =
dzero
1135 do n = 1, this%maxsig0
1136 this%nodelistsig0(n) = 0
1149 integer(I4B) :: node
1151 integer(I4B),
dimension(:),
pointer,
contiguous :: map
1155 if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser
1158 call mem_set_value(this%cg_ske_cr,
'CG_SKE_CR', this%input_mempath, &
1159 map, found%cg_ske_cr)
1160 call mem_set_value(this%cg_thetaini,
'CG_THETA', this%input_mempath, &
1161 map, found%cg_theta)
1162 call mem_set_value(this%sgm,
'SGM', this%input_mempath, map, found%sgm)
1163 call mem_set_value(this%sgs,
'SGS', this%input_mempath, map, found%sgs)
1166 if (.not. found%cg_ske_cr)
then
1167 call store_error(
'CG_SKE GRIDDATA must be specified.')
1170 if (.not. found%cg_theta)
then
1171 call store_error(
'CG_THETA GRIDDATA must be specified.')
1176 if (.not. found%sgm)
then
1177 do node = 1, this%dis%nodes
1178 this%sgm(node) = 1.7d0
1181 if (.not. found%sgs)
then
1182 do node = 1, this%dis%nodes
1183 this%sgs(node) = 2.0d0
1201 integer(I4B),
dimension(:),
pointer,
contiguous :: icsubno
1202 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid_pkgdata
1203 integer(I4B),
dimension(:),
pointer :: cellid
1205 contiguous :: cdelay
1207 contiguous :: boundname
1208 real(DP),
dimension(:),
pointer,
contiguous :: pcs, thick_frac, rnb
1209 real(DP),
dimension(:),
pointer,
contiguous :: ssv_cc, sse_cr, theta, kv, h0
1210 character(len=LINELENGTH) :: cdelaystr
1211 character(len=LENBOUNDNAME) :: bndname
1212 character(len=20) :: cellidstr
1213 real(DP) :: top, botm, baq, q, thick, rval
1214 integer(I4B) :: idelay, ndelaybeds, csubno
1215 integer(I4B) :: ib, n, nodeu, noder
1218 call mem_setptr(icsubno,
'ICSUBNO', this%input_mempath)
1219 call mem_setptr(cellid_pkgdata,
'CELLID_PKGDATA', this%input_mempath)
1220 call mem_setptr(cdelay,
'CDELAY', this%input_mempath)
1221 call mem_setptr(pcs,
'PCS0', this%input_mempath)
1222 call mem_setptr(thick_frac,
'THICK_FRAC', this%input_mempath)
1223 call mem_setptr(rnb,
'RNB', this%input_mempath)
1224 call mem_setptr(ssv_cc,
'SSV_CC', this%input_mempath)
1225 call mem_setptr(sse_cr,
'SSE_CR', this%input_mempath)
1226 call mem_setptr(theta,
'THETA', this%input_mempath)
1227 call mem_setptr(kv,
'KV', this%input_mempath)
1228 call mem_setptr(h0,
'H0', this%input_mempath)
1229 call mem_setptr(boundname,
'BOUNDNAME', this%input_mempath)
1235 do n = 1,
size(icsubno)
1241 if (csubno < 1 .or. csubno > this%ninterbeds)
then
1242 write (
errmsg,
'(a,1x,i0,2(1x,a),1x,i0,a)') &
1243 'Interbed number (', csubno,
') must be greater than 0 and ', &
1244 'less than or equal to', this%ninterbeds,
'.'
1250 cellid => cellid_pkgdata(:, n)
1253 if (this%dis%ndim == 1)
then
1255 elseif (this%dis%ndim == 2)
then
1256 nodeu =
get_node(cellid(1), 1, cellid(2), &
1257 this%dis%mshape(1), 1, &
1260 nodeu =
get_node(cellid(1), cellid(2), cellid(3), &
1261 this%dis%mshape(1), &
1262 this%dis%mshape(2), &
1267 noder = this%dis%get_nodenumber(nodeu, 1)
1268 if (noder <= 0)
then
1269 call this%dis%nodeu_to_string(nodeu, cellidstr)
1271 'CSUB configured for inactive cell: '// &
1272 trim(adjustl(cellidstr))//
'.'
1278 this%nodelist(csubno) = noder
1279 this%unodelist(csubno) = nodeu
1282 top = this%dis%top(noder)
1283 botm = this%dis%bot(noder)
1287 cdelaystr = cdelay(n)
1288 select case (cdelaystr)
1292 ndelaybeds = ndelaybeds + 1
1295 write (
errmsg,
'(a,1x,a,1x,i0,1x,a)') &
1296 'Invalid CDELAY ', trim(adjustl(cdelaystr)), &
1297 'for packagedata entry', csubno,
'.'
1301 this%idelay(csubno) = idelay
1304 this%pcs(csubno) = pcs(n)
1307 if (this%icellf == 0)
then
1308 if (thick_frac(n) <
dzero .or. thick_frac(n) > baq)
then
1309 write (
errmsg,
'(a,g0,2(a,1x),g0,1x,a,1x,i0,a)') &
1310 'THICK (', thick_frac(n),
') MUST BE greater than or equal to 0 ', &
1311 'and less than or equal to than', baq, &
1312 'for packagedata entry', csubno,
'.'
1315 thick = thick_frac(n)
1317 if (thick_frac(n) <
dzero .or. thick_frac(n) >
done)
then
1318 write (
errmsg,
'(a,1x,a,1x,i0,a)') &
1319 'FRAC MUST BE greater than 0 and less than or equal to 1', &
1320 'for packagedata entry', csubno,
'.'
1323 thick = thick_frac(n) * baq
1325 this%thickini(csubno) = thick
1326 if (this%iupdatematprop /= 0)
then
1327 this%thick(csubno) = thick
1331 if (idelay > 0)
then
1332 if (rnb(n) <
done)
then
1333 write (
errmsg,
'(a,g0,a,1x,a,1x,i0,a)') &
1334 'RNB (', rnb(n),
') must be greater than or equal to 1', &
1335 'for packagedata entry', csubno,
'.'
1338 this%rnb(csubno) = rnb(n)
1340 this%rnb(csubno) =
done
1344 if (ssv_cc(n) <
dzero)
then
1345 write (
errmsg,
'(2(a,1x),i0,a)') &
1346 '(SKV,CI) must be greater than or equal to 0', &
1347 'for packagedata entry', csubno,
'.'
1350 this%ci(csubno) = ssv_cc(n)
1353 if (sse_cr(n) <
dzero)
then
1354 write (
errmsg,
'(2(a,1x),i0,a)') &
1355 '(SKE,RCI) must be greater than or equal to 0', &
1356 'for packagedata entry', csubno,
'.'
1359 this%rci(csubno) = sse_cr(n)
1362 if (this%ci(csubno) == this%rci(csubno))
then
1363 this%ielastic(csubno) = 1
1365 this%ielastic(csubno) = 0
1369 if (theta(n) <=
dzero .or. theta(n) >
done)
then
1370 write (
errmsg,
'(a,1x,a,1x,i0,a)') &
1371 'THETA must be greater than 0 and less than or equal to 1', &
1372 'for packagedata entry', csubno,
'.'
1375 this%thetaini(csubno) = theta(n)
1376 if (this%iupdatematprop /= 0)
then
1377 this%theta(csubno) = theta(n)
1381 if (idelay > 0)
then
1382 if (kv(n) <= 0.0)
then
1383 write (
errmsg,
'(a,1x,i0,a)') &
1384 'KV must be greater than 0 for packagedata entry', csubno,
'.'
1388 this%kv(csubno) = kv(n)
1391 this%h0(csubno) = h0(n)
1394 if (this%inamedbound /= 0)
then
1395 bndname = boundname(n)
1396 if (len_trim(bndname) < 1)
then
1397 write (
errmsg,
'(a,1x,i0,a)') &
1398 'BOUNDNAME must be specified for packagedata entry', csubno,
'.'
1401 this%boundname(csubno) = bndname
1407 this%ndelaybeds = ndelaybeds
1410 if (ndelaybeds > 0)
then
1414 'IDB_NCONV_COUNT', trim(this%memoryPath))
1415 call mem_allocate(this%idbconvert, this%ndelaycells, ndelaybeds, &
1416 'IDBCONVERT', trim(this%memoryPath))
1418 'DBDHMAX', trim(this%memoryPath))
1419 call mem_allocate(this%dbz, this%ndelaycells, ndelaybeds, &
1420 'DBZ', trim(this%memoryPath))
1421 call mem_allocate(this%dbrelz, this%ndelaycells, ndelaybeds, &
1422 'DBRELZ', trim(this%memoryPath))
1423 call mem_allocate(this%dbh, this%ndelaycells, ndelaybeds, &
1424 'DBH', trim(this%memoryPath))
1425 call mem_allocate(this%dbh0, this%ndelaycells, ndelaybeds, &
1426 'DBH0', trim(this%memoryPath))
1427 call mem_allocate(this%dbgeo, this%ndelaycells, ndelaybeds, &
1428 'DBGEO', trim(this%memoryPath))
1429 call mem_allocate(this%dbes, this%ndelaycells, ndelaybeds, &
1430 'DBES', trim(this%memoryPath))
1431 call mem_allocate(this%dbes0, this%ndelaycells, ndelaybeds, &
1432 'DBES0', trim(this%memoryPath))
1433 call mem_allocate(this%dbpcs, this%ndelaycells, ndelaybeds, &
1434 'DBPCS', trim(this%memoryPath))
1436 'DBFLOWTOP', trim(this%memoryPath))
1438 'DBFLOWBOT', trim(this%memoryPath))
1439 call mem_allocate(this%dbdzini, this%ndelaycells, ndelaybeds, &
1440 'DBDZINI', trim(this%memoryPath))
1441 call mem_allocate(this%dbthetaini, this%ndelaycells, ndelaybeds, &
1442 'DBTHETAINI', trim(this%memoryPath))
1443 call mem_allocate(this%dbcomp, this%ndelaycells, ndelaybeds, &
1444 'DBCOMP', trim(this%memoryPath))
1445 call mem_allocate(this%dbtcomp, this%ndelaycells, ndelaybeds, &
1446 'DBTCOMP', trim(this%memoryPath))
1449 if (this%iupdatematprop == 0)
then
1450 call mem_setptr(this%dbdz,
'DBDZINI', trim(this%memoryPath))
1451 call mem_setptr(this%dbdz0,
'DBDZINI', trim(this%memoryPath))
1452 call mem_setptr(this%dbtheta,
'DBTHETAINI', trim(this%memoryPath))
1453 call mem_setptr(this%dbtheta0,
'DBTHETAINI', trim(this%memoryPath))
1455 call mem_allocate(this%dbdz, this%ndelaycells, ndelaybeds, &
1456 'DBDZ', trim(this%memoryPath))
1457 call mem_allocate(this%dbdz0, this%ndelaycells, ndelaybeds, &
1458 'DBDZ0', trim(this%memoryPath))
1459 call mem_allocate(this%dbtheta, this%ndelaycells, ndelaybeds, &
1460 'DBTHETA', trim(this%memoryPath))
1461 call mem_allocate(this%dbtheta0, this%ndelaycells, ndelaybeds, &
1462 'DBTHETA0', trim(this%memoryPath))
1467 'DBAL', trim(this%memoryPath))
1469 'DBAD', trim(this%memoryPath))
1471 'DBAU', trim(this%memoryPath))
1473 'DBRHS', trim(this%memoryPath))
1475 'DBDH', trim(this%memoryPath))
1477 'DBAW', trim(this%memoryPath))
1481 this%idb_nconv_count(n) = 0
1485 do ib = 1, this%ninterbeds
1486 idelay = this%idelay(ib)
1487 if (idelay == 0)
then
1492 do n = 1, this%ndelaycells
1493 rval = this%thickini(ib) / real(this%ndelaycells, dp)
1494 this%dbdzini(n, idelay) = rval
1495 this%dbh(n, idelay) = this%h0(ib)
1496 this%dbh0(n, idelay) = this%h0(ib)
1497 this%dbthetaini(n, idelay) = this%thetaini(ib)
1498 this%dbgeo(n, idelay) =
dzero
1499 this%dbes(n, idelay) =
dzero
1500 this%dbes0(n, idelay) =
dzero
1501 this%dbpcs(n, idelay) = this%pcs(ib)
1502 this%dbcomp(n, idelay) =
dzero
1503 this%dbtcomp(n, idelay) =
dzero
1504 if (this%iupdatematprop /= 0)
then
1505 this%dbdz(n, idelay) = this%dbdzini(n, idelay)
1506 this%dbdz0(n, idelay) = this%dbdzini(n, idelay)
1507 this%dbtheta(n, idelay) = this%theta(ib)
1508 this%dbtheta0(n, idelay) = this%theta(ib)
1513 call this%csub_delay_init_zcell(ib)
1517 do n = 1, this%ndelaycells
1518 this%dbal(n) =
dzero
1519 this%dbad(n) =
dzero
1520 this%dbau(n) =
dzero
1521 this%dbrhs(n) =
dzero
1522 this%dbdh(n) =
dzero
1523 this%dbaw(n) =
dzero
1529 if (ndelaybeds > 0)
then
1530 q = mod(real(this%ndelaycells, dp),
dtwo)
1531 if (q ==
dzero)
then
1532 write (
errmsg,
'(a,i0,a,1x,a)') &
1533 'NDELAYCELLS (', this%ndelaycells,
') must be an', &
1534 'odd number when using the effective stress formulation.'
1539 if (this%iprpak /= 0)
then
1540 call this%csub_print_packagedata()
1567 character(len=LINELENGTH) :: title
1568 character(len=LINELENGTH) :: tag
1569 character(len=10) :: ctype
1570 character(len=20) :: cellid
1571 integer(I4B) :: ntabrows
1572 integer(I4B) :: ntabcols
1574 integer(I4b) :: idelay
1575 integer(I4B) :: node
1578 title =
'CSUB'//
' PACKAGE ('// &
1579 trim(adjustl(this%packName))//
') INTERBED DATA'
1582 ntabrows = this%ninterbeds
1584 if (this%inamedbound /= 0)
then
1585 ntabcols = ntabcols + 1
1589 call table_cr(this%inputtab, this%packName, title)
1590 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
1595 tag =
'INTERBED NUMBER'
1596 call this%inputtab%initialize_column(tag, 10, alignment=
tabcenter)
1598 call this%inputtab%initialize_column(tag, 20, alignment=
tableft)
1599 tag =
'INTERBED TYPE'
1600 call this%inputtab%initialize_column(tag, 10, alignment=
tabcenter)
1602 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1604 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1606 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1607 tag =
'INTERBED THICKNESS'
1608 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1609 tag =
'CELL THICKNESS'
1610 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1612 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1614 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1616 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1618 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1620 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1621 if (this%inamedbound /= 0)
then
1623 call this%inputtab%initialize_column(tag, 40, alignment=
tableft)
1626 do ib = 1, this%ninterbeds
1627 idelay = this%idelay(ib)
1628 node = this%nodelist(ib)
1629 call this%dis%noder_to_string(node, cellid)
1630 if (idelay == 0)
then
1637 call this%inputtab%add_term(ib)
1638 call this%inputtab%add_term(cellid)
1639 call this%inputtab%add_term(ctype)
1640 call this%inputtab%add_term(this%pcs(ib))
1641 call this%inputtab%add_term(this%thickini(ib))
1642 call this%inputtab%add_term(this%rnb(ib))
1643 call this%inputtab%add_term(this%thickini(ib) * this%rnb(ib))
1644 call this%inputtab%add_term(this%dis%top(node) - this%dis%bot(node))
1645 call this%inputtab%add_term(this%ci(ib))
1646 call this%inputtab%add_term(this%rci(ib))
1647 call this%inputtab%add_term(this%theta(ib))
1648 if (idelay == 0)
then
1649 call this%inputtab%add_term(
"--")
1650 call this%inputtab%add_term(
"--")
1652 call this%inputtab%add_term(this%kv(ib))
1653 call this%inputtab%add_term(this%h0(ib))
1655 if (this%inamedbound /= 0)
then
1656 call this%inputtab%add_term(this%boundname(ib))
1673 character(len=LINELENGTH) :: title
1674 character(len=LINELENGTH) :: tag
1675 character(len=LINELENGTH) :: msg
1676 character(len=10) :: ctype
1677 character(len=20) :: cellid
1678 character(len=10) :: cflag
1683 integer(I4B) :: node
1685 integer(I4B) :: idelay
1686 integer(I4B) :: iexceed
1687 integer(I4B),
parameter :: ncells = 20
1688 integer(I4B) :: nlen
1689 integer(I4B) :: ntabrows
1690 integer(I4B) :: ntabcols
1691 integer(I4B) :: ipos
1696 integer(I4B),
dimension(:),
allocatable :: imap_sel
1697 integer(I4B),
dimension(:),
allocatable :: locs
1698 real(DP),
dimension(:),
allocatable :: pctcomp_arr
1701 allocate (locs(this%dis%ndim))
1704 if (this%ninterbeds > 0)
then
1705 nlen = min(ncells, this%ninterbeds)
1706 allocate (imap_sel(nlen))
1707 allocate (pctcomp_arr(this%ninterbeds))
1709 do ib = 1, this%ninterbeds
1710 idelay = this%idelay(ib)
1711 b0 = this%thickini(ib)
1712 strain = this%tcomp(ib) / b0
1714 pctcomp_arr(ib) = pctcomp
1715 if (pctcomp >=
done)
then
1716 iexceed = iexceed + 1
1719 call selectn(imap_sel, pctcomp_arr, reverse=.true.)
1722 i0 = max(1, this%ninterbeds - ncells + 1)
1723 i1 = this%ninterbeds
1725 if (iexceed /= 0)
then
1726 write (msg,
'(1x,a,1x,i0,1x,a,1x,i0,1x,a)') &
1727 'LARGEST', (i1 - i0 + 1),
'OF', this%ninterbeds, &
1728 'INTERBED STRAIN VALUES SHOWN'
1733 title = trim(adjustl(this%packName))//
' PACKAGE INTERBED STRAIN SUMMARY'
1740 call table_cr(this%outputtab, this%packName, title)
1741 call this%outputtab%table_df(ntabrows, ntabcols, this%iout)
1744 tag =
'INTERBED NUMBER'
1745 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1746 tag =
'INTERBED TYPE'
1747 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1749 call this%outputtab%initialize_column(tag, 20, alignment=
tableft)
1750 tag =
'INITIAL THICKNESS'
1751 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1752 tag =
'FINAL THICKNESS'
1753 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1754 tag =
'TOTAL COMPACTION'
1755 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1756 tag =
'FINAL STRAIN'
1757 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1758 tag =
'PERCENT COMPACTION'
1759 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1761 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1766 idelay = this%idelay(ib)
1767 b0 = this%thickini(ib)
1768 b1 = this%csub_calc_interbed_thickness(ib)
1769 if (idelay == 0)
then
1773 b0 = b0 * this%rnb(ib)
1775 strain = this%tcomp(ib) / b0
1777 if (pctcomp >= 5.0_dp)
then
1779 else if (pctcomp >=
done)
then
1784 node = this%nodelist(ib)
1785 call this%dis%noder_to_string(node, cellid)
1788 call this%outputtab%add_term(ib)
1789 call this%outputtab%add_term(ctype)
1790 call this%outputtab%add_term(cellid)
1791 call this%outputtab%add_term(b0)
1792 call this%outputtab%add_term(b1)
1793 call this%outputtab%add_term(this%tcomp(ib))
1794 call this%outputtab%add_term(strain)
1795 call this%outputtab%add_term(pctcomp)
1796 call this%outputtab%add_term(cflag)
1798 write (this%iout,
'(/1X,A,1X,I0,1X,A,1X,I0,1X,A,/1X,A,/1X,A)') &
1799 'PERCENT COMPACTION IS GREATER THAN OR EQUAL TO 1 PERCENT IN', &
1800 iexceed,
'OF', this%ninterbeds,
'INTERBED(S).', &
1801 'USE THE STRAIN_CSV_INTERBED OPTION TO OUTPUT A CSV '// &
1802 'FILE WITH PERCENT COMPACTION ',
'VALUES FOR ALL INTERBEDS.'
1804 msg =
'PERCENT COMPACTION WAS LESS THAN 1 PERCENT IN ALL INTERBEDS'
1805 write (this%iout,
'(/1X,A)') trim(adjustl(msg))
1809 if (this%istrainib /= 0)
then
1812 ntabrows = this%ninterbeds
1814 if (this%dis%ndim > 1)
then
1815 ntabcols = ntabcols + 1
1817 ntabcols = ntabcols + this%dis%ndim
1820 call table_cr(this%outputtab, this%packName,
'')
1821 call this%outputtab%table_df(ntabrows, ntabcols, this%istrainib, &
1822 lineseparator=.false., separator=
',')
1825 tag =
'INTERBED_NUMBER'
1826 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1827 tag =
'INTERBED_TYPE'
1828 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1830 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1831 if (this%dis%ndim == 2)
then
1833 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1835 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1838 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1840 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1842 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1844 tag =
'INITIAL_THICKNESS'
1845 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1846 tag =
'FINAL_THICKNESS'
1847 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1848 tag =
'TOTAL_COMPACTION'
1849 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1850 tag =
'TOTAL_STRAIN'
1851 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1852 tag =
'PERCENT_COMPACTION'
1853 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1856 do ib = 1, this%ninterbeds
1857 idelay = this%idelay(ib)
1858 b0 = this%thickini(ib)
1859 b1 = this%csub_calc_interbed_thickness(ib)
1860 if (idelay == 0)
then
1864 b0 = b0 * this%rnb(ib)
1866 strain = this%tcomp(ib) / b0
1868 node = this%nodelist(ib)
1869 call this%dis%noder_to_array(node, locs)
1872 call this%outputtab%add_term(ib)
1873 call this%outputtab%add_term(ctype)
1874 if (this%dis%ndim > 1)
then
1875 call this%outputtab%add_term(this%dis%get_nodeuser(node))
1877 do ipos = 1, this%dis%ndim
1878 call this%outputtab%add_term(locs(ipos))
1880 call this%outputtab%add_term(b0)
1881 call this%outputtab%add_term(b1)
1882 call this%outputtab%add_term(this%tcomp(ib))
1883 call this%outputtab%add_term(strain)
1884 call this%outputtab%add_term(pctcomp)
1889 deallocate (imap_sel)
1890 deallocate (pctcomp_arr)
1894 nlen = min(ncells, this%dis%nodes)
1895 allocate (imap_sel(nlen))
1896 allocate (pctcomp_arr(this%dis%nodes))
1898 do node = 1, this%dis%nodes
1900 if (this%cg_thickini(node) >
dzero)
then
1901 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1904 pctcomp_arr(node) = pctcomp
1905 if (pctcomp >=
done)
then
1906 iexceed = iexceed + 1
1909 call selectn(imap_sel, pctcomp_arr, reverse=.true.)
1912 i0 = max(1, this%dis%nodes - ncells + 1)
1915 if (iexceed /= 0)
then
1916 write (msg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1917 'LARGEST ', (i1 - i0 + 1),
'OF', this%dis%nodes, &
1918 'CELL COARSE-GRAINED VALUES SHOWN'
1922 title = trim(adjustl(this%packName))// &
1923 ' PACKAGE COARSE-GRAINED STRAIN SUMMARY'
1930 call table_cr(this%outputtab, this%packName, title)
1931 call this%outputtab%table_df(ntabrows, ntabcols, this%iout)
1935 call this%outputtab%initialize_column(tag, 20, alignment=
tableft)
1936 tag =
'INITIAL THICKNESS'
1937 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1938 tag =
'FINAL THICKNESS'
1939 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1940 tag =
'TOTAL COMPACTION'
1941 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1942 tag =
'FINAL STRAIN'
1943 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1944 tag =
'PERCENT COMPACTION'
1945 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1947 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1951 if (this%cg_thickini(node) >
dzero)
then
1952 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1957 if (pctcomp >= 5.0_dp)
then
1959 else if (pctcomp >=
done)
then
1964 call this%dis%noder_to_string(node, cellid)
1967 call this%outputtab%add_term(cellid)
1968 call this%outputtab%add_term(this%cg_thickini(node))
1969 call this%outputtab%add_term(this%cg_thick(node))
1970 call this%outputtab%add_term(this%cg_tcomp(node))
1971 call this%outputtab%add_term(strain)
1972 call this%outputtab%add_term(pctcomp)
1973 call this%outputtab%add_term(cflag)
1975 write (this%iout,
'(/1X,A,1X,I0,1X,A,1X,I0,1X,A,/1X,A,/1X,A)') &
1976 'COARSE-GRAINED STORAGE PERCENT COMPACTION IS GREATER THAN OR '// &
1977 'EQUAL TO 1 PERCENT IN', iexceed,
'OF', this%dis%nodes,
'CELL(S).', &
1978 'USE THE STRAIN_CSV_COARSE OPTION TO OUTPUT A CSV '// &
1979 'FILE WITH PERCENT COMPACTION ',
'VALUES FOR ALL CELLS.'
1981 msg =
'COARSE-GRAINED STORAGE PERCENT COMPACTION WAS LESS THAN '// &
1982 '1 PERCENT IN ALL CELLS '
1983 write (this%iout,
'(/1X,A)') trim(adjustl(msg))
1987 if (this%istrainsk /= 0)
then
1990 ntabrows = this%dis%nodes
1992 if (this%dis%ndim > 1)
then
1993 ntabcols = ntabcols + 1
1995 ntabcols = ntabcols + this%dis%ndim
1998 call table_cr(this%outputtab, this%packName,
'')
1999 call this%outputtab%table_df(ntabrows, ntabcols, this%istrainsk, &
2000 lineseparator=.false., separator=
',')
2004 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2005 if (this%dis%ndim == 2)
then
2007 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2009 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2012 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2014 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2016 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2018 tag =
'INITIAL_THICKNESS'
2019 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2020 tag =
'FINAL_THICKNESS'
2021 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2022 tag =
'TOTAL_COMPACTION'
2023 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2024 tag =
'TOTAL_STRAIN'
2025 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2026 tag =
'PERCENT_COMPACTION'
2027 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2030 do node = 1, this%dis%nodes
2031 if (this%cg_thickini(node) >
dzero)
then
2032 strain = this%cg_tcomp(node) / this%cg_thickini(node)
2037 call this%dis%noder_to_array(node, locs)
2040 if (this%dis%ndim > 1)
then
2041 call this%outputtab%add_term(this%dis%get_nodeuser(node))
2043 do ipos = 1, this%dis%ndim
2044 call this%outputtab%add_term(locs(ipos))
2046 call this%outputtab%add_term(this%cg_thickini(node))
2047 call this%outputtab%add_term(this%cg_thick(node))
2048 call this%outputtab%add_term(this%cg_tcomp(node))
2049 call this%outputtab%add_term(strain)
2050 call this%outputtab%add_term(pctcomp)
2056 if (this%ndelaybeds > 0)
then
2057 if (this%idb_nconv_count(2) > 0)
then
2058 write (
warnmsg,
'(a,1x,a,1x,i0,1x,a,1x,a)') &
2059 'Delay interbed cell heads were less than the top of the interbed', &
2060 'cell in', this%idb_nconv_count(2),
'interbed cells in ', &
2061 'non-convertible GWF cells for at least one time step during '// &
2068 deallocate (imap_sel)
2070 deallocate (pctcomp_arr)
2085 if (this%inunit > 0)
then
2107 if (this%iupdatematprop == 0)
then
2108 nullify (this%cg_thick)
2109 nullify (this%cg_thick0)
2110 nullify (this%cg_theta)
2111 nullify (this%cg_theta0)
2126 call mem_deallocate(this%boundname,
'BOUNDNAME', this%memoryPath)
2143 if (this%iupdatematprop == 0)
then
2144 nullify (this%thick)
2145 nullify (this%thick0)
2146 nullify (this%theta)
2147 nullify (this%theta0)
2158 if (this%ndelaybeds > 0)
then
2159 if (this%iupdatematprop == 0)
then
2161 nullify (this%dbdz0)
2162 nullify (this%dbtheta)
2163 nullify (this%dbtheta0)
2202 nullify (this%gwfiss)
2205 nullify (this%stoiconv)
2206 nullify (this%stoss)
2209 if (this%iprpak > 0)
then
2210 call this%inputtab%table_da()
2211 deallocate (this%inputtab)
2212 nullify (this%inputtab)
2216 if (
associated(this%outputtab))
then
2217 call this%outputtab%table_da()
2218 deallocate (this%outputtab)
2219 nullify (this%outputtab)
2224 if (this%ipakcsv > 0)
then
2225 call this%pakcsvtab%table_da()
2226 deallocate (this%pakcsvtab)
2227 nullify (this%pakcsvtab)
2231 call mem_deallocate(this%listlabel,
'LISTLABEL', this%memoryPath)
2275 if (this%inunit > 0)
then
2276 call this%obs%obs_da()
2279 deallocate (this%obs)
2285 call this%NumericalPackageType%da()
2304 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellids
2305 integer(I4B),
dimension(:),
pointer,
contiguous :: cellid
2306 integer(I4B),
pointer :: iper
2307 integer(I4B) :: n, nodeu, noder
2308 character(len=LINELENGTH) :: title, text
2309 character(len=20) :: cellstr
2310 logical(LGP) :: found
2312 character(len=*),
parameter :: fmtlsp = &
2313 &
"(1X,/1X,'REUSING ',a,'S FROM LAST STRESS PERIOD')"
2315 call mem_setptr(iper,
'IPER', this%input_mempath)
2316 if (iper /=
kper)
then
2317 write (this%iout, fmtlsp) trim(this%filtyp)
2318 call this%csub_rp_obs()
2322 call mem_setptr(cellids,
'CELLID', this%input_mempath)
2323 call mem_set_value(this%nbound,
'NBOUND', this%input_mempath, &
2324 found, release=.false.)
2327 if (this%iprpak /= 0)
then
2329 title =
'CSUB'//
' PACKAGE ('// &
2330 trim(adjustl(this%packName))//
') DATA FOR PERIOD'
2331 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
2332 call table_cr(this%inputtab, this%packName, title)
2333 call this%inputtab%table_df(1, 2, this%iout, finalize=.false.)
2335 call this%inputtab%initialize_column(text, 20)
2337 call this%inputtab%initialize_column(text, 15, alignment=tableft)
2341 do n = 1, this%nbound
2344 cellid => cellids(:, n)
2347 if (this%dis%ndim == 1)
then
2349 elseif (this%dis%ndim == 2)
then
2350 nodeu =
get_node(cellid(1), 1, cellid(2), &
2351 this%dis%mshape(1), 1, &
2354 nodeu =
get_node(cellid(1), cellid(2), cellid(3), &
2355 this%dis%mshape(1), &
2356 this%dis%mshape(2), &
2361 noder = this%dis%get_nodenumber(nodeu, 1)
2362 if (noder <= 0)
then
2366 this%nodelistsig0(n) = noder
2369 if (this%iprpak /= 0)
then
2370 call this%dis%noder_to_string(noder, cellstr)
2371 call this%inputtab%add_term(cellstr)
2372 call this%inputtab%add_term(this%sig0(n))
2382 if (this%iprpak /= 0)
then
2383 call this%inputtab%finalize_table()
2387 call this%csub_rp_obs()
2403 integer(I4B),
intent(in) :: nodes
2404 real(DP),
dimension(nodes),
intent(in) :: hnew
2408 integer(I4B) :: idelay
2409 integer(I4B) :: node
2416 if (this%ninterbeds > 0)
then
2418 if (this%gwfiss /= 0)
then
2419 write (
errmsg,
'(a,i0,a,1x,a,1x,a,1x,i0,1x,a)') &
2420 'Only the first and last (',
nper,
')', &
2421 'stress period can be steady if interbeds are simulated.', &
2422 'Stress period',
kper,
'has been defined to be steady state.'
2429 if (this%initialized == 0)
then
2430 if (this%gwfiss == 0)
then
2431 call this%csub_set_initial_state(nodes, hnew)
2439 this%cg_comp(node) =
dzero
2440 this%cg_es0(node) = this%cg_es(node)
2441 if (this%iupdatematprop /= 0)
then
2442 this%cg_thick0(node) = this%cg_thick(node)
2443 this%cg_theta0(node) = this%cg_theta(node)
2448 do ib = 1, this%ninterbeds
2449 idelay = this%idelay(ib)
2452 this%comp(ib) =
dzero
2453 node = this%nodelist(ib)
2454 if (this%initialized /= 0)
then
2455 es = this%cg_es(node)
2461 if (this%iupdatematprop /= 0)
then
2462 this%thick0(ib) = this%thick(ib)
2463 this%theta0(ib) = this%theta(ib)
2467 if (idelay /= 0)
then
2471 if (this%gwfiss0 /= 0)
then
2472 node = this%nodelist(ib)
2474 do n = 1, this%ndelaycells
2475 this%dbh(n, idelay) = h
2481 do n = 1, this%ndelaycells
2483 if (this%initialized /= 0)
then
2484 if (this%dbes(n, idelay) > this%dbpcs(n, idelay))
then
2485 this%dbpcs(n, idelay) = this%dbes(n, idelay)
2488 this%dbh0(n, idelay) = this%dbh(n, idelay)
2489 this%dbes0(n, idelay) = this%dbes(n, idelay)
2490 if (this%iupdatematprop /= 0)
then
2491 this%dbdz0(n, idelay) = this%dbdz(n, idelay)
2492 this%dbtheta0(n, idelay) = this%dbtheta(n, idelay)
2499 this%gwfiss0 = this%gwfiss
2504 call this%obs%obs_ad()
2512 subroutine csub_fc(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
2517 integer(I4B),
intent(in) :: kiter
2518 real(DP),
intent(in),
dimension(:) :: hold
2519 real(DP),
intent(in),
dimension(:) :: hnew
2521 integer(I4B),
intent(in),
dimension(:) :: idxglo
2522 real(DP),
intent(inout),
dimension(:) :: rhs
2525 integer(I4B) :: node
2526 integer(I4B) :: idiag
2527 integer(I4B) :: idelay
2535 call this%csub_cg_calc_stress(this%dis%nodes, hnew)
2538 if (this%gwfiss == 0)
then
2544 do node = 1, this%dis%nodes
2545 idiag = this%dis%con%ia(node)
2546 area = this%dis%get_area(node)
2549 if (this%ibound(node) < 1) cycle
2552 if (this%iupdatematprop /= 0)
then
2553 if (this%ieslag == 0)
then
2556 call this%csub_cg_calc_comp(node, hnew(node), hold(node), comp)
2557 this%cg_comp(node) = comp
2560 call this%csub_cg_update(node)
2565 call this%csub_cg_fc(node, tled, area, hnew(node), hold(node), &
2569 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2570 rhs(node) = rhs(node) + rhsterm
2574 if (this%brg /=
dzero)
then
2575 call this%csub_cg_wcomp_fc(node, tled, area, hnew(node), hold(node), &
2580 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2581 rhs(node) = rhs(node) + rhsterm
2586 if (this%ninterbeds /= 0)
then
2590 do ib = 1, this%ninterbeds
2591 node = this%nodelist(ib)
2592 idelay = this%idelay(ib)
2593 idiag = this%dis%con%ia(node)
2594 area = this%dis%get_area(node)
2595 call this%csub_interbed_fc(ib, node, area, hnew(node), hold(node), &
2597 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2598 rhs(node) = rhs(node) + rhsterm
2602 call this%csub_nodelay_wcomp_fc(ib, node, tled, area, &
2603 hnew(node), hold(node), &
2607 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2608 rhs(node) = rhs(node) + rhsterm
2629 subroutine csub_fn(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
2634 integer(I4B),
intent(in) :: kiter
2635 real(DP),
intent(in),
dimension(:) :: hold
2636 real(DP),
intent(in),
dimension(:) :: hnew
2638 integer(I4B),
intent(in),
dimension(:) :: idxglo
2639 real(DP),
intent(inout),
dimension(:) :: rhs
2641 integer(I4B) :: idelay
2642 integer(I4B) :: node
2643 integer(I4B) :: idiag
2651 if (this%gwfiss == 0)
then
2655 do node = 1, this%dis%nodes
2656 idiag = this%dis%con%ia(node)
2657 area = this%dis%get_area(node)
2660 if (this%ibound(node) < 1) cycle
2663 call this%csub_cg_fn(node, tled, area, &
2664 hnew(node), hcof, rhsterm)
2668 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2669 rhs(node) = rhs(node) + rhsterm
2673 if (this%brg /=
dzero)
then
2674 call this%csub_cg_wcomp_fn(node, tled, area, hnew(node), hold(node), &
2679 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2680 rhs(node) = rhs(node) + rhsterm
2685 if (this%ninterbeds /= 0)
then
2689 do ib = 1, this%ninterbeds
2690 idelay = this%idelay(ib)
2691 node = this%nodelist(ib)
2694 if (this%ibound(node) < 1) cycle
2697 idiag = this%dis%con%ia(node)
2698 area = this%dis%get_area(node)
2699 call this%csub_interbed_fn(ib, node, hnew(node), hold(node), &
2703 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2704 rhs(node) = rhs(node) + rhsterm
2707 if (this%brg /=
dzero .and. idelay == 0)
then
2708 call this%csub_nodelay_wcomp_fn(ib, node, tled, area, &
2709 hnew(node), hold(node), &
2713 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2714 rhs(node) = rhs(node) + rhsterm
2730 character(len=LINELENGTH) :: tag
2731 integer(I4B) :: ntabrows
2732 integer(I4B) :: ntabcols
2734 if (this%ipakcsv > 0)
then
2735 if (this%ndelaybeds < 1)
then
2736 write (
warnmsg,
'(a,1x,3a)') &
2737 'Package convergence data is requested but delay interbeds', &
2738 'are not included in package (', &
2739 trim(adjustl(this%packName)),
').'
2747 call table_cr(this%pakcsvtab, this%packName,
'')
2748 call this%pakcsvtab%table_df(ntabrows, ntabcols, this%ipakcsv, &
2749 lineseparator=.false., separator=
',', &
2753 tag =
'total_inner_iterations'
2754 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2756 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2758 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2760 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2762 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2764 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2766 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2768 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2769 tag =
'dstoragemax_loc'
2770 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2788 subroutine csub_cc(this, innertot, kiter, iend, icnvgmod, nodes, &
2789 hnew, hold, cpak, ipak, dpak)
2794 integer(I4B),
intent(in) :: innertot
2795 integer(I4B),
intent(in) :: kiter
2796 integer(I4B),
intent(in) :: iend
2797 integer(I4B),
intent(in) :: icnvgmod
2798 integer(I4B),
intent(in) :: nodes
2799 real(DP),
dimension(nodes),
intent(in) :: hnew
2800 real(DP),
dimension(nodes),
intent(in) :: hold
2801 character(len=LENPAKLOC),
intent(inout) :: cpak
2802 integer(I4B),
intent(inout) :: ipak
2803 real(DP),
intent(inout) :: dpak
2805 character(len=LENPAKLOC) :: cloc
2806 integer(I4B) :: icheck
2807 integer(I4B) :: ipakfail
2809 integer(I4B) :: node
2810 integer(I4B) :: idelay
2811 integer(I4B) :: locdhmax
2812 integer(I4B) :: locrmax
2813 integer(I4B) :: ifirst
2819 real(DP) :: hcellold
2833 icheck = this%iconvchk
2843 if (this%gwfiss /= 0)
then
2846 if (icnvgmod == 0)
then
2852 if (icheck /= 0)
then
2858 final_check:
do ib = 1, this%ninterbeds
2859 idelay = this%idelay(ib)
2860 node = this%nodelist(ib)
2863 if (idelay == 0) cycle
2866 if (this%ibound(node) < 1) cycle
2869 dh = this%dbdhmax(idelay)
2874 area = this%dis%get_area(node)
2876 hcellold = hold(node)
2879 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
2882 call this%csub_delay_calc_dstor(ib, hcell, stoe, stoi)
2883 v1 = (stoe + stoi) * area * this%rnb(ib) * tled
2886 call this%csub_delay_calc_wcomp(ib, dwc)
2887 v1 = v1 + dwc * area * this%rnb(ib)
2890 call this%csub_delay_fc(ib, hcof, rhs)
2891 v2 = (-hcof * hcell - rhs) * area * this%rnb(ib)
2898 df = df *
delt / area
2901 if (ifirst == 1)
then
2908 if (abs(dh) > abs(dhmax))
then
2912 if (abs(df) > abs(rmax))
then
2921 if (abs(dhmax) > abs(dpak))
then
2924 write (cloc,
"(a,'-',a)") trim(this%packName),
'head'
2929 if (abs(rmax) > abs(dpak))
then
2932 write (cloc,
"(a,'-',a)") trim(this%packName),
'storage'
2937 if (this%ipakcsv /= 0)
then
2940 call this%pakcsvtab%add_term(innertot)
2941 call this%pakcsvtab%add_term(
totim)
2942 call this%pakcsvtab%add_term(
kper)
2943 call this%pakcsvtab%add_term(
kstp)
2944 call this%pakcsvtab%add_term(kiter)
2945 if (this%ndelaybeds > 0)
then
2946 call this%pakcsvtab%add_term(dhmax)
2947 call this%pakcsvtab%add_term(locdhmax)
2948 call this%pakcsvtab%add_term(rmax)
2949 call this%pakcsvtab%add_term(locrmax)
2951 call this%pakcsvtab%add_term(
'--')
2952 call this%pakcsvtab%add_term(
'--')
2953 call this%pakcsvtab%add_term(
'--')
2954 call this%pakcsvtab%add_term(
'--')
2959 call this%pakcsvtab%finalize_table()
2974 subroutine csub_cq(this, nodes, hnew, hold, isuppress_output, flowja)
2980 integer(I4B),
intent(in) :: nodes
2981 real(DP),
intent(in),
dimension(nodes) :: hnew
2982 real(DP),
intent(in),
dimension(nodes) :: hold
2983 integer(I4B),
intent(in) :: isuppress_output
2984 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
2987 integer(I4B) :: idelay
2988 integer(I4B) :: ielastic
2989 integer(I4B) :: iconvert
2990 integer(I4B) :: node
2993 integer(I4B) :: idiag
3020 integer(I4B) :: iprobslocal
3030 do node = 1, this%dis%nodes
3031 idiag = this%dis%con%ia(node)
3032 area = this%dis%get_area(node)
3036 if (this%gwfiss == 0)
then
3042 if (this%ibound(node) > 0 .and. this%cg_thickini(node) >
dzero)
then
3045 call this%csub_cg_fc(node, tled, area, hnew(node), hold(node), &
3047 rrate = hcof * hnew(node) - rhs
3050 call this%csub_cg_calc_comp(node, hnew(node), hold(node), comp)
3053 call this%csub_cg_wcomp_fc(node, tled, area, hnew(node), hold(node), &
3055 rratewc = hcof * hnew(node) - rhs
3061 this%cg_stor(node) = rrate
3062 this%cell_wcstor(node) = rratewc
3063 this%cell_thick(node) = this%cg_thick(node)
3066 this%cg_comp(node) = comp
3070 if (isuppress_output == 0)
then
3074 if (this%iupdatematprop /= 0)
then
3075 call this%csub_cg_update(node)
3079 this%cg_tcomp(node) = this%cg_tcomp(node) + comp
3083 flowja(idiag) = flowja(idiag) + rrate
3084 flowja(idiag) = flowja(idiag) + rratewc
3090 if (this%ndelaybeds > 0)
then
3091 this%idb_nconv_count(1) = 0
3098 do ib = 1, this%ninterbeds
3100 idelay = this%idelay(ib)
3101 ielastic = this%ielastic(ib)
3105 if (idelay == 0)
then
3109 b = this%thick(ib) * this%rnb(ib)
3113 node = this%nodelist(ib)
3114 idiag = this%dis%con%ia(node)
3115 area = this%dis%get_area(node)
3118 this%cell_thick(node) = this%cell_thick(node) + b
3121 if (this%gwfiss == 0)
then
3129 if (this%ibound(node) < 1) cycle
3132 if (idelay == 0)
then
3133 iconvert = this%iconvert(ib)
3137 call this%csub_nodelay_calc_comp(ib, hnew(node), hold(node), comp, &
3141 es = this%cg_es(node)
3143 es0 = this%cg_es0(node)
3146 if (ielastic > 0 .or. iconvert == 0)
then
3149 stoi = -pcs * rho2 + (rho2 * es)
3150 stoe = pcs * rho1 - (rho1 * es0)
3156 this%storagee(ib) = stoe * tledm
3157 this%storagei(ib) = stoi * tledm
3160 this%comp(ib) = comp
3163 if (isuppress_output == 0)
then
3166 if (this%iupdatematprop /= 0)
then
3167 call this%csub_nodelay_update(ib)
3171 this%tcomp(ib) = this%tcomp(ib) + comp
3172 this%tcompe(ib) = this%tcompe(ib) + compe
3173 this%tcompi(ib) = this%tcompi(ib) + compi
3182 call this%csub_calc_sat(node, h, h0, snnew, snold)
3185 call this%csub_delay_calc_dstor(ib, h, stoe, stoi)
3186 this%storagee(ib) = stoe * area * this%rnb(ib) * tledm
3187 this%storagei(ib) = stoi * area * this%rnb(ib) * tledm
3190 q = this%csub_calc_delay_flow(ib, 1, h) * area * this%rnb(ib)
3191 this%dbflowtop(idelay) = q
3192 nn = this%ndelaycells
3193 q = this%csub_calc_delay_flow(ib, nn, h) * area * this%rnb(ib)
3194 this%dbflowbot(idelay) = q
3197 if (isuppress_output == 0)
then
3200 call this%csub_delay_calc_comp(ib, h, h0, comp, compi, compe)
3204 if (this%iupdatematprop /= 0)
then
3205 call this%csub_delay_update(ib)
3209 this%tcomp(ib) = this%tcomp(ib) + comp
3210 this%tcompi(ib) = this%tcompi(ib) + compi
3211 this%tcompe(ib) = this%tcompe(ib) + compe
3214 do n = 1, this%ndelaycells
3215 this%dbtcomp(n, idelay) = this%dbtcomp(n, idelay) + &
3216 this%dbcomp(n, idelay)
3221 call this%csub_delay_head_check(ib)
3228 if (idelay == 0)
then
3229 call this%csub_nodelay_wcomp_fc(ib, node, tledm, area, &
3230 hnew(node), hold(node), hcof, rhs)
3231 rratewc = hcof * hnew(node) - rhs
3235 call this%csub_delay_calc_wcomp(ib, q)
3236 rratewc = q * area * this%rnb(ib)
3238 this%cell_wcstor(node) = this%cell_wcstor(node) + rratewc
3241 flowja(idiag) = flowja(idiag) + rratewc
3243 this%storagee(ib) =
dzero
3244 this%storagei(ib) =
dzero
3245 if (idelay /= 0)
then
3246 this%dbflowtop(idelay) =
dzero
3247 this%dbflowbot(idelay) =
dzero
3252 flowja(idiag) = flowja(idiag) + this%storagee(ib)
3253 flowja(idiag) = flowja(idiag) + this%storagei(ib)
3257 if (this%iupdatematprop /= 0)
then
3273 subroutine csub_bd(this, isuppress_output, model_budget)
3280 integer(I4B),
intent(in) :: isuppress_output
3281 type(
budgettype),
intent(inout) :: model_budget
3288 call model_budget%addentry(rin, rout,
delt,
budtxt(1), &
3289 isuppress_output,
' CSUB')
3290 if (this%ninterbeds > 0)
then
3294 call model_budget%addentry(rin, rout,
delt,
budtxt(2), &
3295 isuppress_output,
' CSUB')
3299 call model_budget%addentry(rin, rout,
delt,
budtxt(3), &
3300 isuppress_output,
' CSUB')
3303 call model_budget%addentry(rin, rout,
delt,
budtxt(4), &
3304 isuppress_output,
' CSUB')
3316 integer(I4B),
intent(in) :: icbcfl
3317 integer(I4B),
intent(in) :: icbcun
3319 character(len=1) :: cdatafmp =
' '
3320 character(len=1) :: editdesc =
' '
3321 integer(I4B) :: ibinun
3322 integer(I4B) :: iprint
3323 integer(I4B) :: nvaluesp
3324 integer(I4B) :: nwidthp
3326 integer(I4B) :: node
3327 integer(I4B) :: naux
3333 if (this%ipakcb < 0)
then
3335 elseif (this%ipakcb == 0)
then
3338 ibinun = this%ipakcb
3340 if (icbcfl == 0) ibinun = 0
3343 if (ibinun /= 0)
then
3348 call this%dis%record_array(this%cg_stor, this%iout, iprint, -ibinun, &
3349 budtxt(1), cdatafmp, nvaluesp, &
3350 nwidthp, editdesc, dinact)
3351 if (this%ninterbeds > 0)
then
3355 call this%dis%record_srcdst_list_header(
budtxt(2), &
3365 do ib = 1, this%ninterbeds
3366 q = this%storagee(ib)
3367 node = this%nodelist(ib)
3368 call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
3373 call this%dis%record_srcdst_list_header(
budtxt(3), &
3383 do ib = 1, this%ninterbeds
3384 q = this%storagei(ib)
3385 node = this%nodelist(ib)
3386 call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
3392 call this%dis%record_array(this%cell_wcstor, this%iout, iprint, -ibinun, &
3393 budtxt(4), cdatafmp, nvaluesp, &
3394 nwidthp, editdesc, dinact)
3407 integer(I4B),
intent(in) :: idvfl
3408 integer(I4B),
intent(in) :: idvprint
3410 character(len=1) :: cdatafmp =
' '
3411 character(len=1) :: editdesc =
' '
3412 integer(I4B) :: ibinun
3413 integer(I4B) :: iprint
3414 integer(I4B) :: nvaluesp
3415 integer(I4B) :: nwidthp
3417 integer(I4B) :: node
3418 integer(I4B) :: nodem
3419 integer(I4B) :: nodeu
3422 integer(I4B) :: idx_conn
3424 integer(I4B) :: ncpl
3425 integer(I4B) :: nlay
3428 real(DP) :: va_scale
3430 character(len=*),
parameter :: fmtnconv = &
3431 "(/4x, 'DELAY INTERBED CELL HEADS IN ', i0, ' INTERBEDS IN', &
3432 &' NON-CONVERTIBLE GWF CELLS WERE LESS THAN THE TOP OF THE INTERBED CELL')"
3437 if (this%ioutcomp /= 0 .or. this%ioutzdisp /= 0)
then
3442 if (idvfl == 0) ibinun = 0
3445 if (ibinun /= 0)
then
3450 do node = 1, this%dis%nodes
3451 this%buff(node) = this%cg_tcomp(node)
3453 do ib = 1, this%ninterbeds
3454 node = this%nodelist(ib)
3455 this%buff(node) = this%buff(node) + this%tcomp(ib)
3459 if (this%ioutcomp /= 0)
then
3460 ibinun = this%ioutcomp
3461 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3462 comptxt(1), cdatafmp, nvaluesp, &
3463 nwidthp, editdesc, dinact)
3467 if (this%ioutzdisp /= 0)
then
3468 ibinun = this%ioutzdisp
3471 do nodeu = 1, this%dis%nodesuser
3472 this%buffusr(nodeu) =
dzero
3476 do node = 1, this%dis%nodes
3477 nodeu = this%dis%get_nodeuser(node)
3478 this%buffusr(nodeu) = this%buff(node)
3482 ncpl = this%dis%get_ncpl()
3485 if (this%dis%ndim == 1)
then
3486 do node = this%dis%nodes, 1, -1
3487 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
3490 nodem = this%dis%con%ja(ii)
3491 idx_conn = this%dis%con%jas(ii)
3494 ihc = this%dis%con%ihc(idx_conn)
3498 if (node < nodem)
then
3499 va_scale = this%dis%get_area_factor(node, idx_conn)
3500 this%buffusr(node) = this%buffusr(node) + &
3501 va_scale * this%buffusr(nodem)
3508 nlay = this%dis%nodesuser / ncpl
3509 do k = nlay - 1, 1, -1
3511 node = (k - 1) * ncpl + i
3512 nodem = k * ncpl + i
3513 this%buffusr(node) = this%buffusr(node) + this%buffusr(nodem)
3519 do nodeu = 1, this%dis%nodesuser
3520 node = this%dis%get_nodenumber_idx1(nodeu, 1)
3522 this%buff(node) = this%buffusr(nodeu)
3527 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3528 comptxt(6), cdatafmp, nvaluesp, &
3529 nwidthp, editdesc, dinact)
3535 if (this%ioutcompi /= 0)
then
3536 ibinun = this%ioutcompi
3540 if (idvfl == 0) ibinun = 0
3543 if (ibinun /= 0)
then
3548 do node = 1, this%dis%nodes
3549 this%buff(node) =
dzero
3551 do ib = 1, this%ninterbeds
3552 node = this%nodelist(ib)
3553 this%buff(node) = this%buff(node) + this%tcompi(ib)
3557 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3558 comptxt(2), cdatafmp, nvaluesp, &
3559 nwidthp, editdesc, dinact)
3563 if (this%ioutcompe /= 0)
then
3564 ibinun = this%ioutcompe
3568 if (idvfl == 0) ibinun = 0
3571 if (ibinun /= 0)
then
3576 do node = 1, this%dis%nodes
3577 this%buff(node) =
dzero
3579 do ib = 1, this%ninterbeds
3580 node = this%nodelist(ib)
3581 this%buff(node) = this%buff(node) + this%tcompe(ib)
3585 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3586 comptxt(3), cdatafmp, nvaluesp, &
3587 nwidthp, editdesc, dinact)
3591 if (this%ioutcompib /= 0)
then
3592 ibinun = this%ioutcompib
3596 if (idvfl == 0) ibinun = 0
3599 if (ibinun /= 0)
then
3604 do node = 1, this%dis%nodes
3605 this%buff(node) =
dzero
3607 do ib = 1, this%ninterbeds
3608 node = this%nodelist(ib)
3609 this%buff(node) = this%buff(node) + this%tcompe(ib) + this%tcompi(ib)
3613 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3614 comptxt(4), cdatafmp, nvaluesp, &
3615 nwidthp, editdesc, dinact)
3619 if (this%ioutcomps /= 0)
then
3620 ibinun = this%ioutcomps
3624 if (idvfl == 0) ibinun = 0
3627 if (ibinun /= 0)
then
3632 do node = 1, this%dis%nodes
3633 this%buff(node) = this%cg_tcomp(node)
3637 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3638 comptxt(5), cdatafmp, nvaluesp, &
3639 nwidthp, editdesc, dinact)
3644 if (this%gwfiss == 0)
then
3645 call this%csub_cg_chk_stress()
3652 if (this%ndelaybeds > 0)
then
3653 if (this%idb_nconv_count(1) > this%idb_nconv_count(2))
then
3654 this%idb_nconv_count(2) = this%idb_nconv_count(1)
3656 if (this%idb_nconv_count(1) > 0)
then
3657 write (this%iout, fmtnconv) this%idb_nconv_count(1)
3672 integer(I4B),
intent(in) :: nodes
3673 real(DP),
dimension(nodes),
intent(in) :: hnew
3675 integer(I4B) :: node
3679 integer(I4B) :: idx_conn
3684 real(DP) :: va_scale
3693 if (this%iupdatestress /= 0)
then
3694 do node = 1, this%dis%nodes
3699 top = this%dis%top(node)
3700 bot = this%dis%bot(node)
3704 if (this%ibound(node) /= 0)
then
3714 if (hcell < top)
then
3715 gs = (top - hbar) * this%sgm(node) + (hbar - bot) * this%sgs(node)
3717 gs = thick * this%sgs(node)
3721 this%cg_gs(node) = gs
3725 do nn = 1, this%nbound
3726 node = this%nodelistsig0(nn)
3727 sadd = this%sig0(nn)
3728 this%cg_gs(node) = this%cg_gs(node) + sadd
3732 do node = 1, this%dis%nodes
3735 gs = this%cg_gs(node)
3739 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
3742 m = this%dis%con%ja(ii)
3743 idx_conn = this%dis%con%jas(ii)
3746 if (this%dis%con%ihc(idx_conn) == 0)
then
3752 if (this%dis%ndim /= 1)
then
3753 gs = gs + this%cg_gs(m)
3757 va_scale = this%dis%get_area_factor(node, idx_conn)
3758 gs_conn = this%cg_gs(m)
3759 gs = gs + (gs_conn * va_scale)
3767 this%cg_gs(node) = gs
3773 do node = 1, this%dis%nodes
3774 top = this%dis%top(node)
3775 bot = this%dis%bot(node)
3776 if (this%ibound(node) /= 0)
then
3789 es = this%cg_gs(node) - phead
3790 this%cg_es(node) = es
3806 character(len=20) :: cellid
3807 integer(I4B) :: ierr
3808 integer(I4B) :: node
3822 do node = 1, this%dis%nodes
3823 if (this%ibound(node) < 1) cycle
3824 bot = this%dis%bot(node)
3825 gs = this%cg_gs(node)
3826 es = this%cg_es(node)
3828 if (this%ibound(node) /= 0)
then
3832 if (this%lhead_based .EQV. .false.)
then
3835 call this%dis%noder_to_string(node, cellid)
3836 write (
errmsg,
'(a,g0,a,1x,a,1x,a,4(g0,a))') &
3837 'Small to negative effective stress (', es,
') in cell', &
3838 trim(adjustl(cellid)),
'. (', es,
' = ', this%cg_gs(node), &
3839 ' - (', hcell,
' - ', bot,
').'
3847 write (
errmsg,
'(a,1x,i0,3(1x,a))') &
3848 'Solution: small to negative effective stress values in', ierr, &
3849 'cells can be eliminated by increasing storage values and/or ', &
3850 'adding/modifying stress boundaries to prevent water-levels from', &
3851 'exceeding the top of the model.'
3866 integer(I4B),
intent(in) :: i
3873 comp = this%tcomp(i) + this%comp(i)
3874 if (abs(comp) >
dzero)
then
3875 thick = this%thickini(i)
3876 theta = this%thetaini(i)
3877 call this%csub_adj_matprop(comp, thick, theta)
3878 if (thick <=
dzero)
then
3879 write (
errmsg,
'(a,1x,i0,1x,a,g0,a)') &
3880 'Adjusted thickness for no-delay interbed', i, &
3881 'is less than or equal to 0 (', thick,
').'
3884 if (theta <=
dzero)
then
3885 write (
errmsg,
'(a,1x,i0,1x,a,g0,a)') &
3886 'Adjusted theta for no-delay interbed', i, &
3887 'is less than or equal to 0 (', theta,
').'
3890 this%thick(i) = thick
3891 this%theta(i) = theta
3913 integer(I4B),
intent(in) :: ib
3914 real(DP),
intent(in) :: hcell
3915 real(DP),
intent(in) :: hcellold
3916 real(DP),
intent(inout) :: rho1
3917 real(DP),
intent(inout) :: rho2
3918 real(DP),
intent(inout) :: rhs
3919 real(DP),
intent(in),
optional :: argtled
3921 integer(I4B) :: node
3931 real(DP) :: sto_fac0
3941 if (
present(argtled))
then
3946 node = this%nodelist(ib)
3947 area = this%dis%get_area(node)
3948 bot = this%dis%bot(node)
3949 top = this%dis%top(node)
3950 thick = this%thickini(ib)
3956 this%iconvert(ib) = 0
3959 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
3960 if (this%lhead_based .EQV. .true.)
then
3964 znode = this%csub_calc_znode(top, bot, hbar)
3965 es = this%cg_es(node)
3966 es0 = this%cg_es0(node)
3967 theta = this%thetaini(ib)
3972 call this%csub_calc_sfacts(node, bot, znode, theta, es, es0, f)
3974 sto_fac = tled * snnew * thick * f
3975 sto_fac0 = tled * snold * thick * f
3978 rho1 = this%rci(ib) * sto_fac0
3979 rho2 = this%rci(ib) * sto_fac
3980 if (this%cg_es(node) > this%pcs(ib))
then
3981 this%iconvert(ib) = 1
3982 rho2 = this%ci(ib) * sto_fac
3986 rcorr = rho2 * (hcell - hbar)
3989 if (this%ielastic(ib) /= 0)
then
3990 rhs = rho1 * this%cg_es0(node) - &
3991 rho2 * (this%cg_gs(node) + bot) - &
3994 rhs = -rho2 * (this%cg_gs(node) + bot) + &
3995 (this%pcs(ib) * (rho2 - rho1)) + &
3996 (rho1 * this%cg_es0(node)) - &
4018 integer(I4B),
intent(in) :: ib
4019 real(DP),
intent(in) :: hcell
4020 real(DP),
intent(in) :: hcellold
4021 real(DP),
intent(inout) :: comp
4022 real(DP),
intent(inout) :: rho1
4023 real(DP),
intent(inout) :: rho2
4025 integer(I4B) :: node
4033 node = this%nodelist(ib)
4035 es = this%cg_es(node)
4036 es0 = this%cg_es0(node)
4040 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, rho2, rhs, argtled=tled)
4043 if (this%ielastic(ib) /= 0)
then
4044 comp = rho2 * es - rho1 * es0
4046 comp = -pcs * (rho2 - rho1) - (rho1 * es0) + (rho2 * es)
4060 integer(I4B),
intent(in) :: nodes
4061 real(DP),
dimension(nodes),
intent(in) :: hnew
4063 character(len=LINELENGTH) :: title
4064 character(len=LINELENGTH) :: tag
4065 character(len=20) :: cellid
4067 integer(I4B) :: node
4069 integer(I4B) :: idelay
4070 integer(I4B) :: ntabrows
4071 integer(I4B) :: ntabcols
4077 real(DP) :: void_ratio
4087 call this%csub_cg_calc_stress(nodes, hnew)
4092 this%cg_es0(node) = this%cg_es(node)
4096 do ib = 1, this%ninterbeds
4097 idelay = this%idelay(ib)
4098 node = this%nodelist(ib)
4099 top = this%dis%top(node)
4100 bot = this%dis%bot(node)
4104 if (this%ispecified_pcs == 0)
then
4106 if (this%ipch /= 0)
then
4107 pcs = this%cg_es(node) - pcs0
4109 pcs = this%cg_es(node) + pcs0
4113 if (this%ipch /= 0)
then
4114 pcs = this%cg_gs(node) - (pcs0 - bot)
4116 if (pcs < this%cg_es(node))
then
4117 pcs = this%cg_es(node)
4123 if (idelay /= 0)
then
4124 dzhalf =
dhalf * this%dbdzini(1, idelay)
4129 do n = 1, this%ndelaycells
4130 if (this%ispecified_dbh == 0)
then
4131 this%dbh(n, idelay) = hcell + this%dbh(n, idelay)
4133 this%dbh(n, idelay) = hcell
4135 this%dbh0(n, idelay) = this%dbh(n, idelay)
4139 call this%csub_delay_calc_stress(ib, hcell)
4143 do n = 1, this%ndelaycells
4144 zbot = this%dbz(n, idelay) - dzhalf
4147 dbpcs = pcs - (zbot - bot) * (this%sgs(node) -
done)
4148 this%dbpcs(n, idelay) = dbpcs
4151 this%dbes0(n, idelay) = this%dbes(n, idelay)
4158 top = this%dis%top(node)
4159 bot = this%dis%bot(node)
4162 if (this%istoragec == 1)
then
4165 if (this%lhead_based .EQV. .true.)
then
4171 void_ratio = this%csub_calc_void_ratio(this%cg_theta(node))
4172 es = this%cg_es(node)
4179 znode = this%csub_calc_znode(top, bot, hbar)
4180 fact = this%csub_calc_adjes(node, es, bot, znode)
4181 fact = fact * (
done + void_ratio)
4188 this%cg_ske_cr(node) = this%cg_ske_cr(node) * fact
4191 if (fact <=
dzero)
then
4192 call this%dis%noder_to_string(node, cellid)
4193 write (
errmsg,
'(a,1x,a,a)') &
4194 'Negative recompression index calculated for cell', &
4195 trim(adjustl(cellid)),
'.'
4201 do ib = 1, this%ninterbeds
4202 idelay = this%idelay(ib)
4203 node = this%nodelist(ib)
4204 top = this%dis%top(node)
4205 bot = this%dis%bot(node)
4208 if (this%istoragec == 1)
then
4211 if (this%lhead_based .EQV. .true.)
then
4217 void_ratio = this%csub_calc_void_ratio(this%theta(ib))
4218 es = this%cg_es(node)
4225 znode = this%csub_calc_znode(top, bot, hbar)
4226 fact = this%csub_calc_adjes(node, es, bot, znode)
4227 fact = fact * (
done + void_ratio)
4234 this%ci(ib) = this%ci(ib) * fact
4235 this%rci(ib) = this%rci(ib) * fact
4238 if (fact <=
dzero)
then
4239 call this%dis%noder_to_string(node, cellid)
4240 write (
errmsg,
'(a,1x,i0,2(1x,a),a)') &
4241 'Negative compression indices calculated for interbed', ib, &
4242 'in cell', trim(adjustl(cellid)),
'.'
4248 if (this%iprpak == 1)
then
4250 title = trim(adjustl(this%packName))// &
4251 ' PACKAGE CALCULATED INITIAL INTERBED STRESSES AT THE CELL BOTTOM'
4254 ntabrows = this%ninterbeds
4256 if (this%inamedbound /= 0)
then
4257 ntabcols = ntabcols + 1
4261 call table_cr(this%inputtab, this%packName, title)
4262 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4265 tag =
'INTERBED NUMBER'
4266 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4268 call this%inputtab%initialize_column(tag, 20)
4269 tag =
'GEOSTATIC STRESS'
4270 call this%inputtab%initialize_column(tag, 16)
4271 tag =
'EFFECTIVE STRESS'
4272 call this%inputtab%initialize_column(tag, 16)
4273 tag =
'PRECONSOLIDATION STRESS'
4274 call this%inputtab%initialize_column(tag, 16)
4275 if (this%inamedbound /= 0)
then
4277 call this%inputtab%initialize_column(tag,
lenboundname, &
4282 do ib = 1, this%ninterbeds
4283 node = this%nodelist(ib)
4284 call this%dis%noder_to_string(node, cellid)
4287 call this%inputtab%add_term(ib)
4288 call this%inputtab%add_term(cellid)
4289 call this%inputtab%add_term(this%cg_gs(node))
4290 call this%inputtab%add_term(this%cg_es(node))
4291 call this%inputtab%add_term(this%pcs(ib))
4292 if (this%inamedbound /= 0)
then
4293 call this%inputtab%add_term(this%boundname(ib))
4300 title = trim(adjustl(this%packName))// &
4301 ' PACKAGE CALCULATED INITIAL DELAY INTERBED STRESSES'
4305 do ib = 1, this%ninterbeds
4306 idelay = this%idelay(ib)
4307 if (idelay /= 0)
then
4308 ntabrows = ntabrows + this%ndelaycells
4312 if (this%inamedbound /= 0)
then
4313 ntabcols = ntabcols + 1
4317 call table_cr(this%inputtab, this%packName, title)
4318 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4321 tag =
'INTERBED NUMBER'
4322 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4324 call this%inputtab%initialize_column(tag, 20)
4326 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4327 tag =
'GEOSTATIC STRESS'
4328 call this%inputtab%initialize_column(tag, 16)
4329 tag =
'EFFECTIVE STRESS'
4330 call this%inputtab%initialize_column(tag, 16)
4331 tag =
'PRECONSOLIDATION STRESS'
4332 call this%inputtab%initialize_column(tag, 16)
4333 if (this%inamedbound /= 0)
then
4335 call this%inputtab%initialize_column(tag,
lenboundname, &
4340 do ib = 1, this%ninterbeds
4341 idelay = this%idelay(ib)
4342 if (idelay /= 0)
then
4343 node = this%nodelist(ib)
4344 call this%dis%noder_to_string(node, cellid)
4347 do n = 1, this%ndelaycells
4349 call this%inputtab%add_term(ib)
4350 call this%inputtab%add_term(cellid)
4352 call this%inputtab%add_term(
' ')
4353 call this%inputtab%add_term(
' ')
4355 call this%inputtab%add_term(n)
4356 call this%inputtab%add_term(this%dbgeo(n, idelay))
4357 call this%inputtab%add_term(this%dbes(n, idelay))
4358 call this%inputtab%add_term(this%dbpcs(n, idelay))
4359 if (this%inamedbound /= 0)
then
4361 call this%inputtab%add_term(this%boundname(ib))
4363 call this%inputtab%add_term(
' ')
4371 if (this%istoragec == 1)
then
4372 if (this%lhead_based .EQV. .false.)
then
4374 title = trim(adjustl(this%packName))// &
4375 ' PACKAGE COMPRESSION INDICES'
4378 ntabrows = this%ninterbeds
4380 if (this%inamedbound /= 0)
then
4381 ntabcols = ntabcols + 1
4385 call table_cr(this%inputtab, this%packName, title)
4386 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4389 tag =
'INTERBED NUMBER'
4390 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4392 call this%inputtab%initialize_column(tag, 20)
4394 call this%inputtab%initialize_column(tag, 16)
4396 call this%inputtab%initialize_column(tag, 16)
4397 if (this%inamedbound /= 0)
then
4399 call this%inputtab%initialize_column(tag,
lenboundname, &
4404 do ib = 1, this%ninterbeds
4406 node = this%nodelist(ib)
4407 call this%dis%noder_to_string(node, cellid)
4410 call this%inputtab%add_term(ib)
4411 call this%inputtab%add_term(cellid)
4412 call this%inputtab%add_term(this%ci(ib) * fact)
4413 call this%inputtab%add_term(this%rci(ib) * fact)
4414 if (this%inamedbound /= 0)
then
4415 call this%inputtab%add_term(this%boundname(ib))
4428 this%initialized = 1
4431 if (this%lhead_based .EQV. .true.)
then
4432 this%iupdatestress = 0
4445 subroutine csub_cg_fc(this, node, tled, area, hcell, hcellold, hcof, rhs)
4448 integer(I4B),
intent(in) :: node
4449 real(DP),
intent(in) :: tled
4450 real(DP),
intent(in) :: area
4451 real(DP),
intent(in) :: hcell
4452 real(DP),
intent(in) :: hcellold
4453 real(DP),
intent(inout) :: hcof
4454 real(DP),
intent(inout) :: rhs
4470 top = this%dis%top(node)
4471 bot = this%dis%bot(node)
4472 tthk = this%cg_thickini(node)
4475 if (tthk >
dzero)
then
4478 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4484 call this%csub_cg_calc_sske(node, sske, hcell)
4485 rho1 = sske * area * tthk * tled
4488 this%cg_ske(node) = sske * tthk * snold
4489 this%cg_sk(node) = sske * tthk * snnew
4492 hcof = -rho1 * snnew
4493 rhs = rho1 * snold * this%cg_es0(node) - &
4494 rho1 * snnew * (this%cg_gs(node) + bot)
4497 rhs = rhs - rho1 * snnew * (hcell - hbar)
4514 integer(I4B),
intent(in) :: node
4515 real(DP),
intent(in) :: tled
4516 real(DP),
intent(in) :: area
4517 real(DP),
intent(in) :: hcell
4518 real(DP),
intent(inout) :: hcof
4519 real(DP),
intent(inout) :: rhs
4528 real(DP) :: hbarderv
4537 top = this%dis%top(node)
4538 bot = this%dis%bot(node)
4539 tthk = this%cg_thickini(node)
4542 if (tthk >
dzero)
then
4545 call this%csub_calc_sat(node, hcell, top, snnew, snold)
4548 satderv = this%csub_calc_sat_derivative(node, hcell)
4557 call this%csub_cg_calc_sske(node, sske, hcell)
4558 rho1 = sske * area * tthk * tled
4561 hcof = rho1 * snnew * (
done - hbarderv) + &
4562 rho1 * (this%cg_gs(node) - hbar + bot) * satderv
4565 if (this%ieslag /= 0)
then
4566 hcof = hcof - rho1 * this%cg_es0(node) * satderv
4586 integer(I4B),
intent(in) :: ib
4587 integer(I4B),
intent(in) :: node
4588 real(DP),
intent(in) :: area
4589 real(DP),
intent(in) :: hcell
4590 real(DP),
intent(in) :: hcellold
4591 real(DP),
intent(inout) :: hcof
4592 real(DP),
intent(inout) :: rhs
4611 if (this%ibound(node) > 0)
then
4612 if (this%idelay(ib) == 0)
then
4615 if (this%iupdatematprop /= 0)
then
4616 if (this%ieslag == 0)
then
4619 call this%csub_nodelay_calc_comp(ib, hcell, hcellold, comp, &
4621 this%comp(ib) = comp
4624 call this%csub_nodelay_update(ib)
4629 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, hcof, rhs)
4634 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4637 if (this%iupdatematprop /= 0)
then
4638 if (this%ieslag == 0)
then
4641 call this%csub_delay_calc_comp(ib, hcell, hcellold, &
4643 this%comp(ib) = comp
4646 call this%csub_delay_update(ib)
4651 call this%csub_delay_sln(ib, hcell)
4652 call this%csub_delay_fc(ib, hcof, rhs)
4653 f = area * this%rnb(ib)
4674 integer(I4B),
intent(in) :: ib
4675 integer(I4B),
intent(in) :: node
4676 real(DP),
intent(in) :: hcell
4677 real(DP),
intent(in) :: hcellold
4678 real(DP),
intent(inout) :: hcof
4679 real(DP),
intent(inout) :: rhs
4681 integer(I4B) :: idelay
4693 real(DP) :: hbarderv
4703 idelay = this%idelay(ib)
4704 top = this%dis%top(node)
4705 bot = this%dis%bot(node)
4708 if (this%ibound(node) > 0)
then
4710 tthk = this%thickini(ib)
4713 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4716 if (idelay == 0)
then
4722 satderv = this%csub_calc_sat_derivative(node, hcell)
4731 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, rho2, rhsn)
4734 hcofn = rho2 * (
done - hbarderv) * snnew + &
4735 rho2 * (this%cg_gs(node) - hbar + bot) * satderv
4736 if (this%ielastic(ib) == 0)
then
4737 hcofn = hcofn - rho2 * this%pcs(ib) * satderv
4741 if (this%ieslag /= 0)
then
4742 if (this%ielastic(ib) /= 0)
then
4743 hcofn = hcofn - rho1 * this%cg_es0(node) * satderv
4745 hcofn = hcofn - rho1 * (this%pcs(ib) - this%cg_es0(node)) * satderv
4762 integer(I4B),
intent(in) :: n
4763 real(DP),
intent(inout) :: sske
4764 real(DP),
intent(in) :: hcell
4780 if (this%lhead_based .EQV. .true.)
then
4786 top = this%dis%top(n)
4787 bot = this%dis%bot(n)
4793 znode = this%csub_calc_znode(top, bot, hbar)
4797 es0 = this%cg_es0(n)
4798 theta = this%cg_thetaini(n)
4803 call this%csub_calc_sfacts(n, bot, znode, theta, es, es0, f)
4805 sske = f * this%cg_ske_cr(n)
4818 integer(I4B),
intent(in) :: node
4819 real(DP),
intent(in) :: hcell
4820 real(DP),
intent(in) :: hcellold
4821 real(DP),
intent(inout) :: comp
4833 call this%csub_cg_fc(node, tled, area, hcell, hcellold, hcof, rhs)
4836 comp = hcof * hcell - rhs
4847 integer(I4B),
intent(in) :: node
4849 character(len=20) :: cellid
4855 comp = this%cg_tcomp(node) + this%cg_comp(node)
4856 call this%dis%noder_to_string(node, cellid)
4857 if (abs(comp) >
dzero)
then
4858 thick = this%cg_thickini(node)
4859 theta = this%cg_thetaini(node)
4860 call this%csub_adj_matprop(comp, thick, theta)
4861 if (thick <=
dzero)
then
4862 write (
errmsg,
'(a,1x,a,1x,a,g0,a)') &
4863 'Adjusted thickness for cell', trim(adjustl(cellid)), &
4864 'is less than or equal to 0 (', thick,
').'
4867 if (theta <=
dzero)
then
4868 write (
errmsg,
'(a,1x,a,1x,a,g0,a)') &
4869 'Adjusted theta for cell', trim(adjustl(cellid)), &
4870 'is less than or equal to 0 (', theta,
').'
4873 this%cg_thick(node) = thick
4874 this%cg_theta(node) = theta
4892 integer(I4B),
intent(in) :: node
4893 real(DP),
intent(in) :: tled
4894 real(DP),
intent(in) :: area
4895 real(DP),
intent(in) :: hcell
4896 real(DP),
intent(in) :: hcellold
4897 real(DP),
intent(inout) :: hcof
4898 real(DP),
intent(inout) :: rhs
4914 top = this%dis%top(node)
4915 bot = this%dis%bot(node)
4916 tthk = this%cg_thick(node)
4917 tthk0 = this%cg_thick0(node)
4920 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4923 wc0 = this%brg * area * tthk0 * this%cg_theta0(node) * tled
4924 wc = this%brg * area * tthk * this%cg_theta(node) * tled
4930 rhs = -wc0 * snold * hcellold
4946 integer(I4B),
intent(in) :: node
4947 real(DP),
intent(in) :: tled
4948 real(DP),
intent(in) :: area
4949 real(DP),
intent(in) :: hcell
4950 real(DP),
intent(in) :: hcellold
4951 real(DP),
intent(inout) :: hcof
4952 real(DP),
intent(inout) :: rhs
4968 top = this%dis%top(node)
4969 bot = this%dis%bot(node)
4970 tthk = this%cg_thick(node)
4973 satderv = this%csub_calc_sat_derivative(node, hcell)
4976 f = this%brg * area * tled
4979 wc = f * tthk * this%cg_theta(node)
4982 hcof = -wc * hcell * satderv
4985 if (this%ieslag /= 0)
then
4986 tthk0 = this%cg_thick0(node)
4987 wc0 = f * tthk0 * this%cg_theta0(node)
4988 hcof = hcof + wc * hcellold * satderv
5006 hcell, hcellold, hcof, rhs)
5009 integer(I4B),
intent(in) :: ib
5010 integer(I4B),
intent(in) :: node
5011 real(DP),
intent(in) :: tled
5012 real(DP),
intent(in) :: area
5013 real(DP),
intent(in) :: hcell
5014 real(DP),
intent(in) :: hcellold
5015 real(DP),
intent(inout) :: hcof
5016 real(DP),
intent(inout) :: rhs
5031 top = this%dis%top(node)
5032 bot = this%dis%bot(node)
5035 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
5038 f = this%brg * area * tled
5039 wc0 = f * this%theta0(ib) * this%thick0(ib)
5040 wc = f * this%theta(ib) * this%thick(ib)
5042 rhs = -wc0 * snold * hcellold
5056 hcell, hcellold, hcof, rhs)
5059 integer(I4B),
intent(in) :: ib
5060 integer(I4B),
intent(in) :: node
5061 real(DP),
intent(in) :: tled
5062 real(DP),
intent(in) :: area
5063 real(DP),
intent(in) :: hcell
5064 real(DP),
intent(in) :: hcellold
5065 real(DP),
intent(inout) :: hcof
5066 real(DP),
intent(inout) :: rhs
5080 top = this%dis%top(node)
5081 bot = this%dis%bot(node)
5084 f = this%brg * area * tled
5087 satderv = this%csub_calc_sat_derivative(node, hcell)
5090 wc = f * this%theta(ib) * this%thick(ib)
5093 hcof = -wc * hcell * satderv
5096 if (this%ieslag /= 0)
then
5097 wc0 = f * this%theta0(ib) * this%thick0(ib)
5098 hcof = hcof + wc0 * hcellold * satderv
5114 real(dp),
intent(in) :: theta
5116 real(dp) :: void_ratio
5118 void_ratio = theta / (
done - theta)
5130 real(dp),
intent(in) :: void_ratio
5135 theta = void_ratio / (
done + void_ratio)
5147 integer(I4B),
intent(in) :: ib
5149 integer(I4B) :: idelay
5153 idelay = this%idelay(ib)
5154 thick = this%thick(ib)
5155 if (idelay /= 0)
then
5156 thick = thick * this%rnb(ib)
5173 real(dp),
intent(in) :: top
5174 real(dp),
intent(in) :: bottom
5175 real(dp),
intent(in) :: zbar
5181 if (zbar > top)
then
5186 znode =
dhalf * (v + bottom)
5200 integer(I4B),
intent(in) :: node
5201 real(dp),
intent(in) :: es0
5202 real(dp),
intent(in) :: z0
5203 real(dp),
intent(in) :: z
5208 es = es0 - (z - z0) * (this%sgs(node) -
done)
5221 integer(I4B),
intent(in) :: ib
5223 integer(I4B) :: iviolate
5224 integer(I4B) :: idelay
5225 integer(I4B) :: node
5234 idelay = this%idelay(ib)
5235 node = this%nodelist(ib)
5238 idelaycells:
do n = 1, this%ndelaycells
5239 z = this%dbz(n, idelay)
5240 h = this%dbh(n, idelay)
5241 dzhalf =
dhalf * this%dbdzini(1, idelay)
5244 if (this%stoiconv(node) == 0)
then
5247 this%idb_nconv_count(1) = this%idb_nconv_count(1) + 1
5253 if (iviolate > 0)
then
5271 integer(I4B),
intent(in) :: node
5272 real(DP),
intent(in) :: hcell
5273 real(DP),
intent(in) :: hcellold
5274 real(DP),
intent(inout) :: snnew
5275 real(DP),
intent(inout) :: snold
5281 if (this%stoiconv(node) /= 0)
then
5282 top = this%dis%top(node)
5283 bot = this%dis%bot(node)
5290 if (this%ieslag /= 0)
then
5305 integer(I4B),
intent(in) :: node
5306 real(dp),
intent(in) :: hcell
5312 if (this%stoiconv(node) /= 0)
then
5313 top = this%dis%top(node)
5314 bot = this%dis%bot(node)
5333 integer(I4B),
intent(in) :: node
5334 real(DP),
intent(in) :: bot
5335 real(DP),
intent(in) :: znode
5336 real(DP),
intent(in) :: theta
5337 real(DP),
intent(in) :: es
5338 real(DP),
intent(in) :: es0
5339 real(DP),
intent(inout) :: fact
5342 real(DP) :: void_ratio
5347 if (this%ieslag /= 0)
then
5354 void_ratio = this%csub_calc_void_ratio(theta)
5355 denom = this%csub_calc_adjes(node, esv, bot, znode)
5356 denom = denom * (
done + void_ratio)
5357 if (denom /=
dzero)
then
5373 real(DP),
intent(in) :: comp
5374 real(DP),
intent(inout) :: thick
5375 real(DP),
intent(inout) :: theta
5378 real(DP) :: void_ratio
5382 void_ratio = this%csub_calc_void_ratio(theta)
5385 if (thick >
dzero) strain = -comp / thick
5388 void_ratio = void_ratio + strain * (
done + void_ratio)
5389 theta = this%csub_calc_theta(void_ratio)
5390 thick = thick - comp
5403 integer(I4B),
intent(in) :: ib
5404 real(DP),
intent(in) :: hcell
5405 logical(LGP),
intent(in),
optional :: update
5409 logical(LGP) :: lupdate
5411 integer(I4B) :: icnvg
5412 integer(I4B) :: iter
5413 integer(I4B) :: idelay
5420 if (
present(update))
then
5427 call this%csub_delay_calc_stress(ib, hcell)
5435 if (this%thickini(ib) >
dzero)
then
5438 idelay = this%idelay(ib)
5443 call this%csub_delay_assemble(ib, hcell)
5447 this%dbal, this%dbad, this%dbau, &
5448 this%dbrhs, this%dbdh, this%dbaw)
5452 do n = 1, this%ndelaycells
5453 dh = this%dbdh(n) - this%dbh(n, idelay)
5454 if (abs(dh) > abs(dhmax))
then
5457 this%dbdhmax(idelay) = dhmax
5461 this%dbh(n, idelay) = this%dbdh(n)
5465 call this%csub_delay_calc_stress(ib, hcell)
5468 if (abs(dhmax) < dclose)
then
5470 else if (iter /= 1)
then
5471 if (abs(dhmax) - abs(dhmax0) <
dprec)
then
5475 if (icnvg == 1)
then
5496 integer(I4B),
intent(in) :: ib
5499 integer(I4B) :: node
5500 integer(I4B) :: idelay
5512 idelay = this%idelay(ib)
5513 node = this%nodelist(ib)
5514 b = this%thickini(ib)
5515 bot = this%dis%bot(node)
5521 znode = this%csub_calc_znode(top, bot, hbar)
5522 dz =
dhalf * this%dbdzini(1, idelay)
5529 do n = 1, this%ndelaycells
5532 this%dbz(n, idelay) = z
5536 if (abs(zr) < dz)
then
5539 this%dbrelz(n, idelay) = zr
5553 integer(I4B),
intent(in) :: ib
5554 real(DP),
intent(in) :: hcell
5557 integer(I4B) :: idelay
5558 integer(I4B) :: node
5574 idelay = this%idelay(ib)
5575 node = this%nodelist(ib)
5576 sigma = this%cg_gs(node)
5577 topaq = this%dis%top(node)
5578 botaq = this%dis%bot(node)
5579 dzhalf =
dhalf * this%dbdzini(1, idelay)
5580 top = this%dbz(1, idelay) + dzhalf
5586 sgm = this%sgm(node)
5587 sgs = this%sgs(node)
5588 if (hcell < top)
then
5589 sadd = ((top - hbar) * sgm) + ((hbar - botaq) * sgs)
5591 sadd = (top - botaq) * sgs
5593 sigma = sigma - sadd
5596 do n = 1, this%ndelaycells
5597 h = this%dbh(n, idelay)
5600 z = this%dbz(n, idelay)
5609 sadd = ((top - hbar) * sgm) + ((hbar - bot) * sgs)
5611 sadd = (top - bot) * sgs
5613 sigma = sigma + sadd
5615 this%dbgeo(n, idelay) = sigma
5616 this%dbes(n, idelay) = sigma - phead
5633 integer(I4B),
intent(in) :: ib
5634 integer(I4B),
intent(in) :: n
5635 real(DP),
intent(in) :: hcell
5636 real(DP),
intent(inout) :: ssk
5637 real(DP),
intent(inout) :: sske
5639 integer(I4B) :: idelay
5640 integer(I4B) :: ielastic
5641 integer(I4B) :: node
5644 real(DP) :: hbarcell
5663 idelay = this%idelay(ib)
5664 ielastic = this%ielastic(ib)
5667 if (this%lhead_based .EQV. .true.)
then
5673 node = this%nodelist(ib)
5674 theta = this%dbthetaini(n, idelay)
5677 topcell = this%dis%top(node)
5678 botcell = this%dis%bot(node)
5685 zcell = this%csub_calc_znode(topcell, botcell, hbarcell)
5688 zcenter = zcell + this%dbrelz(n, idelay)
5689 dzhalf =
dhalf * this%dbdzini(1, idelay)
5690 top = zcenter + dzhalf
5691 bot = zcenter - dzhalf
5692 h = this%dbh(n, idelay)
5699 znode = this%csub_calc_znode(top, bot, hbar)
5703 zbot = this%dbz(n, idelay) - dzhalf
5706 es = this%dbes(n, idelay)
5707 es0 = this%dbes0(n, idelay)
5712 call this%csub_calc_sfacts(node, zbot, znode, theta, es, es0, f)
5714 this%idbconvert(n, idelay) = 0
5715 sske = f * this%rci(ib)
5716 ssk = f * this%rci(ib)
5717 if (ielastic == 0)
then
5718 if (this%dbes(n, idelay) > this%dbpcs(n, idelay))
then
5719 this%idbconvert(n, idelay) = 1
5720 ssk = f * this%ci(ib)
5735 integer(I4B),
intent(in) :: ib
5736 real(DP),
intent(in) :: hcell
5745 do n = 1, this%ndelaycells
5748 if (this%inewton == 0)
then
5749 call this%csub_delay_assemble_fc(ib, n, hcell, aii, au, al, r)
5751 call this%csub_delay_assemble_fn(ib, n, hcell, aii, au, al, r)
5773 integer(I4B),
intent(in) :: ib
5774 integer(I4B),
intent(in) :: n
5775 real(DP),
intent(in) :: hcell
5776 real(DP),
intent(inout) :: aii
5777 real(DP),
intent(inout) :: au
5778 real(DP),
intent(inout) :: al
5779 real(DP),
intent(inout) :: r
5781 integer(I4B) :: node
5782 integer(I4B) :: idelay
5783 integer(I4B) :: ielastic
5819 idelay = this%idelay(ib)
5820 ielastic = this%ielastic(ib)
5821 node = this%nodelist(ib)
5822 dzini = this%dbdzini(1, idelay)
5823 dzhalf =
dhalf * dzini
5825 c = this%kv(ib) / dzini
5833 if (n == 1 .or. n == this%ndelaycells)
then
5844 if (n < this%ndelaycells)
then
5849 z = this%dbz(n, idelay)
5852 h = this%dbh(n, idelay)
5853 h0 = this%dbh0(n, idelay)
5854 dz = this%dbdz(n, idelay)
5855 dz0 = this%dbdz0(n, idelay)
5856 theta = this%dbtheta(n, idelay)
5857 theta0 = this%dbtheta0(n, idelay)
5863 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
5866 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
5869 smult = dzini * tled
5870 gs = this%dbgeo(n, idelay)
5871 es0 = this%dbes0(n, idelay)
5872 pcs = this%dbpcs(n, idelay)
5873 aii = aii - smult * dsn * ssk
5874 if (ielastic /= 0)
then
5876 (dsn * ssk * (gs + zbot) - dsn0 * sske * es0)
5879 (dsn * ssk * (gs + zbot - pcs) + dsn0 * sske * (pcs - es0))
5883 r = r + smult * dsn * ssk * (h - hbar)
5886 wcf = this%brg * tled
5887 wc = dz * wcf * theta
5888 wc0 = dz0 * wcf * theta0
5889 aii = aii - dsn * wc
5890 r = r - dsn0 * wc0 * h0
5904 integer(I4B),
intent(in) :: ib
5905 integer(I4B),
intent(in) :: n
5906 real(DP),
intent(in) :: hcell
5907 real(DP),
intent(inout) :: aii
5908 real(DP),
intent(inout) :: au
5909 real(DP),
intent(inout) :: al
5910 real(DP),
intent(inout) :: r
5912 integer(I4B) :: node
5913 integer(I4B) :: idelay
5914 integer(I4B) :: ielastic
5940 real(DP) :: hbarderv
5956 idelay = this%idelay(ib)
5957 ielastic = this%ielastic(ib)
5958 node = this%nodelist(ib)
5959 dzini = this%dbdzini(1, idelay)
5960 dzhalf =
dhalf * dzini
5962 c = this%kv(ib) / dzini
5970 if (n == 1 .or. n == this%ndelaycells)
then
5981 if (n < this%ndelaycells)
then
5986 z = this%dbz(n, idelay)
5989 h = this%dbh(n, idelay)
5990 h0 = this%dbh0(n, idelay)
5991 dz = this%dbdz(n, idelay)
5992 dz0 = this%dbdz0(n, idelay)
5993 theta = this%dbtheta(n, idelay)
5994 theta0 = this%dbtheta0(n, idelay)
6003 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6006 dsnderv = this%csub_delay_calc_sat_derivative(node, idelay, n, hcell)
6009 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6012 smult = dzini * tled
6013 gs = this%dbgeo(n, idelay)
6014 es0 = this%dbes0(n, idelay)
6015 pcs = this%dbpcs(n, idelay)
6016 if (ielastic /= 0)
then
6017 qsto = smult * (dsn * ssk * (gs - hbar + zbot) - dsn0 * sske * es0)
6018 stoderv = -smult * dsn * ssk * hbarderv + &
6019 smult * ssk * (gs - hbar + zbot) * dsnderv
6021 qsto = smult * (dsn * ssk * (gs - hbar + zbot - pcs) + &
6022 dsn0 * sske * (pcs - es0))
6023 stoderv = -smult * dsn * ssk * hbarderv + &
6024 smult * ssk * (gs - hbar + zbot - pcs) * dsnderv
6028 if (this%ieslag /= 0)
then
6029 if (ielastic /= 0)
then
6030 stoderv = stoderv - smult * sske * es0 * dsnderv
6032 stoderv = stoderv + smult * sske * (pcs - es0) * dsnderv
6038 r = r - qsto + stoderv * h
6041 wcf = this%brg * tled
6042 wc = dz * wcf * theta
6043 wc0 = dz0 * wcf * theta0
6044 qwc = dsn0 * wc0 * h0 - dsn * wc * h
6045 wcderv = -dsn * wc - wc * h * dsnderv
6048 if (this%ieslag /= 0)
then
6049 wcderv = wcderv + wc0 * h0 * dsnderv
6054 r = r - qwc + wcderv * h
6069 integer(I4B),
intent(in) :: node
6070 integer(I4B),
intent(in) :: idelay
6071 integer(I4B),
intent(in) :: n
6072 real(DP),
intent(in) :: hcell
6073 real(DP),
intent(in) :: hcellold
6074 real(DP),
intent(inout) :: snnew
6075 real(DP),
intent(inout) :: snold
6082 if (this%stoiconv(node) /= 0)
then
6083 dzhalf =
dhalf * this%dbdzini(n, idelay)
6084 top = this%dbz(n, idelay) + dzhalf
6085 bot = this%dbz(n, idelay) - dzhalf
6092 if (this%ieslag /= 0)
then
6108 integer(I4B),
intent(in) :: node
6109 integer(I4B),
intent(in) :: idelay
6110 integer(I4B),
intent(in) :: n
6111 real(dp),
intent(in) :: hcell
6118 if (this%stoiconv(node) /= 0)
then
6119 dzhalf =
dhalf * this%dbdzini(n, idelay)
6120 top = this%dbz(n, idelay) + dzhalf
6121 bot = this%dbz(n, idelay) - dzhalf
6139 integer(I4B),
intent(in) :: ib
6140 real(DP),
intent(in) :: hcell
6141 real(DP),
intent(inout) :: stoe
6142 real(DP),
intent(inout) :: stoi
6144 integer(I4B) :: idelay
6145 integer(I4B) :: ielastic
6146 integer(I4B) :: node
6165 idelay = this%idelay(ib)
6166 ielastic = this%ielastic(ib)
6167 node = this%nodelist(ib)
6174 if (this%thickini(ib) >
dzero)
then
6175 fmult = this%dbdzini(1, idelay)
6176 dzhalf =
dhalf * this%dbdzini(1, idelay)
6177 do n = 1, this%ndelaycells
6178 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6179 z = this%dbz(n, idelay)
6181 h = this%dbh(n, idelay)
6182 h0 = this%dbh0(n, idelay)
6183 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6185 if (ielastic /= 0)
then
6186 v1 = dsn * ssk * (this%dbgeo(n, idelay) - hbar + zbot) - &
6187 dsn0 * sske * this%dbes0(n, idelay)
6190 v1 = dsn * ssk * (this%dbgeo(n, idelay) - hbar + zbot - &
6191 this%dbpcs(n, idelay))
6192 v2 = dsn0 * sske * (this%dbpcs(n, idelay) - this%dbes0(n, idelay))
6196 if (this%idbconvert(n, idelay) /= 0)
then
6197 stoi = stoi + v1 * fmult
6198 stoe = stoe + v2 * fmult
6200 stoe = stoe + (v1 + v2) * fmult
6204 ske = ske + sske * fmult
6205 sk = sk + ssk * fmult
6226 integer(I4B),
intent(in) :: ib
6227 real(DP),
intent(inout) :: dwc
6229 integer(I4B) :: idelay
6230 integer(I4B) :: node
6247 if (this%thickini(ib) >
dzero)
then
6248 idelay = this%idelay(ib)
6249 node = this%nodelist(ib)
6251 do n = 1, this%ndelaycells
6252 h = this%dbh(n, idelay)
6253 h0 = this%dbh0(n, idelay)
6254 dz = this%dbdz(n, idelay)
6255 dz0 = this%dbdz0(n, idelay)
6256 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6257 wc = dz * this%brg * this%dbtheta(n, idelay)
6258 wc0 = dz0 * this%brg * this%dbtheta0(n, idelay)
6259 v = dsn0 * wc0 * h0 - dsn * wc * h
6260 dwc = dwc + v * tled
6277 integer(I4B),
intent(in) :: ib
6278 real(DP),
intent(in) :: hcell
6279 real(DP),
intent(in) :: hcellold
6280 real(DP),
intent(inout) :: comp
6281 real(DP),
intent(inout) :: compi
6282 real(DP),
intent(inout) :: compe
6284 integer(I4B) :: idelay
6285 integer(I4B) :: ielastic
6286 integer(I4B) :: node
6302 idelay = this%idelay(ib)
6303 ielastic = this%ielastic(ib)
6304 node = this%nodelist(ib)
6310 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
6313 if (this%thickini(ib) >
dzero)
then
6314 fmult = this%dbdzini(1, idelay)
6315 do n = 1, this%ndelaycells
6316 h = this%dbh(n, idelay)
6317 h0 = this%dbh0(n, idelay)
6318 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6319 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6320 if (ielastic /= 0)
then
6321 v1 = dsn * ssk * this%dbes(n, idelay) - sske * this%dbes0(n, idelay)
6324 v1 = dsn * ssk * (this%dbes(n, idelay) - this%dbpcs(n, idelay))
6325 v2 = dsn0 * sske * (this%dbpcs(n, idelay) - this%dbes0(n, idelay))
6327 v = (v1 + v2) * fmult
6331 this%dbcomp(n, idelay) = v * snnew
6334 if (this%idbconvert(n, idelay) /= 0)
then
6335 compi = compi + v1 * fmult
6336 compe = compe + v2 * fmult
6338 compe = compe + (v1 + v2) * fmult
6344 comp = comp * this%rnb(ib)
6345 compi = compi * this%rnb(ib)
6346 compe = compe * this%rnb(ib)
6357 integer(I4B),
intent(in) :: ib
6359 integer(I4B) :: idelay
6368 idelay = this%idelay(ib)
6374 do n = 1, this%ndelaycells
6377 comp = this%dbtcomp(n, idelay) + this%dbcomp(n, idelay)
6381 comp = comp / this%rnb(ib)
6384 if (abs(comp) >
dzero)
then
6385 thick = this%dbdzini(n, idelay)
6386 theta = this%dbthetaini(n, idelay)
6387 call this%csub_adj_matprop(comp, thick, theta)
6388 if (thick <=
dzero)
then
6389 write (
errmsg,
'(2(a,i0),a,g0,a)') &
6390 'Adjusted thickness for delay interbed (', ib, &
6391 ') cell (', n,
') is less than or equal to 0 (', thick,
').'
6394 if (theta <=
dzero)
then
6395 write (
errmsg,
'(2(a,i0),a,g0,a)') &
6396 'Adjusted theta for delay interbed (', ib, &
6397 ') cell (', n,
'is less than or equal to 0 (', theta,
').'
6400 this%dbdz(n, idelay) = thick
6401 this%dbtheta(n, idelay) = theta
6402 tthick = tthick + thick
6403 wtheta = wtheta + thick * theta
6405 thick = this%dbdz(n, idelay)
6406 theta = this%dbtheta(n, idelay)
6407 tthick = tthick + thick
6408 wtheta = wtheta + thick * theta
6414 if (tthick >
dzero)
then
6415 wtheta = wtheta / tthick
6420 this%thick(ib) = tthick
6421 this%theta(ib) = wtheta
6437 integer(I4B),
intent(in) :: ib
6438 real(DP),
intent(inout) :: hcof
6439 real(DP),
intent(inout) :: rhs
6441 integer(I4B) :: idelay
6446 idelay = this%idelay(ib)
6449 if (this%thickini(ib) >
dzero)
then
6451 c1 =
dtwo * this%kv(ib) / this%dbdzini(1, idelay)
6452 rhs = -c1 * this%dbh(1, idelay)
6454 this%kv(ib) / this%dbdzini(this%ndelaycells, idelay)
6455 rhs = rhs - c2 * this%dbh(this%ndelaycells, idelay)
6470 integer(I4B),
intent(in) :: ib
6471 integer(I4B),
intent(in) :: n
6472 real(dp),
intent(in) :: hcell
6474 integer(I4B) :: idelay
6479 idelay = this%idelay(ib)
6480 c =
dtwo * this%kv(ib) / this%dbdzini(n, idelay)
6481 q = c * (hcell - this%dbh(n, idelay))
6510 integer(I4B) :: indx
6514 call this%obs%StoreObsType(
'csub', .true., indx)
6519 call this%obs%StoreObsType(
'inelastic-csub', .true., indx)
6524 call this%obs%StoreObsType(
'elastic-csub', .true., indx)
6529 call this%obs%StoreObsType(
'coarse-csub', .false., indx)
6534 call this%obs%StoreObsType(
'csub-cell', .true., indx)
6539 call this%obs%StoreObsType(
'wcomp-csub-cell', .false., indx)
6544 call this%obs%StoreObsType(
'ske', .true., indx)
6549 call this%obs%StoreObsType(
'sk', .true., indx)
6554 call this%obs%StoreObsType(
'ske-cell', .true., indx)
6559 call this%obs%StoreObsType(
'sk-cell', .true., indx)
6564 call this%obs%StoreObsType(
'gstress-cell', .false., indx)
6569 call this%obs%StoreObsType(
'estress-cell', .false., indx)
6574 call this%obs%StoreObsType(
'interbed-compaction', .true., indx)
6579 call this%obs%StoreObsType(
'inelastic-compaction', .true., indx)
6584 call this%obs%StoreObsType(
'elastic-compaction', .true., indx)
6589 call this%obs%StoreObsType(
'coarse-compaction', .false., indx)
6594 call this%obs%StoreObsType(
'inelastic-compaction-cell', .true., indx)
6599 call this%obs%StoreObsType(
'elastic-compaction-cell', .true., indx)
6604 call this%obs%StoreObsType(
'compaction-cell', .true., indx)
6609 call this%obs%StoreObsType(
'thickness', .true., indx)
6614 call this%obs%StoreObsType(
'coarse-thickness', .false., indx)
6619 call this%obs%StoreObsType(
'thickness-cell', .false., indx)
6624 call this%obs%StoreObsType(
'theta', .true., indx)
6629 call this%obs%StoreObsType(
'coarse-theta', .false., indx)
6634 call this%obs%StoreObsType(
'theta-cell', .true., indx)
6639 call this%obs%StoreObsType(
'preconstress-cell', .false., indx)
6644 call this%obs%StoreObsType(
'interbed-compaction-pct', .false., indx)
6649 call this%obs%StoreObsType(
'delay-preconstress', .false., indx)
6654 call this%obs%StoreObsType(
'delay-head', .false., indx)
6659 call this%obs%StoreObsType(
'delay-gstress', .false., indx)
6664 call this%obs%StoreObsType(
'delay-estress', .false., indx)
6669 call this%obs%StoreObsType(
'delay-compaction', .false., indx)
6674 call this%obs%StoreObsType(
'delay-thickness', .false., indx)
6679 call this%obs%StoreObsType(
'delay-theta', .false., indx)
6684 call this%obs%StoreObsType(
'delay-flowtop', .true., indx)
6689 call this%obs%StoreObsType(
'delay-flowbot', .true., indx)
6706 integer(I4B) :: idelay
6707 integer(I4B) :: ncol
6708 integer(I4B) :: node
6715 if (this%obs%npakobs > 0)
then
6716 call this%obs%obs_bd_clear()
6717 do i = 1, this%obs%npakobs
6718 obsrv => this%obs%pakobs(i)%obsrv
6719 if (obsrv%BndFound)
then
6720 if (obsrv%ObsTypeId ==
'SKE' .or. &
6721 obsrv%ObsTypeId ==
'SK' .or. &
6722 obsrv%ObsTypeId ==
'SKE-CELL' .or. &
6723 obsrv%ObsTypeId ==
'SK-CELL' .or. &
6724 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6725 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6726 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6727 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6728 obsrv%ObsTypeId ==
'PRECONSTRESS-CELL')
then
6729 if (this%gwfiss /= 0)
then
6730 call this%obs%SaveOneSimval(obsrv,
dnodata)
6733 do j = 1, obsrv%indxbnds_count
6734 n = obsrv%indxbnds(j)
6735 select case (obsrv%ObsTypeId)
6756 case (
'DELAY-HEAD',
'DELAY-PRECONSTRESS', &
6757 'DELAY-GSTRESS',
'DELAY-ESTRESS')
6758 if (n > this%ndelaycells)
then
6759 r = real(n - 1, dp) / real(this%ndelaycells, dp)
6760 idelay = int(floor(r)) + 1
6761 ncol = n - int(floor(r)) * this%ndelaycells
6766 select case (obsrv%ObsTypeId)
6768 v = this%dbh(ncol, idelay)
6769 case (
'DELAY-PRECONSTRESS')
6770 v = this%dbpcs(ncol, idelay)
6771 case (
'DELAY-GSTRESS')
6772 v = this%dbgeo(ncol, idelay)
6773 case (
'DELAY-ESTRESS')
6774 v = this%dbes(ncol, idelay)
6776 case (
'PRECONSTRESS-CELL')
6779 errmsg =
"Unrecognized observation type '"// &
6780 trim(obsrv%ObsTypeId)//
"'."
6783 call this%obs%SaveOneSimval(obsrv, v)
6788 do j = 1, obsrv%indxbnds_count
6789 n = obsrv%indxbnds(j)
6790 select case (obsrv%ObsTypeId)
6792 v = this%storagee(n) + this%storagei(n)
6793 case (
'INELASTIC-CSUB')
6794 v = this%storagei(n)
6795 case (
'ELASTIC-CSUB')
6796 v = this%storagee(n)
6797 case (
'COARSE-CSUB')
6799 case (
'WCOMP-CSUB-CELL')
6800 v = this%cell_wcstor(n)
6807 v = this%storagee(n) + this%storagei(n)
6811 case (
'COARSE-THETA')
6812 v = this%cg_theta(n)
6817 f = this%cg_thick(n) / this%cell_thick(n)
6818 v = f * this%cg_theta(n)
6820 node = this%nodelist(n)
6821 f = this%csub_calc_interbed_thickness(n) / this%cell_thick(node)
6822 v = f * this%theta(n)
6824 case (
'GSTRESS-CELL')
6826 case (
'ESTRESS-CELL')
6828 case (
'INTERBED-COMPACTION')
6830 case (
'INTERBED-COMPACTION-PCT')
6831 b0 = this%thickini(n)
6832 if (this%idelay(n) /= 0)
then
6833 b0 = b0 * this%rnb(n)
6836 case (
'INELASTIC-COMPACTION')
6838 case (
'ELASTIC-COMPACTION')
6840 case (
'COARSE-COMPACTION')
6841 v = this%cg_tcomp(n)
6842 case (
'INELASTIC-COMPACTION-CELL')
6848 case (
'ELASTIC-COMPACTION-CELL')
6852 v = this%cg_tcomp(n)
6856 case (
'COMPACTION-CELL')
6860 v = this%cg_tcomp(n)
6865 idelay = this%idelay(n)
6867 if (idelay /= 0)
then
6870 case (
'COARSE-THICKNESS')
6871 v = this%cg_thick(n)
6872 case (
'THICKNESS-CELL')
6873 v = this%cell_thick(n)
6874 case (
'DELAY-COMPACTION',
'DELAY-THICKNESS', &
6876 if (n > this%ndelaycells)
then
6877 r = real(n, dp) / real(this%ndelaycells, dp)
6878 idelay = int(floor(r)) + 1
6879 ncol = mod(n, this%ndelaycells)
6884 select case (obsrv%ObsTypeId)
6885 case (
'DELAY-COMPACTION')
6886 v = this%dbtcomp(ncol, idelay)
6887 case (
'DELAY-THICKNESS')
6888 v = this%dbdz(ncol, idelay)
6889 case (
'DELAY-THETA')
6890 v = this%dbtheta(ncol, idelay)
6892 case (
'DELAY-FLOWTOP')
6893 idelay = this%idelay(n)
6894 v = this%dbflowtop(idelay)
6895 case (
'DELAY-FLOWBOT')
6896 idelay = this%idelay(n)
6897 v = this%dbflowbot(idelay)
6899 errmsg =
"Unrecognized observation type: '"// &
6900 trim(obsrv%ObsTypeId)//
"'."
6903 call this%obs%SaveOneSimval(obsrv, v)
6907 call this%obs%SaveOneSimval(obsrv,
dnodata)
6930 character(len=LENBOUNDNAME) :: bname
6935 integer(I4B) :: idelay
6938 if (.not. this%csub_obs_supported())
then
6946 do i = 1, this%obs%npakobs
6947 obsrv => this%obs%pakobs(i)%obsrv
6950 obsrv%BndFound = .false.
6952 bname = obsrv%FeatureName
6953 if (bname /=
'')
then
6958 do j = 1, this%ninterbeds
6959 if (this%boundname(j) == bname)
then
6960 obsrv%BndFound = .true.
6961 obsrv%CurrentTimeStepEndValue =
dzero
6962 call obsrv%AddObsIndex(j)
6967 else if (obsrv%ObsTypeId ==
'GSTRESS-CELL' .or. &
6968 obsrv%ObsTypeId ==
'ESTRESS-CELL' .or. &
6969 obsrv%ObsTypeId ==
'THICKNESS-CELL' .or. &
6970 obsrv%ObsTypeId ==
'COARSE-CSUB' .or. &
6971 obsrv%ObsTypeId ==
'WCOMP-CSUB-CELL' .or. &
6972 obsrv%ObsTypeId ==
'COARSE-COMPACTION' .or. &
6973 obsrv%ObsTypeId ==
'COARSE-THETA' .or. &
6974 obsrv%ObsTypeId ==
'COARSE-THICKNESS')
then
6975 obsrv%BndFound = .true.
6976 obsrv%CurrentTimeStepEndValue =
dzero
6977 call obsrv%AddObsIndex(obsrv%NodeNumber)
6978 else if (obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6979 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6980 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6981 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6982 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
6983 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
6984 obsrv%ObsTypeId ==
'DELAY-THETA')
then
6985 if (this%ninterbeds > 0)
then
6986 n = obsrv%NodeNumber
6987 idelay = this%idelay(n)
6988 if (idelay /= 0)
then
6989 j = (idelay - 1) * this%ndelaycells + 1
6990 n2 = obsrv%NodeNumber2
6991 if (n2 < 1 .or. n2 > this%ndelaycells)
then
6992 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
6993 trim(adjustl(obsrv%ObsTypeId)),
'interbed cell must be ', &
6994 'greater than 0 and less than or equal to', this%ndelaycells, &
6995 '(specified value is ', n2,
').'
6998 j = (idelay - 1) * this%ndelaycells + n2
7000 obsrv%BndFound = .true.
7001 call obsrv%AddObsIndex(j)
7006 else if (obsrv%ObsTypeId ==
'CSUB' .or. &
7007 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
7008 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
7009 obsrv%ObsTypeId ==
'SK' .or. &
7010 obsrv%ObsTypeId ==
'SKE' .or. &
7011 obsrv%ObsTypeId ==
'THICKNESS' .or. &
7012 obsrv%ObsTypeId ==
'THETA' .or. &
7013 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7014 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7015 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7016 obsrv%ObsTypeId ==
'INTERBED-COMPACTION-PCT')
then
7017 if (this%ninterbeds > 0)
then
7018 j = obsrv%NodeNumber
7019 if (j < 1 .or. j > this%ninterbeds)
then
7020 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
7021 trim(adjustl(obsrv%ObsTypeId)),
'interbed cell must be greater', &
7022 'than 0 and less than or equal to', this%ninterbeds, &
7023 '(specified value is ', j,
').'
7026 obsrv%BndFound = .true.
7027 obsrv%CurrentTimeStepEndValue =
dzero
7028 call obsrv%AddObsIndex(j)
7031 else if (obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7032 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7033 if (this%ninterbeds > 0)
then
7034 j = obsrv%NodeNumber
7035 if (j < 1 .or. j > this%ninterbeds)
then
7036 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
7037 trim(adjustl(obsrv%ObsTypeId)), &
7038 'interbed cell must be greater ', &
7039 'than 0 and less than or equal to', this%ninterbeds, &
7040 '(specified value is ', j,
').'
7043 idelay = this%idelay(j)
7044 if (idelay /= 0)
then
7045 obsrv%BndFound = .true.
7046 obsrv%CurrentTimeStepEndValue =
dzero
7047 call obsrv%AddObsIndex(j)
7055 if (obsrv%ObsTypeId ==
'CSUB-CELL' .or. &
7056 obsrv%ObsTypeId ==
'SKE-CELL' .or. &
7057 obsrv%ObsTypeId ==
'SK-CELL' .or. &
7058 obsrv%ObsTypeId ==
'THETA-CELL' .or. &
7059 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION-CELL' .or. &
7060 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION-CELL' .or. &
7061 obsrv%ObsTypeId ==
'COMPACTION-CELL')
then
7062 if (.NOT. obsrv%BndFound)
then
7063 obsrv%BndFound = .true.
7064 obsrv%CurrentTimeStepEndValue =
dzero
7065 call obsrv%AddObsIndex(obsrv%NodeNumber)
7068 jloop:
do j = 1, this%ninterbeds
7069 if (this%nodelist(j) == obsrv%NodeNumber)
then
7070 obsrv%BndFound = .true.
7071 obsrv%CurrentTimeStepEndValue =
dzero
7072 call obsrv%AddObsIndex(j)
7099 integer(I4B),
intent(in) :: inunitobs
7100 integer(I4B),
intent(in) :: iout
7104 integer(I4B) :: icol, istart, istop
7105 character(len=LINELENGTH) :: string
7106 character(len=LENBOUNDNAME) :: bndname
7107 logical(LGP) :: flag_string
7108 logical(LGP) :: flag_idcellno
7109 logical(LGP) :: flag_error
7112 string = obsrv%IDstring
7113 flag_string = .true.
7114 flag_idcellno = .false.
7115 flag_error = .false.
7116 if (obsrv%ObsTypeId(1:5) ==
"DELAY" .AND. &
7117 obsrv%ObsTypeId(1:10) /=
"DELAY-FLOW")
then
7118 flag_idcellno = .true.
7127 if (obsrv%ObsTypeId ==
'CSUB' .or. &
7128 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
7129 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
7130 obsrv%ObsTypeId ==
'SK' .or. &
7131 obsrv%ObsTypeId ==
'SKE' .or. &
7132 obsrv%ObsTypeId ==
'THETA' .or. &
7133 obsrv%ObsTypeId ==
'THICKNESS' .or. &
7134 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7135 obsrv%ObsTypeId ==
'INTERBED-COMPACTION-PCT' .or. &
7136 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7137 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7138 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
7139 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
7140 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
7141 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
7142 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
7143 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
7144 obsrv%ObsTypeId ==
'DELAY-THETA' .or. &
7145 obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7146 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7150 nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
7151 iout, string, flag_string)
7154 if (obsrv%ObsTypeId ==
'SK' .or. &
7155 obsrv%ObsTypeId ==
'SKE' .or. &
7156 obsrv%ObsTypeId ==
'THETA' .or. &
7157 obsrv%ObsTypeId ==
'THICKNESS' .or. &
7158 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7159 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7160 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7161 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
7162 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
7163 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
7164 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
7165 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
7166 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
7167 obsrv%ObsTypeId ==
'DELAY-THETA')
then
7170 "BOUNDNAME ('", trim(adjustl(bndname)), &
7171 "') not allowed for CSUB observation type '", &
7172 trim(adjustl(obsrv%ObsTypeId)),
"'."
7177 else if (obsrv%ObsTypeId ==
'CSUB' .or. &
7178 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
7179 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
7183 obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7184 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7186 obsrv%FeatureName = bndname
7190 if (flag_idcellno .EQV. .true. .AND. flag_error .EQV. .false.)
then
7195 "BOUNDNAME ('", trim(adjustl(bndname)), &
7196 "') not allowed for CSUB observation type '", &
7197 trim(adjustl(obsrv%ObsTypeId)),
"' idcellno."
7200 obsrv%NodeNumber2 = nn2
7206 obsrv%NodeNumber = nn1
7220 this%listlabel = trim(this%filtyp)//
' NO.'
7221 if (this%dis%ndim == 3)
then
7222 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
7223 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
7224 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
7225 elseif (this%dis%ndim == 2)
then
7226 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
7227 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
7229 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
7231 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'SIG0'
7232 if (this%inamedbound == 1)
then
7233 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
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
@ tabright
right justified table column
@ tableft
left justified table column
@ mnormal
normal output mode
real(dp), parameter dem20
real constant 1e-20
@ tabucstring
upper case string table data
@ tabstring
string table data
@ tabinteger
integer table data
integer(i4b), parameter lenpackagename
maximum length of the package name
real(dp), parameter dp9
real constant 9/10
real(dp), parameter dem10
real constant 1e-10
real(dp), parameter dem7
real constant 1e-7
real(dp), parameter dem8
real constant 1e-8
integer(i4b), parameter namedboundflag
named bound flag
real(dp), parameter dnodata
real no data constant
real(dp), parameter dhnoflo
real no flow constant
integer(i4b), parameter lenlistlabel
maximum length of a llist label
real(dp), parameter dhundred
real constant 100
integer(i4b), parameter lenpakloc
maximum length of a package location
real(dp), parameter dem1
real constant 1e-1
real(dp), parameter dhalf
real constant 1/2
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
real(dp), parameter dgravity
real constant gravitational acceleration (m/(s s))
integer(i4b), parameter lenauxname
maximum length of a aux variable
integer(i4b), parameter lenboundname
maximum length of a bound name
real(dp), parameter dem4
real constant 1e-4
real(dp), parameter dem6
real constant 1e-6
real(dp), parameter dzero
real constant zero
real(dp), parameter dten
real constant 10
real(dp), parameter dprec
real constant machine precision
integer(i4b), parameter maxcharlen
maximum length of char string
real(dp), parameter dem15
real constant 1e-15
real(dp), parameter dtwo
real constant 2
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
integer(i4b), parameter lenmempath
maximum length of the memory path
real(dp), parameter dthree
real constant 3
real(dp), parameter done
real constant 1
integer(i4b) function, public get_node(ilay, irow, icol, nlay, nrow, ncol)
Get node number, given layer, row, and column indices for a structured grid. If any argument is inval...
This module contains the CSUB package methods.
subroutine csub_nodelay_wcomp_fn(this, ib, node, tled, area, hcell, hcellold, hcof, rhs)
@ brief Formulate no-delay interbed water compressibility coefficients
real(dp) function csub_calc_delay_flow(this, ib, n, hcell)
Calculate the flow from delay interbed top or bottom.
subroutine csub_source_dimensions(this)
@ brief Source dimensions for package
subroutine csub_cg_wcomp_fc(this, node, tled, area, hcell, hcellold, hcof, rhs)
@ brief Formulate coarse-grained water compressibility coefficients
subroutine, public csub_cr(csubobj, name_model, mempath, istounit, stoPckName, inunit, iout)
@ brief Create a new package object
subroutine csub_calc_sfacts(this, node, bot, znode, theta, es, es0, fact)
Calculate specific storage coefficient factor.
subroutine csub_delay_assemble_fn(this, ib, n, hcell, aii, au, al, r)
Assemble delay interbed Newton-Raphson formulation coefficients.
subroutine csub_ar(this, dis, ibound)
@ brief Allocate and read method for package
subroutine csub_initialize_tables(this)
@ brief Initialize optional tables
subroutine csub_nodelay_wcomp_fc(this, ib, node, tled, area, hcell, hcellold, hcof, rhs)
@ brief Formulate no-delay interbed water compressibility coefficients
real(dp) function csub_calc_sat_derivative(this, node, hcell)
Calculate the saturation derivative.
character(len=lenbudtxt), dimension(4) budtxt
subroutine csub_cg_calc_comp(this, node, hcell, hcellold, comp)
@ brief Calculate coarse-grained compaction in a cell
real(dp) function csub_calc_adjes(this, node, es0, z0, z)
Calculate the effective stress at elevation z.
subroutine csub_cg_wcomp_fn(this, node, tled, area, hcell, hcellold, hcof, rhs)
@ brief Formulate coarse-grained water compressibility coefficients
subroutine csub_interbed_fc(this, ib, node, area, hcell, hcellold, hcof, rhs)
@ brief Formulate the coefficients for a interbed
subroutine csub_delay_fc(this, ib, hcof, rhs)
Calculate delay interbed contribution to the cell.
subroutine csub_delay_update(this, ib)
Update delay interbed material properties.
subroutine csub_delay_init_zcell(this, ib)
Calculate delay interbed znode and z relative to interbed center.
subroutine csub_nodelay_update(this, i)
@ brief Update no-delay material properties
subroutine csub_source_packagedata(this)
@ brief source packagedata for package
subroutine csub_allocate_arrays(this)
@ brief Allocate package arrays
subroutine csub_delay_calc_ssksske(this, ib, n, hcell, ssk, sske)
Calculate delay interbed cell storage coefficients.
subroutine csub_adj_matprop(this, comp, thick, theta)
Calculate new material properties.
subroutine log_options(this, warn_estress_lag)
@ brief log options for package
subroutine csub_cg_calc_sske(this, n, sske, hcell)
@ brief Calculate Sske for a cell
real(dp) function csub_calc_void_ratio(this, theta)
Calculate the void ratio.
subroutine csub_fc(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
@ brief Fill A and r for the package
subroutine csub_calc_sat(this, node, hcell, hcellold, snnew, snold)
Calculate cell saturation.
real(dp) function csub_calc_theta(this, void_ratio)
Calculate the porosity.
subroutine csub_cc(this, innertot, kiter, iend, icnvgmod, nodes, hnew, hold, cpak, ipak, dpak)
@ brief Final convergence check
subroutine csub_delay_calc_wcomp(this, ib, dwc)
Calculate delay interbed water compressibility.
subroutine csub_delay_calc_sat(this, node, idelay, n, hcell, hcellold, snnew, snold)
Calculate delay interbed saturation.
subroutine csub_source_griddata(this)
@ brief Source griddata for package
real(dp) function csub_calc_znode(this, top, bottom, zbar)
Calculate the cell node.
subroutine csub_delay_calc_comp(this, ib, hcell, hcellold, comp, compi, compe)
Calculate delay interbed compaction.
subroutine csub_delay_calc_stress(this, ib, hcell)
Calculate delay interbed stress values.
subroutine source_options(this)
@ brief Source options for package
subroutine csub_nodelay_calc_comp(this, ib, hcell, hcellold, comp, rho1, rho2)
@ brief Calculate no-delay interbed compaction
subroutine csub_set_initial_state(this, nodes, hnew)
@ brief Set initial states for the package
subroutine csub_cg_calc_stress(this, nodes, hnew)
@ brief Calculate the stress for model cells
real(dp) function csub_calc_interbed_thickness(this, ib)
Calculate the interbed thickness.
real(dp), parameter dlog10es
derivative of the log of effective stress
subroutine csub_delay_assemble_fc(this, ib, n, hcell, aii, au, al, r)
Assemble delay interbed standard formulation coefficients.
subroutine csub_interbed_fn(this, ib, node, hcell, hcellold, hcof, rhs)
@ brief Formulate the coefficients for a interbed
subroutine csub_print_packagedata(this)
@ brief Print packagedata
subroutine csub_rp_obs(this)
Read and prepare the observations.
subroutine csub_rp(this)
@ brief Read and prepare stress period data for package
subroutine csub_nodelay_fc(this, ib, hcell, hcellold, rho1, rho2, rhs, argtled)
@ brief Calculate no-delay interbed storage coefficients
subroutine csub_ad(this, nodes, hnew)
@ brief Advance the package
subroutine csub_bd_obs(this)
Set the observations for this time step.
subroutine csub_cg_update(this, node)
@ brief Update coarse-grained material properties
subroutine csub_delay_assemble(this, ib, hcell)
Assemble delay interbed coefficients.
subroutine csub_bd(this, isuppress_output, model_budget)
@ brief Model budget calculation for package
subroutine define_listlabel(this)
@ brief Define the list label for the package
subroutine csub_ot_dv(this, idvfl, idvprint)
@ brief Save and print dependent values for package
real(dp) function csub_delay_calc_sat_derivative(this, node, idelay, n, hcell)
Calculate the delay interbed cell saturation derivative.
subroutine csub_da(this)
@ brief Deallocate package memory
subroutine csub_save_model_flows(this, icbcfl, icbcun)
@ brief Save model flows for package
subroutine csub_cg_fn(this, node, tled, area, hcell, hcof, rhs)
@ brief Formulate coarse-grained Newton-Raphson terms
subroutine csub_delay_head_check(this, ib)
Check delay interbed head.
subroutine csub_delay_sln(this, ib, hcell, update)
Solve delay interbed continuity equation.
subroutine csub_fp(this)
@ brief Final processing for package
subroutine csub_process_obsid(obsrv, dis, inunitobs, iout)
Process the observation IDs for the package.
subroutine csub_fn(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
@ brief Fill Newton-Raphson terms in A and r for the package
logical function csub_obs_supported(this)
Determine if observations are supported.
character(len=lenbudtxt), dimension(6) comptxt
subroutine csub_delay_calc_dstor(this, ib, hcell, stoe, stoi)
Calculate delay interbed storage change.
subroutine csub_cg_chk_stress(this)
@ brief Check effective stress values
subroutine csub_cg_fc(this, node, tled, area, hcell, hcellold, hcof, rhs)
@ brief Formulate the coefficients for coarse-grained materials
subroutine csub_cq(this, nodes, hnew, hold, isuppress_output, flowja)
@ brief Calculate flows for package
subroutine csub_allocate_scalars(this)
@ brief Allocate scalars
subroutine csub_df_obs(this)
Define the observation types available in the package.
subroutine, public ims_misc_thomas(n, tl, td, tu, b, x, w)
Tridiagonal solve using the Thomas algorithm.
This module defines variable data types.
pure logical function, public is_close(a, b, rtol, atol, symmetric)
Check if a real value is approximately equal to another.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine, public memorystore_release(varname, memory_path)
Release a single variable from the memory store.
Store and issue logging messages to output units.
subroutine, public write_message(text, iunit, fmt, skipbefore, skipafter, advance)
Write a message to an output unit.
This module contains the base numerical package type.
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_warning(msg, substring)
Store warning message.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=maxcharlen) warnmsg
warning message string
real(dp) function squadraticsaturation(top, bot, x, eps)
@ brief sQuadraticSaturation
real(dp) function squadraticsaturationderivative(top, bot, x, eps)
@ brief Derivative of the quadratic saturation function
real(dp) function squadratic0spderivative(x, xi, tomega)
@ brief sQuadratic0spDerivative
real(dp) function squadratic0sp(x, xi, tomega)
@ brief sQuadratic0sp
subroutine, public selectn(indx, v, reverse)
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)
real(dp), pointer, public totim
time relative to start of simulation
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
real(dp), pointer, public delt
length of the current time step
integer(i4b), pointer, public nper
number of stress period
Derived type for the Budget object.
This class is used to store a single deferred-length character string. It was designed to work in an ...