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()
1554 character(len=LINELENGTH) :: title
1555 character(len=LINELENGTH) :: tag
1556 character(len=10) :: ctype
1557 character(len=20) :: cellid
1558 integer(I4B) :: ntabrows
1559 integer(I4B) :: ntabcols
1561 integer(I4b) :: idelay
1562 integer(I4B) :: node
1565 title =
'CSUB'//
' PACKAGE ('// &
1566 trim(adjustl(this%packName))//
') INTERBED DATA'
1569 ntabrows = this%ninterbeds
1571 if (this%inamedbound /= 0)
then
1572 ntabcols = ntabcols + 1
1576 call table_cr(this%inputtab, this%packName, title)
1577 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
1582 tag =
'INTERBED NUMBER'
1583 call this%inputtab%initialize_column(tag, 10, alignment=
tabcenter)
1585 call this%inputtab%initialize_column(tag, 20, alignment=
tableft)
1586 tag =
'INTERBED TYPE'
1587 call this%inputtab%initialize_column(tag, 10, alignment=
tabcenter)
1589 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1591 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1593 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1594 tag =
'INTERBED THICKNESS'
1595 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1596 tag =
'CELL THICKNESS'
1597 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1599 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1601 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1603 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1605 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1607 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1608 if (this%inamedbound /= 0)
then
1610 call this%inputtab%initialize_column(tag, 40, alignment=
tableft)
1613 do ib = 1, this%ninterbeds
1614 idelay = this%idelay(ib)
1615 node = this%nodelist(ib)
1616 call this%dis%noder_to_string(node, cellid)
1617 if (idelay == 0)
then
1624 call this%inputtab%add_term(ib)
1625 call this%inputtab%add_term(cellid)
1626 call this%inputtab%add_term(ctype)
1627 call this%inputtab%add_term(this%pcs(ib))
1628 call this%inputtab%add_term(this%thickini(ib))
1629 call this%inputtab%add_term(this%rnb(ib))
1630 call this%inputtab%add_term(this%thickini(ib) * this%rnb(ib))
1631 call this%inputtab%add_term(this%dis%top(node) - this%dis%bot(node))
1632 call this%inputtab%add_term(this%ci(ib))
1633 call this%inputtab%add_term(this%rci(ib))
1634 call this%inputtab%add_term(this%theta(ib))
1635 if (idelay == 0)
then
1636 call this%inputtab%add_term(
"--")
1637 call this%inputtab%add_term(
"--")
1639 call this%inputtab%add_term(this%kv(ib))
1640 call this%inputtab%add_term(this%h0(ib))
1642 if (this%inamedbound /= 0)
then
1643 call this%inputtab%add_term(this%boundname(ib))
1660 character(len=LINELENGTH) :: title
1661 character(len=LINELENGTH) :: tag
1662 character(len=LINELENGTH) :: msg
1663 character(len=10) :: ctype
1664 character(len=20) :: cellid
1665 character(len=10) :: cflag
1670 integer(I4B) :: node
1672 integer(I4B) :: idelay
1673 integer(I4B) :: iexceed
1674 integer(I4B),
parameter :: ncells = 20
1675 integer(I4B) :: nlen
1676 integer(I4B) :: ntabrows
1677 integer(I4B) :: ntabcols
1678 integer(I4B) :: ipos
1683 integer(I4B),
dimension(:),
allocatable :: imap_sel
1684 integer(I4B),
dimension(:),
allocatable :: locs
1685 real(DP),
dimension(:),
allocatable :: pctcomp_arr
1688 allocate (locs(this%dis%ndim))
1691 if (this%ninterbeds > 0)
then
1692 nlen = min(ncells, this%ninterbeds)
1693 allocate (imap_sel(nlen))
1694 allocate (pctcomp_arr(this%ninterbeds))
1696 do ib = 1, this%ninterbeds
1697 idelay = this%idelay(ib)
1698 b0 = this%thickini(ib)
1699 strain = this%tcomp(ib) / b0
1701 pctcomp_arr(ib) = pctcomp
1702 if (pctcomp >=
done)
then
1703 iexceed = iexceed + 1
1706 call selectn(imap_sel, pctcomp_arr, reverse=.true.)
1709 i0 = max(1, this%ninterbeds - ncells + 1)
1710 i1 = this%ninterbeds
1712 if (iexceed /= 0)
then
1713 write (msg,
'(1x,a,1x,i0,1x,a,1x,i0,1x,a)') &
1714 'LARGEST', (i1 - i0 + 1),
'OF', this%ninterbeds, &
1715 'INTERBED STRAIN VALUES SHOWN'
1720 title = trim(adjustl(this%packName))//
' PACKAGE INTERBED STRAIN SUMMARY'
1727 call table_cr(this%outputtab, this%packName, title)
1728 call this%outputtab%table_df(ntabrows, ntabcols, this%iout)
1731 tag =
'INTERBED NUMBER'
1732 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1733 tag =
'INTERBED TYPE'
1734 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1736 call this%outputtab%initialize_column(tag, 20, alignment=
tableft)
1737 tag =
'INITIAL THICKNESS'
1738 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1739 tag =
'FINAL THICKNESS'
1740 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1741 tag =
'TOTAL COMPACTION'
1742 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1743 tag =
'FINAL STRAIN'
1744 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1745 tag =
'PERCENT COMPACTION'
1746 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1748 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1753 idelay = this%idelay(ib)
1754 b0 = this%thickini(ib)
1755 b1 = this%csub_calc_interbed_thickness(ib)
1756 if (idelay == 0)
then
1760 b0 = b0 * this%rnb(ib)
1762 strain = this%tcomp(ib) / b0
1764 if (pctcomp >= 5.0_dp)
then
1766 else if (pctcomp >=
done)
then
1771 node = this%nodelist(ib)
1772 call this%dis%noder_to_string(node, cellid)
1775 call this%outputtab%add_term(ib)
1776 call this%outputtab%add_term(ctype)
1777 call this%outputtab%add_term(cellid)
1778 call this%outputtab%add_term(b0)
1779 call this%outputtab%add_term(b1)
1780 call this%outputtab%add_term(this%tcomp(ib))
1781 call this%outputtab%add_term(strain)
1782 call this%outputtab%add_term(pctcomp)
1783 call this%outputtab%add_term(cflag)
1785 write (this%iout,
'(/1X,A,1X,I0,1X,A,1X,I0,1X,A,/1X,A,/1X,A)') &
1786 'PERCENT COMPACTION IS GREATER THAN OR EQUAL TO 1 PERCENT IN', &
1787 iexceed,
'OF', this%ninterbeds,
'INTERBED(S).', &
1788 'USE THE STRAIN_CSV_INTERBED OPTION TO OUTPUT A CSV '// &
1789 'FILE WITH PERCENT COMPACTION ',
'VALUES FOR ALL INTERBEDS.'
1791 msg =
'PERCENT COMPACTION WAS LESS THAN 1 PERCENT IN ALL INTERBEDS'
1792 write (this%iout,
'(/1X,A)') trim(adjustl(msg))
1796 if (this%istrainib /= 0)
then
1799 ntabrows = this%ninterbeds
1801 if (this%dis%ndim > 1)
then
1802 ntabcols = ntabcols + 1
1804 ntabcols = ntabcols + this%dis%ndim
1807 call table_cr(this%outputtab, this%packName,
'')
1808 call this%outputtab%table_df(ntabrows, ntabcols, this%istrainib, &
1809 lineseparator=.false., separator=
',')
1812 tag =
'INTERBED_NUMBER'
1813 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1814 tag =
'INTERBED_TYPE'
1815 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1817 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1818 if (this%dis%ndim == 2)
then
1820 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1822 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1825 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1827 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1829 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1831 tag =
'INITIAL_THICKNESS'
1832 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1833 tag =
'FINAL_THICKNESS'
1834 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1835 tag =
'TOTAL_COMPACTION'
1836 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1837 tag =
'TOTAL_STRAIN'
1838 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1839 tag =
'PERCENT_COMPACTION'
1840 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1843 do ib = 1, this%ninterbeds
1844 idelay = this%idelay(ib)
1845 b0 = this%thickini(ib)
1846 b1 = this%csub_calc_interbed_thickness(ib)
1847 if (idelay == 0)
then
1851 b0 = b0 * this%rnb(ib)
1853 strain = this%tcomp(ib) / b0
1855 node = this%nodelist(ib)
1856 call this%dis%noder_to_array(node, locs)
1859 call this%outputtab%add_term(ib)
1860 call this%outputtab%add_term(ctype)
1861 if (this%dis%ndim > 1)
then
1862 call this%outputtab%add_term(this%dis%get_nodeuser(node))
1864 do ipos = 1, this%dis%ndim
1865 call this%outputtab%add_term(locs(ipos))
1867 call this%outputtab%add_term(b0)
1868 call this%outputtab%add_term(b1)
1869 call this%outputtab%add_term(this%tcomp(ib))
1870 call this%outputtab%add_term(strain)
1871 call this%outputtab%add_term(pctcomp)
1876 deallocate (imap_sel)
1877 deallocate (pctcomp_arr)
1881 nlen = min(ncells, this%dis%nodes)
1882 allocate (imap_sel(nlen))
1883 allocate (pctcomp_arr(this%dis%nodes))
1885 do node = 1, this%dis%nodes
1887 if (this%cg_thickini(node) >
dzero)
then
1888 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1891 pctcomp_arr(node) = pctcomp
1892 if (pctcomp >=
done)
then
1893 iexceed = iexceed + 1
1896 call selectn(imap_sel, pctcomp_arr, reverse=.true.)
1899 i0 = max(1, this%dis%nodes - ncells + 1)
1902 if (iexceed /= 0)
then
1903 write (msg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1904 'LARGEST ', (i1 - i0 + 1),
'OF', this%dis%nodes, &
1905 'CELL COARSE-GRAINED VALUES SHOWN'
1909 title = trim(adjustl(this%packName))// &
1910 ' PACKAGE COARSE-GRAINED STRAIN SUMMARY'
1917 call table_cr(this%outputtab, this%packName, title)
1918 call this%outputtab%table_df(ntabrows, ntabcols, this%iout)
1922 call this%outputtab%initialize_column(tag, 20, alignment=
tableft)
1923 tag =
'INITIAL THICKNESS'
1924 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1925 tag =
'FINAL THICKNESS'
1926 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1927 tag =
'TOTAL COMPACTION'
1928 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1929 tag =
'FINAL STRAIN'
1930 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1931 tag =
'PERCENT COMPACTION'
1932 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1934 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1938 if (this%cg_thickini(node) >
dzero)
then
1939 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1944 if (pctcomp >= 5.0_dp)
then
1946 else if (pctcomp >=
done)
then
1951 call this%dis%noder_to_string(node, cellid)
1954 call this%outputtab%add_term(cellid)
1955 call this%outputtab%add_term(this%cg_thickini(node))
1956 call this%outputtab%add_term(this%cg_thick(node))
1957 call this%outputtab%add_term(this%cg_tcomp(node))
1958 call this%outputtab%add_term(strain)
1959 call this%outputtab%add_term(pctcomp)
1960 call this%outputtab%add_term(cflag)
1962 write (this%iout,
'(/1X,A,1X,I0,1X,A,1X,I0,1X,A,/1X,A,/1X,A)') &
1963 'COARSE-GRAINED STORAGE PERCENT COMPACTION IS GREATER THAN OR '// &
1964 'EQUAL TO 1 PERCENT IN', iexceed,
'OF', this%dis%nodes,
'CELL(S).', &
1965 'USE THE STRAIN_CSV_COARSE OPTION TO OUTPUT A CSV '// &
1966 'FILE WITH PERCENT COMPACTION ',
'VALUES FOR ALL CELLS.'
1968 msg =
'COARSE-GRAINED STORAGE PERCENT COMPACTION WAS LESS THAN '// &
1969 '1 PERCENT IN ALL CELLS '
1970 write (this%iout,
'(/1X,A)') trim(adjustl(msg))
1974 if (this%istrainsk /= 0)
then
1977 ntabrows = this%dis%nodes
1979 if (this%dis%ndim > 1)
then
1980 ntabcols = ntabcols + 1
1982 ntabcols = ntabcols + this%dis%ndim
1985 call table_cr(this%outputtab, this%packName,
'')
1986 call this%outputtab%table_df(ntabrows, ntabcols, this%istrainsk, &
1987 lineseparator=.false., separator=
',')
1991 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1992 if (this%dis%ndim == 2)
then
1994 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1996 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1999 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2001 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2003 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
2005 tag =
'INITIAL_THICKNESS'
2006 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2007 tag =
'FINAL_THICKNESS'
2008 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2009 tag =
'TOTAL_COMPACTION'
2010 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2011 tag =
'TOTAL_STRAIN'
2012 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2013 tag =
'PERCENT_COMPACTION'
2014 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2017 do node = 1, this%dis%nodes
2018 if (this%cg_thickini(node) >
dzero)
then
2019 strain = this%cg_tcomp(node) / this%cg_thickini(node)
2024 call this%dis%noder_to_array(node, locs)
2027 if (this%dis%ndim > 1)
then
2028 call this%outputtab%add_term(this%dis%get_nodeuser(node))
2030 do ipos = 1, this%dis%ndim
2031 call this%outputtab%add_term(locs(ipos))
2033 call this%outputtab%add_term(this%cg_thickini(node))
2034 call this%outputtab%add_term(this%cg_thick(node))
2035 call this%outputtab%add_term(this%cg_tcomp(node))
2036 call this%outputtab%add_term(strain)
2037 call this%outputtab%add_term(pctcomp)
2043 if (this%ndelaybeds > 0)
then
2044 if (this%idb_nconv_count(2) > 0)
then
2045 write (
warnmsg,
'(a,1x,a,1x,i0,1x,a,1x,a)') &
2046 'Delay interbed cell heads were less than the top of the interbed', &
2047 'cell in', this%idb_nconv_count(2),
'interbed cells in ', &
2048 'non-convertible GWF cells for at least one time step during '// &
2055 deallocate (imap_sel)
2057 deallocate (pctcomp_arr)
2072 if (this%inunit > 0)
then
2094 if (this%iupdatematprop == 0)
then
2095 nullify (this%cg_thick)
2096 nullify (this%cg_thick0)
2097 nullify (this%cg_theta)
2098 nullify (this%cg_theta0)
2113 call mem_deallocate(this%boundname,
'BOUNDNAME', this%memoryPath)
2130 if (this%iupdatematprop == 0)
then
2131 nullify (this%thick)
2132 nullify (this%thick0)
2133 nullify (this%theta)
2134 nullify (this%theta0)
2145 if (this%ndelaybeds > 0)
then
2146 if (this%iupdatematprop == 0)
then
2148 nullify (this%dbdz0)
2149 nullify (this%dbtheta)
2150 nullify (this%dbtheta0)
2189 nullify (this%gwfiss)
2192 nullify (this%stoiconv)
2193 nullify (this%stoss)
2196 if (this%iprpak > 0)
then
2197 call this%inputtab%table_da()
2198 deallocate (this%inputtab)
2199 nullify (this%inputtab)
2203 if (
associated(this%outputtab))
then
2204 call this%outputtab%table_da()
2205 deallocate (this%outputtab)
2206 nullify (this%outputtab)
2211 if (this%ipakcsv > 0)
then
2212 call this%pakcsvtab%table_da()
2213 deallocate (this%pakcsvtab)
2214 nullify (this%pakcsvtab)
2218 call mem_deallocate(this%listlabel,
'LISTLABEL', this%memoryPath)
2262 if (this%inunit > 0)
then
2263 call this%obs%obs_da()
2266 deallocate (this%obs)
2272 call this%NumericalPackageType%da()
2291 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellids
2292 integer(I4B),
dimension(:),
pointer,
contiguous :: cellid
2293 integer(I4B),
pointer :: iper
2294 integer(I4B) :: n, nodeu, noder
2295 character(len=LINELENGTH) :: title, text
2296 character(len=20) :: cellstr
2297 logical(LGP) :: found
2299 character(len=*),
parameter :: fmtlsp = &
2300 &
"(1X,/1X,'REUSING ',a,'S FROM LAST STRESS PERIOD')"
2302 call mem_setptr(iper,
'IPER', this%input_mempath)
2303 if (iper /=
kper)
then
2304 write (this%iout, fmtlsp) trim(this%filtyp)
2305 call this%csub_rp_obs()
2309 call mem_setptr(cellids,
'CELLID', this%input_mempath)
2310 call mem_set_value(this%nbound,
'NBOUND', this%input_mempath, &
2314 if (this%iprpak /= 0)
then
2316 title =
'CSUB'//
' PACKAGE ('// &
2317 trim(adjustl(this%packName))//
') DATA FOR PERIOD'
2318 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
2319 call table_cr(this%inputtab, this%packName, title)
2320 call this%inputtab%table_df(1, 2, this%iout, finalize=.false.)
2322 call this%inputtab%initialize_column(text, 20)
2324 call this%inputtab%initialize_column(text, 15, alignment=tableft)
2328 do n = 1, this%nbound
2331 cellid => cellids(:, n)
2334 if (this%dis%ndim == 1)
then
2336 elseif (this%dis%ndim == 2)
then
2337 nodeu =
get_node(cellid(1), 1, cellid(2), &
2338 this%dis%mshape(1), 1, &
2341 nodeu =
get_node(cellid(1), cellid(2), cellid(3), &
2342 this%dis%mshape(1), &
2343 this%dis%mshape(2), &
2348 noder = this%dis%get_nodenumber(nodeu, 1)
2349 if (noder <= 0)
then
2353 this%nodelistsig0(n) = noder
2356 if (this%iprpak /= 0)
then
2357 call this%dis%noder_to_string(noder, cellstr)
2358 call this%inputtab%add_term(cellstr)
2359 call this%inputtab%add_term(this%sig0(n))
2369 if (this%iprpak /= 0)
then
2370 call this%inputtab%finalize_table()
2374 call this%csub_rp_obs()
2390 integer(I4B),
intent(in) :: nodes
2391 real(DP),
dimension(nodes),
intent(in) :: hnew
2395 integer(I4B) :: idelay
2396 integer(I4B) :: node
2403 if (this%ninterbeds > 0)
then
2405 if (this%gwfiss /= 0)
then
2406 write (
errmsg,
'(a,i0,a,1x,a,1x,a,1x,i0,1x,a)') &
2407 'Only the first and last (',
nper,
')', &
2408 'stress period can be steady if interbeds are simulated.', &
2409 'Stress period',
kper,
'has been defined to be steady state.'
2416 if (this%initialized == 0)
then
2417 if (this%gwfiss == 0)
then
2418 call this%csub_set_initial_state(nodes, hnew)
2426 this%cg_comp(node) =
dzero
2427 this%cg_es0(node) = this%cg_es(node)
2428 if (this%iupdatematprop /= 0)
then
2429 this%cg_thick0(node) = this%cg_thick(node)
2430 this%cg_theta0(node) = this%cg_theta(node)
2435 do ib = 1, this%ninterbeds
2436 idelay = this%idelay(ib)
2439 this%comp(ib) =
dzero
2440 node = this%nodelist(ib)
2441 if (this%initialized /= 0)
then
2442 es = this%cg_es(node)
2448 if (this%iupdatematprop /= 0)
then
2449 this%thick0(ib) = this%thick(ib)
2450 this%theta0(ib) = this%theta(ib)
2454 if (idelay /= 0)
then
2458 if (this%gwfiss0 /= 0)
then
2459 node = this%nodelist(ib)
2461 do n = 1, this%ndelaycells
2462 this%dbh(n, idelay) = h
2468 do n = 1, this%ndelaycells
2470 if (this%initialized /= 0)
then
2471 if (this%dbes(n, idelay) > this%dbpcs(n, idelay))
then
2472 this%dbpcs(n, idelay) = this%dbes(n, idelay)
2475 this%dbh0(n, idelay) = this%dbh(n, idelay)
2476 this%dbes0(n, idelay) = this%dbes(n, idelay)
2477 if (this%iupdatematprop /= 0)
then
2478 this%dbdz0(n, idelay) = this%dbdz(n, idelay)
2479 this%dbtheta0(n, idelay) = this%dbtheta(n, idelay)
2486 this%gwfiss0 = this%gwfiss
2491 call this%obs%obs_ad()
2499 subroutine csub_fc(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
2504 integer(I4B),
intent(in) :: kiter
2505 real(DP),
intent(in),
dimension(:) :: hold
2506 real(DP),
intent(in),
dimension(:) :: hnew
2508 integer(I4B),
intent(in),
dimension(:) :: idxglo
2509 real(DP),
intent(inout),
dimension(:) :: rhs
2512 integer(I4B) :: node
2513 integer(I4B) :: idiag
2514 integer(I4B) :: idelay
2522 call this%csub_cg_calc_stress(this%dis%nodes, hnew)
2525 if (this%gwfiss == 0)
then
2531 do node = 1, this%dis%nodes
2532 idiag = this%dis%con%ia(node)
2533 area = this%dis%get_area(node)
2536 if (this%ibound(node) < 1) cycle
2539 if (this%iupdatematprop /= 0)
then
2540 if (this%ieslag == 0)
then
2543 call this%csub_cg_calc_comp(node, hnew(node), hold(node), comp)
2544 this%cg_comp(node) = comp
2547 call this%csub_cg_update(node)
2552 call this%csub_cg_fc(node, tled, area, hnew(node), hold(node), &
2556 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2557 rhs(node) = rhs(node) + rhsterm
2561 if (this%brg /=
dzero)
then
2562 call this%csub_cg_wcomp_fc(node, tled, area, hnew(node), hold(node), &
2567 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2568 rhs(node) = rhs(node) + rhsterm
2573 if (this%ninterbeds /= 0)
then
2577 do ib = 1, this%ninterbeds
2578 node = this%nodelist(ib)
2579 idelay = this%idelay(ib)
2580 idiag = this%dis%con%ia(node)
2581 area = this%dis%get_area(node)
2582 call this%csub_interbed_fc(ib, node, area, hnew(node), hold(node), &
2584 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2585 rhs(node) = rhs(node) + rhsterm
2589 call this%csub_nodelay_wcomp_fc(ib, node, tled, area, &
2590 hnew(node), hold(node), &
2594 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2595 rhs(node) = rhs(node) + rhsterm
2616 subroutine csub_fn(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
2621 integer(I4B),
intent(in) :: kiter
2622 real(DP),
intent(in),
dimension(:) :: hold
2623 real(DP),
intent(in),
dimension(:) :: hnew
2625 integer(I4B),
intent(in),
dimension(:) :: idxglo
2626 real(DP),
intent(inout),
dimension(:) :: rhs
2628 integer(I4B) :: idelay
2629 integer(I4B) :: node
2630 integer(I4B) :: idiag
2638 if (this%gwfiss == 0)
then
2642 do node = 1, this%dis%nodes
2643 idiag = this%dis%con%ia(node)
2644 area = this%dis%get_area(node)
2647 if (this%ibound(node) < 1) cycle
2650 call this%csub_cg_fn(node, tled, area, &
2651 hnew(node), hcof, rhsterm)
2655 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2656 rhs(node) = rhs(node) + rhsterm
2660 if (this%brg /=
dzero)
then
2661 call this%csub_cg_wcomp_fn(node, tled, area, hnew(node), hold(node), &
2666 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2667 rhs(node) = rhs(node) + rhsterm
2672 if (this%ninterbeds /= 0)
then
2676 do ib = 1, this%ninterbeds
2677 idelay = this%idelay(ib)
2678 node = this%nodelist(ib)
2681 if (this%ibound(node) < 1) cycle
2684 idiag = this%dis%con%ia(node)
2685 area = this%dis%get_area(node)
2686 call this%csub_interbed_fn(ib, node, hnew(node), hold(node), &
2690 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2691 rhs(node) = rhs(node) + rhsterm
2694 if (this%brg /=
dzero .and. idelay == 0)
then
2695 call this%csub_nodelay_wcomp_fn(ib, node, tled, area, &
2696 hnew(node), hold(node), &
2700 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2701 rhs(node) = rhs(node) + rhsterm
2717 character(len=LINELENGTH) :: tag
2718 integer(I4B) :: ntabrows
2719 integer(I4B) :: ntabcols
2721 if (this%ipakcsv > 0)
then
2722 if (this%ndelaybeds < 1)
then
2723 write (
warnmsg,
'(a,1x,3a)') &
2724 'Package convergence data is requested but delay interbeds', &
2725 'are not included in package (', &
2726 trim(adjustl(this%packName)),
').'
2734 call table_cr(this%pakcsvtab, this%packName,
'')
2735 call this%pakcsvtab%table_df(ntabrows, ntabcols, this%ipakcsv, &
2736 lineseparator=.false., separator=
',', &
2740 tag =
'total_inner_iterations'
2741 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2743 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2745 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2747 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2749 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2751 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2753 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2755 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2756 tag =
'dstoragemax_loc'
2757 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2775 subroutine csub_cc(this, innertot, kiter, iend, icnvgmod, nodes, &
2776 hnew, hold, cpak, ipak, dpak)
2781 integer(I4B),
intent(in) :: innertot
2782 integer(I4B),
intent(in) :: kiter
2783 integer(I4B),
intent(in) :: iend
2784 integer(I4B),
intent(in) :: icnvgmod
2785 integer(I4B),
intent(in) :: nodes
2786 real(DP),
dimension(nodes),
intent(in) :: hnew
2787 real(DP),
dimension(nodes),
intent(in) :: hold
2788 character(len=LENPAKLOC),
intent(inout) :: cpak
2789 integer(I4B),
intent(inout) :: ipak
2790 real(DP),
intent(inout) :: dpak
2792 character(len=LENPAKLOC) :: cloc
2793 integer(I4B) :: icheck
2794 integer(I4B) :: ipakfail
2796 integer(I4B) :: node
2797 integer(I4B) :: idelay
2798 integer(I4B) :: locdhmax
2799 integer(I4B) :: locrmax
2800 integer(I4B) :: ifirst
2806 real(DP) :: hcellold
2820 icheck = this%iconvchk
2830 if (this%gwfiss /= 0)
then
2833 if (icnvgmod == 0)
then
2839 if (icheck /= 0)
then
2845 final_check:
do ib = 1, this%ninterbeds
2846 idelay = this%idelay(ib)
2847 node = this%nodelist(ib)
2850 if (idelay == 0) cycle
2853 if (this%ibound(node) < 1) cycle
2856 dh = this%dbdhmax(idelay)
2861 area = this%dis%get_area(node)
2863 hcellold = hold(node)
2866 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
2869 call this%csub_delay_calc_dstor(ib, hcell, stoe, stoi)
2870 v1 = (stoe + stoi) * area * this%rnb(ib) * tled
2873 call this%csub_delay_calc_wcomp(ib, dwc)
2874 v1 = v1 + dwc * area * this%rnb(ib)
2877 call this%csub_delay_fc(ib, hcof, rhs)
2878 v2 = (-hcof * hcell - rhs) * area * this%rnb(ib)
2885 df = df *
delt / area
2888 if (ifirst == 1)
then
2895 if (abs(dh) > abs(dhmax))
then
2899 if (abs(df) > abs(rmax))
then
2908 if (abs(dhmax) > abs(dpak))
then
2911 write (cloc,
"(a,'-',a)") trim(this%packName),
'head'
2916 if (abs(rmax) > abs(dpak))
then
2919 write (cloc,
"(a,'-',a)") trim(this%packName),
'storage'
2924 if (this%ipakcsv /= 0)
then
2927 call this%pakcsvtab%add_term(innertot)
2928 call this%pakcsvtab%add_term(
totim)
2929 call this%pakcsvtab%add_term(
kper)
2930 call this%pakcsvtab%add_term(
kstp)
2931 call this%pakcsvtab%add_term(kiter)
2932 if (this%ndelaybeds > 0)
then
2933 call this%pakcsvtab%add_term(dhmax)
2934 call this%pakcsvtab%add_term(locdhmax)
2935 call this%pakcsvtab%add_term(rmax)
2936 call this%pakcsvtab%add_term(locrmax)
2938 call this%pakcsvtab%add_term(
'--')
2939 call this%pakcsvtab%add_term(
'--')
2940 call this%pakcsvtab%add_term(
'--')
2941 call this%pakcsvtab%add_term(
'--')
2946 call this%pakcsvtab%finalize_table()
2961 subroutine csub_cq(this, nodes, hnew, hold, isuppress_output, flowja)
2967 integer(I4B),
intent(in) :: nodes
2968 real(DP),
intent(in),
dimension(nodes) :: hnew
2969 real(DP),
intent(in),
dimension(nodes) :: hold
2970 integer(I4B),
intent(in) :: isuppress_output
2971 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
2974 integer(I4B) :: idelay
2975 integer(I4B) :: ielastic
2976 integer(I4B) :: iconvert
2977 integer(I4B) :: node
2980 integer(I4B) :: idiag
3007 integer(I4B) :: iprobslocal
3017 do node = 1, this%dis%nodes
3018 idiag = this%dis%con%ia(node)
3019 area = this%dis%get_area(node)
3023 if (this%gwfiss == 0)
then
3029 if (this%ibound(node) > 0 .and. this%cg_thickini(node) >
dzero)
then
3032 call this%csub_cg_fc(node, tled, area, hnew(node), hold(node), &
3034 rrate = hcof * hnew(node) - rhs
3037 call this%csub_cg_calc_comp(node, hnew(node), hold(node), comp)
3040 call this%csub_cg_wcomp_fc(node, tled, area, hnew(node), hold(node), &
3042 rratewc = hcof * hnew(node) - rhs
3048 this%cg_stor(node) = rrate
3049 this%cell_wcstor(node) = rratewc
3050 this%cell_thick(node) = this%cg_thick(node)
3053 this%cg_comp(node) = comp
3057 if (isuppress_output == 0)
then
3061 if (this%iupdatematprop /= 0)
then
3062 call this%csub_cg_update(node)
3066 this%cg_tcomp(node) = this%cg_tcomp(node) + comp
3070 flowja(idiag) = flowja(idiag) + rrate
3071 flowja(idiag) = flowja(idiag) + rratewc
3077 if (this%ndelaybeds > 0)
then
3078 this%idb_nconv_count(1) = 0
3085 do ib = 1, this%ninterbeds
3087 idelay = this%idelay(ib)
3088 ielastic = this%ielastic(ib)
3092 if (idelay == 0)
then
3096 b = this%thick(ib) * this%rnb(ib)
3100 node = this%nodelist(ib)
3101 idiag = this%dis%con%ia(node)
3102 area = this%dis%get_area(node)
3105 this%cell_thick(node) = this%cell_thick(node) + b
3108 if (this%gwfiss == 0)
then
3116 if (this%ibound(node) < 1) cycle
3119 if (idelay == 0)
then
3120 iconvert = this%iconvert(ib)
3124 call this%csub_nodelay_calc_comp(ib, hnew(node), hold(node), comp, &
3128 es = this%cg_es(node)
3130 es0 = this%cg_es0(node)
3133 if (ielastic > 0 .or. iconvert == 0)
then
3136 stoi = -pcs * rho2 + (rho2 * es)
3137 stoe = pcs * rho1 - (rho1 * es0)
3143 this%storagee(ib) = stoe * tledm
3144 this%storagei(ib) = stoi * tledm
3147 this%comp(ib) = comp
3150 if (isuppress_output == 0)
then
3153 if (this%iupdatematprop /= 0)
then
3154 call this%csub_nodelay_update(ib)
3158 this%tcomp(ib) = this%tcomp(ib) + comp
3159 this%tcompe(ib) = this%tcompe(ib) + compe
3160 this%tcompi(ib) = this%tcompi(ib) + compi
3169 call this%csub_calc_sat(node, h, h0, snnew, snold)
3172 call this%csub_delay_calc_dstor(ib, h, stoe, stoi)
3173 this%storagee(ib) = stoe * area * this%rnb(ib) * tledm
3174 this%storagei(ib) = stoi * area * this%rnb(ib) * tledm
3177 q = this%csub_calc_delay_flow(ib, 1, h) * area * this%rnb(ib)
3178 this%dbflowtop(idelay) = q
3179 nn = this%ndelaycells
3180 q = this%csub_calc_delay_flow(ib, nn, h) * area * this%rnb(ib)
3181 this%dbflowbot(idelay) = q
3184 if (isuppress_output == 0)
then
3187 call this%csub_delay_calc_comp(ib, h, h0, comp, compi, compe)
3191 if (this%iupdatematprop /= 0)
then
3192 call this%csub_delay_update(ib)
3196 this%tcomp(ib) = this%tcomp(ib) + comp
3197 this%tcompi(ib) = this%tcompi(ib) + compi
3198 this%tcompe(ib) = this%tcompe(ib) + compe
3201 do n = 1, this%ndelaycells
3202 this%dbtcomp(n, idelay) = this%dbtcomp(n, idelay) + &
3203 this%dbcomp(n, idelay)
3208 call this%csub_delay_head_check(ib)
3215 if (idelay == 0)
then
3216 call this%csub_nodelay_wcomp_fc(ib, node, tledm, area, &
3217 hnew(node), hold(node), hcof, rhs)
3218 rratewc = hcof * hnew(node) - rhs
3222 call this%csub_delay_calc_wcomp(ib, q)
3223 rratewc = q * area * this%rnb(ib)
3225 this%cell_wcstor(node) = this%cell_wcstor(node) + rratewc
3228 flowja(idiag) = flowja(idiag) + rratewc
3230 this%storagee(ib) =
dzero
3231 this%storagei(ib) =
dzero
3232 if (idelay /= 0)
then
3233 this%dbflowtop(idelay) =
dzero
3234 this%dbflowbot(idelay) =
dzero
3239 flowja(idiag) = flowja(idiag) + this%storagee(ib)
3240 flowja(idiag) = flowja(idiag) + this%storagei(ib)
3244 if (this%iupdatematprop /= 0)
then
3260 subroutine csub_bd(this, isuppress_output, model_budget)
3267 integer(I4B),
intent(in) :: isuppress_output
3268 type(
budgettype),
intent(inout) :: model_budget
3275 call model_budget%addentry(rin, rout,
delt,
budtxt(1), &
3276 isuppress_output,
' CSUB')
3277 if (this%ninterbeds > 0)
then
3281 call model_budget%addentry(rin, rout,
delt,
budtxt(2), &
3282 isuppress_output,
' CSUB')
3286 call model_budget%addentry(rin, rout,
delt,
budtxt(3), &
3287 isuppress_output,
' CSUB')
3290 call model_budget%addentry(rin, rout,
delt,
budtxt(4), &
3291 isuppress_output,
' CSUB')
3303 integer(I4B),
intent(in) :: icbcfl
3304 integer(I4B),
intent(in) :: icbcun
3306 character(len=1) :: cdatafmp =
' '
3307 character(len=1) :: editdesc =
' '
3308 integer(I4B) :: ibinun
3309 integer(I4B) :: iprint
3310 integer(I4B) :: nvaluesp
3311 integer(I4B) :: nwidthp
3313 integer(I4B) :: node
3314 integer(I4B) :: naux
3320 if (this%ipakcb < 0)
then
3322 elseif (this%ipakcb == 0)
then
3325 ibinun = this%ipakcb
3327 if (icbcfl == 0) ibinun = 0
3330 if (ibinun /= 0)
then
3335 call this%dis%record_array(this%cg_stor, this%iout, iprint, -ibinun, &
3336 budtxt(1), cdatafmp, nvaluesp, &
3337 nwidthp, editdesc, dinact)
3338 if (this%ninterbeds > 0)
then
3342 call this%dis%record_srcdst_list_header(
budtxt(2), &
3352 do ib = 1, this%ninterbeds
3353 q = this%storagee(ib)
3354 node = this%nodelist(ib)
3355 call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
3360 call this%dis%record_srcdst_list_header(
budtxt(3), &
3370 do ib = 1, this%ninterbeds
3371 q = this%storagei(ib)
3372 node = this%nodelist(ib)
3373 call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
3379 call this%dis%record_array(this%cell_wcstor, this%iout, iprint, -ibinun, &
3380 budtxt(4), cdatafmp, nvaluesp, &
3381 nwidthp, editdesc, dinact)
3394 integer(I4B),
intent(in) :: idvfl
3395 integer(I4B),
intent(in) :: idvprint
3397 character(len=1) :: cdatafmp =
' '
3398 character(len=1) :: editdesc =
' '
3399 integer(I4B) :: ibinun
3400 integer(I4B) :: iprint
3401 integer(I4B) :: nvaluesp
3402 integer(I4B) :: nwidthp
3404 integer(I4B) :: node
3405 integer(I4B) :: nodem
3406 integer(I4B) :: nodeu
3409 integer(I4B) :: idx_conn
3411 integer(I4B) :: ncpl
3412 integer(I4B) :: nlay
3415 real(DP) :: va_scale
3417 character(len=*),
parameter :: fmtnconv = &
3418 "(/4x, 'DELAY INTERBED CELL HEADS IN ', i0, ' INTERBEDS IN', &
3419 &' NON-CONVERTIBLE GWF CELLS WERE LESS THAN THE TOP OF THE INTERBED CELL')"
3424 if (this%ioutcomp /= 0 .or. this%ioutzdisp /= 0)
then
3429 if (idvfl == 0) ibinun = 0
3432 if (ibinun /= 0)
then
3437 do node = 1, this%dis%nodes
3438 this%buff(node) = this%cg_tcomp(node)
3440 do ib = 1, this%ninterbeds
3441 node = this%nodelist(ib)
3442 this%buff(node) = this%buff(node) + this%tcomp(ib)
3446 if (this%ioutcomp /= 0)
then
3447 ibinun = this%ioutcomp
3448 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3449 comptxt(1), cdatafmp, nvaluesp, &
3450 nwidthp, editdesc, dinact)
3454 if (this%ioutzdisp /= 0)
then
3455 ibinun = this%ioutzdisp
3458 do nodeu = 1, this%dis%nodesuser
3459 this%buffusr(nodeu) =
dzero
3463 do node = 1, this%dis%nodes
3464 nodeu = this%dis%get_nodeuser(node)
3465 this%buffusr(nodeu) = this%buff(node)
3469 ncpl = this%dis%get_ncpl()
3472 if (this%dis%ndim == 1)
then
3473 do node = this%dis%nodes, 1, -1
3474 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
3477 nodem = this%dis%con%ja(ii)
3478 idx_conn = this%dis%con%jas(ii)
3481 ihc = this%dis%con%ihc(idx_conn)
3485 if (node < nodem)
then
3486 va_scale = this%dis%get_area_factor(node, idx_conn)
3487 this%buffusr(node) = this%buffusr(node) + &
3488 va_scale * this%buffusr(nodem)
3495 nlay = this%dis%nodesuser / ncpl
3496 do k = nlay - 1, 1, -1
3498 node = (k - 1) * ncpl + i
3499 nodem = k * ncpl + i
3500 this%buffusr(node) = this%buffusr(node) + this%buffusr(nodem)
3506 do nodeu = 1, this%dis%nodesuser
3507 node = this%dis%get_nodenumber_idx1(nodeu, 1)
3509 this%buff(node) = this%buffusr(nodeu)
3514 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3515 comptxt(6), cdatafmp, nvaluesp, &
3516 nwidthp, editdesc, dinact)
3522 if (this%ioutcompi /= 0)
then
3523 ibinun = this%ioutcompi
3527 if (idvfl == 0) ibinun = 0
3530 if (ibinun /= 0)
then
3535 do node = 1, this%dis%nodes
3536 this%buff(node) =
dzero
3538 do ib = 1, this%ninterbeds
3539 node = this%nodelist(ib)
3540 this%buff(node) = this%buff(node) + this%tcompi(ib)
3544 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3545 comptxt(2), cdatafmp, nvaluesp, &
3546 nwidthp, editdesc, dinact)
3550 if (this%ioutcompe /= 0)
then
3551 ibinun = this%ioutcompe
3555 if (idvfl == 0) ibinun = 0
3558 if (ibinun /= 0)
then
3563 do node = 1, this%dis%nodes
3564 this%buff(node) =
dzero
3566 do ib = 1, this%ninterbeds
3567 node = this%nodelist(ib)
3568 this%buff(node) = this%buff(node) + this%tcompe(ib)
3572 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3573 comptxt(3), cdatafmp, nvaluesp, &
3574 nwidthp, editdesc, dinact)
3578 if (this%ioutcompib /= 0)
then
3579 ibinun = this%ioutcompib
3583 if (idvfl == 0) ibinun = 0
3586 if (ibinun /= 0)
then
3591 do node = 1, this%dis%nodes
3592 this%buff(node) =
dzero
3594 do ib = 1, this%ninterbeds
3595 node = this%nodelist(ib)
3596 this%buff(node) = this%buff(node) + this%tcompe(ib) + this%tcompi(ib)
3600 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3601 comptxt(4), cdatafmp, nvaluesp, &
3602 nwidthp, editdesc, dinact)
3606 if (this%ioutcomps /= 0)
then
3607 ibinun = this%ioutcomps
3611 if (idvfl == 0) ibinun = 0
3614 if (ibinun /= 0)
then
3619 do node = 1, this%dis%nodes
3620 this%buff(node) = this%cg_tcomp(node)
3624 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3625 comptxt(5), cdatafmp, nvaluesp, &
3626 nwidthp, editdesc, dinact)
3631 if (this%gwfiss == 0)
then
3632 call this%csub_cg_chk_stress()
3639 if (this%ndelaybeds > 0)
then
3640 if (this%idb_nconv_count(1) > this%idb_nconv_count(2))
then
3641 this%idb_nconv_count(2) = this%idb_nconv_count(1)
3643 if (this%idb_nconv_count(1) > 0)
then
3644 write (this%iout, fmtnconv) this%idb_nconv_count(1)
3659 integer(I4B),
intent(in) :: nodes
3660 real(DP),
dimension(nodes),
intent(in) :: hnew
3662 integer(I4B) :: node
3666 integer(I4B) :: idx_conn
3671 real(DP) :: va_scale
3680 if (this%iupdatestress /= 0)
then
3681 do node = 1, this%dis%nodes
3686 top = this%dis%top(node)
3687 bot = this%dis%bot(node)
3691 if (this%ibound(node) /= 0)
then
3701 if (hcell < top)
then
3702 gs = (top - hbar) * this%sgm(node) + (hbar - bot) * this%sgs(node)
3704 gs = thick * this%sgs(node)
3708 this%cg_gs(node) = gs
3712 do nn = 1, this%nbound
3713 node = this%nodelistsig0(nn)
3714 sadd = this%sig0(nn)
3715 this%cg_gs(node) = this%cg_gs(node) + sadd
3719 do node = 1, this%dis%nodes
3722 gs = this%cg_gs(node)
3726 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
3729 m = this%dis%con%ja(ii)
3730 idx_conn = this%dis%con%jas(ii)
3733 if (this%dis%con%ihc(idx_conn) == 0)
then
3739 if (this%dis%ndim /= 1)
then
3740 gs = gs + this%cg_gs(m)
3744 va_scale = this%dis%get_area_factor(node, idx_conn)
3745 gs_conn = this%cg_gs(m)
3746 gs = gs + (gs_conn * va_scale)
3754 this%cg_gs(node) = gs
3760 do node = 1, this%dis%nodes
3761 top = this%dis%top(node)
3762 bot = this%dis%bot(node)
3763 if (this%ibound(node) /= 0)
then
3776 es = this%cg_gs(node) - phead
3777 this%cg_es(node) = es
3793 character(len=20) :: cellid
3794 integer(I4B) :: ierr
3795 integer(I4B) :: node
3809 do node = 1, this%dis%nodes
3810 if (this%ibound(node) < 1) cycle
3811 bot = this%dis%bot(node)
3812 gs = this%cg_gs(node)
3813 es = this%cg_es(node)
3815 if (this%ibound(node) /= 0)
then
3819 if (this%lhead_based .EQV. .false.)
then
3822 call this%dis%noder_to_string(node, cellid)
3823 write (
errmsg,
'(a,g0,a,1x,a,1x,a,4(g0,a))') &
3824 'Small to negative effective stress (', es,
') in cell', &
3825 trim(adjustl(cellid)),
'. (', es,
' = ', this%cg_gs(node), &
3826 ' - (', hcell,
' - ', bot,
').'
3834 write (
errmsg,
'(a,1x,i0,3(1x,a))') &
3835 'Solution: small to negative effective stress values in', ierr, &
3836 'cells can be eliminated by increasing storage values and/or ', &
3837 'adding/modifying stress boundaries to prevent water-levels from', &
3838 'exceeding the top of the model.'
3853 integer(I4B),
intent(in) :: i
3860 comp = this%tcomp(i) + this%comp(i)
3861 if (abs(comp) >
dzero)
then
3862 thick = this%thickini(i)
3863 theta = this%thetaini(i)
3864 call this%csub_adj_matprop(comp, thick, theta)
3865 if (thick <=
dzero)
then
3866 write (
errmsg,
'(a,1x,i0,1x,a,g0,a)') &
3867 'Adjusted thickness for no-delay interbed', i, &
3868 'is less than or equal to 0 (', thick,
').'
3871 if (theta <=
dzero)
then
3872 write (
errmsg,
'(a,1x,i0,1x,a,g0,a)') &
3873 'Adjusted theta for no-delay interbed', i, &
3874 'is less than or equal to 0 (', theta,
').'
3877 this%thick(i) = thick
3878 this%theta(i) = theta
3900 integer(I4B),
intent(in) :: ib
3901 real(DP),
intent(in) :: hcell
3902 real(DP),
intent(in) :: hcellold
3903 real(DP),
intent(inout) :: rho1
3904 real(DP),
intent(inout) :: rho2
3905 real(DP),
intent(inout) :: rhs
3906 real(DP),
intent(in),
optional :: argtled
3908 integer(I4B) :: node
3918 real(DP) :: sto_fac0
3928 if (
present(argtled))
then
3933 node = this%nodelist(ib)
3934 area = this%dis%get_area(node)
3935 bot = this%dis%bot(node)
3936 top = this%dis%top(node)
3937 thick = this%thickini(ib)
3943 this%iconvert(ib) = 0
3946 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
3947 if (this%lhead_based .EQV. .true.)
then
3951 znode = this%csub_calc_znode(top, bot, hbar)
3952 es = this%cg_es(node)
3953 es0 = this%cg_es0(node)
3954 theta = this%thetaini(ib)
3959 call this%csub_calc_sfacts(node, bot, znode, theta, es, es0, f)
3961 sto_fac = tled * snnew * thick * f
3962 sto_fac0 = tled * snold * thick * f
3965 rho1 = this%rci(ib) * sto_fac0
3966 rho2 = this%rci(ib) * sto_fac
3967 if (this%cg_es(node) > this%pcs(ib))
then
3968 this%iconvert(ib) = 1
3969 rho2 = this%ci(ib) * sto_fac
3973 rcorr = rho2 * (hcell - hbar)
3976 if (this%ielastic(ib) /= 0)
then
3977 rhs = rho1 * this%cg_es0(node) - &
3978 rho2 * (this%cg_gs(node) + bot) - &
3981 rhs = -rho2 * (this%cg_gs(node) + bot) + &
3982 (this%pcs(ib) * (rho2 - rho1)) + &
3983 (rho1 * this%cg_es0(node)) - &
4005 integer(I4B),
intent(in) :: ib
4006 real(DP),
intent(in) :: hcell
4007 real(DP),
intent(in) :: hcellold
4008 real(DP),
intent(inout) :: comp
4009 real(DP),
intent(inout) :: rho1
4010 real(DP),
intent(inout) :: rho2
4012 integer(I4B) :: node
4020 node = this%nodelist(ib)
4022 es = this%cg_es(node)
4023 es0 = this%cg_es0(node)
4027 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, rho2, rhs, argtled=tled)
4030 if (this%ielastic(ib) /= 0)
then
4031 comp = rho2 * es - rho1 * es0
4033 comp = -pcs * (rho2 - rho1) - (rho1 * es0) + (rho2 * es)
4047 integer(I4B),
intent(in) :: nodes
4048 real(DP),
dimension(nodes),
intent(in) :: hnew
4050 character(len=LINELENGTH) :: title
4051 character(len=LINELENGTH) :: tag
4052 character(len=20) :: cellid
4054 integer(I4B) :: node
4056 integer(I4B) :: idelay
4057 integer(I4B) :: ntabrows
4058 integer(I4B) :: ntabcols
4064 real(DP) :: void_ratio
4074 call this%csub_cg_calc_stress(nodes, hnew)
4079 this%cg_es0(node) = this%cg_es(node)
4083 do ib = 1, this%ninterbeds
4084 idelay = this%idelay(ib)
4085 node = this%nodelist(ib)
4086 top = this%dis%top(node)
4087 bot = this%dis%bot(node)
4091 if (this%ispecified_pcs == 0)
then
4093 if (this%ipch /= 0)
then
4094 pcs = this%cg_es(node) - pcs0
4096 pcs = this%cg_es(node) + pcs0
4100 if (this%ipch /= 0)
then
4101 pcs = this%cg_gs(node) - (pcs0 - bot)
4103 if (pcs < this%cg_es(node))
then
4104 pcs = this%cg_es(node)
4110 if (idelay /= 0)
then
4111 dzhalf =
dhalf * this%dbdzini(1, idelay)
4116 do n = 1, this%ndelaycells
4117 if (this%ispecified_dbh == 0)
then
4118 this%dbh(n, idelay) = hcell + this%dbh(n, idelay)
4120 this%dbh(n, idelay) = hcell
4122 this%dbh0(n, idelay) = this%dbh(n, idelay)
4126 call this%csub_delay_calc_stress(ib, hcell)
4130 do n = 1, this%ndelaycells
4131 zbot = this%dbz(n, idelay) - dzhalf
4134 dbpcs = pcs - (zbot - bot) * (this%sgs(node) -
done)
4135 this%dbpcs(n, idelay) = dbpcs
4138 this%dbes0(n, idelay) = this%dbes(n, idelay)
4145 top = this%dis%top(node)
4146 bot = this%dis%bot(node)
4149 if (this%istoragec == 1)
then
4152 if (this%lhead_based .EQV. .true.)
then
4158 void_ratio = this%csub_calc_void_ratio(this%cg_theta(node))
4159 es = this%cg_es(node)
4166 znode = this%csub_calc_znode(top, bot, hbar)
4167 fact = this%csub_calc_adjes(node, es, bot, znode)
4168 fact = fact * (
done + void_ratio)
4175 this%cg_ske_cr(node) = this%cg_ske_cr(node) * fact
4178 if (fact <=
dzero)
then
4179 call this%dis%noder_to_string(node, cellid)
4180 write (
errmsg,
'(a,1x,a,a)') &
4181 'Negative recompression index calculated for cell', &
4182 trim(adjustl(cellid)),
'.'
4188 do ib = 1, this%ninterbeds
4189 idelay = this%idelay(ib)
4190 node = this%nodelist(ib)
4191 top = this%dis%top(node)
4192 bot = this%dis%bot(node)
4195 if (this%istoragec == 1)
then
4198 if (this%lhead_based .EQV. .true.)
then
4204 void_ratio = this%csub_calc_void_ratio(this%theta(ib))
4205 es = this%cg_es(node)
4212 znode = this%csub_calc_znode(top, bot, hbar)
4213 fact = this%csub_calc_adjes(node, es, bot, znode)
4214 fact = fact * (
done + void_ratio)
4221 this%ci(ib) = this%ci(ib) * fact
4222 this%rci(ib) = this%rci(ib) * fact
4225 if (fact <=
dzero)
then
4226 call this%dis%noder_to_string(node, cellid)
4227 write (
errmsg,
'(a,1x,i0,2(1x,a),a)') &
4228 'Negative compression indices calculated for interbed', ib, &
4229 'in cell', trim(adjustl(cellid)),
'.'
4235 if (this%iprpak == 1)
then
4237 title = trim(adjustl(this%packName))// &
4238 ' PACKAGE CALCULATED INITIAL INTERBED STRESSES AT THE CELL BOTTOM'
4241 ntabrows = this%ninterbeds
4243 if (this%inamedbound /= 0)
then
4244 ntabcols = ntabcols + 1
4248 call table_cr(this%inputtab, this%packName, title)
4249 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4252 tag =
'INTERBED NUMBER'
4253 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4255 call this%inputtab%initialize_column(tag, 20)
4256 tag =
'GEOSTATIC STRESS'
4257 call this%inputtab%initialize_column(tag, 16)
4258 tag =
'EFFECTIVE STRESS'
4259 call this%inputtab%initialize_column(tag, 16)
4260 tag =
'PRECONSOLIDATION STRESS'
4261 call this%inputtab%initialize_column(tag, 16)
4262 if (this%inamedbound /= 0)
then
4264 call this%inputtab%initialize_column(tag,
lenboundname, &
4269 do ib = 1, this%ninterbeds
4270 node = this%nodelist(ib)
4271 call this%dis%noder_to_string(node, cellid)
4274 call this%inputtab%add_term(ib)
4275 call this%inputtab%add_term(cellid)
4276 call this%inputtab%add_term(this%cg_gs(node))
4277 call this%inputtab%add_term(this%cg_es(node))
4278 call this%inputtab%add_term(this%pcs(ib))
4279 if (this%inamedbound /= 0)
then
4280 call this%inputtab%add_term(this%boundname(ib))
4287 title = trim(adjustl(this%packName))// &
4288 ' PACKAGE CALCULATED INITIAL DELAY INTERBED STRESSES'
4292 do ib = 1, this%ninterbeds
4293 idelay = this%idelay(ib)
4294 if (idelay /= 0)
then
4295 ntabrows = ntabrows + this%ndelaycells
4299 if (this%inamedbound /= 0)
then
4300 ntabcols = ntabcols + 1
4304 call table_cr(this%inputtab, this%packName, title)
4305 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4308 tag =
'INTERBED NUMBER'
4309 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4311 call this%inputtab%initialize_column(tag, 20)
4313 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4314 tag =
'GEOSTATIC STRESS'
4315 call this%inputtab%initialize_column(tag, 16)
4316 tag =
'EFFECTIVE STRESS'
4317 call this%inputtab%initialize_column(tag, 16)
4318 tag =
'PRECONSOLIDATION STRESS'
4319 call this%inputtab%initialize_column(tag, 16)
4320 if (this%inamedbound /= 0)
then
4322 call this%inputtab%initialize_column(tag,
lenboundname, &
4327 do ib = 1, this%ninterbeds
4328 idelay = this%idelay(ib)
4329 if (idelay /= 0)
then
4330 node = this%nodelist(ib)
4331 call this%dis%noder_to_string(node, cellid)
4334 do n = 1, this%ndelaycells
4336 call this%inputtab%add_term(ib)
4337 call this%inputtab%add_term(cellid)
4339 call this%inputtab%add_term(
' ')
4340 call this%inputtab%add_term(
' ')
4342 call this%inputtab%add_term(n)
4343 call this%inputtab%add_term(this%dbgeo(n, idelay))
4344 call this%inputtab%add_term(this%dbes(n, idelay))
4345 call this%inputtab%add_term(this%dbpcs(n, idelay))
4346 if (this%inamedbound /= 0)
then
4348 call this%inputtab%add_term(this%boundname(ib))
4350 call this%inputtab%add_term(
' ')
4358 if (this%istoragec == 1)
then
4359 if (this%lhead_based .EQV. .false.)
then
4361 title = trim(adjustl(this%packName))// &
4362 ' PACKAGE COMPRESSION INDICES'
4365 ntabrows = this%ninterbeds
4367 if (this%inamedbound /= 0)
then
4368 ntabcols = ntabcols + 1
4372 call table_cr(this%inputtab, this%packName, title)
4373 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4376 tag =
'INTERBED NUMBER'
4377 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4379 call this%inputtab%initialize_column(tag, 20)
4381 call this%inputtab%initialize_column(tag, 16)
4383 call this%inputtab%initialize_column(tag, 16)
4384 if (this%inamedbound /= 0)
then
4386 call this%inputtab%initialize_column(tag,
lenboundname, &
4391 do ib = 1, this%ninterbeds
4393 node = this%nodelist(ib)
4394 call this%dis%noder_to_string(node, cellid)
4397 call this%inputtab%add_term(ib)
4398 call this%inputtab%add_term(cellid)
4399 call this%inputtab%add_term(this%ci(ib) * fact)
4400 call this%inputtab%add_term(this%rci(ib) * fact)
4401 if (this%inamedbound /= 0)
then
4402 call this%inputtab%add_term(this%boundname(ib))
4415 this%initialized = 1
4418 if (this%lhead_based .EQV. .true.)
then
4419 this%iupdatestress = 0
4432 subroutine csub_cg_fc(this, node, tled, area, hcell, hcellold, hcof, rhs)
4435 integer(I4B),
intent(in) :: node
4436 real(DP),
intent(in) :: tled
4437 real(DP),
intent(in) :: area
4438 real(DP),
intent(in) :: hcell
4439 real(DP),
intent(in) :: hcellold
4440 real(DP),
intent(inout) :: hcof
4441 real(DP),
intent(inout) :: rhs
4457 top = this%dis%top(node)
4458 bot = this%dis%bot(node)
4459 tthk = this%cg_thickini(node)
4462 if (tthk >
dzero)
then
4465 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4471 call this%csub_cg_calc_sske(node, sske, hcell)
4472 rho1 = sske * area * tthk * tled
4475 this%cg_ske(node) = sske * tthk * snold
4476 this%cg_sk(node) = sske * tthk * snnew
4479 hcof = -rho1 * snnew
4480 rhs = rho1 * snold * this%cg_es0(node) - &
4481 rho1 * snnew * (this%cg_gs(node) + bot)
4484 rhs = rhs - rho1 * snnew * (hcell - hbar)
4501 integer(I4B),
intent(in) :: node
4502 real(DP),
intent(in) :: tled
4503 real(DP),
intent(in) :: area
4504 real(DP),
intent(in) :: hcell
4505 real(DP),
intent(inout) :: hcof
4506 real(DP),
intent(inout) :: rhs
4515 real(DP) :: hbarderv
4524 top = this%dis%top(node)
4525 bot = this%dis%bot(node)
4526 tthk = this%cg_thickini(node)
4529 if (tthk >
dzero)
then
4532 call this%csub_calc_sat(node, hcell, top, snnew, snold)
4535 satderv = this%csub_calc_sat_derivative(node, hcell)
4544 call this%csub_cg_calc_sske(node, sske, hcell)
4545 rho1 = sske * area * tthk * tled
4548 hcof = rho1 * snnew * (
done - hbarderv) + &
4549 rho1 * (this%cg_gs(node) - hbar + bot) * satderv
4552 if (this%ieslag /= 0)
then
4553 hcof = hcof - rho1 * this%cg_es0(node) * satderv
4573 integer(I4B),
intent(in) :: ib
4574 integer(I4B),
intent(in) :: node
4575 real(DP),
intent(in) :: area
4576 real(DP),
intent(in) :: hcell
4577 real(DP),
intent(in) :: hcellold
4578 real(DP),
intent(inout) :: hcof
4579 real(DP),
intent(inout) :: rhs
4598 if (this%ibound(node) > 0)
then
4599 if (this%idelay(ib) == 0)
then
4602 if (this%iupdatematprop /= 0)
then
4603 if (this%ieslag == 0)
then
4606 call this%csub_nodelay_calc_comp(ib, hcell, hcellold, comp, &
4608 this%comp(ib) = comp
4611 call this%csub_nodelay_update(ib)
4616 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, hcof, rhs)
4621 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4624 if (this%iupdatematprop /= 0)
then
4625 if (this%ieslag == 0)
then
4628 call this%csub_delay_calc_comp(ib, hcell, hcellold, &
4630 this%comp(ib) = comp
4633 call this%csub_delay_update(ib)
4638 call this%csub_delay_sln(ib, hcell)
4639 call this%csub_delay_fc(ib, hcof, rhs)
4640 f = area * this%rnb(ib)
4661 integer(I4B),
intent(in) :: ib
4662 integer(I4B),
intent(in) :: node
4663 real(DP),
intent(in) :: hcell
4664 real(DP),
intent(in) :: hcellold
4665 real(DP),
intent(inout) :: hcof
4666 real(DP),
intent(inout) :: rhs
4668 integer(I4B) :: idelay
4680 real(DP) :: hbarderv
4690 idelay = this%idelay(ib)
4691 top = this%dis%top(node)
4692 bot = this%dis%bot(node)
4695 if (this%ibound(node) > 0)
then
4697 tthk = this%thickini(ib)
4700 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4703 if (idelay == 0)
then
4709 satderv = this%csub_calc_sat_derivative(node, hcell)
4718 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, rho2, rhsn)
4721 hcofn = rho2 * (
done - hbarderv) * snnew + &
4722 rho2 * (this%cg_gs(node) - hbar + bot) * satderv
4723 if (this%ielastic(ib) == 0)
then
4724 hcofn = hcofn - rho2 * this%pcs(ib) * satderv
4728 if (this%ieslag /= 0)
then
4729 if (this%ielastic(ib) /= 0)
then
4730 hcofn = hcofn - rho1 * this%cg_es0(node) * satderv
4732 hcofn = hcofn - rho1 * (this%pcs(ib) - this%cg_es0(node)) * satderv
4749 integer(I4B),
intent(in) :: n
4750 real(DP),
intent(inout) :: sske
4751 real(DP),
intent(in) :: hcell
4767 if (this%lhead_based .EQV. .true.)
then
4773 top = this%dis%top(n)
4774 bot = this%dis%bot(n)
4780 znode = this%csub_calc_znode(top, bot, hbar)
4784 es0 = this%cg_es0(n)
4785 theta = this%cg_thetaini(n)
4790 call this%csub_calc_sfacts(n, bot, znode, theta, es, es0, f)
4792 sske = f * this%cg_ske_cr(n)
4805 integer(I4B),
intent(in) :: node
4806 real(DP),
intent(in) :: hcell
4807 real(DP),
intent(in) :: hcellold
4808 real(DP),
intent(inout) :: comp
4820 call this%csub_cg_fc(node, tled, area, hcell, hcellold, hcof, rhs)
4823 comp = hcof * hcell - rhs
4834 integer(I4B),
intent(in) :: node
4836 character(len=20) :: cellid
4842 comp = this%cg_tcomp(node) + this%cg_comp(node)
4843 call this%dis%noder_to_string(node, cellid)
4844 if (abs(comp) >
dzero)
then
4845 thick = this%cg_thickini(node)
4846 theta = this%cg_thetaini(node)
4847 call this%csub_adj_matprop(comp, thick, theta)
4848 if (thick <=
dzero)
then
4849 write (
errmsg,
'(a,1x,a,1x,a,g0,a)') &
4850 'Adjusted thickness for cell', trim(adjustl(cellid)), &
4851 'is less than or equal to 0 (', thick,
').'
4854 if (theta <=
dzero)
then
4855 write (
errmsg,
'(a,1x,a,1x,a,g0,a)') &
4856 'Adjusted theta for cell', trim(adjustl(cellid)), &
4857 'is less than or equal to 0 (', theta,
').'
4860 this%cg_thick(node) = thick
4861 this%cg_theta(node) = theta
4879 integer(I4B),
intent(in) :: node
4880 real(DP),
intent(in) :: tled
4881 real(DP),
intent(in) :: area
4882 real(DP),
intent(in) :: hcell
4883 real(DP),
intent(in) :: hcellold
4884 real(DP),
intent(inout) :: hcof
4885 real(DP),
intent(inout) :: rhs
4901 top = this%dis%top(node)
4902 bot = this%dis%bot(node)
4903 tthk = this%cg_thick(node)
4904 tthk0 = this%cg_thick0(node)
4907 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4910 wc0 = this%brg * area * tthk0 * this%cg_theta0(node) * tled
4911 wc = this%brg * area * tthk * this%cg_theta(node) * tled
4917 rhs = -wc0 * snold * hcellold
4933 integer(I4B),
intent(in) :: node
4934 real(DP),
intent(in) :: tled
4935 real(DP),
intent(in) :: area
4936 real(DP),
intent(in) :: hcell
4937 real(DP),
intent(in) :: hcellold
4938 real(DP),
intent(inout) :: hcof
4939 real(DP),
intent(inout) :: rhs
4955 top = this%dis%top(node)
4956 bot = this%dis%bot(node)
4957 tthk = this%cg_thick(node)
4960 satderv = this%csub_calc_sat_derivative(node, hcell)
4963 f = this%brg * area * tled
4966 wc = f * tthk * this%cg_theta(node)
4969 hcof = -wc * hcell * satderv
4972 if (this%ieslag /= 0)
then
4973 tthk0 = this%cg_thick0(node)
4974 wc0 = f * tthk0 * this%cg_theta0(node)
4975 hcof = hcof + wc * hcellold * satderv
4993 hcell, hcellold, hcof, rhs)
4996 integer(I4B),
intent(in) :: ib
4997 integer(I4B),
intent(in) :: node
4998 real(DP),
intent(in) :: tled
4999 real(DP),
intent(in) :: area
5000 real(DP),
intent(in) :: hcell
5001 real(DP),
intent(in) :: hcellold
5002 real(DP),
intent(inout) :: hcof
5003 real(DP),
intent(inout) :: rhs
5018 top = this%dis%top(node)
5019 bot = this%dis%bot(node)
5022 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
5025 f = this%brg * area * tled
5026 wc0 = f * this%theta0(ib) * this%thick0(ib)
5027 wc = f * this%theta(ib) * this%thick(ib)
5029 rhs = -wc0 * snold * hcellold
5043 hcell, hcellold, hcof, rhs)
5046 integer(I4B),
intent(in) :: ib
5047 integer(I4B),
intent(in) :: node
5048 real(DP),
intent(in) :: tled
5049 real(DP),
intent(in) :: area
5050 real(DP),
intent(in) :: hcell
5051 real(DP),
intent(in) :: hcellold
5052 real(DP),
intent(inout) :: hcof
5053 real(DP),
intent(inout) :: rhs
5067 top = this%dis%top(node)
5068 bot = this%dis%bot(node)
5071 f = this%brg * area * tled
5074 satderv = this%csub_calc_sat_derivative(node, hcell)
5077 wc = f * this%theta(ib) * this%thick(ib)
5080 hcof = -wc * hcell * satderv
5083 if (this%ieslag /= 0)
then
5084 wc0 = f * this%theta0(ib) * this%thick0(ib)
5085 hcof = hcof + wc0 * hcellold * satderv
5101 real(dp),
intent(in) :: theta
5103 real(dp) :: void_ratio
5105 void_ratio = theta / (
done - theta)
5117 real(dp),
intent(in) :: void_ratio
5122 theta = void_ratio / (
done + void_ratio)
5134 integer(I4B),
intent(in) :: ib
5136 integer(I4B) :: idelay
5140 idelay = this%idelay(ib)
5141 thick = this%thick(ib)
5142 if (idelay /= 0)
then
5143 thick = thick * this%rnb(ib)
5160 real(dp),
intent(in) :: top
5161 real(dp),
intent(in) :: bottom
5162 real(dp),
intent(in) :: zbar
5168 if (zbar > top)
then
5173 znode =
dhalf * (v + bottom)
5187 integer(I4B),
intent(in) :: node
5188 real(dp),
intent(in) :: es0
5189 real(dp),
intent(in) :: z0
5190 real(dp),
intent(in) :: z
5195 es = es0 - (z - z0) * (this%sgs(node) -
done)
5208 integer(I4B),
intent(in) :: ib
5210 integer(I4B) :: iviolate
5211 integer(I4B) :: idelay
5212 integer(I4B) :: node
5221 idelay = this%idelay(ib)
5222 node = this%nodelist(ib)
5225 idelaycells:
do n = 1, this%ndelaycells
5226 z = this%dbz(n, idelay)
5227 h = this%dbh(n, idelay)
5228 dzhalf =
dhalf * this%dbdzini(1, idelay)
5231 if (this%stoiconv(node) == 0)
then
5234 this%idb_nconv_count(1) = this%idb_nconv_count(1) + 1
5240 if (iviolate > 0)
then
5258 integer(I4B),
intent(in) :: node
5259 real(DP),
intent(in) :: hcell
5260 real(DP),
intent(in) :: hcellold
5261 real(DP),
intent(inout) :: snnew
5262 real(DP),
intent(inout) :: snold
5268 if (this%stoiconv(node) /= 0)
then
5269 top = this%dis%top(node)
5270 bot = this%dis%bot(node)
5277 if (this%ieslag /= 0)
then
5292 integer(I4B),
intent(in) :: node
5293 real(dp),
intent(in) :: hcell
5299 if (this%stoiconv(node) /= 0)
then
5300 top = this%dis%top(node)
5301 bot = this%dis%bot(node)
5320 integer(I4B),
intent(in) :: node
5321 real(DP),
intent(in) :: bot
5322 real(DP),
intent(in) :: znode
5323 real(DP),
intent(in) :: theta
5324 real(DP),
intent(in) :: es
5325 real(DP),
intent(in) :: es0
5326 real(DP),
intent(inout) :: fact
5329 real(DP) :: void_ratio
5334 if (this%ieslag /= 0)
then
5341 void_ratio = this%csub_calc_void_ratio(theta)
5342 denom = this%csub_calc_adjes(node, esv, bot, znode)
5343 denom = denom * (
done + void_ratio)
5344 if (denom /=
dzero)
then
5360 real(DP),
intent(in) :: comp
5361 real(DP),
intent(inout) :: thick
5362 real(DP),
intent(inout) :: theta
5365 real(DP) :: void_ratio
5369 void_ratio = this%csub_calc_void_ratio(theta)
5372 if (thick >
dzero) strain = -comp / thick
5375 void_ratio = void_ratio + strain * (
done + void_ratio)
5376 theta = this%csub_calc_theta(void_ratio)
5377 thick = thick - comp
5390 integer(I4B),
intent(in) :: ib
5391 real(DP),
intent(in) :: hcell
5392 logical(LGP),
intent(in),
optional :: update
5396 logical(LGP) :: lupdate
5398 integer(I4B) :: icnvg
5399 integer(I4B) :: iter
5400 integer(I4B) :: idelay
5407 if (
present(update))
then
5414 call this%csub_delay_calc_stress(ib, hcell)
5422 if (this%thickini(ib) >
dzero)
then
5425 idelay = this%idelay(ib)
5430 call this%csub_delay_assemble(ib, hcell)
5434 this%dbal, this%dbad, this%dbau, &
5435 this%dbrhs, this%dbdh, this%dbaw)
5439 do n = 1, this%ndelaycells
5440 dh = this%dbdh(n) - this%dbh(n, idelay)
5441 if (abs(dh) > abs(dhmax))
then
5444 this%dbdhmax(idelay) = dhmax
5448 this%dbh(n, idelay) = this%dbdh(n)
5452 call this%csub_delay_calc_stress(ib, hcell)
5455 if (abs(dhmax) < dclose)
then
5457 else if (iter /= 1)
then
5458 if (abs(dhmax) - abs(dhmax0) <
dprec)
then
5462 if (icnvg == 1)
then
5483 integer(I4B),
intent(in) :: ib
5486 integer(I4B) :: node
5487 integer(I4B) :: idelay
5499 idelay = this%idelay(ib)
5500 node = this%nodelist(ib)
5501 b = this%thickini(ib)
5502 bot = this%dis%bot(node)
5508 znode = this%csub_calc_znode(top, bot, hbar)
5509 dz =
dhalf * this%dbdzini(1, idelay)
5516 do n = 1, this%ndelaycells
5519 this%dbz(n, idelay) = z
5523 if (abs(zr) < dz)
then
5526 this%dbrelz(n, idelay) = zr
5540 integer(I4B),
intent(in) :: ib
5541 real(DP),
intent(in) :: hcell
5544 integer(I4B) :: idelay
5545 integer(I4B) :: node
5561 idelay = this%idelay(ib)
5562 node = this%nodelist(ib)
5563 sigma = this%cg_gs(node)
5564 topaq = this%dis%top(node)
5565 botaq = this%dis%bot(node)
5566 dzhalf =
dhalf * this%dbdzini(1, idelay)
5567 top = this%dbz(1, idelay) + dzhalf
5573 sgm = this%sgm(node)
5574 sgs = this%sgs(node)
5575 if (hcell < top)
then
5576 sadd = ((top - hbar) * sgm) + ((hbar - botaq) * sgs)
5578 sadd = (top - botaq) * sgs
5580 sigma = sigma - sadd
5583 do n = 1, this%ndelaycells
5584 h = this%dbh(n, idelay)
5587 z = this%dbz(n, idelay)
5596 sadd = ((top - hbar) * sgm) + ((hbar - bot) * sgs)
5598 sadd = (top - bot) * sgs
5600 sigma = sigma + sadd
5602 this%dbgeo(n, idelay) = sigma
5603 this%dbes(n, idelay) = sigma - phead
5620 integer(I4B),
intent(in) :: ib
5621 integer(I4B),
intent(in) :: n
5622 real(DP),
intent(in) :: hcell
5623 real(DP),
intent(inout) :: ssk
5624 real(DP),
intent(inout) :: sske
5626 integer(I4B) :: idelay
5627 integer(I4B) :: ielastic
5628 integer(I4B) :: node
5631 real(DP) :: hbarcell
5650 idelay = this%idelay(ib)
5651 ielastic = this%ielastic(ib)
5654 if (this%lhead_based .EQV. .true.)
then
5660 node = this%nodelist(ib)
5661 theta = this%dbthetaini(n, idelay)
5664 topcell = this%dis%top(node)
5665 botcell = this%dis%bot(node)
5672 zcell = this%csub_calc_znode(topcell, botcell, hbarcell)
5675 zcenter = zcell + this%dbrelz(n, idelay)
5676 dzhalf =
dhalf * this%dbdzini(1, idelay)
5677 top = zcenter + dzhalf
5678 bot = zcenter - dzhalf
5679 h = this%dbh(n, idelay)
5686 znode = this%csub_calc_znode(top, bot, hbar)
5690 zbot = this%dbz(n, idelay) - dzhalf
5693 es = this%dbes(n, idelay)
5694 es0 = this%dbes0(n, idelay)
5699 call this%csub_calc_sfacts(node, zbot, znode, theta, es, es0, f)
5701 this%idbconvert(n, idelay) = 0
5702 sske = f * this%rci(ib)
5703 ssk = f * this%rci(ib)
5704 if (ielastic == 0)
then
5705 if (this%dbes(n, idelay) > this%dbpcs(n, idelay))
then
5706 this%idbconvert(n, idelay) = 1
5707 ssk = f * this%ci(ib)
5722 integer(I4B),
intent(in) :: ib
5723 real(DP),
intent(in) :: hcell
5732 do n = 1, this%ndelaycells
5735 if (this%inewton == 0)
then
5736 call this%csub_delay_assemble_fc(ib, n, hcell, aii, au, al, r)
5738 call this%csub_delay_assemble_fn(ib, n, hcell, aii, au, al, r)
5760 integer(I4B),
intent(in) :: ib
5761 integer(I4B),
intent(in) :: n
5762 real(DP),
intent(in) :: hcell
5763 real(DP),
intent(inout) :: aii
5764 real(DP),
intent(inout) :: au
5765 real(DP),
intent(inout) :: al
5766 real(DP),
intent(inout) :: r
5768 integer(I4B) :: node
5769 integer(I4B) :: idelay
5770 integer(I4B) :: ielastic
5806 idelay = this%idelay(ib)
5807 ielastic = this%ielastic(ib)
5808 node = this%nodelist(ib)
5809 dzini = this%dbdzini(1, idelay)
5810 dzhalf =
dhalf * dzini
5812 c = this%kv(ib) / dzini
5820 if (n == 1 .or. n == this%ndelaycells)
then
5831 if (n < this%ndelaycells)
then
5836 z = this%dbz(n, idelay)
5839 h = this%dbh(n, idelay)
5840 h0 = this%dbh0(n, idelay)
5841 dz = this%dbdz(n, idelay)
5842 dz0 = this%dbdz0(n, idelay)
5843 theta = this%dbtheta(n, idelay)
5844 theta0 = this%dbtheta0(n, idelay)
5850 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
5853 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
5856 smult = dzini * tled
5857 gs = this%dbgeo(n, idelay)
5858 es0 = this%dbes0(n, idelay)
5859 pcs = this%dbpcs(n, idelay)
5860 aii = aii - smult * dsn * ssk
5861 if (ielastic /= 0)
then
5863 (dsn * ssk * (gs + zbot) - dsn0 * sske * es0)
5866 (dsn * ssk * (gs + zbot - pcs) + dsn0 * sske * (pcs - es0))
5870 r = r + smult * dsn * ssk * (h - hbar)
5873 wcf = this%brg * tled
5874 wc = dz * wcf * theta
5875 wc0 = dz0 * wcf * theta0
5876 aii = aii - dsn * wc
5877 r = r - dsn0 * wc0 * h0
5891 integer(I4B),
intent(in) :: ib
5892 integer(I4B),
intent(in) :: n
5893 real(DP),
intent(in) :: hcell
5894 real(DP),
intent(inout) :: aii
5895 real(DP),
intent(inout) :: au
5896 real(DP),
intent(inout) :: al
5897 real(DP),
intent(inout) :: r
5899 integer(I4B) :: node
5900 integer(I4B) :: idelay
5901 integer(I4B) :: ielastic
5927 real(DP) :: hbarderv
5943 idelay = this%idelay(ib)
5944 ielastic = this%ielastic(ib)
5945 node = this%nodelist(ib)
5946 dzini = this%dbdzini(1, idelay)
5947 dzhalf =
dhalf * dzini
5949 c = this%kv(ib) / dzini
5957 if (n == 1 .or. n == this%ndelaycells)
then
5968 if (n < this%ndelaycells)
then
5973 z = this%dbz(n, idelay)
5976 h = this%dbh(n, idelay)
5977 h0 = this%dbh0(n, idelay)
5978 dz = this%dbdz(n, idelay)
5979 dz0 = this%dbdz0(n, idelay)
5980 theta = this%dbtheta(n, idelay)
5981 theta0 = this%dbtheta0(n, idelay)
5990 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
5993 dsnderv = this%csub_delay_calc_sat_derivative(node, idelay, n, hcell)
5996 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
5999 smult = dzini * tled
6000 gs = this%dbgeo(n, idelay)
6001 es0 = this%dbes0(n, idelay)
6002 pcs = this%dbpcs(n, idelay)
6003 if (ielastic /= 0)
then
6004 qsto = smult * (dsn * ssk * (gs - hbar + zbot) - dsn0 * sske * es0)
6005 stoderv = -smult * dsn * ssk * hbarderv + &
6006 smult * ssk * (gs - hbar + zbot) * dsnderv
6008 qsto = smult * (dsn * ssk * (gs - hbar + zbot - pcs) + &
6009 dsn0 * sske * (pcs - es0))
6010 stoderv = -smult * dsn * ssk * hbarderv + &
6011 smult * ssk * (gs - hbar + zbot - pcs) * dsnderv
6015 if (this%ieslag /= 0)
then
6016 if (ielastic /= 0)
then
6017 stoderv = stoderv - smult * sske * es0 * dsnderv
6019 stoderv = stoderv + smult * sske * (pcs - es0) * dsnderv
6025 r = r - qsto + stoderv * h
6028 wcf = this%brg * tled
6029 wc = dz * wcf * theta
6030 wc0 = dz0 * wcf * theta0
6031 qwc = dsn0 * wc0 * h0 - dsn * wc * h
6032 wcderv = -dsn * wc - wc * h * dsnderv
6035 if (this%ieslag /= 0)
then
6036 wcderv = wcderv + wc0 * h0 * dsnderv
6041 r = r - qwc + wcderv * h
6056 integer(I4B),
intent(in) :: node
6057 integer(I4B),
intent(in) :: idelay
6058 integer(I4B),
intent(in) :: n
6059 real(DP),
intent(in) :: hcell
6060 real(DP),
intent(in) :: hcellold
6061 real(DP),
intent(inout) :: snnew
6062 real(DP),
intent(inout) :: snold
6069 if (this%stoiconv(node) /= 0)
then
6070 dzhalf =
dhalf * this%dbdzini(n, idelay)
6071 top = this%dbz(n, idelay) + dzhalf
6072 bot = this%dbz(n, idelay) - dzhalf
6079 if (this%ieslag /= 0)
then
6095 integer(I4B),
intent(in) :: node
6096 integer(I4B),
intent(in) :: idelay
6097 integer(I4B),
intent(in) :: n
6098 real(dp),
intent(in) :: hcell
6105 if (this%stoiconv(node) /= 0)
then
6106 dzhalf =
dhalf * this%dbdzini(n, idelay)
6107 top = this%dbz(n, idelay) + dzhalf
6108 bot = this%dbz(n, idelay) - dzhalf
6126 integer(I4B),
intent(in) :: ib
6127 real(DP),
intent(in) :: hcell
6128 real(DP),
intent(inout) :: stoe
6129 real(DP),
intent(inout) :: stoi
6131 integer(I4B) :: idelay
6132 integer(I4B) :: ielastic
6133 integer(I4B) :: node
6152 idelay = this%idelay(ib)
6153 ielastic = this%ielastic(ib)
6154 node = this%nodelist(ib)
6161 if (this%thickini(ib) >
dzero)
then
6162 fmult = this%dbdzini(1, idelay)
6163 dzhalf =
dhalf * this%dbdzini(1, idelay)
6164 do n = 1, this%ndelaycells
6165 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6166 z = this%dbz(n, idelay)
6168 h = this%dbh(n, idelay)
6169 h0 = this%dbh0(n, idelay)
6170 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6172 if (ielastic /= 0)
then
6173 v1 = dsn * ssk * (this%dbgeo(n, idelay) - hbar + zbot) - &
6174 dsn0 * sske * this%dbes0(n, idelay)
6177 v1 = dsn * ssk * (this%dbgeo(n, idelay) - hbar + zbot - &
6178 this%dbpcs(n, idelay))
6179 v2 = dsn0 * sske * (this%dbpcs(n, idelay) - this%dbes0(n, idelay))
6183 if (this%idbconvert(n, idelay) /= 0)
then
6184 stoi = stoi + v1 * fmult
6185 stoe = stoe + v2 * fmult
6187 stoe = stoe + (v1 + v2) * fmult
6191 ske = ske + sske * fmult
6192 sk = sk + ssk * fmult
6213 integer(I4B),
intent(in) :: ib
6214 real(DP),
intent(inout) :: dwc
6216 integer(I4B) :: idelay
6217 integer(I4B) :: node
6234 if (this%thickini(ib) >
dzero)
then
6235 idelay = this%idelay(ib)
6236 node = this%nodelist(ib)
6238 do n = 1, this%ndelaycells
6239 h = this%dbh(n, idelay)
6240 h0 = this%dbh0(n, idelay)
6241 dz = this%dbdz(n, idelay)
6242 dz0 = this%dbdz0(n, idelay)
6243 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6244 wc = dz * this%brg * this%dbtheta(n, idelay)
6245 wc0 = dz0 * this%brg * this%dbtheta0(n, idelay)
6246 v = dsn0 * wc0 * h0 - dsn * wc * h
6247 dwc = dwc + v * tled
6264 integer(I4B),
intent(in) :: ib
6265 real(DP),
intent(in) :: hcell
6266 real(DP),
intent(in) :: hcellold
6267 real(DP),
intent(inout) :: comp
6268 real(DP),
intent(inout) :: compi
6269 real(DP),
intent(inout) :: compe
6271 integer(I4B) :: idelay
6272 integer(I4B) :: ielastic
6273 integer(I4B) :: node
6289 idelay = this%idelay(ib)
6290 ielastic = this%ielastic(ib)
6291 node = this%nodelist(ib)
6297 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
6300 if (this%thickini(ib) >
dzero)
then
6301 fmult = this%dbdzini(1, idelay)
6302 do n = 1, this%ndelaycells
6303 h = this%dbh(n, idelay)
6304 h0 = this%dbh0(n, idelay)
6305 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6306 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6307 if (ielastic /= 0)
then
6308 v1 = dsn * ssk * this%dbes(n, idelay) - sske * this%dbes0(n, idelay)
6311 v1 = dsn * ssk * (this%dbes(n, idelay) - this%dbpcs(n, idelay))
6312 v2 = dsn0 * sske * (this%dbpcs(n, idelay) - this%dbes0(n, idelay))
6314 v = (v1 + v2) * fmult
6318 this%dbcomp(n, idelay) = v * snnew
6321 if (this%idbconvert(n, idelay) /= 0)
then
6322 compi = compi + v1 * fmult
6323 compe = compe + v2 * fmult
6325 compe = compe + (v1 + v2) * fmult
6331 comp = comp * this%rnb(ib)
6332 compi = compi * this%rnb(ib)
6333 compe = compe * this%rnb(ib)
6344 integer(I4B),
intent(in) :: ib
6346 integer(I4B) :: idelay
6355 idelay = this%idelay(ib)
6361 do n = 1, this%ndelaycells
6364 comp = this%dbtcomp(n, idelay) + this%dbcomp(n, idelay)
6368 comp = comp / this%rnb(ib)
6371 if (abs(comp) >
dzero)
then
6372 thick = this%dbdzini(n, idelay)
6373 theta = this%dbthetaini(n, idelay)
6374 call this%csub_adj_matprop(comp, thick, theta)
6375 if (thick <=
dzero)
then
6376 write (
errmsg,
'(2(a,i0),a,g0,a)') &
6377 'Adjusted thickness for delay interbed (', ib, &
6378 ') cell (', n,
') is less than or equal to 0 (', thick,
').'
6381 if (theta <=
dzero)
then
6382 write (
errmsg,
'(2(a,i0),a,g0,a)') &
6383 'Adjusted theta for delay interbed (', ib, &
6384 ') cell (', n,
'is less than or equal to 0 (', theta,
').'
6387 this%dbdz(n, idelay) = thick
6388 this%dbtheta(n, idelay) = theta
6389 tthick = tthick + thick
6390 wtheta = wtheta + thick * theta
6392 thick = this%dbdz(n, idelay)
6393 theta = this%dbtheta(n, idelay)
6394 tthick = tthick + thick
6395 wtheta = wtheta + thick * theta
6401 if (tthick >
dzero)
then
6402 wtheta = wtheta / tthick
6407 this%thick(ib) = tthick
6408 this%theta(ib) = wtheta
6424 integer(I4B),
intent(in) :: ib
6425 real(DP),
intent(inout) :: hcof
6426 real(DP),
intent(inout) :: rhs
6428 integer(I4B) :: idelay
6433 idelay = this%idelay(ib)
6436 if (this%thickini(ib) >
dzero)
then
6438 c1 =
dtwo * this%kv(ib) / this%dbdzini(1, idelay)
6439 rhs = -c1 * this%dbh(1, idelay)
6441 this%kv(ib) / this%dbdzini(this%ndelaycells, idelay)
6442 rhs = rhs - c2 * this%dbh(this%ndelaycells, idelay)
6457 integer(I4B),
intent(in) :: ib
6458 integer(I4B),
intent(in) :: n
6459 real(dp),
intent(in) :: hcell
6461 integer(I4B) :: idelay
6466 idelay = this%idelay(ib)
6467 c =
dtwo * this%kv(ib) / this%dbdzini(n, idelay)
6468 q = c * (hcell - this%dbh(n, idelay))
6497 integer(I4B) :: indx
6501 call this%obs%StoreObsType(
'csub', .true., indx)
6506 call this%obs%StoreObsType(
'inelastic-csub', .true., indx)
6511 call this%obs%StoreObsType(
'elastic-csub', .true., indx)
6516 call this%obs%StoreObsType(
'coarse-csub', .false., indx)
6521 call this%obs%StoreObsType(
'csub-cell', .true., indx)
6526 call this%obs%StoreObsType(
'wcomp-csub-cell', .false., indx)
6531 call this%obs%StoreObsType(
'ske', .true., indx)
6536 call this%obs%StoreObsType(
'sk', .true., indx)
6541 call this%obs%StoreObsType(
'ske-cell', .true., indx)
6546 call this%obs%StoreObsType(
'sk-cell', .true., indx)
6551 call this%obs%StoreObsType(
'gstress-cell', .false., indx)
6556 call this%obs%StoreObsType(
'estress-cell', .false., indx)
6561 call this%obs%StoreObsType(
'interbed-compaction', .true., indx)
6566 call this%obs%StoreObsType(
'inelastic-compaction', .true., indx)
6571 call this%obs%StoreObsType(
'elastic-compaction', .true., indx)
6576 call this%obs%StoreObsType(
'coarse-compaction', .false., indx)
6581 call this%obs%StoreObsType(
'inelastic-compaction-cell', .true., indx)
6586 call this%obs%StoreObsType(
'elastic-compaction-cell', .true., indx)
6591 call this%obs%StoreObsType(
'compaction-cell', .true., indx)
6596 call this%obs%StoreObsType(
'thickness', .true., indx)
6601 call this%obs%StoreObsType(
'coarse-thickness', .false., indx)
6606 call this%obs%StoreObsType(
'thickness-cell', .false., indx)
6611 call this%obs%StoreObsType(
'theta', .true., indx)
6616 call this%obs%StoreObsType(
'coarse-theta', .false., indx)
6621 call this%obs%StoreObsType(
'theta-cell', .true., indx)
6626 call this%obs%StoreObsType(
'preconstress-cell', .false., indx)
6631 call this%obs%StoreObsType(
'interbed-compaction-pct', .false., indx)
6636 call this%obs%StoreObsType(
'delay-preconstress', .false., indx)
6641 call this%obs%StoreObsType(
'delay-head', .false., indx)
6646 call this%obs%StoreObsType(
'delay-gstress', .false., indx)
6651 call this%obs%StoreObsType(
'delay-estress', .false., indx)
6656 call this%obs%StoreObsType(
'delay-compaction', .false., indx)
6661 call this%obs%StoreObsType(
'delay-thickness', .false., indx)
6666 call this%obs%StoreObsType(
'delay-theta', .false., indx)
6671 call this%obs%StoreObsType(
'delay-flowtop', .true., indx)
6676 call this%obs%StoreObsType(
'delay-flowbot', .true., indx)
6693 integer(I4B) :: idelay
6694 integer(I4B) :: ncol
6695 integer(I4B) :: node
6702 if (this%obs%npakobs > 0)
then
6703 call this%obs%obs_bd_clear()
6704 do i = 1, this%obs%npakobs
6705 obsrv => this%obs%pakobs(i)%obsrv
6706 if (obsrv%BndFound)
then
6707 if (obsrv%ObsTypeId ==
'SKE' .or. &
6708 obsrv%ObsTypeId ==
'SK' .or. &
6709 obsrv%ObsTypeId ==
'SKE-CELL' .or. &
6710 obsrv%ObsTypeId ==
'SK-CELL' .or. &
6711 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6712 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6713 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6714 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6715 obsrv%ObsTypeId ==
'PRECONSTRESS-CELL')
then
6716 if (this%gwfiss /= 0)
then
6717 call this%obs%SaveOneSimval(obsrv,
dnodata)
6720 do j = 1, obsrv%indxbnds_count
6721 n = obsrv%indxbnds(j)
6722 select case (obsrv%ObsTypeId)
6743 case (
'DELAY-HEAD',
'DELAY-PRECONSTRESS', &
6744 'DELAY-GSTRESS',
'DELAY-ESTRESS')
6745 if (n > this%ndelaycells)
then
6746 r = real(n - 1, dp) / real(this%ndelaycells, dp)
6747 idelay = int(floor(r)) + 1
6748 ncol = n - int(floor(r)) * this%ndelaycells
6753 select case (obsrv%ObsTypeId)
6755 v = this%dbh(ncol, idelay)
6756 case (
'DELAY-PRECONSTRESS')
6757 v = this%dbpcs(ncol, idelay)
6758 case (
'DELAY-GSTRESS')
6759 v = this%dbgeo(ncol, idelay)
6760 case (
'DELAY-ESTRESS')
6761 v = this%dbes(ncol, idelay)
6763 case (
'PRECONSTRESS-CELL')
6766 errmsg =
"Unrecognized observation type '"// &
6767 trim(obsrv%ObsTypeId)//
"'."
6770 call this%obs%SaveOneSimval(obsrv, v)
6775 do j = 1, obsrv%indxbnds_count
6776 n = obsrv%indxbnds(j)
6777 select case (obsrv%ObsTypeId)
6779 v = this%storagee(n) + this%storagei(n)
6780 case (
'INELASTIC-CSUB')
6781 v = this%storagei(n)
6782 case (
'ELASTIC-CSUB')
6783 v = this%storagee(n)
6784 case (
'COARSE-CSUB')
6786 case (
'WCOMP-CSUB-CELL')
6787 v = this%cell_wcstor(n)
6794 v = this%storagee(n) + this%storagei(n)
6798 case (
'COARSE-THETA')
6799 v = this%cg_theta(n)
6804 f = this%cg_thick(n) / this%cell_thick(n)
6805 v = f * this%cg_theta(n)
6807 node = this%nodelist(n)
6808 f = this%csub_calc_interbed_thickness(n) / this%cell_thick(node)
6809 v = f * this%theta(n)
6811 case (
'GSTRESS-CELL')
6813 case (
'ESTRESS-CELL')
6815 case (
'INTERBED-COMPACTION')
6817 case (
'INTERBED-COMPACTION-PCT')
6818 b0 = this%thickini(n)
6819 if (this%idelay(n) /= 0)
then
6820 b0 = b0 * this%rnb(n)
6823 case (
'INELASTIC-COMPACTION')
6825 case (
'ELASTIC-COMPACTION')
6827 case (
'COARSE-COMPACTION')
6828 v = this%cg_tcomp(n)
6829 case (
'INELASTIC-COMPACTION-CELL')
6835 case (
'ELASTIC-COMPACTION-CELL')
6839 v = this%cg_tcomp(n)
6843 case (
'COMPACTION-CELL')
6847 v = this%cg_tcomp(n)
6852 idelay = this%idelay(n)
6854 if (idelay /= 0)
then
6857 case (
'COARSE-THICKNESS')
6858 v = this%cg_thick(n)
6859 case (
'THICKNESS-CELL')
6860 v = this%cell_thick(n)
6861 case (
'DELAY-COMPACTION',
'DELAY-THICKNESS', &
6863 if (n > this%ndelaycells)
then
6864 r = real(n, dp) / real(this%ndelaycells, dp)
6865 idelay = int(floor(r)) + 1
6866 ncol = mod(n, this%ndelaycells)
6871 select case (obsrv%ObsTypeId)
6872 case (
'DELAY-COMPACTION')
6873 v = this%dbtcomp(ncol, idelay)
6874 case (
'DELAY-THICKNESS')
6875 v = this%dbdz(ncol, idelay)
6876 case (
'DELAY-THETA')
6877 v = this%dbtheta(ncol, idelay)
6879 case (
'DELAY-FLOWTOP')
6880 idelay = this%idelay(n)
6881 v = this%dbflowtop(idelay)
6882 case (
'DELAY-FLOWBOT')
6883 idelay = this%idelay(n)
6884 v = this%dbflowbot(idelay)
6886 errmsg =
"Unrecognized observation type: '"// &
6887 trim(obsrv%ObsTypeId)//
"'."
6890 call this%obs%SaveOneSimval(obsrv, v)
6894 call this%obs%SaveOneSimval(obsrv,
dnodata)
6917 character(len=LENBOUNDNAME) :: bname
6922 integer(I4B) :: idelay
6925 if (.not. this%csub_obs_supported())
then
6933 do i = 1, this%obs%npakobs
6934 obsrv => this%obs%pakobs(i)%obsrv
6937 obsrv%BndFound = .false.
6939 bname = obsrv%FeatureName
6940 if (bname /=
'')
then
6945 do j = 1, this%ninterbeds
6946 if (this%boundname(j) == bname)
then
6947 obsrv%BndFound = .true.
6948 obsrv%CurrentTimeStepEndValue =
dzero
6949 call obsrv%AddObsIndex(j)
6954 else if (obsrv%ObsTypeId ==
'GSTRESS-CELL' .or. &
6955 obsrv%ObsTypeId ==
'ESTRESS-CELL' .or. &
6956 obsrv%ObsTypeId ==
'THICKNESS-CELL' .or. &
6957 obsrv%ObsTypeId ==
'COARSE-CSUB' .or. &
6958 obsrv%ObsTypeId ==
'WCOMP-CSUB-CELL' .or. &
6959 obsrv%ObsTypeId ==
'COARSE-COMPACTION' .or. &
6960 obsrv%ObsTypeId ==
'COARSE-THETA' .or. &
6961 obsrv%ObsTypeId ==
'COARSE-THICKNESS')
then
6962 obsrv%BndFound = .true.
6963 obsrv%CurrentTimeStepEndValue =
dzero
6964 call obsrv%AddObsIndex(obsrv%NodeNumber)
6965 else if (obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6966 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6967 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6968 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6969 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
6970 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
6971 obsrv%ObsTypeId ==
'DELAY-THETA')
then
6972 if (this%ninterbeds > 0)
then
6973 n = obsrv%NodeNumber
6974 idelay = this%idelay(n)
6975 if (idelay /= 0)
then
6976 j = (idelay - 1) * this%ndelaycells + 1
6977 n2 = obsrv%NodeNumber2
6978 if (n2 < 1 .or. n2 > this%ndelaycells)
then
6979 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
6980 trim(adjustl(obsrv%ObsTypeId)),
'interbed cell must be ', &
6981 'greater than 0 and less than or equal to', this%ndelaycells, &
6982 '(specified value is ', n2,
').'
6985 j = (idelay - 1) * this%ndelaycells + n2
6987 obsrv%BndFound = .true.
6988 call obsrv%AddObsIndex(j)
6993 else if (obsrv%ObsTypeId ==
'CSUB' .or. &
6994 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
6995 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
6996 obsrv%ObsTypeId ==
'SK' .or. &
6997 obsrv%ObsTypeId ==
'SKE' .or. &
6998 obsrv%ObsTypeId ==
'THICKNESS' .or. &
6999 obsrv%ObsTypeId ==
'THETA' .or. &
7000 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7001 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7002 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7003 obsrv%ObsTypeId ==
'INTERBED-COMPACTION-PCT')
then
7004 if (this%ninterbeds > 0)
then
7005 j = obsrv%NodeNumber
7006 if (j < 1 .or. j > this%ninterbeds)
then
7007 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
7008 trim(adjustl(obsrv%ObsTypeId)),
'interbed cell must be greater', &
7009 'than 0 and less than or equal to', this%ninterbeds, &
7010 '(specified value is ', j,
').'
7013 obsrv%BndFound = .true.
7014 obsrv%CurrentTimeStepEndValue =
dzero
7015 call obsrv%AddObsIndex(j)
7018 else if (obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7019 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7020 if (this%ninterbeds > 0)
then
7021 j = obsrv%NodeNumber
7022 if (j < 1 .or. j > this%ninterbeds)
then
7023 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
7024 trim(adjustl(obsrv%ObsTypeId)), &
7025 'interbed cell must be greater ', &
7026 'than 0 and less than or equal to', this%ninterbeds, &
7027 '(specified value is ', j,
').'
7030 idelay = this%idelay(j)
7031 if (idelay /= 0)
then
7032 obsrv%BndFound = .true.
7033 obsrv%CurrentTimeStepEndValue =
dzero
7034 call obsrv%AddObsIndex(j)
7042 if (obsrv%ObsTypeId ==
'CSUB-CELL' .or. &
7043 obsrv%ObsTypeId ==
'SKE-CELL' .or. &
7044 obsrv%ObsTypeId ==
'SK-CELL' .or. &
7045 obsrv%ObsTypeId ==
'THETA-CELL' .or. &
7046 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION-CELL' .or. &
7047 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION-CELL' .or. &
7048 obsrv%ObsTypeId ==
'COMPACTION-CELL')
then
7049 if (.NOT. obsrv%BndFound)
then
7050 obsrv%BndFound = .true.
7051 obsrv%CurrentTimeStepEndValue =
dzero
7052 call obsrv%AddObsIndex(obsrv%NodeNumber)
7055 jloop:
do j = 1, this%ninterbeds
7056 if (this%nodelist(j) == obsrv%NodeNumber)
then
7057 obsrv%BndFound = .true.
7058 obsrv%CurrentTimeStepEndValue =
dzero
7059 call obsrv%AddObsIndex(j)
7086 integer(I4B),
intent(in) :: inunitobs
7087 integer(I4B),
intent(in) :: iout
7091 integer(I4B) :: icol, istart, istop
7092 character(len=LINELENGTH) :: string
7093 character(len=LENBOUNDNAME) :: bndname
7094 logical(LGP) :: flag_string
7095 logical(LGP) :: flag_idcellno
7096 logical(LGP) :: flag_error
7099 string = obsrv%IDstring
7100 flag_string = .true.
7101 flag_idcellno = .false.
7102 flag_error = .false.
7103 if (obsrv%ObsTypeId(1:5) ==
"DELAY" .AND. &
7104 obsrv%ObsTypeId(1:10) /=
"DELAY-FLOW")
then
7105 flag_idcellno = .true.
7114 if (obsrv%ObsTypeId ==
'CSUB' .or. &
7115 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
7116 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
7117 obsrv%ObsTypeId ==
'SK' .or. &
7118 obsrv%ObsTypeId ==
'SKE' .or. &
7119 obsrv%ObsTypeId ==
'THETA' .or. &
7120 obsrv%ObsTypeId ==
'THICKNESS' .or. &
7121 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7122 obsrv%ObsTypeId ==
'INTERBED-COMPACTION-PCT' .or. &
7123 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7124 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7125 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
7126 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
7127 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
7128 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
7129 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
7130 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
7131 obsrv%ObsTypeId ==
'DELAY-THETA' .or. &
7132 obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7133 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7137 nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
7138 iout, string, flag_string)
7141 if (obsrv%ObsTypeId ==
'SK' .or. &
7142 obsrv%ObsTypeId ==
'SKE' .or. &
7143 obsrv%ObsTypeId ==
'THETA' .or. &
7144 obsrv%ObsTypeId ==
'THICKNESS' .or. &
7145 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7146 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7147 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7148 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
7149 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
7150 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
7151 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
7152 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
7153 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
7154 obsrv%ObsTypeId ==
'DELAY-THETA')
then
7157 "BOUNDNAME ('", trim(adjustl(bndname)), &
7158 "') not allowed for CSUB observation type '", &
7159 trim(adjustl(obsrv%ObsTypeId)),
"'."
7164 else if (obsrv%ObsTypeId ==
'CSUB' .or. &
7165 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
7166 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
7170 obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7171 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7173 obsrv%FeatureName = bndname
7177 if (flag_idcellno .EQV. .true. .AND. flag_error .EQV. .false.)
then
7182 "BOUNDNAME ('", trim(adjustl(bndname)), &
7183 "') not allowed for CSUB observation type '", &
7184 trim(adjustl(obsrv%ObsTypeId)),
"' idcellno."
7187 obsrv%NodeNumber2 = nn2
7193 obsrv%NodeNumber = nn1
7207 this%listlabel = trim(this%filtyp)//
' NO.'
7208 if (this%dis%ndim == 3)
then
7209 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
7210 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
7211 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
7212 elseif (this%dis%ndim == 2)
then
7213 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
7214 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
7216 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
7218 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'SIG0'
7219 if (this%inamedbound == 1)
then
7220 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
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 ...