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 real(DP) :: top, botm, baq, q, thick, rval
1213 integer(I4B) :: idelay, ndelaybeds, csubno
1214 integer(I4B) :: ib, n, nodeu, noder
1217 call mem_setptr(icsubno,
'ICSUBNO', this%input_mempath)
1218 call mem_setptr(cellid_pkgdata,
'CELLID_PKGDATA', this%input_mempath)
1219 call mem_setptr(cdelay,
'CDELAY', this%input_mempath)
1220 call mem_setptr(pcs,
'PCS0', this%input_mempath)
1221 call mem_setptr(thick_frac,
'THICK_FRAC', this%input_mempath)
1222 call mem_setptr(rnb,
'RNB', this%input_mempath)
1223 call mem_setptr(ssv_cc,
'SSV_CC', this%input_mempath)
1224 call mem_setptr(sse_cr,
'SSE_CR', this%input_mempath)
1225 call mem_setptr(theta,
'THETA', this%input_mempath)
1226 call mem_setptr(kv,
'KV', this%input_mempath)
1227 call mem_setptr(h0,
'H0', this%input_mempath)
1228 call mem_setptr(boundname,
'BOUNDNAME', this%input_mempath)
1234 do n = 1,
size(icsubno)
1240 if (csubno < 1 .or. csubno > this%ninterbeds)
then
1241 write (
errmsg,
'(a,1x,i0,2(1x,a),1x,i0,a)') &
1242 'Interbed number (', csubno,
') must be greater than 0 and ', &
1243 'less than or equal to', this%ninterbeds,
'.'
1249 cellid => cellid_pkgdata(:, n)
1252 if (this%dis%ndim == 1)
then
1254 elseif (this%dis%ndim == 2)
then
1255 nodeu =
get_node(cellid(1), 1, cellid(2), &
1256 this%dis%mshape(1), 1, &
1259 nodeu =
get_node(cellid(1), cellid(2), cellid(3), &
1260 this%dis%mshape(1), &
1261 this%dis%mshape(2), &
1266 noder = this%dis%get_nodenumber(nodeu, 1)
1267 if (noder <= 0)
then
1272 this%nodelist(csubno) = noder
1273 this%unodelist(csubno) = nodeu
1276 top = this%dis%top(noder)
1277 botm = this%dis%bot(noder)
1281 cdelaystr = cdelay(n)
1282 select case (cdelaystr)
1286 ndelaybeds = ndelaybeds + 1
1289 write (
errmsg,
'(a,1x,a,1x,i0,1x,a)') &
1290 'Invalid CDELAY ', trim(adjustl(cdelaystr)), &
1291 'for packagedata entry', csubno,
'.'
1295 this%idelay(csubno) = idelay
1298 this%pcs(csubno) = pcs(n)
1301 if (this%icellf == 0)
then
1302 if (thick_frac(n) <
dzero .or. thick_frac(n) > baq)
then
1303 write (
errmsg,
'(a,g0,2(a,1x),g0,1x,a,1x,i0,a)') &
1304 'THICK (', thick_frac(n),
') MUST BE greater than or equal to 0 ', &
1305 'and less than or equal to than', baq, &
1306 'for packagedata entry', csubno,
'.'
1309 thick = thick_frac(n)
1311 if (thick_frac(n) <
dzero .or. thick_frac(n) >
done)
then
1312 write (
errmsg,
'(a,1x,a,1x,i0,a)') &
1313 'FRAC MUST BE greater than 0 and less than or equal to 1', &
1314 'for packagedata entry', csubno,
'.'
1317 thick = thick_frac(n) * baq
1319 this%thickini(csubno) = thick
1320 if (this%iupdatematprop /= 0)
then
1321 this%thick(csubno) = thick
1325 if (idelay > 0)
then
1326 if (rnb(n) <
done)
then
1327 write (
errmsg,
'(a,g0,a,1x,a,1x,i0,a)') &
1328 'RNB (', rnb(n),
') must be greater than or equal to 1', &
1329 'for packagedata entry', csubno,
'.'
1332 this%rnb(csubno) = rnb(n)
1334 this%rnb(csubno) =
done
1338 if (ssv_cc(n) <
dzero)
then
1339 write (
errmsg,
'(2(a,1x),i0,a)') &
1340 '(SKV,CI) must be greater than or equal to 0', &
1341 'for packagedata entry', csubno,
'.'
1344 this%ci(csubno) = ssv_cc(n)
1347 if (sse_cr(n) <
dzero)
then
1348 write (
errmsg,
'(2(a,1x),i0,a)') &
1349 '(SKE,RCI) must be greater than or equal to 0', &
1350 'for packagedata entry', csubno,
'.'
1353 this%rci(csubno) = sse_cr(n)
1356 if (this%ci(csubno) == this%rci(csubno))
then
1357 this%ielastic(csubno) = 1
1359 this%ielastic(csubno) = 0
1363 if (theta(n) <=
dzero .or. theta(n) >
done)
then
1364 write (
errmsg,
'(a,1x,a,1x,i0,a)') &
1365 'THETA must be greater than 0 and less than or equal to 1', &
1366 'for packagedata entry', csubno,
'.'
1369 this%thetaini(csubno) = theta(n)
1370 if (this%iupdatematprop /= 0)
then
1371 this%theta(csubno) = theta(n)
1375 if (idelay > 0)
then
1376 if (kv(n) <= 0.0)
then
1377 write (
errmsg,
'(a,1x,i0,a)') &
1378 'KV must be greater than 0 for packagedata entry', csubno,
'.'
1382 this%kv(csubno) = kv(n)
1385 this%h0(csubno) = h0(n)
1388 if (this%inamedbound /= 0)
then
1389 bndname = boundname(n)
1390 if (len_trim(bndname) < 1)
then
1391 write (
errmsg,
'(a,1x,i0,a)') &
1392 'BOUNDNAME must be specified for packagedata entry', csubno,
'.'
1395 this%boundname(csubno) = bndname
1401 this%ndelaybeds = ndelaybeds
1404 if (ndelaybeds > 0)
then
1408 'IDB_NCONV_COUNT', trim(this%memoryPath))
1409 call mem_allocate(this%idbconvert, this%ndelaycells, ndelaybeds, &
1410 'IDBCONVERT', trim(this%memoryPath))
1412 'DBDHMAX', trim(this%memoryPath))
1413 call mem_allocate(this%dbz, this%ndelaycells, ndelaybeds, &
1414 'DBZ', trim(this%memoryPath))
1415 call mem_allocate(this%dbrelz, this%ndelaycells, ndelaybeds, &
1416 'DBRELZ', trim(this%memoryPath))
1417 call mem_allocate(this%dbh, this%ndelaycells, ndelaybeds, &
1418 'DBH', trim(this%memoryPath))
1419 call mem_allocate(this%dbh0, this%ndelaycells, ndelaybeds, &
1420 'DBH0', trim(this%memoryPath))
1421 call mem_allocate(this%dbgeo, this%ndelaycells, ndelaybeds, &
1422 'DBGEO', trim(this%memoryPath))
1423 call mem_allocate(this%dbes, this%ndelaycells, ndelaybeds, &
1424 'DBES', trim(this%memoryPath))
1425 call mem_allocate(this%dbes0, this%ndelaycells, ndelaybeds, &
1426 'DBES0', trim(this%memoryPath))
1427 call mem_allocate(this%dbpcs, this%ndelaycells, ndelaybeds, &
1428 'DBPCS', trim(this%memoryPath))
1430 'DBFLOWTOP', trim(this%memoryPath))
1432 'DBFLOWBOT', trim(this%memoryPath))
1433 call mem_allocate(this%dbdzini, this%ndelaycells, ndelaybeds, &
1434 'DBDZINI', trim(this%memoryPath))
1435 call mem_allocate(this%dbthetaini, this%ndelaycells, ndelaybeds, &
1436 'DBTHETAINI', trim(this%memoryPath))
1437 call mem_allocate(this%dbcomp, this%ndelaycells, ndelaybeds, &
1438 'DBCOMP', trim(this%memoryPath))
1439 call mem_allocate(this%dbtcomp, this%ndelaycells, ndelaybeds, &
1440 'DBTCOMP', trim(this%memoryPath))
1443 if (this%iupdatematprop == 0)
then
1444 call mem_setptr(this%dbdz,
'DBDZINI', trim(this%memoryPath))
1445 call mem_setptr(this%dbdz0,
'DBDZINI', trim(this%memoryPath))
1446 call mem_setptr(this%dbtheta,
'DBTHETAINI', trim(this%memoryPath))
1447 call mem_setptr(this%dbtheta0,
'DBTHETAINI', trim(this%memoryPath))
1449 call mem_allocate(this%dbdz, this%ndelaycells, ndelaybeds, &
1450 'DBDZ', trim(this%memoryPath))
1451 call mem_allocate(this%dbdz0, this%ndelaycells, ndelaybeds, &
1452 'DBDZ0', trim(this%memoryPath))
1453 call mem_allocate(this%dbtheta, this%ndelaycells, ndelaybeds, &
1454 'DBTHETA', trim(this%memoryPath))
1455 call mem_allocate(this%dbtheta0, this%ndelaycells, ndelaybeds, &
1456 'DBTHETA0', trim(this%memoryPath))
1461 'DBAL', trim(this%memoryPath))
1463 'DBAD', trim(this%memoryPath))
1465 'DBAU', trim(this%memoryPath))
1467 'DBRHS', trim(this%memoryPath))
1469 'DBDH', trim(this%memoryPath))
1471 'DBAW', trim(this%memoryPath))
1475 this%idb_nconv_count(n) = 0
1479 do ib = 1, this%ninterbeds
1480 idelay = this%idelay(ib)
1481 if (idelay == 0)
then
1486 do n = 1, this%ndelaycells
1487 rval = this%thickini(ib) / real(this%ndelaycells, dp)
1488 this%dbdzini(n, idelay) = rval
1489 this%dbh(n, idelay) = this%h0(ib)
1490 this%dbh0(n, idelay) = this%h0(ib)
1491 this%dbthetaini(n, idelay) = this%thetaini(ib)
1492 this%dbgeo(n, idelay) =
dzero
1493 this%dbes(n, idelay) =
dzero
1494 this%dbes0(n, idelay) =
dzero
1495 this%dbpcs(n, idelay) = this%pcs(ib)
1496 this%dbcomp(n, idelay) =
dzero
1497 this%dbtcomp(n, idelay) =
dzero
1498 if (this%iupdatematprop /= 0)
then
1499 this%dbdz(n, idelay) = this%dbdzini(n, idelay)
1500 this%dbdz0(n, idelay) = this%dbdzini(n, idelay)
1501 this%dbtheta(n, idelay) = this%theta(ib)
1502 this%dbtheta0(n, idelay) = this%theta(ib)
1507 call this%csub_delay_init_zcell(ib)
1511 do n = 1, this%ndelaycells
1512 this%dbal(n) =
dzero
1513 this%dbad(n) =
dzero
1514 this%dbau(n) =
dzero
1515 this%dbrhs(n) =
dzero
1516 this%dbdh(n) =
dzero
1517 this%dbaw(n) =
dzero
1523 if (ndelaybeds > 0)
then
1524 q = mod(real(this%ndelaycells, dp),
dtwo)
1525 if (q ==
dzero)
then
1526 write (
errmsg,
'(a,i0,a,1x,a)') &
1527 'NDELAYCELLS (', this%ndelaycells,
') must be an', &
1528 'odd number when using the effective stress formulation.'
1533 if (this%iprpak /= 0)
then
1534 call this%csub_print_packagedata()
1544 character(len=LINELENGTH) :: title
1545 character(len=LINELENGTH) :: tag
1546 character(len=10) :: ctype
1547 character(len=20) :: cellid
1548 integer(I4B) :: ntabrows
1549 integer(I4B) :: ntabcols
1551 integer(I4b) :: idelay
1552 integer(I4B) :: node
1555 title =
'CSUB'//
' PACKAGE ('// &
1556 trim(adjustl(this%packName))//
') INTERBED DATA'
1559 ntabrows = this%ninterbeds
1561 if (this%inamedbound /= 0)
then
1562 ntabcols = ntabcols + 1
1566 call table_cr(this%inputtab, this%packName, title)
1567 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
1572 tag =
'INTERBED NUMBER'
1573 call this%inputtab%initialize_column(tag, 10, alignment=
tabcenter)
1575 call this%inputtab%initialize_column(tag, 20, alignment=
tableft)
1576 tag =
'INTERBED TYPE'
1577 call this%inputtab%initialize_column(tag, 10, alignment=
tabcenter)
1579 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1581 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1583 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1584 tag =
'INTERBED THICKNESS'
1585 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1586 tag =
'CELL THICKNESS'
1587 call this%inputtab%initialize_column(tag, 12, 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)
1595 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1597 call this%inputtab%initialize_column(tag, 12, alignment=
tabcenter)
1598 if (this%inamedbound /= 0)
then
1600 call this%inputtab%initialize_column(tag, 40, alignment=
tableft)
1603 do ib = 1, this%ninterbeds
1604 idelay = this%idelay(ib)
1605 node = this%nodelist(ib)
1606 call this%dis%noder_to_string(node, cellid)
1607 if (idelay == 0)
then
1614 call this%inputtab%add_term(ib)
1615 call this%inputtab%add_term(cellid)
1616 call this%inputtab%add_term(ctype)
1617 call this%inputtab%add_term(this%pcs(ib))
1618 call this%inputtab%add_term(this%thickini(ib))
1619 call this%inputtab%add_term(this%rnb(ib))
1620 call this%inputtab%add_term(this%thickini(ib) * this%rnb(ib))
1621 call this%inputtab%add_term(this%dis%top(node) - this%dis%bot(node))
1622 call this%inputtab%add_term(this%ci(ib))
1623 call this%inputtab%add_term(this%rci(ib))
1624 call this%inputtab%add_term(this%theta(ib))
1625 if (idelay == 0)
then
1626 call this%inputtab%add_term(
"--")
1627 call this%inputtab%add_term(
"--")
1629 call this%inputtab%add_term(this%kv(ib))
1630 call this%inputtab%add_term(this%h0(ib))
1632 if (this%inamedbound /= 0)
then
1633 call this%inputtab%add_term(this%boundname(ib))
1650 character(len=LINELENGTH) :: title
1651 character(len=LINELENGTH) :: tag
1652 character(len=LINELENGTH) :: msg
1653 character(len=10) :: ctype
1654 character(len=20) :: cellid
1655 character(len=10) :: cflag
1660 integer(I4B) :: node
1662 integer(I4B) :: idelay
1663 integer(I4B) :: iexceed
1664 integer(I4B),
parameter :: ncells = 20
1665 integer(I4B) :: nlen
1666 integer(I4B) :: ntabrows
1667 integer(I4B) :: ntabcols
1668 integer(I4B) :: ipos
1673 integer(I4B),
dimension(:),
allocatable :: imap_sel
1674 integer(I4B),
dimension(:),
allocatable :: locs
1675 real(DP),
dimension(:),
allocatable :: pctcomp_arr
1678 allocate (locs(this%dis%ndim))
1681 if (this%ninterbeds > 0)
then
1682 nlen = min(ncells, this%ninterbeds)
1683 allocate (imap_sel(nlen))
1684 allocate (pctcomp_arr(this%ninterbeds))
1686 do ib = 1, this%ninterbeds
1687 idelay = this%idelay(ib)
1688 b0 = this%thickini(ib)
1689 strain = this%tcomp(ib) / b0
1691 pctcomp_arr(ib) = pctcomp
1692 if (pctcomp >=
done)
then
1693 iexceed = iexceed + 1
1696 call selectn(imap_sel, pctcomp_arr, reverse=.true.)
1699 i0 = max(1, this%ninterbeds - ncells + 1)
1700 i1 = this%ninterbeds
1702 if (iexceed /= 0)
then
1703 write (msg,
'(1x,a,1x,i0,1x,a,1x,i0,1x,a)') &
1704 'LARGEST', (i1 - i0 + 1),
'OF', this%ninterbeds, &
1705 'INTERBED STRAIN VALUES SHOWN'
1710 title = trim(adjustl(this%packName))//
' PACKAGE INTERBED STRAIN SUMMARY'
1717 call table_cr(this%outputtab, this%packName, title)
1718 call this%outputtab%table_df(ntabrows, ntabcols, this%iout)
1721 tag =
'INTERBED NUMBER'
1722 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1723 tag =
'INTERBED TYPE'
1724 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1726 call this%outputtab%initialize_column(tag, 20, alignment=
tableft)
1727 tag =
'INITIAL THICKNESS'
1728 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1729 tag =
'FINAL THICKNESS'
1730 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1731 tag =
'TOTAL COMPACTION'
1732 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1733 tag =
'FINAL STRAIN'
1734 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1735 tag =
'PERCENT COMPACTION'
1736 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1738 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1743 idelay = this%idelay(ib)
1744 b0 = this%thickini(ib)
1745 b1 = this%csub_calc_interbed_thickness(ib)
1746 if (idelay == 0)
then
1750 b0 = b0 * this%rnb(ib)
1752 strain = this%tcomp(ib) / b0
1754 if (pctcomp >= 5.0_dp)
then
1756 else if (pctcomp >=
done)
then
1761 node = this%nodelist(ib)
1762 call this%dis%noder_to_string(node, cellid)
1765 call this%outputtab%add_term(ib)
1766 call this%outputtab%add_term(ctype)
1767 call this%outputtab%add_term(cellid)
1768 call this%outputtab%add_term(b0)
1769 call this%outputtab%add_term(b1)
1770 call this%outputtab%add_term(this%tcomp(ib))
1771 call this%outputtab%add_term(strain)
1772 call this%outputtab%add_term(pctcomp)
1773 call this%outputtab%add_term(cflag)
1775 write (this%iout,
'(/1X,A,1X,I0,1X,A,1X,I0,1X,A,/1X,A,/1X,A)') &
1776 'PERCENT COMPACTION IS GREATER THAN OR EQUAL TO 1 PERCENT IN', &
1777 iexceed,
'OF', this%ninterbeds,
'INTERBED(S).', &
1778 'USE THE STRAIN_CSV_INTERBED OPTION TO OUTPUT A CSV '// &
1779 'FILE WITH PERCENT COMPACTION ',
'VALUES FOR ALL INTERBEDS.'
1781 msg =
'PERCENT COMPACTION WAS LESS THAN 1 PERCENT IN ALL INTERBEDS'
1782 write (this%iout,
'(/1X,A)') trim(adjustl(msg))
1786 if (this%istrainib /= 0)
then
1789 ntabrows = this%ninterbeds
1791 if (this%dis%ndim > 1)
then
1792 ntabcols = ntabcols + 1
1794 ntabcols = ntabcols + this%dis%ndim
1797 call table_cr(this%outputtab, this%packName,
'')
1798 call this%outputtab%table_df(ntabrows, ntabcols, this%istrainib, &
1799 lineseparator=.false., separator=
',')
1802 tag =
'INTERBED_NUMBER'
1803 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1804 tag =
'INTERBED_TYPE'
1805 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1807 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1808 if (this%dis%ndim == 2)
then
1810 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1812 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1815 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1817 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1819 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1821 tag =
'INITIAL_THICKNESS'
1822 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1823 tag =
'FINAL_THICKNESS'
1824 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1825 tag =
'TOTAL_COMPACTION'
1826 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1827 tag =
'TOTAL_STRAIN'
1828 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1829 tag =
'PERCENT_COMPACTION'
1830 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1833 do ib = 1, this%ninterbeds
1834 idelay = this%idelay(ib)
1835 b0 = this%thickini(ib)
1836 b1 = this%csub_calc_interbed_thickness(ib)
1837 if (idelay == 0)
then
1841 b0 = b0 * this%rnb(ib)
1843 strain = this%tcomp(ib) / b0
1845 node = this%nodelist(ib)
1846 call this%dis%noder_to_array(node, locs)
1849 call this%outputtab%add_term(ib)
1850 call this%outputtab%add_term(ctype)
1851 if (this%dis%ndim > 1)
then
1852 call this%outputtab%add_term(this%dis%get_nodeuser(node))
1854 do ipos = 1, this%dis%ndim
1855 call this%outputtab%add_term(locs(ipos))
1857 call this%outputtab%add_term(b0)
1858 call this%outputtab%add_term(b1)
1859 call this%outputtab%add_term(this%tcomp(ib))
1860 call this%outputtab%add_term(strain)
1861 call this%outputtab%add_term(pctcomp)
1866 deallocate (imap_sel)
1867 deallocate (pctcomp_arr)
1871 nlen = min(ncells, this%dis%nodes)
1872 allocate (imap_sel(nlen))
1873 allocate (pctcomp_arr(this%dis%nodes))
1875 do node = 1, this%dis%nodes
1877 if (this%cg_thickini(node) >
dzero)
then
1878 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1881 pctcomp_arr(node) = pctcomp
1882 if (pctcomp >=
done)
then
1883 iexceed = iexceed + 1
1886 call selectn(imap_sel, pctcomp_arr, reverse=.true.)
1889 i0 = max(1, this%dis%nodes - ncells + 1)
1892 if (iexceed /= 0)
then
1893 write (msg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1894 'LARGEST ', (i1 - i0 + 1),
'OF', this%dis%nodes, &
1895 'CELL COARSE-GRAINED VALUES SHOWN'
1899 title = trim(adjustl(this%packName))// &
1900 ' PACKAGE COARSE-GRAINED STRAIN SUMMARY'
1907 call table_cr(this%outputtab, this%packName, title)
1908 call this%outputtab%table_df(ntabrows, ntabcols, this%iout)
1912 call this%outputtab%initialize_column(tag, 20, alignment=
tableft)
1913 tag =
'INITIAL THICKNESS'
1914 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1915 tag =
'FINAL THICKNESS'
1916 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1917 tag =
'TOTAL COMPACTION'
1918 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1919 tag =
'FINAL STRAIN'
1920 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1921 tag =
'PERCENT COMPACTION'
1922 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1924 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1928 if (this%cg_thickini(node) >
dzero)
then
1929 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1934 if (pctcomp >= 5.0_dp)
then
1936 else if (pctcomp >=
done)
then
1941 call this%dis%noder_to_string(node, cellid)
1944 call this%outputtab%add_term(cellid)
1945 call this%outputtab%add_term(this%cg_thickini(node))
1946 call this%outputtab%add_term(this%cg_thick(node))
1947 call this%outputtab%add_term(this%cg_tcomp(node))
1948 call this%outputtab%add_term(strain)
1949 call this%outputtab%add_term(pctcomp)
1950 call this%outputtab%add_term(cflag)
1952 write (this%iout,
'(/1X,A,1X,I0,1X,A,1X,I0,1X,A,/1X,A,/1X,A)') &
1953 'COARSE-GRAINED STORAGE PERCENT COMPACTION IS GREATER THAN OR '// &
1954 'EQUAL TO 1 PERCENT IN', iexceed,
'OF', this%dis%nodes,
'CELL(S).', &
1955 'USE THE STRAIN_CSV_COARSE OPTION TO OUTPUT A CSV '// &
1956 'FILE WITH PERCENT COMPACTION ',
'VALUES FOR ALL CELLS.'
1958 msg =
'COARSE-GRAINED STORAGE PERCENT COMPACTION WAS LESS THAN '// &
1959 '1 PERCENT IN ALL CELLS '
1960 write (this%iout,
'(/1X,A)') trim(adjustl(msg))
1964 if (this%istrainsk /= 0)
then
1967 ntabrows = this%dis%nodes
1969 if (this%dis%ndim > 1)
then
1970 ntabcols = ntabcols + 1
1972 ntabcols = ntabcols + this%dis%ndim
1975 call table_cr(this%outputtab, this%packName,
'')
1976 call this%outputtab%table_df(ntabrows, ntabcols, this%istrainsk, &
1977 lineseparator=.false., separator=
',')
1981 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1982 if (this%dis%ndim == 2)
then
1984 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1986 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1989 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1991 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1993 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1995 tag =
'INITIAL_THICKNESS'
1996 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1997 tag =
'FINAL_THICKNESS'
1998 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1999 tag =
'TOTAL_COMPACTION'
2000 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2001 tag =
'TOTAL_STRAIN'
2002 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2003 tag =
'PERCENT_COMPACTION'
2004 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
2007 do node = 1, this%dis%nodes
2008 if (this%cg_thickini(node) >
dzero)
then
2009 strain = this%cg_tcomp(node) / this%cg_thickini(node)
2014 call this%dis%noder_to_array(node, locs)
2017 if (this%dis%ndim > 1)
then
2018 call this%outputtab%add_term(this%dis%get_nodeuser(node))
2020 do ipos = 1, this%dis%ndim
2021 call this%outputtab%add_term(locs(ipos))
2023 call this%outputtab%add_term(this%cg_thickini(node))
2024 call this%outputtab%add_term(this%cg_thick(node))
2025 call this%outputtab%add_term(this%cg_tcomp(node))
2026 call this%outputtab%add_term(strain)
2027 call this%outputtab%add_term(pctcomp)
2033 if (this%ndelaybeds > 0)
then
2034 if (this%idb_nconv_count(2) > 0)
then
2035 write (
warnmsg,
'(a,1x,a,1x,i0,1x,a,1x,a)') &
2036 'Delay interbed cell heads were less than the top of the interbed', &
2037 'cell in', this%idb_nconv_count(2),
'interbed cells in ', &
2038 'non-convertible GWF cells for at least one time step during '// &
2045 deallocate (imap_sel)
2047 deallocate (pctcomp_arr)
2062 if (this%inunit > 0)
then
2084 if (this%iupdatematprop == 0)
then
2085 nullify (this%cg_thick)
2086 nullify (this%cg_thick0)
2087 nullify (this%cg_theta)
2088 nullify (this%cg_theta0)
2103 call mem_deallocate(this%boundname,
'BOUNDNAME', this%memoryPath)
2120 if (this%iupdatematprop == 0)
then
2121 nullify (this%thick)
2122 nullify (this%thick0)
2123 nullify (this%theta)
2124 nullify (this%theta0)
2135 if (this%ndelaybeds > 0)
then
2136 if (this%iupdatematprop == 0)
then
2138 nullify (this%dbdz0)
2139 nullify (this%dbtheta)
2140 nullify (this%dbtheta0)
2179 nullify (this%gwfiss)
2182 nullify (this%stoiconv)
2183 nullify (this%stoss)
2186 if (this%iprpak > 0)
then
2187 call this%inputtab%table_da()
2188 deallocate (this%inputtab)
2189 nullify (this%inputtab)
2193 if (
associated(this%outputtab))
then
2194 call this%outputtab%table_da()
2195 deallocate (this%outputtab)
2196 nullify (this%outputtab)
2201 if (this%ipakcsv > 0)
then
2202 call this%pakcsvtab%table_da()
2203 deallocate (this%pakcsvtab)
2204 nullify (this%pakcsvtab)
2208 call mem_deallocate(this%listlabel,
'LISTLABEL', this%memoryPath)
2252 if (this%inunit > 0)
then
2253 call this%obs%obs_da()
2256 deallocate (this%obs)
2262 call this%NumericalPackageType%da()
2281 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellids
2282 integer(I4B),
dimension(:),
pointer,
contiguous :: cellid
2283 integer(I4B),
pointer :: iper
2284 integer(I4B) :: n, nodeu, noder
2285 character(len=LINELENGTH) :: title, text
2286 character(len=20) :: cellstr
2287 logical(LGP) :: found
2289 character(len=*),
parameter :: fmtlsp = &
2290 &
"(1X,/1X,'REUSING ',a,'S FROM LAST STRESS PERIOD')"
2292 call mem_setptr(iper,
'IPER', this%input_mempath)
2293 if (iper /=
kper)
then
2294 write (this%iout, fmtlsp) trim(this%filtyp)
2295 call this%csub_rp_obs()
2299 call mem_setptr(cellids,
'CELLID', this%input_mempath)
2300 call mem_set_value(this%nbound,
'NBOUND', this%input_mempath, &
2304 if (this%iprpak /= 0)
then
2306 title =
'CSUB'//
' PACKAGE ('// &
2307 trim(adjustl(this%packName))//
') DATA FOR PERIOD'
2308 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
2309 call table_cr(this%inputtab, this%packName, title)
2310 call this%inputtab%table_df(1, 2, this%iout, finalize=.false.)
2312 call this%inputtab%initialize_column(text, 20)
2314 call this%inputtab%initialize_column(text, 15, alignment=tableft)
2318 do n = 1, this%nbound
2321 cellid => cellids(:, n)
2324 if (this%dis%ndim == 1)
then
2326 elseif (this%dis%ndim == 2)
then
2327 nodeu =
get_node(cellid(1), 1, cellid(2), &
2328 this%dis%mshape(1), 1, &
2331 nodeu =
get_node(cellid(1), cellid(2), cellid(3), &
2332 this%dis%mshape(1), &
2333 this%dis%mshape(2), &
2338 noder = this%dis%get_nodenumber(nodeu, 1)
2339 if (noder <= 0)
then
2343 this%nodelistsig0(n) = noder
2346 if (this%iprpak /= 0)
then
2347 call this%dis%noder_to_string(noder, cellstr)
2348 call this%inputtab%add_term(cellstr)
2349 call this%inputtab%add_term(this%sig0(n))
2359 if (this%iprpak /= 0)
then
2360 call this%inputtab%finalize_table()
2364 call this%csub_rp_obs()
2380 integer(I4B),
intent(in) :: nodes
2381 real(DP),
dimension(nodes),
intent(in) :: hnew
2385 integer(I4B) :: idelay
2386 integer(I4B) :: node
2393 if (this%ninterbeds > 0)
then
2395 if (this%gwfiss /= 0)
then
2396 write (
errmsg,
'(a,i0,a,1x,a,1x,a,1x,i0,1x,a)') &
2397 'Only the first and last (',
nper,
')', &
2398 'stress period can be steady if interbeds are simulated.', &
2399 'Stress period',
kper,
'has been defined to be steady state.'
2406 if (this%initialized == 0)
then
2407 if (this%gwfiss == 0)
then
2408 call this%csub_set_initial_state(nodes, hnew)
2416 this%cg_comp(node) =
dzero
2417 this%cg_es0(node) = this%cg_es(node)
2418 if (this%iupdatematprop /= 0)
then
2419 this%cg_thick0(node) = this%cg_thick(node)
2420 this%cg_theta0(node) = this%cg_theta(node)
2425 do ib = 1, this%ninterbeds
2426 idelay = this%idelay(ib)
2429 this%comp(ib) =
dzero
2430 node = this%nodelist(ib)
2431 if (this%initialized /= 0)
then
2432 es = this%cg_es(node)
2438 if (this%iupdatematprop /= 0)
then
2439 this%thick0(ib) = this%thick(ib)
2440 this%theta0(ib) = this%theta(ib)
2444 if (idelay /= 0)
then
2448 if (this%gwfiss0 /= 0)
then
2449 node = this%nodelist(ib)
2451 do n = 1, this%ndelaycells
2452 this%dbh(n, idelay) = h
2458 do n = 1, this%ndelaycells
2460 if (this%initialized /= 0)
then
2461 if (this%dbes(n, idelay) > this%dbpcs(n, idelay))
then
2462 this%dbpcs(n, idelay) = this%dbes(n, idelay)
2465 this%dbh0(n, idelay) = this%dbh(n, idelay)
2466 this%dbes0(n, idelay) = this%dbes(n, idelay)
2467 if (this%iupdatematprop /= 0)
then
2468 this%dbdz0(n, idelay) = this%dbdz(n, idelay)
2469 this%dbtheta0(n, idelay) = this%dbtheta(n, idelay)
2476 this%gwfiss0 = this%gwfiss
2481 call this%obs%obs_ad()
2489 subroutine csub_fc(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
2494 integer(I4B),
intent(in) :: kiter
2495 real(DP),
intent(in),
dimension(:) :: hold
2496 real(DP),
intent(in),
dimension(:) :: hnew
2498 integer(I4B),
intent(in),
dimension(:) :: idxglo
2499 real(DP),
intent(inout),
dimension(:) :: rhs
2502 integer(I4B) :: node
2503 integer(I4B) :: idiag
2504 integer(I4B) :: idelay
2512 call this%csub_cg_calc_stress(this%dis%nodes, hnew)
2515 if (this%gwfiss == 0)
then
2521 do node = 1, this%dis%nodes
2522 idiag = this%dis%con%ia(node)
2523 area = this%dis%get_area(node)
2526 if (this%ibound(node) < 1) cycle
2529 if (this%iupdatematprop /= 0)
then
2530 if (this%ieslag == 0)
then
2533 call this%csub_cg_calc_comp(node, hnew(node), hold(node), comp)
2534 this%cg_comp(node) = comp
2537 call this%csub_cg_update(node)
2542 call this%csub_cg_fc(node, tled, area, hnew(node), hold(node), &
2546 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2547 rhs(node) = rhs(node) + rhsterm
2551 if (this%brg /=
dzero)
then
2552 call this%csub_cg_wcomp_fc(node, tled, area, hnew(node), hold(node), &
2557 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2558 rhs(node) = rhs(node) + rhsterm
2563 if (this%ninterbeds /= 0)
then
2567 do ib = 1, this%ninterbeds
2568 node = this%nodelist(ib)
2569 idelay = this%idelay(ib)
2570 idiag = this%dis%con%ia(node)
2571 area = this%dis%get_area(node)
2572 call this%csub_interbed_fc(ib, node, area, hnew(node), hold(node), &
2574 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2575 rhs(node) = rhs(node) + rhsterm
2579 call this%csub_nodelay_wcomp_fc(ib, node, tled, area, &
2580 hnew(node), hold(node), &
2584 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2585 rhs(node) = rhs(node) + rhsterm
2606 subroutine csub_fn(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
2611 integer(I4B),
intent(in) :: kiter
2612 real(DP),
intent(in),
dimension(:) :: hold
2613 real(DP),
intent(in),
dimension(:) :: hnew
2615 integer(I4B),
intent(in),
dimension(:) :: idxglo
2616 real(DP),
intent(inout),
dimension(:) :: rhs
2618 integer(I4B) :: idelay
2619 integer(I4B) :: node
2620 integer(I4B) :: idiag
2628 if (this%gwfiss == 0)
then
2632 do node = 1, this%dis%nodes
2633 idiag = this%dis%con%ia(node)
2634 area = this%dis%get_area(node)
2637 if (this%ibound(node) < 1) cycle
2640 call this%csub_cg_fn(node, tled, area, &
2641 hnew(node), hcof, rhsterm)
2645 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2646 rhs(node) = rhs(node) + rhsterm
2650 if (this%brg /=
dzero)
then
2651 call this%csub_cg_wcomp_fn(node, tled, area, hnew(node), hold(node), &
2656 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2657 rhs(node) = rhs(node) + rhsterm
2662 if (this%ninterbeds /= 0)
then
2666 do ib = 1, this%ninterbeds
2667 idelay = this%idelay(ib)
2668 node = this%nodelist(ib)
2671 if (this%ibound(node) < 1) cycle
2674 idiag = this%dis%con%ia(node)
2675 area = this%dis%get_area(node)
2676 call this%csub_interbed_fn(ib, node, hnew(node), hold(node), &
2680 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2681 rhs(node) = rhs(node) + rhsterm
2684 if (this%brg /=
dzero .and. idelay == 0)
then
2685 call this%csub_nodelay_wcomp_fn(ib, node, tled, area, &
2686 hnew(node), hold(node), &
2690 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2691 rhs(node) = rhs(node) + rhsterm
2707 character(len=LINELENGTH) :: tag
2708 integer(I4B) :: ntabrows
2709 integer(I4B) :: ntabcols
2711 if (this%ipakcsv > 0)
then
2712 if (this%ndelaybeds < 1)
then
2713 write (
warnmsg,
'(a,1x,3a)') &
2714 'Package convergence data is requested but delay interbeds', &
2715 'are not included in package (', &
2716 trim(adjustl(this%packName)),
').'
2724 call table_cr(this%pakcsvtab, this%packName,
'')
2725 call this%pakcsvtab%table_df(ntabrows, ntabcols, this%ipakcsv, &
2726 lineseparator=.false., separator=
',', &
2730 tag =
'total_inner_iterations'
2731 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2733 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2735 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2737 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2739 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2741 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2743 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2745 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2746 tag =
'dstoragemax_loc'
2747 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2765 subroutine csub_cc(this, innertot, kiter, iend, icnvgmod, nodes, &
2766 hnew, hold, cpak, ipak, dpak)
2771 integer(I4B),
intent(in) :: innertot
2772 integer(I4B),
intent(in) :: kiter
2773 integer(I4B),
intent(in) :: iend
2774 integer(I4B),
intent(in) :: icnvgmod
2775 integer(I4B),
intent(in) :: nodes
2776 real(DP),
dimension(nodes),
intent(in) :: hnew
2777 real(DP),
dimension(nodes),
intent(in) :: hold
2778 character(len=LENPAKLOC),
intent(inout) :: cpak
2779 integer(I4B),
intent(inout) :: ipak
2780 real(DP),
intent(inout) :: dpak
2782 character(len=LENPAKLOC) :: cloc
2783 integer(I4B) :: icheck
2784 integer(I4B) :: ipakfail
2786 integer(I4B) :: node
2787 integer(I4B) :: idelay
2788 integer(I4B) :: locdhmax
2789 integer(I4B) :: locrmax
2790 integer(I4B) :: ifirst
2796 real(DP) :: hcellold
2810 icheck = this%iconvchk
2820 if (this%gwfiss /= 0)
then
2823 if (icnvgmod == 0)
then
2829 if (icheck /= 0)
then
2835 final_check:
do ib = 1, this%ninterbeds
2836 idelay = this%idelay(ib)
2837 node = this%nodelist(ib)
2840 if (idelay == 0) cycle
2843 if (this%ibound(node) < 1) cycle
2846 dh = this%dbdhmax(idelay)
2851 area = this%dis%get_area(node)
2853 hcellold = hold(node)
2856 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
2859 call this%csub_delay_calc_dstor(ib, hcell, stoe, stoi)
2860 v1 = (stoe + stoi) * area * this%rnb(ib) * tled
2863 call this%csub_delay_calc_wcomp(ib, dwc)
2864 v1 = v1 + dwc * area * this%rnb(ib)
2867 call this%csub_delay_fc(ib, hcof, rhs)
2868 v2 = (-hcof * hcell - rhs) * area * this%rnb(ib)
2875 df = df *
delt / area
2878 if (ifirst == 1)
then
2885 if (abs(dh) > abs(dhmax))
then
2889 if (abs(df) > abs(rmax))
then
2898 if (abs(dhmax) > abs(dpak))
then
2901 write (cloc,
"(a,'-',a)") trim(this%packName),
'head'
2906 if (abs(rmax) > abs(dpak))
then
2909 write (cloc,
"(a,'-',a)") trim(this%packName),
'storage'
2914 if (this%ipakcsv /= 0)
then
2917 call this%pakcsvtab%add_term(innertot)
2918 call this%pakcsvtab%add_term(
totim)
2919 call this%pakcsvtab%add_term(
kper)
2920 call this%pakcsvtab%add_term(
kstp)
2921 call this%pakcsvtab%add_term(kiter)
2922 if (this%ndelaybeds > 0)
then
2923 call this%pakcsvtab%add_term(dhmax)
2924 call this%pakcsvtab%add_term(locdhmax)
2925 call this%pakcsvtab%add_term(rmax)
2926 call this%pakcsvtab%add_term(locrmax)
2928 call this%pakcsvtab%add_term(
'--')
2929 call this%pakcsvtab%add_term(
'--')
2930 call this%pakcsvtab%add_term(
'--')
2931 call this%pakcsvtab%add_term(
'--')
2936 call this%pakcsvtab%finalize_table()
2951 subroutine csub_cq(this, nodes, hnew, hold, isuppress_output, flowja)
2957 integer(I4B),
intent(in) :: nodes
2958 real(DP),
intent(in),
dimension(nodes) :: hnew
2959 real(DP),
intent(in),
dimension(nodes) :: hold
2960 integer(I4B),
intent(in) :: isuppress_output
2961 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
2964 integer(I4B) :: idelay
2965 integer(I4B) :: ielastic
2966 integer(I4B) :: iconvert
2967 integer(I4B) :: node
2970 integer(I4B) :: idiag
2997 integer(I4B) :: iprobslocal
3007 do node = 1, this%dis%nodes
3008 idiag = this%dis%con%ia(node)
3009 area = this%dis%get_area(node)
3013 if (this%gwfiss == 0)
then
3019 if (this%ibound(node) > 0 .and. this%cg_thickini(node) >
dzero)
then
3022 call this%csub_cg_fc(node, tled, area, hnew(node), hold(node), &
3024 rrate = hcof * hnew(node) - rhs
3027 call this%csub_cg_calc_comp(node, hnew(node), hold(node), comp)
3030 call this%csub_cg_wcomp_fc(node, tled, area, hnew(node), hold(node), &
3032 rratewc = hcof * hnew(node) - rhs
3038 this%cg_stor(node) = rrate
3039 this%cell_wcstor(node) = rratewc
3040 this%cell_thick(node) = this%cg_thick(node)
3043 this%cg_comp(node) = comp
3047 if (isuppress_output == 0)
then
3051 if (this%iupdatematprop /= 0)
then
3052 call this%csub_cg_update(node)
3056 this%cg_tcomp(node) = this%cg_tcomp(node) + comp
3060 flowja(idiag) = flowja(idiag) + rrate
3061 flowja(idiag) = flowja(idiag) + rratewc
3067 if (this%ndelaybeds > 0)
then
3068 this%idb_nconv_count(1) = 0
3075 do ib = 1, this%ninterbeds
3077 idelay = this%idelay(ib)
3078 ielastic = this%ielastic(ib)
3082 if (idelay == 0)
then
3086 b = this%thick(ib) * this%rnb(ib)
3090 node = this%nodelist(ib)
3091 idiag = this%dis%con%ia(node)
3092 area = this%dis%get_area(node)
3095 this%cell_thick(node) = this%cell_thick(node) + b
3098 if (this%gwfiss == 0)
then
3106 if (this%ibound(node) < 1) cycle
3109 if (idelay == 0)
then
3110 iconvert = this%iconvert(ib)
3114 call this%csub_nodelay_calc_comp(ib, hnew(node), hold(node), comp, &
3118 es = this%cg_es(node)
3120 es0 = this%cg_es0(node)
3123 if (ielastic > 0 .or. iconvert == 0)
then
3126 stoi = -pcs * rho2 + (rho2 * es)
3127 stoe = pcs * rho1 - (rho1 * es0)
3133 this%storagee(ib) = stoe * tledm
3134 this%storagei(ib) = stoi * tledm
3137 this%comp(ib) = comp
3140 if (isuppress_output == 0)
then
3143 if (this%iupdatematprop /= 0)
then
3144 call this%csub_nodelay_update(ib)
3148 this%tcomp(ib) = this%tcomp(ib) + comp
3149 this%tcompe(ib) = this%tcompe(ib) + compe
3150 this%tcompi(ib) = this%tcompi(ib) + compi
3159 call this%csub_calc_sat(node, h, h0, snnew, snold)
3162 call this%csub_delay_calc_dstor(ib, h, stoe, stoi)
3163 this%storagee(ib) = stoe * area * this%rnb(ib) * tledm
3164 this%storagei(ib) = stoi * area * this%rnb(ib) * tledm
3167 q = this%csub_calc_delay_flow(ib, 1, h) * area * this%rnb(ib)
3168 this%dbflowtop(idelay) = q
3169 nn = this%ndelaycells
3170 q = this%csub_calc_delay_flow(ib, nn, h) * area * this%rnb(ib)
3171 this%dbflowbot(idelay) = q
3174 if (isuppress_output == 0)
then
3177 call this%csub_delay_calc_comp(ib, h, h0, comp, compi, compe)
3181 if (this%iupdatematprop /= 0)
then
3182 call this%csub_delay_update(ib)
3186 this%tcomp(ib) = this%tcomp(ib) + comp
3187 this%tcompi(ib) = this%tcompi(ib) + compi
3188 this%tcompe(ib) = this%tcompe(ib) + compe
3191 do n = 1, this%ndelaycells
3192 this%dbtcomp(n, idelay) = this%dbtcomp(n, idelay) + &
3193 this%dbcomp(n, idelay)
3198 call this%csub_delay_head_check(ib)
3205 if (idelay == 0)
then
3206 call this%csub_nodelay_wcomp_fc(ib, node, tledm, area, &
3207 hnew(node), hold(node), hcof, rhs)
3208 rratewc = hcof * hnew(node) - rhs
3212 call this%csub_delay_calc_wcomp(ib, q)
3213 rratewc = q * area * this%rnb(ib)
3215 this%cell_wcstor(node) = this%cell_wcstor(node) + rratewc
3218 flowja(idiag) = flowja(idiag) + rratewc
3220 this%storagee(ib) =
dzero
3221 this%storagei(ib) =
dzero
3222 if (idelay /= 0)
then
3223 this%dbflowtop(idelay) =
dzero
3224 this%dbflowbot(idelay) =
dzero
3229 flowja(idiag) = flowja(idiag) + this%storagee(ib)
3230 flowja(idiag) = flowja(idiag) + this%storagei(ib)
3234 if (this%iupdatematprop /= 0)
then
3250 subroutine csub_bd(this, isuppress_output, model_budget)
3257 integer(I4B),
intent(in) :: isuppress_output
3258 type(
budgettype),
intent(inout) :: model_budget
3265 call model_budget%addentry(rin, rout,
delt,
budtxt(1), &
3266 isuppress_output,
' CSUB')
3267 if (this%ninterbeds > 0)
then
3271 call model_budget%addentry(rin, rout,
delt,
budtxt(2), &
3272 isuppress_output,
' CSUB')
3276 call model_budget%addentry(rin, rout,
delt,
budtxt(3), &
3277 isuppress_output,
' CSUB')
3280 call model_budget%addentry(rin, rout,
delt,
budtxt(4), &
3281 isuppress_output,
' CSUB')
3293 integer(I4B),
intent(in) :: icbcfl
3294 integer(I4B),
intent(in) :: icbcun
3296 character(len=1) :: cdatafmp =
' '
3297 character(len=1) :: editdesc =
' '
3298 integer(I4B) :: ibinun
3299 integer(I4B) :: iprint
3300 integer(I4B) :: nvaluesp
3301 integer(I4B) :: nwidthp
3303 integer(I4B) :: node
3304 integer(I4B) :: naux
3310 if (this%ipakcb < 0)
then
3312 elseif (this%ipakcb == 0)
then
3315 ibinun = this%ipakcb
3317 if (icbcfl == 0) ibinun = 0
3320 if (ibinun /= 0)
then
3325 call this%dis%record_array(this%cg_stor, this%iout, iprint, -ibinun, &
3326 budtxt(1), cdatafmp, nvaluesp, &
3327 nwidthp, editdesc, dinact)
3328 if (this%ninterbeds > 0)
then
3332 call this%dis%record_srcdst_list_header(
budtxt(2), &
3342 do ib = 1, this%ninterbeds
3343 q = this%storagee(ib)
3344 node = this%nodelist(ib)
3345 call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
3350 call this%dis%record_srcdst_list_header(
budtxt(3), &
3360 do ib = 1, this%ninterbeds
3361 q = this%storagei(ib)
3362 node = this%nodelist(ib)
3363 call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
3369 call this%dis%record_array(this%cell_wcstor, this%iout, iprint, -ibinun, &
3370 budtxt(4), cdatafmp, nvaluesp, &
3371 nwidthp, editdesc, dinact)
3384 integer(I4B),
intent(in) :: idvfl
3385 integer(I4B),
intent(in) :: idvprint
3387 character(len=1) :: cdatafmp =
' '
3388 character(len=1) :: editdesc =
' '
3389 integer(I4B) :: ibinun
3390 integer(I4B) :: iprint
3391 integer(I4B) :: nvaluesp
3392 integer(I4B) :: nwidthp
3394 integer(I4B) :: node
3395 integer(I4B) :: nodem
3396 integer(I4B) :: nodeu
3399 integer(I4B) :: idx_conn
3401 integer(I4B) :: ncpl
3402 integer(I4B) :: nlay
3405 real(DP) :: va_scale
3407 character(len=*),
parameter :: fmtnconv = &
3408 "(/4x, 'DELAY INTERBED CELL HEADS IN ', i0, ' INTERBEDS IN', &
3409 &' NON-CONVERTIBLE GWF CELLS WERE LESS THAN THE TOP OF THE INTERBED CELL')"
3414 if (this%ioutcomp /= 0 .or. this%ioutzdisp /= 0)
then
3419 if (idvfl == 0) ibinun = 0
3422 if (ibinun /= 0)
then
3427 do node = 1, this%dis%nodes
3428 this%buff(node) = this%cg_tcomp(node)
3430 do ib = 1, this%ninterbeds
3431 node = this%nodelist(ib)
3432 this%buff(node) = this%buff(node) + this%tcomp(ib)
3436 if (this%ioutcomp /= 0)
then
3437 ibinun = this%ioutcomp
3438 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3439 comptxt(1), cdatafmp, nvaluesp, &
3440 nwidthp, editdesc, dinact)
3444 if (this%ioutzdisp /= 0)
then
3445 ibinun = this%ioutzdisp
3448 do nodeu = 1, this%dis%nodesuser
3449 this%buffusr(nodeu) =
dzero
3453 do node = 1, this%dis%nodes
3454 nodeu = this%dis%get_nodeuser(node)
3455 this%buffusr(nodeu) = this%buff(node)
3459 ncpl = this%dis%get_ncpl()
3462 if (this%dis%ndim == 1)
then
3463 do node = this%dis%nodes, 1, -1
3464 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
3467 nodem = this%dis%con%ja(ii)
3468 idx_conn = this%dis%con%jas(ii)
3471 ihc = this%dis%con%ihc(idx_conn)
3475 if (node < nodem)
then
3476 va_scale = this%dis%get_area_factor(node, idx_conn)
3477 this%buffusr(node) = this%buffusr(node) + &
3478 va_scale * this%buffusr(nodem)
3485 nlay = this%dis%nodesuser / ncpl
3486 do k = nlay - 1, 1, -1
3488 node = (k - 1) * ncpl + i
3489 nodem = k * ncpl + i
3490 this%buffusr(node) = this%buffusr(node) + this%buffusr(nodem)
3496 do nodeu = 1, this%dis%nodesuser
3497 node = this%dis%get_nodenumber_idx1(nodeu, 1)
3499 this%buff(node) = this%buffusr(nodeu)
3504 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3505 comptxt(6), cdatafmp, nvaluesp, &
3506 nwidthp, editdesc, dinact)
3512 if (this%ioutcompi /= 0)
then
3513 ibinun = this%ioutcompi
3517 if (idvfl == 0) ibinun = 0
3520 if (ibinun /= 0)
then
3525 do node = 1, this%dis%nodes
3526 this%buff(node) =
dzero
3528 do ib = 1, this%ninterbeds
3529 node = this%nodelist(ib)
3530 this%buff(node) = this%buff(node) + this%tcompi(ib)
3534 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3535 comptxt(2), cdatafmp, nvaluesp, &
3536 nwidthp, editdesc, dinact)
3540 if (this%ioutcompe /= 0)
then
3541 ibinun = this%ioutcompe
3545 if (idvfl == 0) ibinun = 0
3548 if (ibinun /= 0)
then
3553 do node = 1, this%dis%nodes
3554 this%buff(node) =
dzero
3556 do ib = 1, this%ninterbeds
3557 node = this%nodelist(ib)
3558 this%buff(node) = this%buff(node) + this%tcompe(ib)
3562 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3563 comptxt(3), cdatafmp, nvaluesp, &
3564 nwidthp, editdesc, dinact)
3568 if (this%ioutcompib /= 0)
then
3569 ibinun = this%ioutcompib
3573 if (idvfl == 0) ibinun = 0
3576 if (ibinun /= 0)
then
3581 do node = 1, this%dis%nodes
3582 this%buff(node) =
dzero
3584 do ib = 1, this%ninterbeds
3585 node = this%nodelist(ib)
3586 this%buff(node) = this%buff(node) + this%tcompe(ib) + this%tcompi(ib)
3590 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3591 comptxt(4), cdatafmp, nvaluesp, &
3592 nwidthp, editdesc, dinact)
3596 if (this%ioutcomps /= 0)
then
3597 ibinun = this%ioutcomps
3601 if (idvfl == 0) ibinun = 0
3604 if (ibinun /= 0)
then
3609 do node = 1, this%dis%nodes
3610 this%buff(node) = this%cg_tcomp(node)
3614 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3615 comptxt(5), cdatafmp, nvaluesp, &
3616 nwidthp, editdesc, dinact)
3621 if (this%gwfiss == 0)
then
3622 call this%csub_cg_chk_stress()
3629 if (this%ndelaybeds > 0)
then
3630 if (this%idb_nconv_count(1) > this%idb_nconv_count(2))
then
3631 this%idb_nconv_count(2) = this%idb_nconv_count(1)
3633 if (this%idb_nconv_count(1) > 0)
then
3634 write (this%iout, fmtnconv) this%idb_nconv_count(1)
3649 integer(I4B),
intent(in) :: nodes
3650 real(DP),
dimension(nodes),
intent(in) :: hnew
3652 integer(I4B) :: node
3656 integer(I4B) :: idx_conn
3661 real(DP) :: va_scale
3670 if (this%iupdatestress /= 0)
then
3671 do node = 1, this%dis%nodes
3676 top = this%dis%top(node)
3677 bot = this%dis%bot(node)
3681 if (this%ibound(node) /= 0)
then
3691 if (hcell < top)
then
3692 gs = (top - hbar) * this%sgm(node) + (hbar - bot) * this%sgs(node)
3694 gs = thick * this%sgs(node)
3698 this%cg_gs(node) = gs
3702 do nn = 1, this%nbound
3703 node = this%nodelistsig0(nn)
3704 sadd = this%sig0(nn)
3705 this%cg_gs(node) = this%cg_gs(node) + sadd
3709 do node = 1, this%dis%nodes
3712 gs = this%cg_gs(node)
3716 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
3719 m = this%dis%con%ja(ii)
3720 idx_conn = this%dis%con%jas(ii)
3723 if (this%dis%con%ihc(idx_conn) == 0)
then
3729 if (this%dis%ndim /= 1)
then
3730 gs = gs + this%cg_gs(m)
3734 va_scale = this%dis%get_area_factor(node, idx_conn)
3735 gs_conn = this%cg_gs(m)
3736 gs = gs + (gs_conn * va_scale)
3744 this%cg_gs(node) = gs
3750 do node = 1, this%dis%nodes
3751 top = this%dis%top(node)
3752 bot = this%dis%bot(node)
3753 if (this%ibound(node) /= 0)
then
3766 es = this%cg_gs(node) - phead
3767 this%cg_es(node) = es
3783 character(len=20) :: cellid
3784 integer(I4B) :: ierr
3785 integer(I4B) :: node
3799 do node = 1, this%dis%nodes
3800 if (this%ibound(node) < 1) cycle
3801 bot = this%dis%bot(node)
3802 gs = this%cg_gs(node)
3803 es = this%cg_es(node)
3805 if (this%ibound(node) /= 0)
then
3809 if (this%lhead_based .EQV. .false.)
then
3812 call this%dis%noder_to_string(node, cellid)
3813 write (
errmsg,
'(a,g0,a,1x,a,1x,a,4(g0,a))') &
3814 'Small to negative effective stress (', es,
') in cell', &
3815 trim(adjustl(cellid)),
'. (', es,
' = ', this%cg_gs(node), &
3816 ' - (', hcell,
' - ', bot,
').'
3824 write (
errmsg,
'(a,1x,i0,3(1x,a))') &
3825 'Solution: small to negative effective stress values in', ierr, &
3826 'cells can be eliminated by increasing storage values and/or ', &
3827 'adding/modifying stress boundaries to prevent water-levels from', &
3828 'exceeding the top of the model.'
3843 integer(I4B),
intent(in) :: i
3850 comp = this%tcomp(i) + this%comp(i)
3851 if (abs(comp) >
dzero)
then
3852 thick = this%thickini(i)
3853 theta = this%thetaini(i)
3854 call this%csub_adj_matprop(comp, thick, theta)
3855 if (thick <=
dzero)
then
3856 write (
errmsg,
'(a,1x,i0,1x,a,g0,a)') &
3857 'Adjusted thickness for no-delay interbed', i, &
3858 'is less than or equal to 0 (', thick,
').'
3861 if (theta <=
dzero)
then
3862 write (
errmsg,
'(a,1x,i0,1x,a,g0,a)') &
3863 'Adjusted theta for no-delay interbed', i, &
3864 'is less than or equal to 0 (', theta,
').'
3867 this%thick(i) = thick
3868 this%theta(i) = theta
3890 integer(I4B),
intent(in) :: ib
3891 real(DP),
intent(in) :: hcell
3892 real(DP),
intent(in) :: hcellold
3893 real(DP),
intent(inout) :: rho1
3894 real(DP),
intent(inout) :: rho2
3895 real(DP),
intent(inout) :: rhs
3896 real(DP),
intent(in),
optional :: argtled
3898 integer(I4B) :: node
3908 real(DP) :: sto_fac0
3918 if (
present(argtled))
then
3923 node = this%nodelist(ib)
3924 area = this%dis%get_area(node)
3925 bot = this%dis%bot(node)
3926 top = this%dis%top(node)
3927 thick = this%thickini(ib)
3933 this%iconvert(ib) = 0
3936 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
3937 if (this%lhead_based .EQV. .true.)
then
3941 znode = this%csub_calc_znode(top, bot, hbar)
3942 es = this%cg_es(node)
3943 es0 = this%cg_es0(node)
3944 theta = this%thetaini(ib)
3949 call this%csub_calc_sfacts(node, bot, znode, theta, es, es0, f)
3951 sto_fac = tled * snnew * thick * f
3952 sto_fac0 = tled * snold * thick * f
3955 rho1 = this%rci(ib) * sto_fac0
3956 rho2 = this%rci(ib) * sto_fac
3957 if (this%cg_es(node) > this%pcs(ib))
then
3958 this%iconvert(ib) = 1
3959 rho2 = this%ci(ib) * sto_fac
3963 rcorr = rho2 * (hcell - hbar)
3966 if (this%ielastic(ib) /= 0)
then
3967 rhs = rho1 * this%cg_es0(node) - &
3968 rho2 * (this%cg_gs(node) + bot) - &
3971 rhs = -rho2 * (this%cg_gs(node) + bot) + &
3972 (this%pcs(ib) * (rho2 - rho1)) + &
3973 (rho1 * this%cg_es0(node)) - &
3995 integer(I4B),
intent(in) :: ib
3996 real(DP),
intent(in) :: hcell
3997 real(DP),
intent(in) :: hcellold
3998 real(DP),
intent(inout) :: comp
3999 real(DP),
intent(inout) :: rho1
4000 real(DP),
intent(inout) :: rho2
4002 integer(I4B) :: node
4010 node = this%nodelist(ib)
4012 es = this%cg_es(node)
4013 es0 = this%cg_es0(node)
4017 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, rho2, rhs, argtled=tled)
4020 if (this%ielastic(ib) /= 0)
then
4021 comp = rho2 * es - rho1 * es0
4023 comp = -pcs * (rho2 - rho1) - (rho1 * es0) + (rho2 * es)
4037 integer(I4B),
intent(in) :: nodes
4038 real(DP),
dimension(nodes),
intent(in) :: hnew
4040 character(len=LINELENGTH) :: title
4041 character(len=LINELENGTH) :: tag
4042 character(len=20) :: cellid
4044 integer(I4B) :: node
4046 integer(I4B) :: idelay
4047 integer(I4B) :: ntabrows
4048 integer(I4B) :: ntabcols
4054 real(DP) :: void_ratio
4064 call this%csub_cg_calc_stress(nodes, hnew)
4069 this%cg_es0(node) = this%cg_es(node)
4073 do ib = 1, this%ninterbeds
4074 idelay = this%idelay(ib)
4075 node = this%nodelist(ib)
4076 top = this%dis%top(node)
4077 bot = this%dis%bot(node)
4081 if (this%ispecified_pcs == 0)
then
4083 if (this%ipch /= 0)
then
4084 pcs = this%cg_es(node) - pcs0
4086 pcs = this%cg_es(node) + pcs0
4090 if (this%ipch /= 0)
then
4091 pcs = this%cg_gs(node) - (pcs0 - bot)
4093 if (pcs < this%cg_es(node))
then
4094 pcs = this%cg_es(node)
4100 if (idelay /= 0)
then
4101 dzhalf =
dhalf * this%dbdzini(1, idelay)
4106 do n = 1, this%ndelaycells
4107 if (this%ispecified_dbh == 0)
then
4108 this%dbh(n, idelay) = hcell + this%dbh(n, idelay)
4110 this%dbh(n, idelay) = hcell
4112 this%dbh0(n, idelay) = this%dbh(n, idelay)
4116 call this%csub_delay_calc_stress(ib, hcell)
4120 do n = 1, this%ndelaycells
4121 zbot = this%dbz(n, idelay) - dzhalf
4124 dbpcs = pcs - (zbot - bot) * (this%sgs(node) -
done)
4125 this%dbpcs(n, idelay) = dbpcs
4128 this%dbes0(n, idelay) = this%dbes(n, idelay)
4135 top = this%dis%top(node)
4136 bot = this%dis%bot(node)
4139 if (this%istoragec == 1)
then
4142 if (this%lhead_based .EQV. .true.)
then
4148 void_ratio = this%csub_calc_void_ratio(this%cg_theta(node))
4149 es = this%cg_es(node)
4156 znode = this%csub_calc_znode(top, bot, hbar)
4157 fact = this%csub_calc_adjes(node, es, bot, znode)
4158 fact = fact * (
done + void_ratio)
4165 this%cg_ske_cr(node) = this%cg_ske_cr(node) * fact
4168 if (fact <=
dzero)
then
4169 call this%dis%noder_to_string(node, cellid)
4170 write (
errmsg,
'(a,1x,a,a)') &
4171 'Negative recompression index calculated for cell', &
4172 trim(adjustl(cellid)),
'.'
4178 do ib = 1, this%ninterbeds
4179 idelay = this%idelay(ib)
4180 node = this%nodelist(ib)
4181 top = this%dis%top(node)
4182 bot = this%dis%bot(node)
4185 if (this%istoragec == 1)
then
4188 if (this%lhead_based .EQV. .true.)
then
4194 void_ratio = this%csub_calc_void_ratio(this%theta(ib))
4195 es = this%cg_es(node)
4202 znode = this%csub_calc_znode(top, bot, hbar)
4203 fact = this%csub_calc_adjes(node, es, bot, znode)
4204 fact = fact * (
done + void_ratio)
4211 this%ci(ib) = this%ci(ib) * fact
4212 this%rci(ib) = this%rci(ib) * fact
4215 if (fact <=
dzero)
then
4216 call this%dis%noder_to_string(node, cellid)
4217 write (
errmsg,
'(a,1x,i0,2(1x,a),a)') &
4218 'Negative compression indices calculated for interbed', ib, &
4219 'in cell', trim(adjustl(cellid)),
'.'
4225 if (this%iprpak == 1)
then
4227 title = trim(adjustl(this%packName))// &
4228 ' PACKAGE CALCULATED INITIAL INTERBED STRESSES AT THE CELL BOTTOM'
4231 ntabrows = this%ninterbeds
4233 if (this%inamedbound /= 0)
then
4234 ntabcols = ntabcols + 1
4238 call table_cr(this%inputtab, this%packName, title)
4239 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4242 tag =
'INTERBED NUMBER'
4243 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4245 call this%inputtab%initialize_column(tag, 20)
4246 tag =
'GEOSTATIC STRESS'
4247 call this%inputtab%initialize_column(tag, 16)
4248 tag =
'EFFECTIVE STRESS'
4249 call this%inputtab%initialize_column(tag, 16)
4250 tag =
'PRECONSOLIDATION STRESS'
4251 call this%inputtab%initialize_column(tag, 16)
4252 if (this%inamedbound /= 0)
then
4254 call this%inputtab%initialize_column(tag,
lenboundname, &
4259 do ib = 1, this%ninterbeds
4260 node = this%nodelist(ib)
4261 call this%dis%noder_to_string(node, cellid)
4264 call this%inputtab%add_term(ib)
4265 call this%inputtab%add_term(cellid)
4266 call this%inputtab%add_term(this%cg_gs(node))
4267 call this%inputtab%add_term(this%cg_es(node))
4268 call this%inputtab%add_term(this%pcs(ib))
4269 if (this%inamedbound /= 0)
then
4270 call this%inputtab%add_term(this%boundname(ib))
4277 title = trim(adjustl(this%packName))// &
4278 ' PACKAGE CALCULATED INITIAL DELAY INTERBED STRESSES'
4282 do ib = 1, this%ninterbeds
4283 idelay = this%idelay(ib)
4284 if (idelay /= 0)
then
4285 ntabrows = ntabrows + this%ndelaycells
4289 if (this%inamedbound /= 0)
then
4290 ntabcols = ntabcols + 1
4294 call table_cr(this%inputtab, this%packName, title)
4295 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4298 tag =
'INTERBED NUMBER'
4299 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4301 call this%inputtab%initialize_column(tag, 20)
4303 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4304 tag =
'GEOSTATIC STRESS'
4305 call this%inputtab%initialize_column(tag, 16)
4306 tag =
'EFFECTIVE STRESS'
4307 call this%inputtab%initialize_column(tag, 16)
4308 tag =
'PRECONSOLIDATION STRESS'
4309 call this%inputtab%initialize_column(tag, 16)
4310 if (this%inamedbound /= 0)
then
4312 call this%inputtab%initialize_column(tag,
lenboundname, &
4317 do ib = 1, this%ninterbeds
4318 idelay = this%idelay(ib)
4319 if (idelay /= 0)
then
4320 node = this%nodelist(ib)
4321 call this%dis%noder_to_string(node, cellid)
4324 do n = 1, this%ndelaycells
4326 call this%inputtab%add_term(ib)
4327 call this%inputtab%add_term(cellid)
4329 call this%inputtab%add_term(
' ')
4330 call this%inputtab%add_term(
' ')
4332 call this%inputtab%add_term(n)
4333 call this%inputtab%add_term(this%dbgeo(n, idelay))
4334 call this%inputtab%add_term(this%dbes(n, idelay))
4335 call this%inputtab%add_term(this%dbpcs(n, idelay))
4336 if (this%inamedbound /= 0)
then
4338 call this%inputtab%add_term(this%boundname(ib))
4340 call this%inputtab%add_term(
' ')
4348 if (this%istoragec == 1)
then
4349 if (this%lhead_based .EQV. .false.)
then
4351 title = trim(adjustl(this%packName))// &
4352 ' PACKAGE COMPRESSION INDICES'
4355 ntabrows = this%ninterbeds
4357 if (this%inamedbound /= 0)
then
4358 ntabcols = ntabcols + 1
4362 call table_cr(this%inputtab, this%packName, title)
4363 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4366 tag =
'INTERBED NUMBER'
4367 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4369 call this%inputtab%initialize_column(tag, 20)
4371 call this%inputtab%initialize_column(tag, 16)
4373 call this%inputtab%initialize_column(tag, 16)
4374 if (this%inamedbound /= 0)
then
4376 call this%inputtab%initialize_column(tag,
lenboundname, &
4381 do ib = 1, this%ninterbeds
4383 node = this%nodelist(ib)
4384 call this%dis%noder_to_string(node, cellid)
4387 call this%inputtab%add_term(ib)
4388 call this%inputtab%add_term(cellid)
4389 call this%inputtab%add_term(this%ci(ib) * fact)
4390 call this%inputtab%add_term(this%rci(ib) * fact)
4391 if (this%inamedbound /= 0)
then
4392 call this%inputtab%add_term(this%boundname(ib))
4405 this%initialized = 1
4408 if (this%lhead_based .EQV. .true.)
then
4409 this%iupdatestress = 0
4422 subroutine csub_cg_fc(this, node, tled, area, hcell, hcellold, hcof, rhs)
4425 integer(I4B),
intent(in) :: node
4426 real(DP),
intent(in) :: tled
4427 real(DP),
intent(in) :: area
4428 real(DP),
intent(in) :: hcell
4429 real(DP),
intent(in) :: hcellold
4430 real(DP),
intent(inout) :: hcof
4431 real(DP),
intent(inout) :: rhs
4447 top = this%dis%top(node)
4448 bot = this%dis%bot(node)
4449 tthk = this%cg_thickini(node)
4452 if (tthk >
dzero)
then
4455 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4461 call this%csub_cg_calc_sske(node, sske, hcell)
4462 rho1 = sske * area * tthk * tled
4465 this%cg_ske(node) = sske * tthk * snold
4466 this%cg_sk(node) = sske * tthk * snnew
4469 hcof = -rho1 * snnew
4470 rhs = rho1 * snold * this%cg_es0(node) - &
4471 rho1 * snnew * (this%cg_gs(node) + bot)
4474 rhs = rhs - rho1 * snnew * (hcell - hbar)
4491 integer(I4B),
intent(in) :: node
4492 real(DP),
intent(in) :: tled
4493 real(DP),
intent(in) :: area
4494 real(DP),
intent(in) :: hcell
4495 real(DP),
intent(inout) :: hcof
4496 real(DP),
intent(inout) :: rhs
4505 real(DP) :: hbarderv
4514 top = this%dis%top(node)
4515 bot = this%dis%bot(node)
4516 tthk = this%cg_thickini(node)
4519 if (tthk >
dzero)
then
4522 call this%csub_calc_sat(node, hcell, top, snnew, snold)
4525 satderv = this%csub_calc_sat_derivative(node, hcell)
4534 call this%csub_cg_calc_sske(node, sske, hcell)
4535 rho1 = sske * area * tthk * tled
4538 hcof = rho1 * snnew * (
done - hbarderv) + &
4539 rho1 * (this%cg_gs(node) - hbar + bot) * satderv
4542 if (this%ieslag /= 0)
then
4543 hcof = hcof - rho1 * this%cg_es0(node) * satderv
4563 integer(I4B),
intent(in) :: ib
4564 integer(I4B),
intent(in) :: node
4565 real(DP),
intent(in) :: area
4566 real(DP),
intent(in) :: hcell
4567 real(DP),
intent(in) :: hcellold
4568 real(DP),
intent(inout) :: hcof
4569 real(DP),
intent(inout) :: rhs
4588 if (this%ibound(node) > 0)
then
4589 if (this%idelay(ib) == 0)
then
4592 if (this%iupdatematprop /= 0)
then
4593 if (this%ieslag == 0)
then
4596 call this%csub_nodelay_calc_comp(ib, hcell, hcellold, comp, &
4598 this%comp(ib) = comp
4601 call this%csub_nodelay_update(ib)
4606 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, hcof, rhs)
4611 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4614 if (this%iupdatematprop /= 0)
then
4615 if (this%ieslag == 0)
then
4618 call this%csub_delay_calc_comp(ib, hcell, hcellold, &
4620 this%comp(ib) = comp
4623 call this%csub_delay_update(ib)
4628 call this%csub_delay_sln(ib, hcell)
4629 call this%csub_delay_fc(ib, hcof, rhs)
4630 f = area * this%rnb(ib)
4651 integer(I4B),
intent(in) :: ib
4652 integer(I4B),
intent(in) :: node
4653 real(DP),
intent(in) :: hcell
4654 real(DP),
intent(in) :: hcellold
4655 real(DP),
intent(inout) :: hcof
4656 real(DP),
intent(inout) :: rhs
4658 integer(I4B) :: idelay
4670 real(DP) :: hbarderv
4680 idelay = this%idelay(ib)
4681 top = this%dis%top(node)
4682 bot = this%dis%bot(node)
4685 if (this%ibound(node) > 0)
then
4687 tthk = this%thickini(ib)
4690 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4693 if (idelay == 0)
then
4699 satderv = this%csub_calc_sat_derivative(node, hcell)
4708 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, rho2, rhsn)
4711 hcofn = rho2 * (
done - hbarderv) * snnew + &
4712 rho2 * (this%cg_gs(node) - hbar + bot) * satderv
4713 if (this%ielastic(ib) == 0)
then
4714 hcofn = hcofn - rho2 * this%pcs(ib) * satderv
4718 if (this%ieslag /= 0)
then
4719 if (this%ielastic(ib) /= 0)
then
4720 hcofn = hcofn - rho1 * this%cg_es0(node) * satderv
4722 hcofn = hcofn - rho1 * (this%pcs(ib) - this%cg_es0(node)) * satderv
4739 integer(I4B),
intent(in) :: n
4740 real(DP),
intent(inout) :: sske
4741 real(DP),
intent(in) :: hcell
4757 if (this%lhead_based .EQV. .true.)
then
4763 top = this%dis%top(n)
4764 bot = this%dis%bot(n)
4770 znode = this%csub_calc_znode(top, bot, hbar)
4774 es0 = this%cg_es0(n)
4775 theta = this%cg_thetaini(n)
4780 call this%csub_calc_sfacts(n, bot, znode, theta, es, es0, f)
4782 sske = f * this%cg_ske_cr(n)
4795 integer(I4B),
intent(in) :: node
4796 real(DP),
intent(in) :: hcell
4797 real(DP),
intent(in) :: hcellold
4798 real(DP),
intent(inout) :: comp
4810 call this%csub_cg_fc(node, tled, area, hcell, hcellold, hcof, rhs)
4813 comp = hcof * hcell - rhs
4824 integer(I4B),
intent(in) :: node
4826 character(len=20) :: cellid
4832 comp = this%cg_tcomp(node) + this%cg_comp(node)
4833 call this%dis%noder_to_string(node, cellid)
4834 if (abs(comp) >
dzero)
then
4835 thick = this%cg_thickini(node)
4836 theta = this%cg_thetaini(node)
4837 call this%csub_adj_matprop(comp, thick, theta)
4838 if (thick <=
dzero)
then
4839 write (
errmsg,
'(a,1x,a,1x,a,g0,a)') &
4840 'Adjusted thickness for cell', trim(adjustl(cellid)), &
4841 'is less than or equal to 0 (', thick,
').'
4844 if (theta <=
dzero)
then
4845 write (
errmsg,
'(a,1x,a,1x,a,g0,a)') &
4846 'Adjusted theta for cell', trim(adjustl(cellid)), &
4847 'is less than or equal to 0 (', theta,
').'
4850 this%cg_thick(node) = thick
4851 this%cg_theta(node) = theta
4869 integer(I4B),
intent(in) :: node
4870 real(DP),
intent(in) :: tled
4871 real(DP),
intent(in) :: area
4872 real(DP),
intent(in) :: hcell
4873 real(DP),
intent(in) :: hcellold
4874 real(DP),
intent(inout) :: hcof
4875 real(DP),
intent(inout) :: rhs
4891 top = this%dis%top(node)
4892 bot = this%dis%bot(node)
4893 tthk = this%cg_thick(node)
4894 tthk0 = this%cg_thick0(node)
4897 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4900 wc0 = this%brg * area * tthk0 * this%cg_theta0(node) * tled
4901 wc = this%brg * area * tthk * this%cg_theta(node) * tled
4907 rhs = -wc0 * snold * hcellold
4923 integer(I4B),
intent(in) :: node
4924 real(DP),
intent(in) :: tled
4925 real(DP),
intent(in) :: area
4926 real(DP),
intent(in) :: hcell
4927 real(DP),
intent(in) :: hcellold
4928 real(DP),
intent(inout) :: hcof
4929 real(DP),
intent(inout) :: rhs
4945 top = this%dis%top(node)
4946 bot = this%dis%bot(node)
4947 tthk = this%cg_thick(node)
4950 satderv = this%csub_calc_sat_derivative(node, hcell)
4953 f = this%brg * area * tled
4956 wc = f * tthk * this%cg_theta(node)
4959 hcof = -wc * hcell * satderv
4962 if (this%ieslag /= 0)
then
4963 tthk0 = this%cg_thick0(node)
4964 wc0 = f * tthk0 * this%cg_theta0(node)
4965 hcof = hcof + wc * hcellold * satderv
4983 hcell, hcellold, hcof, rhs)
4986 integer(I4B),
intent(in) :: ib
4987 integer(I4B),
intent(in) :: node
4988 real(DP),
intent(in) :: tled
4989 real(DP),
intent(in) :: area
4990 real(DP),
intent(in) :: hcell
4991 real(DP),
intent(in) :: hcellold
4992 real(DP),
intent(inout) :: hcof
4993 real(DP),
intent(inout) :: rhs
5008 top = this%dis%top(node)
5009 bot = this%dis%bot(node)
5012 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
5015 f = this%brg * area * tled
5016 wc0 = f * this%theta0(ib) * this%thick0(ib)
5017 wc = f * this%theta(ib) * this%thick(ib)
5019 rhs = -wc0 * snold * hcellold
5033 hcell, hcellold, hcof, rhs)
5036 integer(I4B),
intent(in) :: ib
5037 integer(I4B),
intent(in) :: node
5038 real(DP),
intent(in) :: tled
5039 real(DP),
intent(in) :: area
5040 real(DP),
intent(in) :: hcell
5041 real(DP),
intent(in) :: hcellold
5042 real(DP),
intent(inout) :: hcof
5043 real(DP),
intent(inout) :: rhs
5057 top = this%dis%top(node)
5058 bot = this%dis%bot(node)
5061 f = this%brg * area * tled
5064 satderv = this%csub_calc_sat_derivative(node, hcell)
5067 wc = f * this%theta(ib) * this%thick(ib)
5070 hcof = -wc * hcell * satderv
5073 if (this%ieslag /= 0)
then
5074 wc0 = f * this%theta0(ib) * this%thick0(ib)
5075 hcof = hcof + wc0 * hcellold * satderv
5091 real(dp),
intent(in) :: theta
5093 real(dp) :: void_ratio
5095 void_ratio = theta / (
done - theta)
5107 real(dp),
intent(in) :: void_ratio
5112 theta = void_ratio / (
done + void_ratio)
5124 integer(I4B),
intent(in) :: ib
5126 integer(I4B) :: idelay
5130 idelay = this%idelay(ib)
5131 thick = this%thick(ib)
5132 if (idelay /= 0)
then
5133 thick = thick * this%rnb(ib)
5150 real(dp),
intent(in) :: top
5151 real(dp),
intent(in) :: bottom
5152 real(dp),
intent(in) :: zbar
5158 if (zbar > top)
then
5163 znode =
dhalf * (v + bottom)
5177 integer(I4B),
intent(in) :: node
5178 real(dp),
intent(in) :: es0
5179 real(dp),
intent(in) :: z0
5180 real(dp),
intent(in) :: z
5185 es = es0 - (z - z0) * (this%sgs(node) -
done)
5198 integer(I4B),
intent(in) :: ib
5200 integer(I4B) :: iviolate
5201 integer(I4B) :: idelay
5202 integer(I4B) :: node
5211 idelay = this%idelay(ib)
5212 node = this%nodelist(ib)
5215 idelaycells:
do n = 1, this%ndelaycells
5216 z = this%dbz(n, idelay)
5217 h = this%dbh(n, idelay)
5218 dzhalf =
dhalf * this%dbdzini(1, idelay)
5221 if (this%stoiconv(node) == 0)
then
5224 this%idb_nconv_count(1) = this%idb_nconv_count(1) + 1
5230 if (iviolate > 0)
then
5248 integer(I4B),
intent(in) :: node
5249 real(DP),
intent(in) :: hcell
5250 real(DP),
intent(in) :: hcellold
5251 real(DP),
intent(inout) :: snnew
5252 real(DP),
intent(inout) :: snold
5258 if (this%stoiconv(node) /= 0)
then
5259 top = this%dis%top(node)
5260 bot = this%dis%bot(node)
5267 if (this%ieslag /= 0)
then
5282 integer(I4B),
intent(in) :: node
5283 real(dp),
intent(in) :: hcell
5289 if (this%stoiconv(node) /= 0)
then
5290 top = this%dis%top(node)
5291 bot = this%dis%bot(node)
5310 integer(I4B),
intent(in) :: node
5311 real(DP),
intent(in) :: bot
5312 real(DP),
intent(in) :: znode
5313 real(DP),
intent(in) :: theta
5314 real(DP),
intent(in) :: es
5315 real(DP),
intent(in) :: es0
5316 real(DP),
intent(inout) :: fact
5319 real(DP) :: void_ratio
5324 if (this%ieslag /= 0)
then
5331 void_ratio = this%csub_calc_void_ratio(theta)
5332 denom = this%csub_calc_adjes(node, esv, bot, znode)
5333 denom = denom * (
done + void_ratio)
5334 if (denom /=
dzero)
then
5350 real(DP),
intent(in) :: comp
5351 real(DP),
intent(inout) :: thick
5352 real(DP),
intent(inout) :: theta
5355 real(DP) :: void_ratio
5359 void_ratio = this%csub_calc_void_ratio(theta)
5362 if (thick >
dzero) strain = -comp / thick
5365 void_ratio = void_ratio + strain * (
done + void_ratio)
5366 theta = this%csub_calc_theta(void_ratio)
5367 thick = thick - comp
5380 integer(I4B),
intent(in) :: ib
5381 real(DP),
intent(in) :: hcell
5382 logical(LGP),
intent(in),
optional :: update
5386 logical(LGP) :: lupdate
5388 integer(I4B) :: icnvg
5389 integer(I4B) :: iter
5390 integer(I4B) :: idelay
5397 if (
present(update))
then
5404 call this%csub_delay_calc_stress(ib, hcell)
5412 if (this%thickini(ib) >
dzero)
then
5415 idelay = this%idelay(ib)
5420 call this%csub_delay_assemble(ib, hcell)
5424 this%dbal, this%dbad, this%dbau, &
5425 this%dbrhs, this%dbdh, this%dbaw)
5429 do n = 1, this%ndelaycells
5430 dh = this%dbdh(n) - this%dbh(n, idelay)
5431 if (abs(dh) > abs(dhmax))
then
5434 this%dbdhmax(idelay) = dhmax
5438 this%dbh(n, idelay) = this%dbdh(n)
5442 call this%csub_delay_calc_stress(ib, hcell)
5445 if (abs(dhmax) < dclose)
then
5447 else if (iter /= 1)
then
5448 if (abs(dhmax) - abs(dhmax0) <
dprec)
then
5452 if (icnvg == 1)
then
5473 integer(I4B),
intent(in) :: ib
5476 integer(I4B) :: node
5477 integer(I4B) :: idelay
5489 idelay = this%idelay(ib)
5490 node = this%nodelist(ib)
5491 b = this%thickini(ib)
5492 bot = this%dis%bot(node)
5498 znode = this%csub_calc_znode(top, bot, hbar)
5499 dz =
dhalf * this%dbdzini(1, idelay)
5506 do n = 1, this%ndelaycells
5509 this%dbz(n, idelay) = z
5513 if (abs(zr) < dz)
then
5516 this%dbrelz(n, idelay) = zr
5530 integer(I4B),
intent(in) :: ib
5531 real(DP),
intent(in) :: hcell
5534 integer(I4B) :: idelay
5535 integer(I4B) :: node
5551 idelay = this%idelay(ib)
5552 node = this%nodelist(ib)
5553 sigma = this%cg_gs(node)
5554 topaq = this%dis%top(node)
5555 botaq = this%dis%bot(node)
5556 dzhalf =
dhalf * this%dbdzini(1, idelay)
5557 top = this%dbz(1, idelay) + dzhalf
5563 sgm = this%sgm(node)
5564 sgs = this%sgs(node)
5565 if (hcell < top)
then
5566 sadd = ((top - hbar) * sgm) + ((hbar - botaq) * sgs)
5568 sadd = (top - botaq) * sgs
5570 sigma = sigma - sadd
5573 do n = 1, this%ndelaycells
5574 h = this%dbh(n, idelay)
5577 z = this%dbz(n, idelay)
5586 sadd = ((top - hbar) * sgm) + ((hbar - bot) * sgs)
5588 sadd = (top - bot) * sgs
5590 sigma = sigma + sadd
5592 this%dbgeo(n, idelay) = sigma
5593 this%dbes(n, idelay) = sigma - phead
5610 integer(I4B),
intent(in) :: ib
5611 integer(I4B),
intent(in) :: n
5612 real(DP),
intent(in) :: hcell
5613 real(DP),
intent(inout) :: ssk
5614 real(DP),
intent(inout) :: sske
5616 integer(I4B) :: idelay
5617 integer(I4B) :: ielastic
5618 integer(I4B) :: node
5621 real(DP) :: hbarcell
5640 idelay = this%idelay(ib)
5641 ielastic = this%ielastic(ib)
5644 if (this%lhead_based .EQV. .true.)
then
5650 node = this%nodelist(ib)
5651 theta = this%dbthetaini(n, idelay)
5654 topcell = this%dis%top(node)
5655 botcell = this%dis%bot(node)
5662 zcell = this%csub_calc_znode(topcell, botcell, hbarcell)
5665 zcenter = zcell + this%dbrelz(n, idelay)
5666 dzhalf =
dhalf * this%dbdzini(1, idelay)
5667 top = zcenter + dzhalf
5668 bot = zcenter - dzhalf
5669 h = this%dbh(n, idelay)
5676 znode = this%csub_calc_znode(top, bot, hbar)
5680 zbot = this%dbz(n, idelay) - dzhalf
5683 es = this%dbes(n, idelay)
5684 es0 = this%dbes0(n, idelay)
5689 call this%csub_calc_sfacts(node, zbot, znode, theta, es, es0, f)
5691 this%idbconvert(n, idelay) = 0
5692 sske = f * this%rci(ib)
5693 ssk = f * this%rci(ib)
5694 if (ielastic == 0)
then
5695 if (this%dbes(n, idelay) > this%dbpcs(n, idelay))
then
5696 this%idbconvert(n, idelay) = 1
5697 ssk = f * this%ci(ib)
5712 integer(I4B),
intent(in) :: ib
5713 real(DP),
intent(in) :: hcell
5722 do n = 1, this%ndelaycells
5725 if (this%inewton == 0)
then
5726 call this%csub_delay_assemble_fc(ib, n, hcell, aii, au, al, r)
5728 call this%csub_delay_assemble_fn(ib, n, hcell, aii, au, al, r)
5750 integer(I4B),
intent(in) :: ib
5751 integer(I4B),
intent(in) :: n
5752 real(DP),
intent(in) :: hcell
5753 real(DP),
intent(inout) :: aii
5754 real(DP),
intent(inout) :: au
5755 real(DP),
intent(inout) :: al
5756 real(DP),
intent(inout) :: r
5758 integer(I4B) :: node
5759 integer(I4B) :: idelay
5760 integer(I4B) :: ielastic
5796 idelay = this%idelay(ib)
5797 ielastic = this%ielastic(ib)
5798 node = this%nodelist(ib)
5799 dzini = this%dbdzini(1, idelay)
5800 dzhalf =
dhalf * dzini
5802 c = this%kv(ib) / dzini
5810 if (n == 1 .or. n == this%ndelaycells)
then
5821 if (n < this%ndelaycells)
then
5826 z = this%dbz(n, idelay)
5829 h = this%dbh(n, idelay)
5830 h0 = this%dbh0(n, idelay)
5831 dz = this%dbdz(n, idelay)
5832 dz0 = this%dbdz0(n, idelay)
5833 theta = this%dbtheta(n, idelay)
5834 theta0 = this%dbtheta0(n, idelay)
5840 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
5843 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
5846 smult = dzini * tled
5847 gs = this%dbgeo(n, idelay)
5848 es0 = this%dbes0(n, idelay)
5849 pcs = this%dbpcs(n, idelay)
5850 aii = aii - smult * dsn * ssk
5851 if (ielastic /= 0)
then
5853 (dsn * ssk * (gs + zbot) - dsn0 * sske * es0)
5856 (dsn * ssk * (gs + zbot - pcs) + dsn0 * sske * (pcs - es0))
5860 r = r + smult * dsn * ssk * (h - hbar)
5863 wcf = this%brg * tled
5864 wc = dz * wcf * theta
5865 wc0 = dz0 * wcf * theta0
5866 aii = aii - dsn * wc
5867 r = r - dsn0 * wc0 * h0
5881 integer(I4B),
intent(in) :: ib
5882 integer(I4B),
intent(in) :: n
5883 real(DP),
intent(in) :: hcell
5884 real(DP),
intent(inout) :: aii
5885 real(DP),
intent(inout) :: au
5886 real(DP),
intent(inout) :: al
5887 real(DP),
intent(inout) :: r
5889 integer(I4B) :: node
5890 integer(I4B) :: idelay
5891 integer(I4B) :: ielastic
5917 real(DP) :: hbarderv
5933 idelay = this%idelay(ib)
5934 ielastic = this%ielastic(ib)
5935 node = this%nodelist(ib)
5936 dzini = this%dbdzini(1, idelay)
5937 dzhalf =
dhalf * dzini
5939 c = this%kv(ib) / dzini
5947 if (n == 1 .or. n == this%ndelaycells)
then
5958 if (n < this%ndelaycells)
then
5963 z = this%dbz(n, idelay)
5966 h = this%dbh(n, idelay)
5967 h0 = this%dbh0(n, idelay)
5968 dz = this%dbdz(n, idelay)
5969 dz0 = this%dbdz0(n, idelay)
5970 theta = this%dbtheta(n, idelay)
5971 theta0 = this%dbtheta0(n, idelay)
5980 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
5983 dsnderv = this%csub_delay_calc_sat_derivative(node, idelay, n, hcell)
5986 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
5989 smult = dzini * tled
5990 gs = this%dbgeo(n, idelay)
5991 es0 = this%dbes0(n, idelay)
5992 pcs = this%dbpcs(n, idelay)
5993 if (ielastic /= 0)
then
5994 qsto = smult * (dsn * ssk * (gs - hbar + zbot) - dsn0 * sske * es0)
5995 stoderv = -smult * dsn * ssk * hbarderv + &
5996 smult * ssk * (gs - hbar + zbot) * dsnderv
5998 qsto = smult * (dsn * ssk * (gs - hbar + zbot - pcs) + &
5999 dsn0 * sske * (pcs - es0))
6000 stoderv = -smult * dsn * ssk * hbarderv + &
6001 smult * ssk * (gs - hbar + zbot - pcs) * dsnderv
6005 if (this%ieslag /= 0)
then
6006 if (ielastic /= 0)
then
6007 stoderv = stoderv - smult * sske * es0 * dsnderv
6009 stoderv = stoderv + smult * sske * (pcs - es0) * dsnderv
6015 r = r - qsto + stoderv * h
6018 wcf = this%brg * tled
6019 wc = dz * wcf * theta
6020 wc0 = dz0 * wcf * theta0
6021 qwc = dsn0 * wc0 * h0 - dsn * wc * h
6022 wcderv = -dsn * wc - wc * h * dsnderv
6025 if (this%ieslag /= 0)
then
6026 wcderv = wcderv + wc0 * h0 * dsnderv
6031 r = r - qwc + wcderv * h
6046 integer(I4B),
intent(in) :: node
6047 integer(I4B),
intent(in) :: idelay
6048 integer(I4B),
intent(in) :: n
6049 real(DP),
intent(in) :: hcell
6050 real(DP),
intent(in) :: hcellold
6051 real(DP),
intent(inout) :: snnew
6052 real(DP),
intent(inout) :: snold
6059 if (this%stoiconv(node) /= 0)
then
6060 dzhalf =
dhalf * this%dbdzini(n, idelay)
6061 top = this%dbz(n, idelay) + dzhalf
6062 bot = this%dbz(n, idelay) - dzhalf
6069 if (this%ieslag /= 0)
then
6085 integer(I4B),
intent(in) :: node
6086 integer(I4B),
intent(in) :: idelay
6087 integer(I4B),
intent(in) :: n
6088 real(dp),
intent(in) :: hcell
6095 if (this%stoiconv(node) /= 0)
then
6096 dzhalf =
dhalf * this%dbdzini(n, idelay)
6097 top = this%dbz(n, idelay) + dzhalf
6098 bot = this%dbz(n, idelay) - dzhalf
6116 integer(I4B),
intent(in) :: ib
6117 real(DP),
intent(in) :: hcell
6118 real(DP),
intent(inout) :: stoe
6119 real(DP),
intent(inout) :: stoi
6121 integer(I4B) :: idelay
6122 integer(I4B) :: ielastic
6123 integer(I4B) :: node
6142 idelay = this%idelay(ib)
6143 ielastic = this%ielastic(ib)
6144 node = this%nodelist(ib)
6151 if (this%thickini(ib) >
dzero)
then
6152 fmult = this%dbdzini(1, idelay)
6153 dzhalf =
dhalf * this%dbdzini(1, idelay)
6154 do n = 1, this%ndelaycells
6155 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6156 z = this%dbz(n, idelay)
6158 h = this%dbh(n, idelay)
6159 h0 = this%dbh0(n, idelay)
6160 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6162 if (ielastic /= 0)
then
6163 v1 = dsn * ssk * (this%dbgeo(n, idelay) - hbar + zbot) - &
6164 dsn0 * sske * this%dbes0(n, idelay)
6167 v1 = dsn * ssk * (this%dbgeo(n, idelay) - hbar + zbot - &
6168 this%dbpcs(n, idelay))
6169 v2 = dsn0 * sske * (this%dbpcs(n, idelay) - this%dbes0(n, idelay))
6173 if (this%idbconvert(n, idelay) /= 0)
then
6174 stoi = stoi + v1 * fmult
6175 stoe = stoe + v2 * fmult
6177 stoe = stoe + (v1 + v2) * fmult
6181 ske = ske + sske * fmult
6182 sk = sk + ssk * fmult
6203 integer(I4B),
intent(in) :: ib
6204 real(DP),
intent(inout) :: dwc
6206 integer(I4B) :: idelay
6207 integer(I4B) :: node
6224 if (this%thickini(ib) >
dzero)
then
6225 idelay = this%idelay(ib)
6226 node = this%nodelist(ib)
6228 do n = 1, this%ndelaycells
6229 h = this%dbh(n, idelay)
6230 h0 = this%dbh0(n, idelay)
6231 dz = this%dbdz(n, idelay)
6232 dz0 = this%dbdz0(n, idelay)
6233 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6234 wc = dz * this%brg * this%dbtheta(n, idelay)
6235 wc0 = dz0 * this%brg * this%dbtheta0(n, idelay)
6236 v = dsn0 * wc0 * h0 - dsn * wc * h
6237 dwc = dwc + v * tled
6254 integer(I4B),
intent(in) :: ib
6255 real(DP),
intent(in) :: hcell
6256 real(DP),
intent(in) :: hcellold
6257 real(DP),
intent(inout) :: comp
6258 real(DP),
intent(inout) :: compi
6259 real(DP),
intent(inout) :: compe
6261 integer(I4B) :: idelay
6262 integer(I4B) :: ielastic
6263 integer(I4B) :: node
6279 idelay = this%idelay(ib)
6280 ielastic = this%ielastic(ib)
6281 node = this%nodelist(ib)
6287 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
6290 if (this%thickini(ib) >
dzero)
then
6291 fmult = this%dbdzini(1, idelay)
6292 do n = 1, this%ndelaycells
6293 h = this%dbh(n, idelay)
6294 h0 = this%dbh0(n, idelay)
6295 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6296 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6297 if (ielastic /= 0)
then
6298 v1 = dsn * ssk * this%dbes(n, idelay) - sske * this%dbes0(n, idelay)
6301 v1 = dsn * ssk * (this%dbes(n, idelay) - this%dbpcs(n, idelay))
6302 v2 = dsn0 * sske * (this%dbpcs(n, idelay) - this%dbes0(n, idelay))
6304 v = (v1 + v2) * fmult
6308 this%dbcomp(n, idelay) = v * snnew
6311 if (this%idbconvert(n, idelay) /= 0)
then
6312 compi = compi + v1 * fmult
6313 compe = compe + v2 * fmult
6315 compe = compe + (v1 + v2) * fmult
6321 comp = comp * this%rnb(ib)
6322 compi = compi * this%rnb(ib)
6323 compe = compe * this%rnb(ib)
6334 integer(I4B),
intent(in) :: ib
6336 integer(I4B) :: idelay
6345 idelay = this%idelay(ib)
6351 do n = 1, this%ndelaycells
6354 comp = this%dbtcomp(n, idelay) + this%dbcomp(n, idelay)
6358 comp = comp / this%rnb(ib)
6361 if (abs(comp) >
dzero)
then
6362 thick = this%dbdzini(n, idelay)
6363 theta = this%dbthetaini(n, idelay)
6364 call this%csub_adj_matprop(comp, thick, theta)
6365 if (thick <=
dzero)
then
6366 write (
errmsg,
'(2(a,i0),a,g0,a)') &
6367 'Adjusted thickness for delay interbed (', ib, &
6368 ') cell (', n,
') is less than or equal to 0 (', thick,
').'
6371 if (theta <=
dzero)
then
6372 write (
errmsg,
'(2(a,i0),a,g0,a)') &
6373 'Adjusted theta for delay interbed (', ib, &
6374 ') cell (', n,
'is less than or equal to 0 (', theta,
').'
6377 this%dbdz(n, idelay) = thick
6378 this%dbtheta(n, idelay) = theta
6379 tthick = tthick + thick
6380 wtheta = wtheta + thick * theta
6382 thick = this%dbdz(n, idelay)
6383 theta = this%dbtheta(n, idelay)
6384 tthick = tthick + thick
6385 wtheta = wtheta + thick * theta
6391 if (tthick >
dzero)
then
6392 wtheta = wtheta / tthick
6397 this%thick(ib) = tthick
6398 this%theta(ib) = wtheta
6414 integer(I4B),
intent(in) :: ib
6415 real(DP),
intent(inout) :: hcof
6416 real(DP),
intent(inout) :: rhs
6418 integer(I4B) :: idelay
6423 idelay = this%idelay(ib)
6426 if (this%thickini(ib) >
dzero)
then
6428 c1 =
dtwo * this%kv(ib) / this%dbdzini(1, idelay)
6429 rhs = -c1 * this%dbh(1, idelay)
6431 this%kv(ib) / this%dbdzini(this%ndelaycells, idelay)
6432 rhs = rhs - c2 * this%dbh(this%ndelaycells, idelay)
6447 integer(I4B),
intent(in) :: ib
6448 integer(I4B),
intent(in) :: n
6449 real(dp),
intent(in) :: hcell
6451 integer(I4B) :: idelay
6456 idelay = this%idelay(ib)
6457 c =
dtwo * this%kv(ib) / this%dbdzini(n, idelay)
6458 q = c * (hcell - this%dbh(n, idelay))
6487 integer(I4B) :: indx
6491 call this%obs%StoreObsType(
'csub', .true., indx)
6496 call this%obs%StoreObsType(
'inelastic-csub', .true., indx)
6501 call this%obs%StoreObsType(
'elastic-csub', .true., indx)
6506 call this%obs%StoreObsType(
'coarse-csub', .false., indx)
6511 call this%obs%StoreObsType(
'csub-cell', .true., indx)
6516 call this%obs%StoreObsType(
'wcomp-csub-cell', .false., indx)
6521 call this%obs%StoreObsType(
'ske', .true., indx)
6526 call this%obs%StoreObsType(
'sk', .true., indx)
6531 call this%obs%StoreObsType(
'ske-cell', .true., indx)
6536 call this%obs%StoreObsType(
'sk-cell', .true., indx)
6541 call this%obs%StoreObsType(
'gstress-cell', .false., indx)
6546 call this%obs%StoreObsType(
'estress-cell', .false., indx)
6551 call this%obs%StoreObsType(
'interbed-compaction', .true., indx)
6556 call this%obs%StoreObsType(
'inelastic-compaction', .true., indx)
6561 call this%obs%StoreObsType(
'elastic-compaction', .true., indx)
6566 call this%obs%StoreObsType(
'coarse-compaction', .false., indx)
6571 call this%obs%StoreObsType(
'inelastic-compaction-cell', .true., indx)
6576 call this%obs%StoreObsType(
'elastic-compaction-cell', .true., indx)
6581 call this%obs%StoreObsType(
'compaction-cell', .true., indx)
6586 call this%obs%StoreObsType(
'thickness', .true., indx)
6591 call this%obs%StoreObsType(
'coarse-thickness', .false., indx)
6596 call this%obs%StoreObsType(
'thickness-cell', .false., indx)
6601 call this%obs%StoreObsType(
'theta', .true., indx)
6606 call this%obs%StoreObsType(
'coarse-theta', .false., indx)
6611 call this%obs%StoreObsType(
'theta-cell', .true., indx)
6616 call this%obs%StoreObsType(
'preconstress-cell', .false., indx)
6621 call this%obs%StoreObsType(
'interbed-compaction-pct', .false., indx)
6626 call this%obs%StoreObsType(
'delay-preconstress', .false., indx)
6631 call this%obs%StoreObsType(
'delay-head', .false., indx)
6636 call this%obs%StoreObsType(
'delay-gstress', .false., indx)
6641 call this%obs%StoreObsType(
'delay-estress', .false., indx)
6646 call this%obs%StoreObsType(
'delay-compaction', .false., indx)
6651 call this%obs%StoreObsType(
'delay-thickness', .false., indx)
6656 call this%obs%StoreObsType(
'delay-theta', .false., indx)
6661 call this%obs%StoreObsType(
'delay-flowtop', .true., indx)
6666 call this%obs%StoreObsType(
'delay-flowbot', .true., indx)
6683 integer(I4B) :: idelay
6684 integer(I4B) :: ncol
6685 integer(I4B) :: node
6692 if (this%obs%npakobs > 0)
then
6693 call this%obs%obs_bd_clear()
6694 do i = 1, this%obs%npakobs
6695 obsrv => this%obs%pakobs(i)%obsrv
6696 if (obsrv%BndFound)
then
6697 if (obsrv%ObsTypeId ==
'SKE' .or. &
6698 obsrv%ObsTypeId ==
'SK' .or. &
6699 obsrv%ObsTypeId ==
'SKE-CELL' .or. &
6700 obsrv%ObsTypeId ==
'SK-CELL' .or. &
6701 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6702 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6703 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6704 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6705 obsrv%ObsTypeId ==
'PRECONSTRESS-CELL')
then
6706 if (this%gwfiss /= 0)
then
6707 call this%obs%SaveOneSimval(obsrv,
dnodata)
6710 do j = 1, obsrv%indxbnds_count
6711 n = obsrv%indxbnds(j)
6712 select case (obsrv%ObsTypeId)
6733 case (
'DELAY-HEAD',
'DELAY-PRECONSTRESS', &
6734 'DELAY-GSTRESS',
'DELAY-ESTRESS')
6735 if (n > this%ndelaycells)
then
6736 r = real(n - 1, dp) / real(this%ndelaycells, dp)
6737 idelay = int(floor(r)) + 1
6738 ncol = n - int(floor(r)) * this%ndelaycells
6743 select case (obsrv%ObsTypeId)
6745 v = this%dbh(ncol, idelay)
6746 case (
'DELAY-PRECONSTRESS')
6747 v = this%dbpcs(ncol, idelay)
6748 case (
'DELAY-GSTRESS')
6749 v = this%dbgeo(ncol, idelay)
6750 case (
'DELAY-ESTRESS')
6751 v = this%dbes(ncol, idelay)
6753 case (
'PRECONSTRESS-CELL')
6756 errmsg =
"Unrecognized observation type '"// &
6757 trim(obsrv%ObsTypeId)//
"'."
6760 call this%obs%SaveOneSimval(obsrv, v)
6765 do j = 1, obsrv%indxbnds_count
6766 n = obsrv%indxbnds(j)
6767 select case (obsrv%ObsTypeId)
6769 v = this%storagee(n) + this%storagei(n)
6770 case (
'INELASTIC-CSUB')
6771 v = this%storagei(n)
6772 case (
'ELASTIC-CSUB')
6773 v = this%storagee(n)
6774 case (
'COARSE-CSUB')
6776 case (
'WCOMP-CSUB-CELL')
6777 v = this%cell_wcstor(n)
6784 v = this%storagee(n) + this%storagei(n)
6788 case (
'COARSE-THETA')
6789 v = this%cg_theta(n)
6794 f = this%cg_thick(n) / this%cell_thick(n)
6795 v = f * this%cg_theta(n)
6797 node = this%nodelist(n)
6798 f = this%csub_calc_interbed_thickness(n) / this%cell_thick(node)
6799 v = f * this%theta(n)
6801 case (
'GSTRESS-CELL')
6803 case (
'ESTRESS-CELL')
6805 case (
'INTERBED-COMPACTION')
6807 case (
'INTERBED-COMPACTION-PCT')
6808 b0 = this%thickini(n)
6809 if (this%idelay(n) /= 0)
then
6810 b0 = b0 * this%rnb(n)
6813 case (
'INELASTIC-COMPACTION')
6815 case (
'ELASTIC-COMPACTION')
6817 case (
'COARSE-COMPACTION')
6818 v = this%cg_tcomp(n)
6819 case (
'INELASTIC-COMPACTION-CELL')
6825 case (
'ELASTIC-COMPACTION-CELL')
6829 v = this%cg_tcomp(n)
6833 case (
'COMPACTION-CELL')
6837 v = this%cg_tcomp(n)
6842 idelay = this%idelay(n)
6844 if (idelay /= 0)
then
6847 case (
'COARSE-THICKNESS')
6848 v = this%cg_thick(n)
6849 case (
'THICKNESS-CELL')
6850 v = this%cell_thick(n)
6851 case (
'DELAY-COMPACTION',
'DELAY-THICKNESS', &
6853 if (n > this%ndelaycells)
then
6854 r = real(n, dp) / real(this%ndelaycells, dp)
6855 idelay = int(floor(r)) + 1
6856 ncol = mod(n, this%ndelaycells)
6861 select case (obsrv%ObsTypeId)
6862 case (
'DELAY-COMPACTION')
6863 v = this%dbtcomp(ncol, idelay)
6864 case (
'DELAY-THICKNESS')
6865 v = this%dbdz(ncol, idelay)
6866 case (
'DELAY-THETA')
6867 v = this%dbtheta(ncol, idelay)
6869 case (
'DELAY-FLOWTOP')
6870 idelay = this%idelay(n)
6871 v = this%dbflowtop(idelay)
6872 case (
'DELAY-FLOWBOT')
6873 idelay = this%idelay(n)
6874 v = this%dbflowbot(idelay)
6876 errmsg =
"Unrecognized observation type: '"// &
6877 trim(obsrv%ObsTypeId)//
"'."
6880 call this%obs%SaveOneSimval(obsrv, v)
6884 call this%obs%SaveOneSimval(obsrv,
dnodata)
6907 character(len=LENBOUNDNAME) :: bname
6912 integer(I4B) :: idelay
6915 if (.not. this%csub_obs_supported())
then
6923 do i = 1, this%obs%npakobs
6924 obsrv => this%obs%pakobs(i)%obsrv
6927 obsrv%BndFound = .false.
6929 bname = obsrv%FeatureName
6930 if (bname /=
'')
then
6935 do j = 1, this%ninterbeds
6936 if (this%boundname(j) == bname)
then
6937 obsrv%BndFound = .true.
6938 obsrv%CurrentTimeStepEndValue =
dzero
6939 call obsrv%AddObsIndex(j)
6944 else if (obsrv%ObsTypeId ==
'GSTRESS-CELL' .or. &
6945 obsrv%ObsTypeId ==
'ESTRESS-CELL' .or. &
6946 obsrv%ObsTypeId ==
'THICKNESS-CELL' .or. &
6947 obsrv%ObsTypeId ==
'COARSE-CSUB' .or. &
6948 obsrv%ObsTypeId ==
'WCOMP-CSUB-CELL' .or. &
6949 obsrv%ObsTypeId ==
'COARSE-COMPACTION' .or. &
6950 obsrv%ObsTypeId ==
'COARSE-THETA' .or. &
6951 obsrv%ObsTypeId ==
'COARSE-THICKNESS')
then
6952 obsrv%BndFound = .true.
6953 obsrv%CurrentTimeStepEndValue =
dzero
6954 call obsrv%AddObsIndex(obsrv%NodeNumber)
6955 else if (obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6956 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6957 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6958 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6959 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
6960 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
6961 obsrv%ObsTypeId ==
'DELAY-THETA')
then
6962 if (this%ninterbeds > 0)
then
6963 n = obsrv%NodeNumber
6964 idelay = this%idelay(n)
6965 if (idelay /= 0)
then
6966 j = (idelay - 1) * this%ndelaycells + 1
6967 n2 = obsrv%NodeNumber2
6968 if (n2 < 1 .or. n2 > this%ndelaycells)
then
6969 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
6970 trim(adjustl(obsrv%ObsTypeId)),
'interbed cell must be ', &
6971 'greater than 0 and less than or equal to', this%ndelaycells, &
6972 '(specified value is ', n2,
').'
6975 j = (idelay - 1) * this%ndelaycells + n2
6977 obsrv%BndFound = .true.
6978 call obsrv%AddObsIndex(j)
6983 else if (obsrv%ObsTypeId ==
'CSUB' .or. &
6984 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
6985 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
6986 obsrv%ObsTypeId ==
'SK' .or. &
6987 obsrv%ObsTypeId ==
'SKE' .or. &
6988 obsrv%ObsTypeId ==
'THICKNESS' .or. &
6989 obsrv%ObsTypeId ==
'THETA' .or. &
6990 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
6991 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
6992 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
6993 obsrv%ObsTypeId ==
'INTERBED-COMPACTION-PCT')
then
6994 if (this%ninterbeds > 0)
then
6995 j = obsrv%NodeNumber
6996 if (j < 1 .or. j > this%ninterbeds)
then
6997 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
6998 trim(adjustl(obsrv%ObsTypeId)),
'interbed cell must be greater', &
6999 'than 0 and less than or equal to', this%ninterbeds, &
7000 '(specified value is ', j,
').'
7003 obsrv%BndFound = .true.
7004 obsrv%CurrentTimeStepEndValue =
dzero
7005 call obsrv%AddObsIndex(j)
7008 else if (obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7009 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7010 if (this%ninterbeds > 0)
then
7011 j = obsrv%NodeNumber
7012 if (j < 1 .or. j > this%ninterbeds)
then
7013 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
7014 trim(adjustl(obsrv%ObsTypeId)), &
7015 'interbed cell must be greater ', &
7016 'than 0 and less than or equal to', this%ninterbeds, &
7017 '(specified value is ', j,
').'
7020 idelay = this%idelay(j)
7021 if (idelay /= 0)
then
7022 obsrv%BndFound = .true.
7023 obsrv%CurrentTimeStepEndValue =
dzero
7024 call obsrv%AddObsIndex(j)
7032 if (obsrv%ObsTypeId ==
'CSUB-CELL' .or. &
7033 obsrv%ObsTypeId ==
'SKE-CELL' .or. &
7034 obsrv%ObsTypeId ==
'SK-CELL' .or. &
7035 obsrv%ObsTypeId ==
'THETA-CELL' .or. &
7036 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION-CELL' .or. &
7037 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION-CELL' .or. &
7038 obsrv%ObsTypeId ==
'COMPACTION-CELL')
then
7039 if (.NOT. obsrv%BndFound)
then
7040 obsrv%BndFound = .true.
7041 obsrv%CurrentTimeStepEndValue =
dzero
7042 call obsrv%AddObsIndex(obsrv%NodeNumber)
7045 jloop:
do j = 1, this%ninterbeds
7046 if (this%nodelist(j) == obsrv%NodeNumber)
then
7047 obsrv%BndFound = .true.
7048 obsrv%CurrentTimeStepEndValue =
dzero
7049 call obsrv%AddObsIndex(j)
7076 integer(I4B),
intent(in) :: inunitobs
7077 integer(I4B),
intent(in) :: iout
7081 integer(I4B) :: icol, istart, istop
7082 character(len=LINELENGTH) :: string
7083 character(len=LENBOUNDNAME) :: bndname
7084 logical(LGP) :: flag_string
7085 logical(LGP) :: flag_idcellno
7086 logical(LGP) :: flag_error
7089 string = obsrv%IDstring
7090 flag_string = .true.
7091 flag_idcellno = .false.
7092 flag_error = .false.
7093 if (obsrv%ObsTypeId(1:5) ==
"DELAY" .AND. &
7094 obsrv%ObsTypeId(1:10) /=
"DELAY-FLOW")
then
7095 flag_idcellno = .true.
7104 if (obsrv%ObsTypeId ==
'CSUB' .or. &
7105 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
7106 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
7107 obsrv%ObsTypeId ==
'SK' .or. &
7108 obsrv%ObsTypeId ==
'SKE' .or. &
7109 obsrv%ObsTypeId ==
'THETA' .or. &
7110 obsrv%ObsTypeId ==
'THICKNESS' .or. &
7111 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7112 obsrv%ObsTypeId ==
'INTERBED-COMPACTION-PCT' .or. &
7113 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7114 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7115 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
7116 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
7117 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
7118 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
7119 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
7120 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
7121 obsrv%ObsTypeId ==
'DELAY-THETA' .or. &
7122 obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7123 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7127 nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
7128 iout, string, flag_string)
7131 if (obsrv%ObsTypeId ==
'SK' .or. &
7132 obsrv%ObsTypeId ==
'SKE' .or. &
7133 obsrv%ObsTypeId ==
'THETA' .or. &
7134 obsrv%ObsTypeId ==
'THICKNESS' .or. &
7135 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7136 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7137 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7138 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
7139 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
7140 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
7141 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
7142 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
7143 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
7144 obsrv%ObsTypeId ==
'DELAY-THETA')
then
7147 "BOUNDNAME ('", trim(adjustl(bndname)), &
7148 "') not allowed for CSUB observation type '", &
7149 trim(adjustl(obsrv%ObsTypeId)),
"'."
7154 else if (obsrv%ObsTypeId ==
'CSUB' .or. &
7155 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
7156 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
7160 obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7161 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7163 obsrv%FeatureName = bndname
7167 if (flag_idcellno .EQV. .true. .AND. flag_error .EQV. .false.)
then
7172 "BOUNDNAME ('", trim(adjustl(bndname)), &
7173 "') not allowed for CSUB observation type '", &
7174 trim(adjustl(obsrv%ObsTypeId)),
"' idcellno."
7177 obsrv%NodeNumber2 = nn2
7183 obsrv%NodeNumber = nn1
7197 this%listlabel = trim(this%filtyp)//
' NO.'
7198 if (this%dis%ndim == 3)
then
7199 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
7200 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
7201 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
7202 elseif (this%dis%ndim == 2)
then
7203 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
7204 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
7206 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
7208 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'SIG0'
7209 if (this%inamedbound == 1)
then
7210 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 ...