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()
317 subroutine csub_cr(csubobj, name_model, mempath, istounit, stoPckName, inunit, &
321 character(len=*),
intent(in) :: name_model
322 character(len=*),
intent(in) :: mempath
323 integer(I4B),
intent(in) :: inunit
324 integer(I4B),
intent(in) :: istounit
325 character(len=*),
intent(in) :: stopckname
326 integer(I4B),
intent(in) :: iout
333 call csubobj%set_names(1, name_model,
'CSUB',
'CSUB', mempath)
336 call csubobj%csub_allocate_scalars()
342 csubobj%istounit = istounit
343 csubobj%inunit = inunit
360 integer(I4B),
dimension(:),
pointer,
contiguous :: ibound
362 character(len=20) :: cellid
363 integer(I4B) :: idelay
366 integer(I4B) :: istoerr
370 real(DP) :: cg_ske_cr
374 character(len=*),
parameter :: fmtcsub = &
375 "(1x,/1x,'CSUB -- COMPACTION PACKAGE, VERSION 1, 12/15/2019', &
376 &' INPUT READ FROM MEMPATH: ', A, /)"
379 write (this%iout, fmtcsub) this%input_mempath
383 this%ibound => ibound
386 call obs_cr(this%obs, this%inobspkg)
389 call this%source_options()
392 call this%source_dimensions()
395 call this%obs%obs_ar()
403 call this%csub_allocate_arrays()
406 call this%csub_source_griddata()
412 do node = 1, this%dis%nodes
413 call this%dis%noder_to_string(node, cellid)
414 cg_ske_cr = this%cg_ske_cr(node)
415 theta = this%cg_thetaini(node)
418 if (cg_ske_cr < dzero)
then
419 write (
errmsg,
'(a,g0,a,1x,a,1x,a,a)') &
420 'Coarse-grained material CG_SKE_CR (', cg_ske_cr,
') is less', &
421 'than zero in cell', trim(adjustl(cellid)),
'.'
425 if (this%stoss(node) /= dzero)
then
430 if (theta > done .or. theta < dzero)
then
431 write (
errmsg,
'(a,g0,a,1x,a,1x,a,a)') &
432 'Coarse-grained material THETA (', theta,
') is less', &
433 'than zero or greater than 1 in cell', trim(adjustl(cellid)),
'.'
439 if (istoerr /= 0)
then
440 write (
errmsg,
'(a,3(1x,a))') &
441 'Specific storage values in the storage (STO) package must', &
442 'be zero in all active cells when using the', &
443 trim(adjustl(this%packName)), &
449 if (this%ninterbeds > 0)
then
450 call this%csub_source_packagedata()
454 call this%csub_initialize_tables()
457 do node = 1, this%dis%nodes
458 top = this%dis%top(node)
459 bot = this%dis%bot(node)
460 this%cg_thickini(node) = top - bot
461 this%cell_thick(node) = top - bot
465 do ib = 1, this%ninterbeds
466 node = this%nodelist(ib)
467 idelay = this%idelay(ib)
468 if (idelay == 0)
then
469 v = this%thickini(ib)
471 v = this%rnb(ib) * this%thickini(ib)
473 this%cg_thickini(node) = this%cg_thickini(node) - v
477 do node = 1, this%dis%nodes
478 thick = this%cg_thickini(node)
479 if (thick < dzero)
then
480 call this%dis%noder_to_string(node, cellid)
481 write (
errmsg,
'(a,g0,a,1x,a,a)') &
482 'Aquifer thickness is less than zero (', &
483 thick,
') in cell', trim(adjustl(cellid)),
'.'
496 if (this%iupdatematprop /= 0)
then
497 do node = 1, this%dis%nodes
498 this%cg_thick(node) = this%cg_thickini(node)
499 this%cg_theta(node) = this%cg_thetaini(node)
521 integer(I4B),
pointer :: ibs
522 integer(I4B) :: inobs
523 character(len=LINELENGTH) :: csv_interbed, csv_coarse
524 character(len=LINELENGTH) :: cmp_fn, ecmp_fn, iecmp_fn, ibcmp_fn, cmpcoarse_fn
525 character(len=LINELENGTH) :: zdisp_fn, pkg_converge_fn
527 logical(LGP) :: warn_estress_lag = .false.
534 call mem_set_value(this%inamedbound,
'BOUNDNAMES', this%input_mempath, &
536 call mem_set_value(this%iprpak,
'PRINT_INPUT', this%input_mempath, &
538 call mem_set_value(this%ipakcb,
'SAVE_FLOWS', this%input_mempath, &
540 call mem_set_value(this%gammaw,
'GAMMAW', this%input_mempath, found%gammaw)
541 call mem_set_value(this%beta,
'BETA', this%input_mempath, found%beta)
542 call mem_set_value(this%ipch,
'HEAD_BASED', this%input_mempath, &
544 call mem_set_value(this%ipch,
'PRECON_HEAD', this%input_mempath, &
546 call mem_set_value(this%ndelaycells,
'NDELAYCELLS', this%input_mempath, &
548 call mem_set_value(this%istoragec,
'ICOMPRESS', this%input_mempath, &
550 call mem_set_value(this%iupdatematprop,
'MATPROP', this%input_mempath, &
552 call mem_set_value(this%icellf,
'CELL_FRACTION', this%input_mempath, &
554 call mem_set_value(ibs,
'INTERBED_STATE', this%input_mempath, &
555 found%interbed_state)
556 call mem_set_value(this%ispecified_pcs,
'PRECON_STRESS', this%input_mempath, &
558 call mem_set_value(this%ispecified_dbh,
'DELAY_HEAD', this%input_mempath, &
560 call mem_set_value(this%ieslag,
'STRESS_LAG', this%input_mempath, &
562 call mem_set_value(csv_interbed,
'INTERBEDSTRAINFN', this%input_mempath, &
563 found%interbedstrainfn)
564 call mem_set_value(csv_coarse,
'COARSESTRAINFN', this%input_mempath, &
565 found%coarsestrainfn)
566 call mem_set_value(cmp_fn,
'CMPFN', this%input_mempath, found%cmpfn)
567 call mem_set_value(ecmp_fn,
'ELASTICCMPFN', this%input_mempath, &
569 call mem_set_value(iecmp_fn,
'INELASTICCMPFN', this%input_mempath, &
570 found%inelasticcmpfn)
571 call mem_set_value(ibcmp_fn,
'INTERBEDCMPFN', this%input_mempath, &
573 call mem_set_value(cmpcoarse_fn,
'CMPCOARSEFN', this%input_mempath, &
575 call mem_set_value(zdisp_fn,
'ZDISPFN', this%input_mempath, found%zdispfn)
576 call mem_set_value(pkg_converge_fn,
'PKGCONVERGEFN', this%input_mempath, &
580 if (
filein_fname(this%obs%inputFilename,
'OBS6_FILENAME', &
581 this%input_mempath, this%input_fname))
then
582 this%obs%active = .true.
584 call openfile(inobs, this%iout, this%obs%inputFilename,
'OBS')
585 this%obs%inUnitObs = inobs
586 this%inobspkg = inobs
587 call this%obs%obs_df(this%iout, this%packName, this%filtyp, this%dis)
588 call this%csub_df_obs()
592 if (found%save_flows) this%ipakcb = -1
593 if (found%head_based)
then
594 this%lhead_based = .true.
595 if (this%ieslag /= 0)
then
597 warn_estress_lag = .true.
600 if (found%icompress) this%istoragec = 0
601 if (found%interbed_state)
then
602 this%ispecified_pcs = 1
603 this%ispecified_dbh = 1
605 if (found%gammaw .or. found%beta)
then
606 this%brg = this%gammaw * this%beta
610 if (found%interbedstrainfn)
then
612 call openfile(this%istrainib, this%iout, csv_interbed,
'CSV_OUTPUT', &
613 filstat_opt=
'REPLACE', mode_opt=
mnormal)
615 if (found%coarsestrainfn)
then
617 call openfile(this%istrainsk, this%iout, csv_coarse,
'CSV_OUTPUT', &
618 filstat_opt=
'REPLACE', mode_opt=
mnormal)
620 if (found%cmpfn)
then
622 call openfile(this%ioutcomp, this%iout, cmp_fn,
'DATA(BINARY)', &
625 if (found%elasticcmpfn)
then
627 call openfile(this%ioutcompe, this%iout, ecmp_fn, &
631 if (found%inelasticcmpfn)
then
633 call openfile(this%ioutcompi, this%iout, iecmp_fn, &
637 if (found%interbedcmpfn)
then
639 call openfile(this%ioutcompib, this%iout, ibcmp_fn, &
643 if (found%cmpcoarsefn)
then
645 call openfile(this%ioutcomps, this%iout, cmpcoarse_fn, &
649 if (found%zdispfn)
then
651 call openfile(this%ioutzdisp, this%iout, zdisp_fn, &
655 if (found%pkgconvergefn)
then
657 call openfile(this%ipakcsv, this%iout, pkg_converge_fn,
'CSV', &
658 filstat_opt=
'REPLACE', mode_opt=
mnormal)
662 call this%log_options(warn_estress_lag)
677 logical(LGP),
intent(in) :: warn_estress_lag
680 character(len=*),
parameter :: fmtts = &
681 &
"(4x,'TIME-SERIES DATA WILL BE READ FROM FILE: ',a)"
682 character(len=*),
parameter :: fmtflow = &
683 &
"(4x,'FLOWS WILL BE SAVED TO FILE: ',a,/4x,'OPENED ON UNIT: ',I7)"
684 character(len=*),
parameter :: fmtflow2 = &
685 &
"(4x,'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL')"
686 character(len=*),
parameter :: fmtssessv = &
687 &
"(4x,'USING SSE AND SSV INSTEAD OF CR AND CC.')"
688 character(len=*),
parameter :: fmtoffset = &
689 &
"(4x,'INITIAL_STRESS TREATED AS AN OFFSET.')"
690 character(len=*),
parameter :: fmtopt = &
692 character(len=*),
parameter :: fmtopti = &
694 character(len=*),
parameter :: fmtoptr = &
696 character(len=*),
parameter :: fmtfileout = &
697 "(4x,'CSUB ',1x,a,1x,' WILL BE SAVED TO FILE: ',a,/4x,&
698 &'OPENED ON UNIT: ',I7)"
701 write (this%iout,
'(//2(1X,A))') trim(adjustl(this%packName)), &
703 write (this%iout, fmtopti)
'NUMBER OF DELAY CELLS =', &
705 if (this%lhead_based .EQV. .true.)
then
706 write (this%iout,
'(4x,a)') &
707 'HEAD-BASED FORMULATION'
709 write (this%iout,
'(4x,a)') &
710 'EFFECTIVE-STRESS FORMULATION'
712 if (this%istoragec == 0)
then
713 write (this%iout,
'(4x,a,1(/,6x,a))') &
714 'COMPRESSION INDICES WILL BE SPECIFIED INSTEAD OF ELASTIC AND', &
715 'INELASTIC SPECIFIC STORAGE COEFFICIENTS'
717 write (this%iout,
'(4x,a,1(/,6x,a))') &
718 'ELASTIC AND INELASTIC SPECIFIC STORAGE COEFFICIENTS WILL BE ', &
721 if (this%iupdatematprop /= 1)
then
722 write (this%iout,
'(4x,a,1(/,6x,a))') &
723 'THICKNESS AND VOID RATIO WILL NOT BE ADJUSTED DURING THE', &
726 write (this%iout,
'(4x,a)') &
727 'THICKNESS AND VOID RATIO WILL BE ADJUSTED DURING THE SIMULATION'
729 if (this%icellf /= 1)
then
730 write (this%iout,
'(4x,a)') &
731 'INTERBED THICKNESS WILL BE SPECIFIED AS A THICKNESS'
733 write (this%iout,
'(4x,a,1(/,6x,a))') &
734 'INTERBED THICKNESS WILL BE SPECIFIED AS A AS A CELL FRACTION'
736 if (this%ispecified_pcs /= 1)
then
737 if (this%ipch /= 0)
then
738 write (this%iout,
'(4x,a,1(/,6x,a))') &
739 'PRECONSOLIDATION HEAD WILL BE SPECIFIED RELATIVE TO INITIAL', &
742 write (this%iout,
'(4x,a,1(/,6x,a))') &
743 'PRECONSOLIDATION STRESS WILL BE SPECIFIED RELATIVE TO INITIAL', &
747 if (this%ipch /= 0)
then
748 write (this%iout,
'(4x,a,1(/,6x,a))') &
749 'PRECONSOLIDATION HEAD WILL BE SPECIFIED AS ABSOLUTE VALUES', &
750 'INSTEAD OF RELATIVE TO INITIAL HEAD CONDITIONS'
752 write (this%iout,
'(4x,a,1(/,6x,a))') &
753 'PRECONSOLIDATION STRESS WILL BE SPECIFIED AS ABSOLUTE VALUES', &
754 'INSTEAD OF RELATIVE TO INITIAL STRESS CONDITIONS'
757 if (this%ispecified_dbh /= 1)
then
758 write (this%iout,
'(4x,a,1(/,6x,a))') &
759 'DELAY INTERBED HEADS WILL BE SPECIFIED RELATIVE TO INITIAL ', &
762 write (this%iout,
'(4x,a,1(/,6x,a))') &
763 'DELAY INTERBED HEADS WILL BE SPECIFIED AS ABSOLUTE VALUES INSTEAD', &
764 'OF RELATIVE TO INITIAL GWF HEADS'
767 if (this%lhead_based .EQV. .false.)
then
768 if (this%ieslag /= 0)
then
769 write (this%iout,
'(4x,a,1(/,6x,a))') &
770 'SPECIFIC STORAGE VALUES WILL BE CALCULATED USING THE EFFECTIVE', &
771 'STRESS FROM THE PREVIOUS TIME STEP'
773 write (this%iout,
'(4x,a,1(/,6x,a))') &
774 'SPECIFIC STORAGE VALUES WILL BE CALCULATED USING THE CURRENT', &
777 else if (warn_estress_lag)
then
778 write (this%iout,
'(4x,a,2(/,6x,a))') &
779 'EFFECTIVE_STRESS_LAG HAS BEEN SPECIFIED BUT HAS NO EFFECT WHEN', &
780 'USING THE HEAD-BASED FORMULATION (HEAD_BASED HAS BEEN SPECIFIED', &
781 'IN THE OPTIONS BLOCK)'
784 write (this%iout, fmtoptr)
'GAMMAW =', this%gammaw
785 write (this%iout, fmtoptr)
'BETA =', this%beta
786 write (this%iout, fmtoptr)
'GAMMAW * BETA =', this%brg
787 write (this%iout,
'((1X,A))')
'END PACKAGE SETTINGS'
809 call mem_set_value(this%ninterbeds,
'NINTERBEDS', this%input_mempath, &
811 call mem_set_value(this%maxsig0,
'MAXBOUND', this%input_mempath, &
815 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%packName))// &
817 write (this%iout,
'(4x,a,i0)')
'NINTERBEDS = ', this%ninterbeds
818 write (this%iout,
'(4x,a,i0)')
'MAXSIG0 = ', this%maxsig0
819 write (this%iout,
'(1x,a)') &
820 'END OF '//trim(adjustl(this%packName))//
' DIMENSIONS'
823 if (.not. found%ninterbeds)
then
825 'NINTERBEDS is a required dimension.'
832 call this%define_listlabel()
848 call this%NumericalPackageType%allocate_scalars()
855 call mem_allocate(this%istounit,
'ISTOUNIT', this%memoryPath)
856 call mem_allocate(this%inobspkg,
'INOBSPKG', this%memoryPath)
857 call mem_allocate(this%ninterbeds,
'NINTERBEDS', this%memoryPath)
858 call mem_allocate(this%maxsig0,
'MAXSIG0', this%memoryPath)
859 call mem_allocate(this%nbound,
'NBOUND', this%memoryPath)
860 call mem_allocate(this%iscloc,
'ISCLOC', this%memoryPath)
861 call mem_allocate(this%iauxmultcol,
'IAUXMULTCOL', this%memoryPath)
862 call mem_allocate(this%ndelaycells,
'NDELAYCELLS', this%memoryPath)
863 call mem_allocate(this%ndelaybeds,
'NDELAYBEDS', this%memoryPath)
864 call mem_allocate(this%initialized,
'INITIALIZED', this%memoryPath)
865 call mem_allocate(this%ieslag,
'IESLAG', this%memoryPath)
867 call mem_allocate(this%lhead_based,
'LHEAD_BASED', this%memoryPath)
868 call mem_allocate(this%iupdatestress,
'IUPDATESTRESS', this%memoryPath)
869 call mem_allocate(this%ispecified_pcs,
'ISPECIFIED_PCS', this%memoryPath)
870 call mem_allocate(this%ispecified_dbh,
'ISPECIFIED_DBH', this%memoryPath)
871 call mem_allocate(this%inamedbound,
'INAMEDBOUND', this%memoryPath)
872 call mem_allocate(this%iconvchk,
'ICONVCHK', this%memoryPath)
874 call mem_allocate(this%istoragec,
'ISTORAGEC', this%memoryPath)
875 call mem_allocate(this%istrainib,
'ISTRAINIB', this%memoryPath)
876 call mem_allocate(this%istrainsk,
'ISTRAINSK', this%memoryPath)
877 call mem_allocate(this%ioutcomp,
'IOUTCOMP', this%memoryPath)
878 call mem_allocate(this%ioutcompi,
'IOUTCOMPI', this%memoryPath)
879 call mem_allocate(this%ioutcompe,
'IOUTCOMPE', this%memoryPath)
880 call mem_allocate(this%ioutcompib,
'IOUTCOMPIB', this%memoryPath)
881 call mem_allocate(this%ioutcomps,
'IOUTCOMPS', this%memoryPath)
882 call mem_allocate(this%ioutzdisp,
'IOUTZDISP', this%memoryPath)
883 call mem_allocate(this%ipakcsv,
'IPAKCSV', this%memoryPath)
884 call mem_allocate(this%iupdatematprop,
'IUPDATEMATPROP', this%memoryPath)
885 call mem_allocate(this%epsilon,
'EPSILON', this%memoryPath)
886 call mem_allocate(this%cc_crit,
'CC_CRIT', this%memoryPath)
887 call mem_allocate(this%gammaw,
'GAMMAW', this%memoryPath)
890 call mem_allocate(this%satomega,
'SATOMEGA', this%memoryPath)
891 call mem_allocate(this%icellf,
'ICELLF', this%memoryPath)
892 call mem_allocate(this%gwfiss0,
'GWFISS0', this%memoryPath)
905 this%ndelaycells = 19
910 this%lhead_based = .false.
911 this%iupdatestress = 1
912 this%ispecified_pcs = 0
913 this%ispecified_dbh = 0
927 this%iupdatematprop = 0
931 this%beta = 4.6512e-10_dp
932 this%brg = this%gammaw * this%beta
935 if (this%inewton /= 0)
then
939 this%satomega =
dzero
959 integer(I4B) :: iblen
963 if (this%ioutcomp == 0 .and. this%ioutcompi == 0 .and. &
964 this%ioutcompe == 0 .and. this%ioutcompib == 0 .and. &
965 this%ioutcomps == 0 .and. this%ioutzdisp == 0)
then
966 call mem_allocate(this%buff, 1,
'BUFF', trim(this%memoryPath))
968 call mem_allocate(this%buff, this%dis%nodes,
'BUFF', trim(this%memoryPath))
970 if (this%ioutcomp == 0 .and. this%ioutzdisp == 0)
then
971 call mem_allocate(this%buffusr, 1,
'BUFFUSR', trim(this%memoryPath))
973 call mem_allocate(this%buffusr, this%dis%nodesuser,
'BUFFUSR', &
974 trim(this%memoryPath))
976 call mem_allocate(this%sgm, this%dis%nodes,
'SGM', trim(this%memoryPath))
977 call mem_allocate(this%sgs, this%dis%nodes,
'SGS', trim(this%memoryPath))
978 call mem_allocate(this%cg_ske_cr, this%dis%nodes,
'CG_SKE_CR', &
979 trim(this%memoryPath))
980 call mem_allocate(this%cg_es, this%dis%nodes,
'CG_ES', &
981 trim(this%memoryPath))
982 call mem_allocate(this%cg_es0, this%dis%nodes,
'CG_ES0', &
983 trim(this%memoryPath))
984 call mem_allocate(this%cg_pcs, this%dis%nodes,
'CG_PCS', &
985 trim(this%memoryPath))
986 call mem_allocate(this%cg_comp, this%dis%nodes,
'CG_COMP', &
987 trim(this%memoryPath))
988 call mem_allocate(this%cg_tcomp, this%dis%nodes,
'CG_TCOMP', &
989 trim(this%memoryPath))
990 call mem_allocate(this%cg_stor, this%dis%nodes,
'CG_STOR', &
991 trim(this%memoryPath))
992 call mem_allocate(this%cg_ske, this%dis%nodes,
'CG_SKE', &
993 trim(this%memoryPath))
994 call mem_allocate(this%cg_sk, this%dis%nodes,
'CG_SK', &
995 trim(this%memoryPath))
996 call mem_allocate(this%cg_thickini, this%dis%nodes,
'CG_THICKINI', &
997 trim(this%memoryPath))
998 call mem_allocate(this%cg_thetaini, this%dis%nodes,
'CG_THETAINI', &
999 trim(this%memoryPath))
1000 if (this%iupdatematprop == 0)
then
1001 call mem_setptr(this%cg_thick,
'CG_THICKINI', trim(this%memoryPath))
1002 call mem_setptr(this%cg_thick0,
'CG_THICKINI', trim(this%memoryPath))
1003 call mem_setptr(this%cg_theta,
'CG_THETAINI', trim(this%memoryPath))
1004 call mem_setptr(this%cg_theta0,
'CG_THETAINI', trim(this%memoryPath))
1006 call mem_allocate(this%cg_thick, this%dis%nodes,
'CG_THICK', &
1007 trim(this%memoryPath))
1008 call mem_allocate(this%cg_thick0, this%dis%nodes,
'CG_THICK0', &
1009 trim(this%memoryPath))
1010 call mem_allocate(this%cg_theta, this%dis%nodes,
'CG_THETA', &
1011 trim(this%memoryPath))
1012 call mem_allocate(this%cg_theta0, this%dis%nodes,
'CG_THETA0', &
1013 trim(this%memoryPath))
1017 call mem_allocate(this%cell_wcstor, this%dis%nodes,
'CELL_WCSTOR', &
1018 trim(this%memoryPath))
1019 call mem_allocate(this%cell_thick, this%dis%nodes,
'CELL_THICK', &
1020 trim(this%memoryPath))
1024 if (this%ninterbeds > 0)
then
1025 iblen = this%ninterbeds
1028 if (this%naux > 0)
then
1031 call mem_allocate(this%auxvar, naux, iblen,
'AUXVAR', this%memoryPath)
1034 this%auxvar(j, n) =
dzero
1037 call mem_allocate(this%unodelist, iblen,
'UNODELIST', trim(this%memoryPath))
1038 call mem_allocate(this%nodelist, iblen,
'NODELIST', trim(this%memoryPath))
1039 call mem_allocate(this%cg_gs, this%dis%nodes,
'CG_GS', trim(this%memoryPath))
1040 call mem_allocate(this%pcs, iblen,
'PCS', trim(this%memoryPath))
1041 call mem_allocate(this%rnb, iblen,
'RNB', trim(this%memoryPath))
1042 call mem_allocate(this%kv, iblen,
'KV', trim(this%memoryPath))
1043 call mem_allocate(this%h0, iblen,
'H0', trim(this%memoryPath))
1044 call mem_allocate(this%ci, iblen,
'CI', trim(this%memoryPath))
1045 call mem_allocate(this%rci, iblen,
'RCI', trim(this%memoryPath))
1046 call mem_allocate(this%idelay, iblen,
'IDELAY', trim(this%memoryPath))
1047 call mem_allocate(this%ielastic, iblen,
'IELASTIC', trim(this%memoryPath))
1048 call mem_allocate(this%iconvert, iblen,
'ICONVERT', trim(this%memoryPath))
1049 call mem_allocate(this%comp, iblen,
'COMP', trim(this%memoryPath))
1050 call mem_allocate(this%tcomp, iblen,
'TCOMP', trim(this%memoryPath))
1051 call mem_allocate(this%tcompi, iblen,
'TCOMPI', trim(this%memoryPath))
1052 call mem_allocate(this%tcompe, iblen,
'TCOMPE', trim(this%memoryPath))
1053 call mem_allocate(this%storagee, iblen,
'STORAGEE', trim(this%memoryPath))
1054 call mem_allocate(this%storagei, iblen,
'STORAGEI', trim(this%memoryPath))
1055 call mem_allocate(this%ske, iblen,
'SKE', trim(this%memoryPath))
1056 call mem_allocate(this%sk, iblen,
'SK', trim(this%memoryPath))
1057 call mem_allocate(this%thickini, iblen,
'THICKINI', trim(this%memoryPath))
1058 call mem_allocate(this%thetaini, iblen,
'THETAINI', trim(this%memoryPath))
1059 if (this%iupdatematprop == 0)
then
1060 call mem_setptr(this%thick,
'THICKINI', trim(this%memoryPath))
1061 call mem_setptr(this%thick0,
'THICKINI', trim(this%memoryPath))
1062 call mem_setptr(this%theta,
'THETAINI', trim(this%memoryPath))
1063 call mem_setptr(this%theta0,
'THETAINI', trim(this%memoryPath))
1065 call mem_allocate(this%thick, iblen,
'THICK', trim(this%memoryPath))
1066 call mem_allocate(this%thick0, iblen,
'THICK0', trim(this%memoryPath))
1067 call mem_allocate(this%theta, iblen,
'THETA', trim(this%memoryPath))
1068 call mem_allocate(this%theta0, iblen,
'THETA0', trim(this%memoryPath))
1075 if (this%inamedbound /= 0)
then
1077 'BOUNDNAME', trim(this%memoryPath))
1080 'BOUNDNAME', trim(this%memoryPath))
1085 call mem_allocate(this%nodelistsig0, this%maxsig0,
'NODELISTSIG0', &
1089 call mem_setptr(this%sig0,
'SIG0', this%input_mempath)
1090 call mem_checkin(this%sig0,
'SIG0', this%memoryPath, &
1091 'SIG0', this%input_mempath)
1094 call mem_setptr(this%gwfiss,
'ISS', trim(this%name_model))
1097 call mem_setptr(this%stoiconv,
'ICONVERT', this%stoMemPath)
1098 call mem_setptr(this%stoss,
'SS', this%stoMemPath)
1101 do n = 1, this%dis%nodes
1102 this%cg_gs(n) =
dzero
1103 this%cg_es(n) =
dzero
1104 this%cg_comp(n) =
dzero
1105 this%cg_tcomp(n) =
dzero
1106 this%cell_wcstor(n) =
dzero
1108 do n = 1, this%ninterbeds
1109 this%theta(n) =
dzero
1110 this%tcomp(n) =
dzero
1111 this%tcompi(n) =
dzero
1112 this%tcompe(n) =
dzero
1114 do n = 1, this%maxsig0
1115 this%nodelistsig0(n) = 0
1128 integer(I4B) :: node
1130 integer(I4B),
dimension(:),
pointer,
contiguous :: map
1134 if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser
1137 call mem_set_value(this%cg_ske_cr,
'CG_SKE_CR', this%input_mempath, &
1138 map, found%cg_ske_cr)
1139 call mem_set_value(this%cg_thetaini,
'CG_THETA', this%input_mempath, &
1140 map, found%cg_theta)
1141 call mem_set_value(this%sgm,
'SGM', this%input_mempath, map, found%sgm)
1142 call mem_set_value(this%sgs,
'SGS', this%input_mempath, map, found%sgs)
1145 if (.not. found%cg_ske_cr)
then
1146 call store_error(
'CG_SKE GRIDDATA must be specified.')
1149 if (.not. found%cg_theta)
then
1150 call store_error(
'CG_THETA GRIDDATA must be specified.')
1155 if (.not. found%sgm)
then
1156 do node = 1, this%dis%nodes
1157 this%sgm(node) = 1.7d0
1160 if (.not. found%sgs)
then
1161 do node = 1, this%dis%nodes
1162 this%sgs(node) = 2.0d0
1180 integer(I4B),
dimension(:),
pointer,
contiguous :: icsubno
1181 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid_pkgdata
1182 integer(I4B),
dimension(:),
pointer :: cellid
1184 contiguous :: cdelay
1186 contiguous :: boundname
1187 real(DP),
dimension(:),
pointer,
contiguous :: pcs, thick_frac, rnb
1188 real(DP),
dimension(:),
pointer,
contiguous :: ssv_cc, sse_cr, theta, kv, h0
1189 character(len=LINELENGTH) :: cdelaystr
1190 character(len=LENBOUNDNAME) :: bndname
1191 real(DP) :: top, botm, baq, q, thick, rval
1192 integer(I4B) :: idelay, ndelaybeds, csubno
1193 integer(I4B) :: ib, n, nodeu, noder
1196 call mem_setptr(icsubno,
'ICSUBNO', this%input_mempath)
1197 call mem_setptr(cellid_pkgdata,
'CELLID_PKGDATA', this%input_mempath)
1198 call mem_setptr(cdelay,
'CDELAY', this%input_mempath)
1199 call mem_setptr(pcs,
'PCS0', this%input_mempath)
1200 call mem_setptr(thick_frac,
'THICK_FRAC', this%input_mempath)
1201 call mem_setptr(rnb,
'RNB', this%input_mempath)
1202 call mem_setptr(ssv_cc,
'SSV_CC', this%input_mempath)
1203 call mem_setptr(sse_cr,
'SSE_CR', this%input_mempath)
1204 call mem_setptr(theta,
'THETA', this%input_mempath)
1205 call mem_setptr(kv,
'KV', this%input_mempath)
1206 call mem_setptr(h0,
'H0', this%input_mempath)
1207 call mem_setptr(boundname,
'BOUNDNAME', this%input_mempath)
1213 do n = 1,
size(icsubno)
1219 if (csubno < 1 .or. csubno > this%ninterbeds)
then
1220 write (
errmsg,
'(a,1x,i0,2(1x,a),1x,i0,a)') &
1221 'Interbed number (', csubno,
') must be greater than 0 and ', &
1222 'less than or equal to', this%ninterbeds,
'.'
1228 cellid => cellid_pkgdata(:, n)
1231 if (this%dis%ndim == 1)
then
1233 elseif (this%dis%ndim == 2)
then
1234 nodeu =
get_node(cellid(1), 1, cellid(2), &
1235 this%dis%mshape(1), 1, &
1238 nodeu =
get_node(cellid(1), cellid(2), cellid(3), &
1239 this%dis%mshape(1), &
1240 this%dis%mshape(2), &
1245 noder = this%dis%get_nodenumber(nodeu, 1)
1246 if (noder <= 0)
then
1251 this%nodelist(csubno) = noder
1252 this%unodelist(csubno) = nodeu
1255 top = this%dis%top(noder)
1256 botm = this%dis%bot(noder)
1260 cdelaystr = cdelay(n)
1261 select case (cdelaystr)
1265 ndelaybeds = ndelaybeds + 1
1268 write (
errmsg,
'(a,1x,a,1x,i0,1x,a)') &
1269 'Invalid CDELAY ', trim(adjustl(cdelaystr)), &
1270 'for packagedata entry', csubno,
'.'
1274 this%idelay(csubno) = idelay
1277 this%pcs(csubno) = pcs(n)
1280 if (this%icellf == 0)
then
1281 if (thick_frac(n) <
dzero .or. thick_frac(n) > baq)
then
1282 write (
errmsg,
'(a,g0,2(a,1x),g0,1x,a,1x,i0,a)') &
1283 'THICK (', thick_frac(n),
') MUST BE greater than or equal to 0 ', &
1284 'and less than or equal to than', baq, &
1285 'for packagedata entry', csubno,
'.'
1288 thick = thick_frac(n)
1290 if (thick_frac(n) <
dzero .or. thick_frac(n) >
done)
then
1291 write (
errmsg,
'(a,1x,a,1x,i0,a)') &
1292 'FRAC MUST BE greater than 0 and less than or equal to 1', &
1293 'for packagedata entry', csubno,
'.'
1296 thick = thick_frac(n) * baq
1298 this%thickini(csubno) = thick
1299 if (this%iupdatematprop /= 0)
then
1300 this%thick(csubno) = thick
1304 if (idelay > 0)
then
1305 if (rnb(n) <
done)
then
1306 write (
errmsg,
'(a,g0,a,1x,a,1x,i0,a)') &
1307 'RNB (', rnb(n),
') must be greater than or equal to 1', &
1308 'for packagedata entry', csubno,
'.'
1311 this%rnb(csubno) = rnb(n)
1313 this%rnb(csubno) =
done
1317 if (ssv_cc(n) <
dzero)
then
1318 write (
errmsg,
'(2(a,1x),i0,a)') &
1319 '(SKV,CI) must be greater than or equal to 0', &
1320 'for packagedata entry', csubno,
'.'
1323 this%ci(csubno) = ssv_cc(n)
1326 if (sse_cr(n) <
dzero)
then
1327 write (
errmsg,
'(2(a,1x),i0,a)') &
1328 '(SKE,RCI) must be greater than or equal to 0', &
1329 'for packagedata entry', csubno,
'.'
1332 this%rci(csubno) = sse_cr(n)
1335 if (this%ci(csubno) == this%rci(csubno))
then
1336 this%ielastic(csubno) = 1
1338 this%ielastic(csubno) = 0
1342 if (theta(n) <=
dzero .or. theta(n) >
done)
then
1343 write (
errmsg,
'(a,1x,a,1x,i0,a)') &
1344 'THETA must be greater than 0 and less than or equal to 1', &
1345 'for packagedata entry', csubno,
'.'
1348 this%thetaini(csubno) = theta(n)
1349 if (this%iupdatematprop /= 0)
then
1350 this%theta(csubno) = theta(n)
1354 if (idelay > 0)
then
1355 if (kv(n) <= 0.0)
then
1356 write (
errmsg,
'(a,1x,i0,a)') &
1357 'KV must be greater than 0 for packagedata entry', csubno,
'.'
1361 this%kv(csubno) = kv(n)
1364 this%h0(csubno) = h0(n)
1367 if (this%inamedbound /= 0)
then
1368 bndname = boundname(n)
1369 if (len_trim(bndname) < 1)
then
1370 write (
errmsg,
'(a,1x,i0,a)') &
1371 'BOUNDNAME must be specified for packagedata entry', csubno,
'.'
1374 this%boundname(csubno) = bndname
1380 this%ndelaybeds = ndelaybeds
1383 if (ndelaybeds > 0)
then
1387 'IDB_NCONV_COUNT', trim(this%memoryPath))
1388 call mem_allocate(this%idbconvert, this%ndelaycells, ndelaybeds, &
1389 'IDBCONVERT', trim(this%memoryPath))
1391 'DBDHMAX', trim(this%memoryPath))
1392 call mem_allocate(this%dbz, this%ndelaycells, ndelaybeds, &
1393 'DBZ', trim(this%memoryPath))
1394 call mem_allocate(this%dbrelz, this%ndelaycells, ndelaybeds, &
1395 'DBRELZ', trim(this%memoryPath))
1396 call mem_allocate(this%dbh, this%ndelaycells, ndelaybeds, &
1397 'DBH', trim(this%memoryPath))
1398 call mem_allocate(this%dbh0, this%ndelaycells, ndelaybeds, &
1399 'DBH0', trim(this%memoryPath))
1400 call mem_allocate(this%dbgeo, this%ndelaycells, ndelaybeds, &
1401 'DBGEO', trim(this%memoryPath))
1402 call mem_allocate(this%dbes, this%ndelaycells, ndelaybeds, &
1403 'DBES', trim(this%memoryPath))
1404 call mem_allocate(this%dbes0, this%ndelaycells, ndelaybeds, &
1405 'DBES0', trim(this%memoryPath))
1406 call mem_allocate(this%dbpcs, this%ndelaycells, ndelaybeds, &
1407 'DBPCS', trim(this%memoryPath))
1409 'DBFLOWTOP', trim(this%memoryPath))
1411 'DBFLOWBOT', trim(this%memoryPath))
1412 call mem_allocate(this%dbdzini, this%ndelaycells, ndelaybeds, &
1413 'DBDZINI', trim(this%memoryPath))
1414 call mem_allocate(this%dbthetaini, this%ndelaycells, ndelaybeds, &
1415 'DBTHETAINI', trim(this%memoryPath))
1416 call mem_allocate(this%dbcomp, this%ndelaycells, ndelaybeds, &
1417 'DBCOMP', trim(this%memoryPath))
1418 call mem_allocate(this%dbtcomp, this%ndelaycells, ndelaybeds, &
1419 'DBTCOMP', trim(this%memoryPath))
1422 if (this%iupdatematprop == 0)
then
1423 call mem_setptr(this%dbdz,
'DBDZINI', trim(this%memoryPath))
1424 call mem_setptr(this%dbdz0,
'DBDZINI', trim(this%memoryPath))
1425 call mem_setptr(this%dbtheta,
'DBTHETAINI', trim(this%memoryPath))
1426 call mem_setptr(this%dbtheta0,
'DBTHETAINI', trim(this%memoryPath))
1428 call mem_allocate(this%dbdz, this%ndelaycells, ndelaybeds, &
1429 'DBDZ', trim(this%memoryPath))
1430 call mem_allocate(this%dbdz0, this%ndelaycells, ndelaybeds, &
1431 'DBDZ0', trim(this%memoryPath))
1432 call mem_allocate(this%dbtheta, this%ndelaycells, ndelaybeds, &
1433 'DBTHETA', trim(this%memoryPath))
1434 call mem_allocate(this%dbtheta0, this%ndelaycells, ndelaybeds, &
1435 'DBTHETA0', trim(this%memoryPath))
1440 'DBAL', trim(this%memoryPath))
1442 'DBAD', trim(this%memoryPath))
1444 'DBAU', trim(this%memoryPath))
1446 'DBRHS', trim(this%memoryPath))
1448 'DBDH', trim(this%memoryPath))
1450 'DBAW', trim(this%memoryPath))
1454 this%idb_nconv_count(n) = 0
1458 do ib = 1, this%ninterbeds
1459 idelay = this%idelay(ib)
1460 if (idelay == 0)
then
1465 do n = 1, this%ndelaycells
1466 rval = this%thickini(ib) / real(this%ndelaycells, dp)
1467 this%dbdzini(n, idelay) = rval
1468 this%dbh(n, idelay) = this%h0(ib)
1469 this%dbh0(n, idelay) = this%h0(ib)
1470 this%dbthetaini(n, idelay) = this%thetaini(ib)
1471 this%dbgeo(n, idelay) =
dzero
1472 this%dbes(n, idelay) =
dzero
1473 this%dbes0(n, idelay) =
dzero
1474 this%dbpcs(n, idelay) = this%pcs(ib)
1475 this%dbcomp(n, idelay) =
dzero
1476 this%dbtcomp(n, idelay) =
dzero
1477 if (this%iupdatematprop /= 0)
then
1478 this%dbdz(n, idelay) = this%dbdzini(n, idelay)
1479 this%dbdz0(n, idelay) = this%dbdzini(n, idelay)
1480 this%dbtheta(n, idelay) = this%theta(ib)
1481 this%dbtheta0(n, idelay) = this%theta(ib)
1486 call this%csub_delay_init_zcell(ib)
1490 do n = 1, this%ndelaycells
1491 this%dbal(n) =
dzero
1492 this%dbad(n) =
dzero
1493 this%dbau(n) =
dzero
1494 this%dbrhs(n) =
dzero
1495 this%dbdh(n) =
dzero
1496 this%dbaw(n) =
dzero
1502 if (ndelaybeds > 0)
then
1503 q = mod(real(this%ndelaycells, dp),
dtwo)
1504 if (q ==
dzero)
then
1505 write (
errmsg,
'(a,i0,a,1x,a)') &
1506 'NDELAYCELLS (', this%ndelaycells,
') must be an', &
1507 'odd number when using the effective stress formulation.'
1524 character(len=LINELENGTH) :: title
1525 character(len=LINELENGTH) :: tag
1526 character(len=LINELENGTH) :: msg
1527 character(len=10) :: ctype
1528 character(len=20) :: cellid
1529 character(len=10) :: cflag
1534 integer(I4B) :: node
1536 integer(I4B) :: idelay
1537 integer(I4B) :: iexceed
1538 integer(I4B),
parameter :: ncells = 20
1539 integer(I4B) :: nlen
1540 integer(I4B) :: ntabrows
1541 integer(I4B) :: ntabcols
1542 integer(I4B) :: ipos
1547 integer(I4B),
dimension(:),
allocatable :: imap_sel
1548 integer(I4B),
dimension(:),
allocatable :: locs
1549 real(DP),
dimension(:),
allocatable :: pctcomp_arr
1552 allocate (locs(this%dis%ndim))
1555 if (this%ninterbeds > 0)
then
1556 nlen = min(ncells, this%ninterbeds)
1557 allocate (imap_sel(nlen))
1558 allocate (pctcomp_arr(this%ninterbeds))
1560 do ib = 1, this%ninterbeds
1561 idelay = this%idelay(ib)
1562 b0 = this%thickini(ib)
1563 strain = this%tcomp(ib) / b0
1565 pctcomp_arr(ib) = pctcomp
1566 if (pctcomp >=
done)
then
1567 iexceed = iexceed + 1
1570 call selectn(imap_sel, pctcomp_arr, reverse=.true.)
1573 i0 = max(1, this%ninterbeds - ncells + 1)
1574 i1 = this%ninterbeds
1576 if (iexceed /= 0)
then
1577 write (msg,
'(1x,a,1x,i0,1x,a,1x,i0,1x,a)') &
1578 'LARGEST', (i1 - i0 + 1),
'OF', this%ninterbeds, &
1579 'INTERBED STRAIN VALUES SHOWN'
1584 title = trim(adjustl(this%packName))//
' PACKAGE INTERBED STRAIN SUMMARY'
1591 call table_cr(this%outputtab, this%packName, title)
1592 call this%outputtab%table_df(ntabrows, ntabcols, this%iout)
1595 tag =
'INTERBED NUMBER'
1596 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1597 tag =
'INTERBED TYPE'
1598 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1600 call this%outputtab%initialize_column(tag, 20, alignment=
tableft)
1601 tag =
'INITIAL THICKNESS'
1602 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1603 tag =
'FINAL THICKNESS'
1604 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1605 tag =
'TOTAL COMPACTION'
1606 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1607 tag =
'FINAL STRAIN'
1608 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1609 tag =
'PERCENT COMPACTION'
1610 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1612 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1617 idelay = this%idelay(ib)
1618 b0 = this%thickini(ib)
1619 b1 = this%csub_calc_interbed_thickness(ib)
1620 if (idelay == 0)
then
1624 b0 = b0 * this%rnb(ib)
1626 strain = this%tcomp(ib) / b0
1628 if (pctcomp >= 5.0_dp)
then
1630 else if (pctcomp >=
done)
then
1635 node = this%nodelist(ib)
1636 call this%dis%noder_to_string(node, cellid)
1639 call this%outputtab%add_term(ib)
1640 call this%outputtab%add_term(ctype)
1641 call this%outputtab%add_term(cellid)
1642 call this%outputtab%add_term(b0)
1643 call this%outputtab%add_term(b1)
1644 call this%outputtab%add_term(this%tcomp(ib))
1645 call this%outputtab%add_term(strain)
1646 call this%outputtab%add_term(pctcomp)
1647 call this%outputtab%add_term(cflag)
1649 write (this%iout,
'(/1X,A,1X,I0,1X,A,1X,I0,1X,A,/1X,A,/1X,A)') &
1650 'PERCENT COMPACTION IS GREATER THAN OR EQUAL TO 1 PERCENT IN', &
1651 iexceed,
'OF', this%ninterbeds,
'INTERBED(S).', &
1652 'USE THE STRAIN_CSV_INTERBED OPTION TO OUTPUT A CSV '// &
1653 'FILE WITH PERCENT COMPACTION ',
'VALUES FOR ALL INTERBEDS.'
1655 msg =
'PERCENT COMPACTION WAS LESS THAN 1 PERCENT IN ALL INTERBEDS'
1656 write (this%iout,
'(/1X,A)') trim(adjustl(msg))
1660 if (this%istrainib /= 0)
then
1663 ntabrows = this%ninterbeds
1665 if (this%dis%ndim > 1)
then
1666 ntabcols = ntabcols + 1
1668 ntabcols = ntabcols + this%dis%ndim
1671 call table_cr(this%outputtab, this%packName,
'')
1672 call this%outputtab%table_df(ntabrows, ntabcols, this%istrainib, &
1673 lineseparator=.false., separator=
',')
1676 tag =
'INTERBED_NUMBER'
1677 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1678 tag =
'INTERBED_TYPE'
1679 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1681 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1682 if (this%dis%ndim == 2)
then
1684 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1686 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1689 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1691 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1693 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1695 tag =
'INITIAL_THICKNESS'
1696 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1697 tag =
'FINAL_THICKNESS'
1698 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1699 tag =
'TOTAL_COMPACTION'
1700 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1701 tag =
'TOTAL_STRAIN'
1702 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1703 tag =
'PERCENT_COMPACTION'
1704 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1707 do ib = 1, this%ninterbeds
1708 idelay = this%idelay(ib)
1709 b0 = this%thickini(ib)
1710 b1 = this%csub_calc_interbed_thickness(ib)
1711 if (idelay == 0)
then
1715 b0 = b0 * this%rnb(ib)
1717 strain = this%tcomp(ib) / b0
1719 node = this%nodelist(ib)
1720 call this%dis%noder_to_array(node, locs)
1723 call this%outputtab%add_term(ib)
1724 call this%outputtab%add_term(ctype)
1725 if (this%dis%ndim > 1)
then
1726 call this%outputtab%add_term(this%dis%get_nodeuser(node))
1728 do ipos = 1, this%dis%ndim
1729 call this%outputtab%add_term(locs(ipos))
1731 call this%outputtab%add_term(b0)
1732 call this%outputtab%add_term(b1)
1733 call this%outputtab%add_term(this%tcomp(ib))
1734 call this%outputtab%add_term(strain)
1735 call this%outputtab%add_term(pctcomp)
1740 deallocate (imap_sel)
1741 deallocate (pctcomp_arr)
1745 nlen = min(ncells, this%dis%nodes)
1746 allocate (imap_sel(nlen))
1747 allocate (pctcomp_arr(this%dis%nodes))
1749 do node = 1, this%dis%nodes
1751 if (this%cg_thickini(node) >
dzero)
then
1752 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1755 pctcomp_arr(node) = pctcomp
1756 if (pctcomp >=
done)
then
1757 iexceed = iexceed + 1
1760 call selectn(imap_sel, pctcomp_arr, reverse=.true.)
1763 i0 = max(1, this%dis%nodes - ncells + 1)
1766 if (iexceed /= 0)
then
1767 write (msg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1768 'LARGEST ', (i1 - i0 + 1),
'OF', this%dis%nodes, &
1769 'CELL COARSE-GRAINED VALUES SHOWN'
1773 title = trim(adjustl(this%packName))// &
1774 ' PACKAGE COARSE-GRAINED STRAIN SUMMARY'
1781 call table_cr(this%outputtab, this%packName, title)
1782 call this%outputtab%table_df(ntabrows, ntabcols, this%iout)
1786 call this%outputtab%initialize_column(tag, 20, alignment=
tableft)
1787 tag =
'INITIAL THICKNESS'
1788 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1789 tag =
'FINAL THICKNESS'
1790 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1791 tag =
'TOTAL COMPACTION'
1792 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1793 tag =
'FINAL STRAIN'
1794 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1795 tag =
'PERCENT COMPACTION'
1796 call this%outputtab%initialize_column(tag, 12, alignment=
tabcenter)
1798 call this%outputtab%initialize_column(tag, 10, alignment=
tabcenter)
1802 if (this%cg_thickini(node) >
dzero)
then
1803 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1808 if (pctcomp >= 5.0_dp)
then
1810 else if (pctcomp >=
done)
then
1815 call this%dis%noder_to_string(node, cellid)
1818 call this%outputtab%add_term(cellid)
1819 call this%outputtab%add_term(this%cg_thickini(node))
1820 call this%outputtab%add_term(this%cg_thick(node))
1821 call this%outputtab%add_term(this%cg_tcomp(node))
1822 call this%outputtab%add_term(strain)
1823 call this%outputtab%add_term(pctcomp)
1824 call this%outputtab%add_term(cflag)
1826 write (this%iout,
'(/1X,A,1X,I0,1X,A,1X,I0,1X,A,/1X,A,/1X,A)') &
1827 'COARSE-GRAINED STORAGE PERCENT COMPACTION IS GREATER THAN OR '// &
1828 'EQUAL TO 1 PERCENT IN', iexceed,
'OF', this%dis%nodes,
'CELL(S).', &
1829 'USE THE STRAIN_CSV_COARSE OPTION TO OUTPUT A CSV '// &
1830 'FILE WITH PERCENT COMPACTION ',
'VALUES FOR ALL CELLS.'
1832 msg =
'COARSE-GRAINED STORAGE PERCENT COMPACTION WAS LESS THAN '// &
1833 '1 PERCENT IN ALL CELLS '
1834 write (this%iout,
'(/1X,A)') trim(adjustl(msg))
1838 if (this%istrainsk /= 0)
then
1841 ntabrows = this%dis%nodes
1843 if (this%dis%ndim > 1)
then
1844 ntabcols = ntabcols + 1
1846 ntabcols = ntabcols + this%dis%ndim
1849 call table_cr(this%outputtab, this%packName,
'')
1850 call this%outputtab%table_df(ntabrows, ntabcols, this%istrainsk, &
1851 lineseparator=.false., separator=
',')
1855 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1856 if (this%dis%ndim == 2)
then
1858 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1860 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1863 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1865 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1867 call this%outputtab%initialize_column(tag, 10, alignment=
tabright)
1869 tag =
'INITIAL_THICKNESS'
1870 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1871 tag =
'FINAL_THICKNESS'
1872 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1873 tag =
'TOTAL_COMPACTION'
1874 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1875 tag =
'TOTAL_STRAIN'
1876 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1877 tag =
'PERCENT_COMPACTION'
1878 call this%outputtab%initialize_column(tag, 20, alignment=
tabright)
1881 do node = 1, this%dis%nodes
1882 if (this%cg_thickini(node) >
dzero)
then
1883 strain = this%cg_tcomp(node) / this%cg_thickini(node)
1888 call this%dis%noder_to_array(node, locs)
1891 if (this%dis%ndim > 1)
then
1892 call this%outputtab%add_term(this%dis%get_nodeuser(node))
1894 do ipos = 1, this%dis%ndim
1895 call this%outputtab%add_term(locs(ipos))
1897 call this%outputtab%add_term(this%cg_thickini(node))
1898 call this%outputtab%add_term(this%cg_thick(node))
1899 call this%outputtab%add_term(this%cg_tcomp(node))
1900 call this%outputtab%add_term(strain)
1901 call this%outputtab%add_term(pctcomp)
1907 if (this%ndelaybeds > 0)
then
1908 if (this%idb_nconv_count(2) > 0)
then
1909 write (
warnmsg,
'(a,1x,a,1x,i0,1x,a,1x,a)') &
1910 'Delay interbed cell heads were less than the top of the interbed', &
1911 'cell in', this%idb_nconv_count(2),
'interbed cells in ', &
1912 'non-convertible GWF cells for at least one time step during '// &
1919 deallocate (imap_sel)
1921 deallocate (pctcomp_arr)
1936 if (this%inunit > 0)
then
1958 if (this%iupdatematprop == 0)
then
1959 nullify (this%cg_thick)
1960 nullify (this%cg_thick0)
1961 nullify (this%cg_theta)
1962 nullify (this%cg_theta0)
1977 call mem_deallocate(this%boundname,
'BOUNDNAME', this%memoryPath)
1994 if (this%iupdatematprop == 0)
then
1995 nullify (this%thick)
1996 nullify (this%thick0)
1997 nullify (this%theta)
1998 nullify (this%theta0)
2009 if (this%ndelaybeds > 0)
then
2010 if (this%iupdatematprop == 0)
then
2012 nullify (this%dbdz0)
2013 nullify (this%dbtheta)
2014 nullify (this%dbtheta0)
2053 nullify (this%gwfiss)
2056 nullify (this%stoiconv)
2057 nullify (this%stoss)
2060 if (this%iprpak > 0)
then
2061 call this%inputtab%table_da()
2062 deallocate (this%inputtab)
2063 nullify (this%inputtab)
2067 if (
associated(this%outputtab))
then
2068 call this%outputtab%table_da()
2069 deallocate (this%outputtab)
2070 nullify (this%outputtab)
2075 if (this%ipakcsv > 0)
then
2076 call this%pakcsvtab%table_da()
2077 deallocate (this%pakcsvtab)
2078 nullify (this%pakcsvtab)
2082 call mem_deallocate(this%listlabel,
'LISTLABEL', this%memoryPath)
2126 if (this%inunit > 0)
then
2127 call this%obs%obs_da()
2130 deallocate (this%obs)
2136 call this%NumericalPackageType%da()
2155 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellids
2156 integer(I4B),
dimension(:),
pointer,
contiguous :: cellid
2157 integer(I4B),
pointer :: iper
2158 integer(I4B) :: n, nodeu, noder
2159 character(len=LINELENGTH) :: title, text
2160 character(len=20) :: cellstr
2161 logical(LGP) :: found
2163 character(len=*),
parameter :: fmtlsp = &
2164 &
"(1X,/1X,'REUSING ',a,'S FROM LAST STRESS PERIOD')"
2166 call mem_setptr(iper,
'IPER', this%input_mempath)
2167 if (iper /=
kper)
then
2168 write (this%iout, fmtlsp) trim(this%filtyp)
2169 call this%csub_rp_obs()
2173 call mem_setptr(cellids,
'CELLID', this%input_mempath)
2174 call mem_set_value(this%nbound,
'NBOUND', this%input_mempath, &
2178 if (this%iprpak /= 0)
then
2180 title =
'CSUB'//
' PACKAGE ('// &
2181 trim(adjustl(this%packName))//
') DATA FOR PERIOD'
2182 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
2183 call table_cr(this%inputtab, this%packName, title)
2184 call this%inputtab%table_df(1, 2, this%iout, finalize=.false.)
2186 call this%inputtab%initialize_column(text, 20)
2188 call this%inputtab%initialize_column(text, 15, alignment=tableft)
2192 do n = 1, this%nbound
2195 cellid => cellids(:, n)
2198 if (this%dis%ndim == 1)
then
2200 elseif (this%dis%ndim == 2)
then
2201 nodeu =
get_node(cellid(1), 1, cellid(2), &
2202 this%dis%mshape(1), 1, &
2205 nodeu =
get_node(cellid(1), cellid(2), cellid(3), &
2206 this%dis%mshape(1), &
2207 this%dis%mshape(2), &
2212 noder = this%dis%get_nodenumber(nodeu, 1)
2213 if (noder <= 0)
then
2217 this%nodelistsig0(n) = noder
2220 if (this%iprpak /= 0)
then
2221 call this%dis%noder_to_string(noder, cellstr)
2222 call this%inputtab%add_term(cellstr)
2223 call this%inputtab%add_term(this%sig0(n))
2233 if (this%iprpak /= 0)
then
2234 call this%inputtab%finalize_table()
2238 call this%csub_rp_obs()
2254 integer(I4B),
intent(in) :: nodes
2255 real(DP),
dimension(nodes),
intent(in) :: hnew
2259 integer(I4B) :: idelay
2260 integer(I4B) :: node
2267 if (this%ninterbeds > 0)
then
2269 if (this%gwfiss /= 0)
then
2270 write (
errmsg,
'(a,i0,a,1x,a,1x,a,1x,i0,1x,a)') &
2271 'Only the first and last (',
nper,
')', &
2272 'stress period can be steady if interbeds are simulated.', &
2273 'Stress period',
kper,
'has been defined to be steady state.'
2280 if (this%initialized == 0)
then
2281 if (this%gwfiss == 0)
then
2282 call this%csub_set_initial_state(nodes, hnew)
2290 this%cg_comp(node) =
dzero
2291 this%cg_es0(node) = this%cg_es(node)
2292 if (this%iupdatematprop /= 0)
then
2293 this%cg_thick0(node) = this%cg_thick(node)
2294 this%cg_theta0(node) = this%cg_theta(node)
2299 do ib = 1, this%ninterbeds
2300 idelay = this%idelay(ib)
2303 this%comp(ib) =
dzero
2304 node = this%nodelist(ib)
2305 if (this%initialized /= 0)
then
2306 es = this%cg_es(node)
2312 if (this%iupdatematprop /= 0)
then
2313 this%thick0(ib) = this%thick(ib)
2314 this%theta0(ib) = this%theta(ib)
2318 if (idelay /= 0)
then
2322 if (this%gwfiss0 /= 0)
then
2323 node = this%nodelist(ib)
2325 do n = 1, this%ndelaycells
2326 this%dbh(n, idelay) = h
2332 do n = 1, this%ndelaycells
2334 if (this%initialized /= 0)
then
2335 if (this%dbes(n, idelay) > this%dbpcs(n, idelay))
then
2336 this%dbpcs(n, idelay) = this%dbes(n, idelay)
2339 this%dbh0(n, idelay) = this%dbh(n, idelay)
2340 this%dbes0(n, idelay) = this%dbes(n, idelay)
2341 if (this%iupdatematprop /= 0)
then
2342 this%dbdz0(n, idelay) = this%dbdz(n, idelay)
2343 this%dbtheta0(n, idelay) = this%dbtheta(n, idelay)
2350 this%gwfiss0 = this%gwfiss
2355 call this%obs%obs_ad()
2363 subroutine csub_fc(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
2368 integer(I4B),
intent(in) :: kiter
2369 real(DP),
intent(in),
dimension(:) :: hold
2370 real(DP),
intent(in),
dimension(:) :: hnew
2372 integer(I4B),
intent(in),
dimension(:) :: idxglo
2373 real(DP),
intent(inout),
dimension(:) :: rhs
2376 integer(I4B) :: node
2377 integer(I4B) :: idiag
2378 integer(I4B) :: idelay
2386 call this%csub_cg_calc_stress(this%dis%nodes, hnew)
2389 if (this%gwfiss == 0)
then
2395 do node = 1, this%dis%nodes
2396 idiag = this%dis%con%ia(node)
2397 area = this%dis%get_area(node)
2400 if (this%ibound(node) < 1) cycle
2403 if (this%iupdatematprop /= 0)
then
2404 if (this%ieslag == 0)
then
2407 call this%csub_cg_calc_comp(node, hnew(node), hold(node), comp)
2408 this%cg_comp(node) = comp
2411 call this%csub_cg_update(node)
2416 call this%csub_cg_fc(node, tled, area, hnew(node), hold(node), &
2420 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2421 rhs(node) = rhs(node) + rhsterm
2425 if (this%brg /=
dzero)
then
2426 call this%csub_cg_wcomp_fc(node, tled, area, hnew(node), hold(node), &
2431 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2432 rhs(node) = rhs(node) + rhsterm
2437 if (this%ninterbeds /= 0)
then
2441 do ib = 1, this%ninterbeds
2442 node = this%nodelist(ib)
2443 idelay = this%idelay(ib)
2444 idiag = this%dis%con%ia(node)
2445 area = this%dis%get_area(node)
2446 call this%csub_interbed_fc(ib, node, area, hnew(node), hold(node), &
2448 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2449 rhs(node) = rhs(node) + rhsterm
2453 call this%csub_nodelay_wcomp_fc(ib, node, tled, area, &
2454 hnew(node), hold(node), &
2458 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2459 rhs(node) = rhs(node) + rhsterm
2480 subroutine csub_fn(this, kiter, hold, hnew, matrix_sln, idxglo, rhs)
2485 integer(I4B),
intent(in) :: kiter
2486 real(DP),
intent(in),
dimension(:) :: hold
2487 real(DP),
intent(in),
dimension(:) :: hnew
2489 integer(I4B),
intent(in),
dimension(:) :: idxglo
2490 real(DP),
intent(inout),
dimension(:) :: rhs
2492 integer(I4B) :: idelay
2493 integer(I4B) :: node
2494 integer(I4B) :: idiag
2502 if (this%gwfiss == 0)
then
2506 do node = 1, this%dis%nodes
2507 idiag = this%dis%con%ia(node)
2508 area = this%dis%get_area(node)
2511 if (this%ibound(node) < 1) cycle
2514 call this%csub_cg_fn(node, tled, area, &
2515 hnew(node), hcof, rhsterm)
2519 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2520 rhs(node) = rhs(node) + rhsterm
2524 if (this%brg /=
dzero)
then
2525 call this%csub_cg_wcomp_fn(node, tled, area, hnew(node), hold(node), &
2530 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2531 rhs(node) = rhs(node) + rhsterm
2536 if (this%ninterbeds /= 0)
then
2540 do ib = 1, this%ninterbeds
2541 idelay = this%idelay(ib)
2542 node = this%nodelist(ib)
2545 if (this%ibound(node) < 1) cycle
2548 idiag = this%dis%con%ia(node)
2549 area = this%dis%get_area(node)
2550 call this%csub_interbed_fn(ib, node, hnew(node), hold(node), &
2554 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2555 rhs(node) = rhs(node) + rhsterm
2558 if (this%brg /=
dzero .and. idelay == 0)
then
2559 call this%csub_nodelay_wcomp_fn(ib, node, tled, area, &
2560 hnew(node), hold(node), &
2564 call matrix_sln%add_value_pos(idxglo(idiag), hcof)
2565 rhs(node) = rhs(node) + rhsterm
2581 character(len=LINELENGTH) :: tag
2582 integer(I4B) :: ntabrows
2583 integer(I4B) :: ntabcols
2585 if (this%ipakcsv > 0)
then
2586 if (this%ndelaybeds < 1)
then
2587 write (
warnmsg,
'(a,1x,3a)') &
2588 'Package convergence data is requested but delay interbeds', &
2589 'are not included in package (', &
2590 trim(adjustl(this%packName)),
').'
2598 call table_cr(this%pakcsvtab, this%packName,
'')
2599 call this%pakcsvtab%table_df(ntabrows, ntabcols, this%ipakcsv, &
2600 lineseparator=.false., separator=
',', &
2604 tag =
'total_inner_iterations'
2605 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2607 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2609 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2611 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2613 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
2615 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2617 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2619 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2620 tag =
'dstoragemax_loc'
2621 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
2639 subroutine csub_cc(this, innertot, kiter, iend, icnvgmod, nodes, &
2640 hnew, hold, cpak, ipak, dpak)
2645 integer(I4B),
intent(in) :: innertot
2646 integer(I4B),
intent(in) :: kiter
2647 integer(I4B),
intent(in) :: iend
2648 integer(I4B),
intent(in) :: icnvgmod
2649 integer(I4B),
intent(in) :: nodes
2650 real(DP),
dimension(nodes),
intent(in) :: hnew
2651 real(DP),
dimension(nodes),
intent(in) :: hold
2652 character(len=LENPAKLOC),
intent(inout) :: cpak
2653 integer(I4B),
intent(inout) :: ipak
2654 real(DP),
intent(inout) :: dpak
2656 character(len=LENPAKLOC) :: cloc
2657 integer(I4B) :: icheck
2658 integer(I4B) :: ipakfail
2660 integer(I4B) :: node
2661 integer(I4B) :: idelay
2662 integer(I4B) :: locdhmax
2663 integer(I4B) :: locrmax
2664 integer(I4B) :: ifirst
2670 real(DP) :: hcellold
2684 icheck = this%iconvchk
2694 if (this%gwfiss /= 0)
then
2697 if (icnvgmod == 0)
then
2703 if (icheck /= 0)
then
2709 final_check:
do ib = 1, this%ninterbeds
2710 idelay = this%idelay(ib)
2711 node = this%nodelist(ib)
2714 if (idelay == 0) cycle
2717 if (this%ibound(node) < 1) cycle
2720 dh = this%dbdhmax(idelay)
2725 area = this%dis%get_area(node)
2727 hcellold = hold(node)
2730 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
2733 call this%csub_delay_calc_dstor(ib, hcell, stoe, stoi)
2734 v1 = (stoe + stoi) * area * this%rnb(ib) * tled
2737 call this%csub_delay_calc_wcomp(ib, dwc)
2738 v1 = v1 + dwc * area * this%rnb(ib)
2741 call this%csub_delay_fc(ib, hcof, rhs)
2742 v2 = (-hcof * hcell - rhs) * area * this%rnb(ib)
2749 df = df *
delt / area
2752 if (ifirst == 1)
then
2759 if (abs(dh) > abs(dhmax))
then
2763 if (abs(df) > abs(rmax))
then
2772 if (abs(dhmax) > abs(dpak))
then
2775 write (cloc,
"(a,'-',a)") trim(this%packName),
'head'
2780 if (abs(rmax) > abs(dpak))
then
2783 write (cloc,
"(a,'-',a)") trim(this%packName),
'storage'
2788 if (this%ipakcsv /= 0)
then
2791 call this%pakcsvtab%add_term(innertot)
2792 call this%pakcsvtab%add_term(
totim)
2793 call this%pakcsvtab%add_term(
kper)
2794 call this%pakcsvtab%add_term(
kstp)
2795 call this%pakcsvtab%add_term(kiter)
2796 if (this%ndelaybeds > 0)
then
2797 call this%pakcsvtab%add_term(dhmax)
2798 call this%pakcsvtab%add_term(locdhmax)
2799 call this%pakcsvtab%add_term(rmax)
2800 call this%pakcsvtab%add_term(locrmax)
2802 call this%pakcsvtab%add_term(
'--')
2803 call this%pakcsvtab%add_term(
'--')
2804 call this%pakcsvtab%add_term(
'--')
2805 call this%pakcsvtab%add_term(
'--')
2810 call this%pakcsvtab%finalize_table()
2825 subroutine csub_cq(this, nodes, hnew, hold, isuppress_output, flowja)
2831 integer(I4B),
intent(in) :: nodes
2832 real(DP),
intent(in),
dimension(nodes) :: hnew
2833 real(DP),
intent(in),
dimension(nodes) :: hold
2834 integer(I4B),
intent(in) :: isuppress_output
2835 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
2838 integer(I4B) :: idelay
2839 integer(I4B) :: ielastic
2840 integer(I4B) :: iconvert
2841 integer(I4B) :: node
2844 integer(I4B) :: idiag
2871 integer(I4B) :: iprobslocal
2881 do node = 1, this%dis%nodes
2882 idiag = this%dis%con%ia(node)
2883 area = this%dis%get_area(node)
2887 if (this%gwfiss == 0)
then
2893 if (this%ibound(node) > 0 .and. this%cg_thickini(node) >
dzero)
then
2896 call this%csub_cg_fc(node, tled, area, hnew(node), hold(node), &
2898 rrate = hcof * hnew(node) - rhs
2901 call this%csub_cg_calc_comp(node, hnew(node), hold(node), comp)
2904 call this%csub_cg_wcomp_fc(node, tled, area, hnew(node), hold(node), &
2906 rratewc = hcof * hnew(node) - rhs
2912 this%cg_stor(node) = rrate
2913 this%cell_wcstor(node) = rratewc
2914 this%cell_thick(node) = this%cg_thick(node)
2917 this%cg_comp(node) = comp
2921 if (isuppress_output == 0)
then
2925 if (this%iupdatematprop /= 0)
then
2926 call this%csub_cg_update(node)
2930 this%cg_tcomp(node) = this%cg_tcomp(node) + comp
2934 flowja(idiag) = flowja(idiag) + rrate
2935 flowja(idiag) = flowja(idiag) + rratewc
2941 if (this%ndelaybeds > 0)
then
2942 this%idb_nconv_count(1) = 0
2949 do ib = 1, this%ninterbeds
2951 idelay = this%idelay(ib)
2952 ielastic = this%ielastic(ib)
2956 if (idelay == 0)
then
2960 b = this%thick(ib) * this%rnb(ib)
2964 node = this%nodelist(ib)
2965 idiag = this%dis%con%ia(node)
2966 area = this%dis%get_area(node)
2969 this%cell_thick(node) = this%cell_thick(node) + b
2972 if (this%gwfiss == 0)
then
2980 if (this%ibound(node) < 1) cycle
2983 if (idelay == 0)
then
2984 iconvert = this%iconvert(ib)
2988 call this%csub_nodelay_calc_comp(ib, hnew(node), hold(node), comp, &
2992 es = this%cg_es(node)
2994 es0 = this%cg_es0(node)
2997 if (ielastic > 0 .or. iconvert == 0)
then
3000 stoi = -pcs * rho2 + (rho2 * es)
3001 stoe = pcs * rho1 - (rho1 * es0)
3007 this%storagee(ib) = stoe * tledm
3008 this%storagei(ib) = stoi * tledm
3011 this%comp(ib) = comp
3014 if (isuppress_output == 0)
then
3017 if (this%iupdatematprop /= 0)
then
3018 call this%csub_nodelay_update(ib)
3022 this%tcomp(ib) = this%tcomp(ib) + comp
3023 this%tcompe(ib) = this%tcompe(ib) + compe
3024 this%tcompi(ib) = this%tcompi(ib) + compi
3033 call this%csub_calc_sat(node, h, h0, snnew, snold)
3036 call this%csub_delay_calc_dstor(ib, h, stoe, stoi)
3037 this%storagee(ib) = stoe * area * this%rnb(ib) * tledm
3038 this%storagei(ib) = stoi * area * this%rnb(ib) * tledm
3041 q = this%csub_calc_delay_flow(ib, 1, h) * area * this%rnb(ib)
3042 this%dbflowtop(idelay) = q
3043 nn = this%ndelaycells
3044 q = this%csub_calc_delay_flow(ib, nn, h) * area * this%rnb(ib)
3045 this%dbflowbot(idelay) = q
3048 if (isuppress_output == 0)
then
3051 call this%csub_delay_calc_comp(ib, h, h0, comp, compi, compe)
3055 if (this%iupdatematprop /= 0)
then
3056 call this%csub_delay_update(ib)
3060 this%tcomp(ib) = this%tcomp(ib) + comp
3061 this%tcompi(ib) = this%tcompi(ib) + compi
3062 this%tcompe(ib) = this%tcompe(ib) + compe
3065 do n = 1, this%ndelaycells
3066 this%dbtcomp(n, idelay) = this%dbtcomp(n, idelay) + &
3067 this%dbcomp(n, idelay)
3072 call this%csub_delay_head_check(ib)
3079 if (idelay == 0)
then
3080 call this%csub_nodelay_wcomp_fc(ib, node, tledm, area, &
3081 hnew(node), hold(node), hcof, rhs)
3082 rratewc = hcof * hnew(node) - rhs
3086 call this%csub_delay_calc_wcomp(ib, q)
3087 rratewc = q * area * this%rnb(ib)
3089 this%cell_wcstor(node) = this%cell_wcstor(node) + rratewc
3092 flowja(idiag) = flowja(idiag) + rratewc
3094 this%storagee(ib) =
dzero
3095 this%storagei(ib) =
dzero
3096 if (idelay /= 0)
then
3097 this%dbflowtop(idelay) =
dzero
3098 this%dbflowbot(idelay) =
dzero
3103 flowja(idiag) = flowja(idiag) + this%storagee(ib)
3104 flowja(idiag) = flowja(idiag) + this%storagei(ib)
3108 if (this%iupdatematprop /= 0)
then
3124 subroutine csub_bd(this, isuppress_output, model_budget)
3131 integer(I4B),
intent(in) :: isuppress_output
3132 type(
budgettype),
intent(inout) :: model_budget
3139 call model_budget%addentry(rin, rout,
delt,
budtxt(1), &
3140 isuppress_output,
' CSUB')
3141 if (this%ninterbeds > 0)
then
3145 call model_budget%addentry(rin, rout,
delt,
budtxt(2), &
3146 isuppress_output,
' CSUB')
3150 call model_budget%addentry(rin, rout,
delt,
budtxt(3), &
3151 isuppress_output,
' CSUB')
3154 call model_budget%addentry(rin, rout,
delt,
budtxt(4), &
3155 isuppress_output,
' CSUB')
3167 integer(I4B),
intent(in) :: icbcfl
3168 integer(I4B),
intent(in) :: icbcun
3170 character(len=1) :: cdatafmp =
' '
3171 character(len=1) :: editdesc =
' '
3172 integer(I4B) :: ibinun
3173 integer(I4B) :: iprint
3174 integer(I4B) :: nvaluesp
3175 integer(I4B) :: nwidthp
3177 integer(I4B) :: node
3178 integer(I4B) :: naux
3184 if (this%ipakcb < 0)
then
3186 elseif (this%ipakcb == 0)
then
3189 ibinun = this%ipakcb
3191 if (icbcfl == 0) ibinun = 0
3194 if (ibinun /= 0)
then
3199 call this%dis%record_array(this%cg_stor, this%iout, iprint, -ibinun, &
3200 budtxt(1), cdatafmp, nvaluesp, &
3201 nwidthp, editdesc, dinact)
3202 if (this%ninterbeds > 0)
then
3206 call this%dis%record_srcdst_list_header(
budtxt(2), &
3216 do ib = 1, this%ninterbeds
3217 q = this%storagee(ib)
3218 node = this%nodelist(ib)
3219 call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
3224 call this%dis%record_srcdst_list_header(
budtxt(3), &
3234 do ib = 1, this%ninterbeds
3235 q = this%storagei(ib)
3236 node = this%nodelist(ib)
3237 call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
3243 call this%dis%record_array(this%cell_wcstor, this%iout, iprint, -ibinun, &
3244 budtxt(4), cdatafmp, nvaluesp, &
3245 nwidthp, editdesc, dinact)
3258 integer(I4B),
intent(in) :: idvfl
3259 integer(I4B),
intent(in) :: idvprint
3261 character(len=1) :: cdatafmp =
' '
3262 character(len=1) :: editdesc =
' '
3263 integer(I4B) :: ibinun
3264 integer(I4B) :: iprint
3265 integer(I4B) :: nvaluesp
3266 integer(I4B) :: nwidthp
3268 integer(I4B) :: node
3269 integer(I4B) :: nodem
3270 integer(I4B) :: nodeu
3273 integer(I4B) :: idx_conn
3275 integer(I4B) :: ncpl
3276 integer(I4B) :: nlay
3279 real(DP) :: va_scale
3281 character(len=*),
parameter :: fmtnconv = &
3282 "(/4x, 'DELAY INTERBED CELL HEADS IN ', i0, ' INTERBEDS IN', &
3283 &' NON-CONVERTIBLE GWF CELLS WERE LESS THAN THE TOP OF THE INTERBED CELL')"
3288 if (this%ioutcomp /= 0 .or. this%ioutzdisp /= 0)
then
3293 if (idvfl == 0) ibinun = 0
3296 if (ibinun /= 0)
then
3301 do node = 1, this%dis%nodes
3302 this%buff(node) = this%cg_tcomp(node)
3304 do ib = 1, this%ninterbeds
3305 node = this%nodelist(ib)
3306 this%buff(node) = this%buff(node) + this%tcomp(ib)
3310 if (this%ioutcomp /= 0)
then
3311 ibinun = this%ioutcomp
3312 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3313 comptxt(1), cdatafmp, nvaluesp, &
3314 nwidthp, editdesc, dinact)
3318 if (this%ioutzdisp /= 0)
then
3319 ibinun = this%ioutzdisp
3322 do nodeu = 1, this%dis%nodesuser
3323 this%buffusr(nodeu) =
dzero
3327 do node = 1, this%dis%nodes
3328 nodeu = this%dis%get_nodeuser(node)
3329 this%buffusr(nodeu) = this%buff(node)
3333 ncpl = this%dis%get_ncpl()
3336 if (this%dis%ndim == 1)
then
3337 do node = this%dis%nodes, 1, -1
3338 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
3341 nodem = this%dis%con%ja(ii)
3342 idx_conn = this%dis%con%jas(ii)
3345 ihc = this%dis%con%ihc(idx_conn)
3349 if (node < nodem)
then
3350 va_scale = this%dis%get_area_factor(node, idx_conn)
3351 this%buffusr(node) = this%buffusr(node) + &
3352 va_scale * this%buffusr(nodem)
3359 nlay = this%dis%nodesuser / ncpl
3360 do k = nlay - 1, 1, -1
3362 node = (k - 1) * ncpl + i
3363 nodem = k * ncpl + i
3364 this%buffusr(node) = this%buffusr(node) + this%buffusr(nodem)
3370 do nodeu = 1, this%dis%nodesuser
3371 node = this%dis%get_nodenumber_idx1(nodeu, 1)
3373 this%buff(node) = this%buffusr(nodeu)
3378 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3379 comptxt(6), cdatafmp, nvaluesp, &
3380 nwidthp, editdesc, dinact)
3386 if (this%ioutcompi /= 0)
then
3387 ibinun = this%ioutcompi
3391 if (idvfl == 0) ibinun = 0
3394 if (ibinun /= 0)
then
3399 do node = 1, this%dis%nodes
3400 this%buff(node) =
dzero
3402 do ib = 1, this%ninterbeds
3403 node = this%nodelist(ib)
3404 this%buff(node) = this%buff(node) + this%tcompi(ib)
3408 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3409 comptxt(2), cdatafmp, nvaluesp, &
3410 nwidthp, editdesc, dinact)
3414 if (this%ioutcompe /= 0)
then
3415 ibinun = this%ioutcompe
3419 if (idvfl == 0) ibinun = 0
3422 if (ibinun /= 0)
then
3427 do node = 1, this%dis%nodes
3428 this%buff(node) =
dzero
3430 do ib = 1, this%ninterbeds
3431 node = this%nodelist(ib)
3432 this%buff(node) = this%buff(node) + this%tcompe(ib)
3436 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3437 comptxt(3), cdatafmp, nvaluesp, &
3438 nwidthp, editdesc, dinact)
3442 if (this%ioutcompib /= 0)
then
3443 ibinun = this%ioutcompib
3447 if (idvfl == 0) ibinun = 0
3450 if (ibinun /= 0)
then
3455 do node = 1, this%dis%nodes
3456 this%buff(node) =
dzero
3458 do ib = 1, this%ninterbeds
3459 node = this%nodelist(ib)
3460 this%buff(node) = this%buff(node) + this%tcompe(ib) + this%tcompi(ib)
3464 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3465 comptxt(4), cdatafmp, nvaluesp, &
3466 nwidthp, editdesc, dinact)
3470 if (this%ioutcomps /= 0)
then
3471 ibinun = this%ioutcomps
3475 if (idvfl == 0) ibinun = 0
3478 if (ibinun /= 0)
then
3483 do node = 1, this%dis%nodes
3484 this%buff(node) = this%cg_tcomp(node)
3488 call this%dis%record_array(this%buff, this%iout, iprint, ibinun, &
3489 comptxt(5), cdatafmp, nvaluesp, &
3490 nwidthp, editdesc, dinact)
3495 if (this%gwfiss == 0)
then
3496 call this%csub_cg_chk_stress()
3503 if (this%ndelaybeds > 0)
then
3504 if (this%idb_nconv_count(1) > this%idb_nconv_count(2))
then
3505 this%idb_nconv_count(2) = this%idb_nconv_count(1)
3507 if (this%idb_nconv_count(1) > 0)
then
3508 write (this%iout, fmtnconv) this%idb_nconv_count(1)
3523 integer(I4B),
intent(in) :: nodes
3524 real(DP),
dimension(nodes),
intent(in) :: hnew
3526 integer(I4B) :: node
3530 integer(I4B) :: idx_conn
3535 real(DP) :: va_scale
3544 if (this%iupdatestress /= 0)
then
3545 do node = 1, this%dis%nodes
3550 top = this%dis%top(node)
3551 bot = this%dis%bot(node)
3555 if (this%ibound(node) /= 0)
then
3565 if (hcell < top)
then
3566 gs = (top - hbar) * this%sgm(node) + (hbar - bot) * this%sgs(node)
3568 gs = thick * this%sgs(node)
3572 this%cg_gs(node) = gs
3576 do nn = 1, this%nbound
3577 node = this%nodelistsig0(nn)
3578 sadd = this%sig0(nn)
3579 this%cg_gs(node) = this%cg_gs(node) + sadd
3583 do node = 1, this%dis%nodes
3586 gs = this%cg_gs(node)
3590 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
3593 m = this%dis%con%ja(ii)
3594 idx_conn = this%dis%con%jas(ii)
3597 if (this%dis%con%ihc(idx_conn) == 0)
then
3603 if (this%dis%ndim /= 1)
then
3604 gs = gs + this%cg_gs(m)
3608 va_scale = this%dis%get_area_factor(node, idx_conn)
3609 gs_conn = this%cg_gs(m)
3610 gs = gs + (gs_conn * va_scale)
3618 this%cg_gs(node) = gs
3624 do node = 1, this%dis%nodes
3625 top = this%dis%top(node)
3626 bot = this%dis%bot(node)
3627 if (this%ibound(node) /= 0)
then
3640 es = this%cg_gs(node) - phead
3641 this%cg_es(node) = es
3657 character(len=20) :: cellid
3658 integer(I4B) :: ierr
3659 integer(I4B) :: node
3673 do node = 1, this%dis%nodes
3674 if (this%ibound(node) < 1) cycle
3675 bot = this%dis%bot(node)
3676 gs = this%cg_gs(node)
3677 es = this%cg_es(node)
3679 if (this%ibound(node) /= 0)
then
3683 if (this%lhead_based .EQV. .false.)
then
3686 call this%dis%noder_to_string(node, cellid)
3687 write (
errmsg,
'(a,g0,a,1x,a,1x,a,4(g0,a))') &
3688 'Small to negative effective stress (', es,
') in cell', &
3689 trim(adjustl(cellid)),
'. (', es,
' = ', this%cg_gs(node), &
3690 ' - (', hcell,
' - ', bot,
').'
3698 write (
errmsg,
'(a,1x,i0,3(1x,a))') &
3699 'Solution: small to negative effective stress values in', ierr, &
3700 'cells can be eliminated by increasing storage values and/or ', &
3701 'adding/modifying stress boundaries to prevent water-levels from', &
3702 'exceeding the top of the model.'
3717 integer(I4B),
intent(in) :: i
3724 comp = this%tcomp(i) + this%comp(i)
3725 if (abs(comp) >
dzero)
then
3726 thick = this%thickini(i)
3727 theta = this%thetaini(i)
3728 call this%csub_adj_matprop(comp, thick, theta)
3729 if (thick <=
dzero)
then
3730 write (
errmsg,
'(a,1x,i0,1x,a,g0,a)') &
3731 'Adjusted thickness for no-delay interbed', i, &
3732 'is less than or equal to 0 (', thick,
').'
3735 if (theta <=
dzero)
then
3736 write (
errmsg,
'(a,1x,i0,1x,a,g0,a)') &
3737 'Adjusted theta for no-delay interbed', i, &
3738 'is less than or equal to 0 (', theta,
').'
3741 this%thick(i) = thick
3742 this%theta(i) = theta
3764 integer(I4B),
intent(in) :: ib
3765 real(DP),
intent(in) :: hcell
3766 real(DP),
intent(in) :: hcellold
3767 real(DP),
intent(inout) :: rho1
3768 real(DP),
intent(inout) :: rho2
3769 real(DP),
intent(inout) :: rhs
3770 real(DP),
intent(in),
optional :: argtled
3772 integer(I4B) :: node
3782 real(DP) :: sto_fac0
3792 if (
present(argtled))
then
3797 node = this%nodelist(ib)
3798 area = this%dis%get_area(node)
3799 bot = this%dis%bot(node)
3800 top = this%dis%top(node)
3801 thick = this%thickini(ib)
3807 this%iconvert(ib) = 0
3810 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
3811 if (this%lhead_based .EQV. .true.)
then
3815 znode = this%csub_calc_znode(top, bot, hbar)
3816 es = this%cg_es(node)
3817 es0 = this%cg_es0(node)
3818 theta = this%thetaini(ib)
3823 call this%csub_calc_sfacts(node, bot, znode, theta, es, es0, f)
3825 sto_fac = tled * snnew * thick * f
3826 sto_fac0 = tled * snold * thick * f
3829 rho1 = this%rci(ib) * sto_fac0
3830 rho2 = this%rci(ib) * sto_fac
3831 if (this%cg_es(node) > this%pcs(ib))
then
3832 this%iconvert(ib) = 1
3833 rho2 = this%ci(ib) * sto_fac
3837 rcorr = rho2 * (hcell - hbar)
3840 if (this%ielastic(ib) /= 0)
then
3841 rhs = rho1 * this%cg_es0(node) - &
3842 rho2 * (this%cg_gs(node) + bot) - &
3845 rhs = -rho2 * (this%cg_gs(node) + bot) + &
3846 (this%pcs(ib) * (rho2 - rho1)) + &
3847 (rho1 * this%cg_es0(node)) - &
3869 integer(I4B),
intent(in) :: ib
3870 real(DP),
intent(in) :: hcell
3871 real(DP),
intent(in) :: hcellold
3872 real(DP),
intent(inout) :: comp
3873 real(DP),
intent(inout) :: rho1
3874 real(DP),
intent(inout) :: rho2
3876 integer(I4B) :: node
3884 node = this%nodelist(ib)
3886 es = this%cg_es(node)
3887 es0 = this%cg_es0(node)
3891 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, rho2, rhs, argtled=tled)
3894 if (this%ielastic(ib) /= 0)
then
3895 comp = rho2 * es - rho1 * es0
3897 comp = -pcs * (rho2 - rho1) - (rho1 * es0) + (rho2 * es)
3911 integer(I4B),
intent(in) :: nodes
3912 real(DP),
dimension(nodes),
intent(in) :: hnew
3914 character(len=LINELENGTH) :: title
3915 character(len=LINELENGTH) :: tag
3916 character(len=20) :: cellid
3918 integer(I4B) :: node
3920 integer(I4B) :: idelay
3921 integer(I4B) :: ntabrows
3922 integer(I4B) :: ntabcols
3928 real(DP) :: void_ratio
3938 call this%csub_cg_calc_stress(nodes, hnew)
3943 this%cg_es0(node) = this%cg_es(node)
3947 do ib = 1, this%ninterbeds
3948 idelay = this%idelay(ib)
3949 node = this%nodelist(ib)
3950 top = this%dis%top(node)
3951 bot = this%dis%bot(node)
3955 if (this%ispecified_pcs == 0)
then
3957 if (this%ipch /= 0)
then
3958 pcs = this%cg_es(node) - pcs0
3960 pcs = this%cg_es(node) + pcs0
3964 if (this%ipch /= 0)
then
3965 pcs = this%cg_gs(node) - (pcs0 - bot)
3967 if (pcs < this%cg_es(node))
then
3968 pcs = this%cg_es(node)
3974 if (idelay /= 0)
then
3975 dzhalf =
dhalf * this%dbdzini(1, idelay)
3980 do n = 1, this%ndelaycells
3981 if (this%ispecified_dbh == 0)
then
3982 this%dbh(n, idelay) = hcell + this%dbh(n, idelay)
3984 this%dbh(n, idelay) = hcell
3986 this%dbh0(n, idelay) = this%dbh(n, idelay)
3990 call this%csub_delay_calc_stress(ib, hcell)
3994 do n = 1, this%ndelaycells
3995 zbot = this%dbz(n, idelay) - dzhalf
3998 dbpcs = pcs - (zbot - bot) * (this%sgs(node) -
done)
3999 this%dbpcs(n, idelay) = dbpcs
4002 this%dbes0(n, idelay) = this%dbes(n, idelay)
4009 top = this%dis%top(node)
4010 bot = this%dis%bot(node)
4013 if (this%istoragec == 1)
then
4016 if (this%lhead_based .EQV. .true.)
then
4022 void_ratio = this%csub_calc_void_ratio(this%cg_theta(node))
4023 es = this%cg_es(node)
4030 znode = this%csub_calc_znode(top, bot, hbar)
4031 fact = this%csub_calc_adjes(node, es, bot, znode)
4032 fact = fact * (
done + void_ratio)
4039 this%cg_ske_cr(node) = this%cg_ske_cr(node) * fact
4042 if (fact <=
dzero)
then
4043 call this%dis%noder_to_string(node, cellid)
4044 write (
errmsg,
'(a,1x,a,a)') &
4045 'Negative recompression index calculated for cell', &
4046 trim(adjustl(cellid)),
'.'
4052 do ib = 1, this%ninterbeds
4053 idelay = this%idelay(ib)
4054 node = this%nodelist(ib)
4055 top = this%dis%top(node)
4056 bot = this%dis%bot(node)
4059 if (this%istoragec == 1)
then
4062 if (this%lhead_based .EQV. .true.)
then
4068 void_ratio = this%csub_calc_void_ratio(this%theta(ib))
4069 es = this%cg_es(node)
4076 znode = this%csub_calc_znode(top, bot, hbar)
4077 fact = this%csub_calc_adjes(node, es, bot, znode)
4078 fact = fact * (
done + void_ratio)
4085 this%ci(ib) = this%ci(ib) * fact
4086 this%rci(ib) = this%rci(ib) * fact
4089 if (fact <=
dzero)
then
4090 call this%dis%noder_to_string(node, cellid)
4091 write (
errmsg,
'(a,1x,i0,2(1x,a),a)') &
4092 'Negative compression indices calculated for interbed', ib, &
4093 'in cell', trim(adjustl(cellid)),
'.'
4099 if (this%iprpak == 1)
then
4101 title = trim(adjustl(this%packName))// &
4102 ' PACKAGE CALCULATED INITIAL INTERBED STRESSES AT THE CELL BOTTOM'
4105 ntabrows = this%ninterbeds
4107 if (this%inamedbound /= 0)
then
4108 ntabcols = ntabcols + 1
4112 call table_cr(this%inputtab, this%packName, title)
4113 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4116 tag =
'INTERBED NUMBER'
4117 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4119 call this%inputtab%initialize_column(tag, 20)
4120 tag =
'GEOSTATIC STRESS'
4121 call this%inputtab%initialize_column(tag, 16)
4122 tag =
'EFFECTIVE STRESS'
4123 call this%inputtab%initialize_column(tag, 16)
4124 tag =
'PRECONSOLIDATION STRESS'
4125 call this%inputtab%initialize_column(tag, 16)
4126 if (this%inamedbound /= 0)
then
4128 call this%inputtab%initialize_column(tag,
lenboundname, &
4133 do ib = 1, this%ninterbeds
4134 node = this%nodelist(ib)
4135 call this%dis%noder_to_string(node, cellid)
4138 call this%inputtab%add_term(ib)
4139 call this%inputtab%add_term(cellid)
4140 call this%inputtab%add_term(this%cg_gs(node))
4141 call this%inputtab%add_term(this%cg_es(node))
4142 call this%inputtab%add_term(this%pcs(ib))
4143 if (this%inamedbound /= 0)
then
4144 call this%inputtab%add_term(this%boundname(ib))
4151 title = trim(adjustl(this%packName))// &
4152 ' PACKAGE CALCULATED INITIAL DELAY INTERBED STRESSES'
4156 do ib = 1, this%ninterbeds
4157 idelay = this%idelay(ib)
4158 if (idelay /= 0)
then
4159 ntabrows = ntabrows + this%ndelaycells
4163 if (this%inamedbound /= 0)
then
4164 ntabcols = ntabcols + 1
4168 call table_cr(this%inputtab, this%packName, title)
4169 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4172 tag =
'INTERBED NUMBER'
4173 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4175 call this%inputtab%initialize_column(tag, 20)
4177 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4178 tag =
'GEOSTATIC STRESS'
4179 call this%inputtab%initialize_column(tag, 16)
4180 tag =
'EFFECTIVE STRESS'
4181 call this%inputtab%initialize_column(tag, 16)
4182 tag =
'PRECONSOLIDATION STRESS'
4183 call this%inputtab%initialize_column(tag, 16)
4184 if (this%inamedbound /= 0)
then
4186 call this%inputtab%initialize_column(tag,
lenboundname, &
4191 do ib = 1, this%ninterbeds
4192 idelay = this%idelay(ib)
4193 if (idelay /= 0)
then
4194 node = this%nodelist(ib)
4195 call this%dis%noder_to_string(node, cellid)
4198 do n = 1, this%ndelaycells
4200 call this%inputtab%add_term(ib)
4201 call this%inputtab%add_term(cellid)
4203 call this%inputtab%add_term(
' ')
4204 call this%inputtab%add_term(
' ')
4206 call this%inputtab%add_term(n)
4207 call this%inputtab%add_term(this%dbgeo(n, idelay))
4208 call this%inputtab%add_term(this%dbes(n, idelay))
4209 call this%inputtab%add_term(this%dbpcs(n, idelay))
4210 if (this%inamedbound /= 0)
then
4212 call this%inputtab%add_term(this%boundname(ib))
4214 call this%inputtab%add_term(
' ')
4222 if (this%istoragec == 1)
then
4223 if (this%lhead_based .EQV. .false.)
then
4225 title = trim(adjustl(this%packName))// &
4226 ' PACKAGE COMPRESSION INDICES'
4229 ntabrows = this%ninterbeds
4231 if (this%inamedbound /= 0)
then
4232 ntabcols = ntabcols + 1
4236 call table_cr(this%inputtab, this%packName, title)
4237 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
4240 tag =
'INTERBED NUMBER'
4241 call this%inputtab%initialize_column(tag, 10, alignment=
tableft)
4243 call this%inputtab%initialize_column(tag, 20)
4245 call this%inputtab%initialize_column(tag, 16)
4247 call this%inputtab%initialize_column(tag, 16)
4248 if (this%inamedbound /= 0)
then
4250 call this%inputtab%initialize_column(tag,
lenboundname, &
4255 do ib = 1, this%ninterbeds
4257 node = this%nodelist(ib)
4258 call this%dis%noder_to_string(node, cellid)
4261 call this%inputtab%add_term(ib)
4262 call this%inputtab%add_term(cellid)
4263 call this%inputtab%add_term(this%ci(ib) * fact)
4264 call this%inputtab%add_term(this%rci(ib) * fact)
4265 if (this%inamedbound /= 0)
then
4266 call this%inputtab%add_term(this%boundname(ib))
4279 this%initialized = 1
4282 if (this%lhead_based .EQV. .true.)
then
4283 this%iupdatestress = 0
4296 subroutine csub_cg_fc(this, node, tled, area, hcell, hcellold, hcof, rhs)
4299 integer(I4B),
intent(in) :: node
4300 real(DP),
intent(in) :: tled
4301 real(DP),
intent(in) :: area
4302 real(DP),
intent(in) :: hcell
4303 real(DP),
intent(in) :: hcellold
4304 real(DP),
intent(inout) :: hcof
4305 real(DP),
intent(inout) :: rhs
4321 top = this%dis%top(node)
4322 bot = this%dis%bot(node)
4323 tthk = this%cg_thickini(node)
4326 if (tthk >
dzero)
then
4329 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4335 call this%csub_cg_calc_sske(node, sske, hcell)
4336 rho1 = sske * area * tthk * tled
4339 this%cg_ske(node) = sske * tthk * snold
4340 this%cg_sk(node) = sske * tthk * snnew
4343 hcof = -rho1 * snnew
4344 rhs = rho1 * snold * this%cg_es0(node) - &
4345 rho1 * snnew * (this%cg_gs(node) + bot)
4348 rhs = rhs - rho1 * snnew * (hcell - hbar)
4365 integer(I4B),
intent(in) :: node
4366 real(DP),
intent(in) :: tled
4367 real(DP),
intent(in) :: area
4368 real(DP),
intent(in) :: hcell
4369 real(DP),
intent(inout) :: hcof
4370 real(DP),
intent(inout) :: rhs
4379 real(DP) :: hbarderv
4388 top = this%dis%top(node)
4389 bot = this%dis%bot(node)
4390 tthk = this%cg_thickini(node)
4393 if (tthk >
dzero)
then
4396 call this%csub_calc_sat(node, hcell, top, snnew, snold)
4399 satderv = this%csub_calc_sat_derivative(node, hcell)
4408 call this%csub_cg_calc_sske(node, sske, hcell)
4409 rho1 = sske * area * tthk * tled
4412 hcof = rho1 * snnew * (
done - hbarderv) + &
4413 rho1 * (this%cg_gs(node) - hbar + bot) * satderv
4416 if (this%ieslag /= 0)
then
4417 hcof = hcof - rho1 * this%cg_es0(node) * satderv
4437 integer(I4B),
intent(in) :: ib
4438 integer(I4B),
intent(in) :: node
4439 real(DP),
intent(in) :: area
4440 real(DP),
intent(in) :: hcell
4441 real(DP),
intent(in) :: hcellold
4442 real(DP),
intent(inout) :: hcof
4443 real(DP),
intent(inout) :: rhs
4462 if (this%ibound(node) > 0)
then
4463 if (this%idelay(ib) == 0)
then
4466 if (this%iupdatematprop /= 0)
then
4467 if (this%ieslag == 0)
then
4470 call this%csub_nodelay_calc_comp(ib, hcell, hcellold, comp, &
4472 this%comp(ib) = comp
4475 call this%csub_nodelay_update(ib)
4480 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, hcof, rhs)
4485 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4488 if (this%iupdatematprop /= 0)
then
4489 if (this%ieslag == 0)
then
4492 call this%csub_delay_calc_comp(ib, hcell, hcellold, &
4494 this%comp(ib) = comp
4497 call this%csub_delay_update(ib)
4502 call this%csub_delay_sln(ib, hcell)
4503 call this%csub_delay_fc(ib, hcof, rhs)
4504 f = area * this%rnb(ib)
4525 integer(I4B),
intent(in) :: ib
4526 integer(I4B),
intent(in) :: node
4527 real(DP),
intent(in) :: hcell
4528 real(DP),
intent(in) :: hcellold
4529 real(DP),
intent(inout) :: hcof
4530 real(DP),
intent(inout) :: rhs
4532 integer(I4B) :: idelay
4544 real(DP) :: hbarderv
4554 idelay = this%idelay(ib)
4555 top = this%dis%top(node)
4556 bot = this%dis%bot(node)
4559 if (this%ibound(node) > 0)
then
4561 tthk = this%thickini(ib)
4564 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4567 if (idelay == 0)
then
4573 satderv = this%csub_calc_sat_derivative(node, hcell)
4582 call this%csub_nodelay_fc(ib, hcell, hcellold, rho1, rho2, rhsn)
4585 hcofn = rho2 * (
done - hbarderv) * snnew + &
4586 rho2 * (this%cg_gs(node) - hbar + bot) * satderv
4587 if (this%ielastic(ib) == 0)
then
4588 hcofn = hcofn - rho2 * this%pcs(ib) * satderv
4592 if (this%ieslag /= 0)
then
4593 if (this%ielastic(ib) /= 0)
then
4594 hcofn = hcofn - rho1 * this%cg_es0(node) * satderv
4596 hcofn = hcofn - rho1 * (this%pcs(ib) - this%cg_es0(node)) * satderv
4613 integer(I4B),
intent(in) :: n
4614 real(DP),
intent(inout) :: sske
4615 real(DP),
intent(in) :: hcell
4631 if (this%lhead_based .EQV. .true.)
then
4637 top = this%dis%top(n)
4638 bot = this%dis%bot(n)
4644 znode = this%csub_calc_znode(top, bot, hbar)
4648 es0 = this%cg_es0(n)
4649 theta = this%cg_thetaini(n)
4654 call this%csub_calc_sfacts(n, bot, znode, theta, es, es0, f)
4656 sske = f * this%cg_ske_cr(n)
4669 integer(I4B),
intent(in) :: node
4670 real(DP),
intent(in) :: hcell
4671 real(DP),
intent(in) :: hcellold
4672 real(DP),
intent(inout) :: comp
4684 call this%csub_cg_fc(node, tled, area, hcell, hcellold, hcof, rhs)
4687 comp = hcof * hcell - rhs
4698 integer(I4B),
intent(in) :: node
4700 character(len=20) :: cellid
4706 comp = this%cg_tcomp(node) + this%cg_comp(node)
4707 call this%dis%noder_to_string(node, cellid)
4708 if (abs(comp) >
dzero)
then
4709 thick = this%cg_thickini(node)
4710 theta = this%cg_thetaini(node)
4711 call this%csub_adj_matprop(comp, thick, theta)
4712 if (thick <=
dzero)
then
4713 write (
errmsg,
'(a,1x,a,1x,a,g0,a)') &
4714 'Adjusted thickness for cell', trim(adjustl(cellid)), &
4715 'is less than or equal to 0 (', thick,
').'
4718 if (theta <=
dzero)
then
4719 write (
errmsg,
'(a,1x,a,1x,a,g0,a)') &
4720 'Adjusted theta for cell', trim(adjustl(cellid)), &
4721 'is less than or equal to 0 (', theta,
').'
4724 this%cg_thick(node) = thick
4725 this%cg_theta(node) = theta
4743 integer(I4B),
intent(in) :: node
4744 real(DP),
intent(in) :: tled
4745 real(DP),
intent(in) :: area
4746 real(DP),
intent(in) :: hcell
4747 real(DP),
intent(in) :: hcellold
4748 real(DP),
intent(inout) :: hcof
4749 real(DP),
intent(inout) :: rhs
4765 top = this%dis%top(node)
4766 bot = this%dis%bot(node)
4767 tthk = this%cg_thick(node)
4768 tthk0 = this%cg_thick0(node)
4771 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4774 wc0 = this%brg * area * tthk0 * this%cg_theta0(node) * tled
4775 wc = this%brg * area * tthk * this%cg_theta(node) * tled
4781 rhs = -wc0 * snold * hcellold
4797 integer(I4B),
intent(in) :: node
4798 real(DP),
intent(in) :: tled
4799 real(DP),
intent(in) :: area
4800 real(DP),
intent(in) :: hcell
4801 real(DP),
intent(in) :: hcellold
4802 real(DP),
intent(inout) :: hcof
4803 real(DP),
intent(inout) :: rhs
4819 top = this%dis%top(node)
4820 bot = this%dis%bot(node)
4821 tthk = this%cg_thick(node)
4824 satderv = this%csub_calc_sat_derivative(node, hcell)
4827 f = this%brg * area * tled
4830 wc = f * tthk * this%cg_theta(node)
4833 hcof = -wc * hcell * satderv
4836 if (this%ieslag /= 0)
then
4837 tthk0 = this%cg_thick0(node)
4838 wc0 = f * tthk0 * this%cg_theta0(node)
4839 hcof = hcof + wc * hcellold * satderv
4857 hcell, hcellold, hcof, rhs)
4860 integer(I4B),
intent(in) :: ib
4861 integer(I4B),
intent(in) :: node
4862 real(DP),
intent(in) :: tled
4863 real(DP),
intent(in) :: area
4864 real(DP),
intent(in) :: hcell
4865 real(DP),
intent(in) :: hcellold
4866 real(DP),
intent(inout) :: hcof
4867 real(DP),
intent(inout) :: rhs
4882 top = this%dis%top(node)
4883 bot = this%dis%bot(node)
4886 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
4889 f = this%brg * area * tled
4890 wc0 = f * this%theta0(ib) * this%thick0(ib)
4891 wc = f * this%theta(ib) * this%thick(ib)
4893 rhs = -wc0 * snold * hcellold
4907 hcell, hcellold, hcof, rhs)
4910 integer(I4B),
intent(in) :: ib
4911 integer(I4B),
intent(in) :: node
4912 real(DP),
intent(in) :: tled
4913 real(DP),
intent(in) :: area
4914 real(DP),
intent(in) :: hcell
4915 real(DP),
intent(in) :: hcellold
4916 real(DP),
intent(inout) :: hcof
4917 real(DP),
intent(inout) :: rhs
4931 top = this%dis%top(node)
4932 bot = this%dis%bot(node)
4935 f = this%brg * area * tled
4938 satderv = this%csub_calc_sat_derivative(node, hcell)
4941 wc = f * this%theta(ib) * this%thick(ib)
4944 hcof = -wc * hcell * satderv
4947 if (this%ieslag /= 0)
then
4948 wc0 = f * this%theta0(ib) * this%thick0(ib)
4949 hcof = hcof + wc0 * hcellold * satderv
4965 real(dp),
intent(in) :: theta
4967 real(dp) :: void_ratio
4969 void_ratio = theta / (
done - theta)
4981 real(dp),
intent(in) :: void_ratio
4986 theta = void_ratio / (
done + void_ratio)
4998 integer(I4B),
intent(in) :: ib
5000 integer(I4B) :: idelay
5004 idelay = this%idelay(ib)
5005 thick = this%thick(ib)
5006 if (idelay /= 0)
then
5007 thick = thick * this%rnb(ib)
5024 real(dp),
intent(in) :: top
5025 real(dp),
intent(in) :: bottom
5026 real(dp),
intent(in) :: zbar
5032 if (zbar > top)
then
5037 znode =
dhalf * (v + bottom)
5051 integer(I4B),
intent(in) :: node
5052 real(dp),
intent(in) :: es0
5053 real(dp),
intent(in) :: z0
5054 real(dp),
intent(in) :: z
5059 es = es0 - (z - z0) * (this%sgs(node) -
done)
5072 integer(I4B),
intent(in) :: ib
5074 integer(I4B) :: iviolate
5075 integer(I4B) :: idelay
5076 integer(I4B) :: node
5085 idelay = this%idelay(ib)
5086 node = this%nodelist(ib)
5089 idelaycells:
do n = 1, this%ndelaycells
5090 z = this%dbz(n, idelay)
5091 h = this%dbh(n, idelay)
5092 dzhalf =
dhalf * this%dbdzini(1, idelay)
5095 if (this%stoiconv(node) == 0)
then
5098 this%idb_nconv_count(1) = this%idb_nconv_count(1) + 1
5104 if (iviolate > 0)
then
5122 integer(I4B),
intent(in) :: node
5123 real(DP),
intent(in) :: hcell
5124 real(DP),
intent(in) :: hcellold
5125 real(DP),
intent(inout) :: snnew
5126 real(DP),
intent(inout) :: snold
5132 if (this%stoiconv(node) /= 0)
then
5133 top = this%dis%top(node)
5134 bot = this%dis%bot(node)
5141 if (this%ieslag /= 0)
then
5156 integer(I4B),
intent(in) :: node
5157 real(dp),
intent(in) :: hcell
5163 if (this%stoiconv(node) /= 0)
then
5164 top = this%dis%top(node)
5165 bot = this%dis%bot(node)
5184 integer(I4B),
intent(in) :: node
5185 real(DP),
intent(in) :: bot
5186 real(DP),
intent(in) :: znode
5187 real(DP),
intent(in) :: theta
5188 real(DP),
intent(in) :: es
5189 real(DP),
intent(in) :: es0
5190 real(DP),
intent(inout) :: fact
5193 real(DP) :: void_ratio
5198 if (this%ieslag /= 0)
then
5205 void_ratio = this%csub_calc_void_ratio(theta)
5206 denom = this%csub_calc_adjes(node, esv, bot, znode)
5207 denom = denom * (
done + void_ratio)
5208 if (denom /=
dzero)
then
5224 real(DP),
intent(in) :: comp
5225 real(DP),
intent(inout) :: thick
5226 real(DP),
intent(inout) :: theta
5229 real(DP) :: void_ratio
5233 void_ratio = this%csub_calc_void_ratio(theta)
5236 if (thick >
dzero) strain = -comp / thick
5239 void_ratio = void_ratio + strain * (
done + void_ratio)
5240 theta = this%csub_calc_theta(void_ratio)
5241 thick = thick - comp
5254 integer(I4B),
intent(in) :: ib
5255 real(DP),
intent(in) :: hcell
5256 logical(LGP),
intent(in),
optional :: update
5260 logical(LGP) :: lupdate
5262 integer(I4B) :: icnvg
5263 integer(I4B) :: iter
5264 integer(I4B) :: idelay
5271 if (
present(update))
then
5278 call this%csub_delay_calc_stress(ib, hcell)
5286 if (this%thickini(ib) >
dzero)
then
5289 idelay = this%idelay(ib)
5294 call this%csub_delay_assemble(ib, hcell)
5298 this%dbal, this%dbad, this%dbau, &
5299 this%dbrhs, this%dbdh, this%dbaw)
5303 do n = 1, this%ndelaycells
5304 dh = this%dbdh(n) - this%dbh(n, idelay)
5305 if (abs(dh) > abs(dhmax))
then
5308 this%dbdhmax(idelay) = dhmax
5312 this%dbh(n, idelay) = this%dbdh(n)
5316 call this%csub_delay_calc_stress(ib, hcell)
5319 if (abs(dhmax) < dclose)
then
5321 else if (iter /= 1)
then
5322 if (abs(dhmax) - abs(dhmax0) <
dprec)
then
5326 if (icnvg == 1)
then
5347 integer(I4B),
intent(in) :: ib
5350 integer(I4B) :: node
5351 integer(I4B) :: idelay
5363 idelay = this%idelay(ib)
5364 node = this%nodelist(ib)
5365 b = this%thickini(ib)
5366 bot = this%dis%bot(node)
5372 znode = this%csub_calc_znode(top, bot, hbar)
5373 dz =
dhalf * this%dbdzini(1, idelay)
5380 do n = 1, this%ndelaycells
5383 this%dbz(n, idelay) = z
5387 if (abs(zr) < dz)
then
5390 this%dbrelz(n, idelay) = zr
5404 integer(I4B),
intent(in) :: ib
5405 real(DP),
intent(in) :: hcell
5408 integer(I4B) :: idelay
5409 integer(I4B) :: node
5425 idelay = this%idelay(ib)
5426 node = this%nodelist(ib)
5427 sigma = this%cg_gs(node)
5428 topaq = this%dis%top(node)
5429 botaq = this%dis%bot(node)
5430 dzhalf =
dhalf * this%dbdzini(1, idelay)
5431 top = this%dbz(1, idelay) + dzhalf
5437 sgm = this%sgm(node)
5438 sgs = this%sgs(node)
5439 if (hcell < top)
then
5440 sadd = ((top - hbar) * sgm) + ((hbar - botaq) * sgs)
5442 sadd = (top - botaq) * sgs
5444 sigma = sigma - sadd
5447 do n = 1, this%ndelaycells
5448 h = this%dbh(n, idelay)
5451 z = this%dbz(n, idelay)
5460 sadd = ((top - hbar) * sgm) + ((hbar - bot) * sgs)
5462 sadd = (top - bot) * sgs
5464 sigma = sigma + sadd
5466 this%dbgeo(n, idelay) = sigma
5467 this%dbes(n, idelay) = sigma - phead
5484 integer(I4B),
intent(in) :: ib
5485 integer(I4B),
intent(in) :: n
5486 real(DP),
intent(in) :: hcell
5487 real(DP),
intent(inout) :: ssk
5488 real(DP),
intent(inout) :: sske
5490 integer(I4B) :: idelay
5491 integer(I4B) :: ielastic
5492 integer(I4B) :: node
5495 real(DP) :: hbarcell
5514 idelay = this%idelay(ib)
5515 ielastic = this%ielastic(ib)
5518 if (this%lhead_based .EQV. .true.)
then
5524 node = this%nodelist(ib)
5525 theta = this%dbthetaini(n, idelay)
5528 topcell = this%dis%top(node)
5529 botcell = this%dis%bot(node)
5536 zcell = this%csub_calc_znode(topcell, botcell, hbarcell)
5539 zcenter = zcell + this%dbrelz(n, idelay)
5540 dzhalf =
dhalf * this%dbdzini(1, idelay)
5541 top = zcenter + dzhalf
5542 bot = zcenter - dzhalf
5543 h = this%dbh(n, idelay)
5550 znode = this%csub_calc_znode(top, bot, hbar)
5554 zbot = this%dbz(n, idelay) - dzhalf
5557 es = this%dbes(n, idelay)
5558 es0 = this%dbes0(n, idelay)
5563 call this%csub_calc_sfacts(node, zbot, znode, theta, es, es0, f)
5565 this%idbconvert(n, idelay) = 0
5566 sske = f * this%rci(ib)
5567 ssk = f * this%rci(ib)
5568 if (ielastic == 0)
then
5569 if (this%dbes(n, idelay) > this%dbpcs(n, idelay))
then
5570 this%idbconvert(n, idelay) = 1
5571 ssk = f * this%ci(ib)
5586 integer(I4B),
intent(in) :: ib
5587 real(DP),
intent(in) :: hcell
5596 do n = 1, this%ndelaycells
5599 if (this%inewton == 0)
then
5600 call this%csub_delay_assemble_fc(ib, n, hcell, aii, au, al, r)
5602 call this%csub_delay_assemble_fn(ib, n, hcell, aii, au, al, r)
5624 integer(I4B),
intent(in) :: ib
5625 integer(I4B),
intent(in) :: n
5626 real(DP),
intent(in) :: hcell
5627 real(DP),
intent(inout) :: aii
5628 real(DP),
intent(inout) :: au
5629 real(DP),
intent(inout) :: al
5630 real(DP),
intent(inout) :: r
5632 integer(I4B) :: node
5633 integer(I4B) :: idelay
5634 integer(I4B) :: ielastic
5670 idelay = this%idelay(ib)
5671 ielastic = this%ielastic(ib)
5672 node = this%nodelist(ib)
5673 dzini = this%dbdzini(1, idelay)
5674 dzhalf =
dhalf * dzini
5676 c = this%kv(ib) / dzini
5684 if (n == 1 .or. n == this%ndelaycells)
then
5695 if (n < this%ndelaycells)
then
5700 z = this%dbz(n, idelay)
5703 h = this%dbh(n, idelay)
5704 h0 = this%dbh0(n, idelay)
5705 dz = this%dbdz(n, idelay)
5706 dz0 = this%dbdz0(n, idelay)
5707 theta = this%dbtheta(n, idelay)
5708 theta0 = this%dbtheta0(n, idelay)
5714 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
5717 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
5720 smult = dzini * tled
5721 gs = this%dbgeo(n, idelay)
5722 es0 = this%dbes0(n, idelay)
5723 pcs = this%dbpcs(n, idelay)
5724 aii = aii - smult * dsn * ssk
5725 if (ielastic /= 0)
then
5727 (dsn * ssk * (gs + zbot) - dsn0 * sske * es0)
5730 (dsn * ssk * (gs + zbot - pcs) + dsn0 * sske * (pcs - es0))
5734 r = r + smult * dsn * ssk * (h - hbar)
5737 wcf = this%brg * tled
5738 wc = dz * wcf * theta
5739 wc0 = dz0 * wcf * theta0
5740 aii = aii - dsn * wc
5741 r = r - dsn0 * wc0 * h0
5755 integer(I4B),
intent(in) :: ib
5756 integer(I4B),
intent(in) :: n
5757 real(DP),
intent(in) :: hcell
5758 real(DP),
intent(inout) :: aii
5759 real(DP),
intent(inout) :: au
5760 real(DP),
intent(inout) :: al
5761 real(DP),
intent(inout) :: r
5763 integer(I4B) :: node
5764 integer(I4B) :: idelay
5765 integer(I4B) :: ielastic
5791 real(DP) :: hbarderv
5807 idelay = this%idelay(ib)
5808 ielastic = this%ielastic(ib)
5809 node = this%nodelist(ib)
5810 dzini = this%dbdzini(1, idelay)
5811 dzhalf =
dhalf * dzini
5813 c = this%kv(ib) / dzini
5821 if (n == 1 .or. n == this%ndelaycells)
then
5832 if (n < this%ndelaycells)
then
5837 z = this%dbz(n, idelay)
5840 h = this%dbh(n, idelay)
5841 h0 = this%dbh0(n, idelay)
5842 dz = this%dbdz(n, idelay)
5843 dz0 = this%dbdz0(n, idelay)
5844 theta = this%dbtheta(n, idelay)
5845 theta0 = this%dbtheta0(n, idelay)
5854 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
5857 dsnderv = this%csub_delay_calc_sat_derivative(node, idelay, n, hcell)
5860 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
5863 smult = dzini * tled
5864 gs = this%dbgeo(n, idelay)
5865 es0 = this%dbes0(n, idelay)
5866 pcs = this%dbpcs(n, idelay)
5867 if (ielastic /= 0)
then
5868 qsto = smult * (dsn * ssk * (gs - hbar + zbot) - dsn0 * sske * es0)
5869 stoderv = -smult * dsn * ssk * hbarderv + &
5870 smult * ssk * (gs - hbar + zbot) * dsnderv
5872 qsto = smult * (dsn * ssk * (gs - hbar + zbot - pcs) + &
5873 dsn0 * sske * (pcs - es0))
5874 stoderv = -smult * dsn * ssk * hbarderv + &
5875 smult * ssk * (gs - hbar + zbot - pcs) * dsnderv
5879 if (this%ieslag /= 0)
then
5880 if (ielastic /= 0)
then
5881 stoderv = stoderv - smult * sske * es0 * dsnderv
5883 stoderv = stoderv + smult * sske * (pcs - es0) * dsnderv
5889 r = r - qsto + stoderv * h
5892 wcf = this%brg * tled
5893 wc = dz * wcf * theta
5894 wc0 = dz0 * wcf * theta0
5895 qwc = dsn0 * wc0 * h0 - dsn * wc * h
5896 wcderv = -dsn * wc - wc * h * dsnderv
5899 if (this%ieslag /= 0)
then
5900 wcderv = wcderv + wc0 * h0 * dsnderv
5905 r = r - qwc + wcderv * h
5920 integer(I4B),
intent(in) :: node
5921 integer(I4B),
intent(in) :: idelay
5922 integer(I4B),
intent(in) :: n
5923 real(DP),
intent(in) :: hcell
5924 real(DP),
intent(in) :: hcellold
5925 real(DP),
intent(inout) :: snnew
5926 real(DP),
intent(inout) :: snold
5933 if (this%stoiconv(node) /= 0)
then
5934 dzhalf =
dhalf * this%dbdzini(n, idelay)
5935 top = this%dbz(n, idelay) + dzhalf
5936 bot = this%dbz(n, idelay) - dzhalf
5943 if (this%ieslag /= 0)
then
5959 integer(I4B),
intent(in) :: node
5960 integer(I4B),
intent(in) :: idelay
5961 integer(I4B),
intent(in) :: n
5962 real(dp),
intent(in) :: hcell
5969 if (this%stoiconv(node) /= 0)
then
5970 dzhalf =
dhalf * this%dbdzini(n, idelay)
5971 top = this%dbz(n, idelay) + dzhalf
5972 bot = this%dbz(n, idelay) - dzhalf
5990 integer(I4B),
intent(in) :: ib
5991 real(DP),
intent(in) :: hcell
5992 real(DP),
intent(inout) :: stoe
5993 real(DP),
intent(inout) :: stoi
5995 integer(I4B) :: idelay
5996 integer(I4B) :: ielastic
5997 integer(I4B) :: node
6016 idelay = this%idelay(ib)
6017 ielastic = this%ielastic(ib)
6018 node = this%nodelist(ib)
6025 if (this%thickini(ib) >
dzero)
then
6026 fmult = this%dbdzini(1, idelay)
6027 dzhalf =
dhalf * this%dbdzini(1, idelay)
6028 do n = 1, this%ndelaycells
6029 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6030 z = this%dbz(n, idelay)
6032 h = this%dbh(n, idelay)
6033 h0 = this%dbh0(n, idelay)
6034 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6036 if (ielastic /= 0)
then
6037 v1 = dsn * ssk * (this%dbgeo(n, idelay) - hbar + zbot) - &
6038 dsn0 * sske * this%dbes0(n, idelay)
6041 v1 = dsn * ssk * (this%dbgeo(n, idelay) - hbar + zbot - &
6042 this%dbpcs(n, idelay))
6043 v2 = dsn0 * sske * (this%dbpcs(n, idelay) - this%dbes0(n, idelay))
6047 if (this%idbconvert(n, idelay) /= 0)
then
6048 stoi = stoi + v1 * fmult
6049 stoe = stoe + v2 * fmult
6051 stoe = stoe + (v1 + v2) * fmult
6055 ske = ske + sske * fmult
6056 sk = sk + ssk * fmult
6077 integer(I4B),
intent(in) :: ib
6078 real(DP),
intent(inout) :: dwc
6080 integer(I4B) :: idelay
6081 integer(I4B) :: node
6098 if (this%thickini(ib) >
dzero)
then
6099 idelay = this%idelay(ib)
6100 node = this%nodelist(ib)
6102 do n = 1, this%ndelaycells
6103 h = this%dbh(n, idelay)
6104 h0 = this%dbh0(n, idelay)
6105 dz = this%dbdz(n, idelay)
6106 dz0 = this%dbdz0(n, idelay)
6107 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6108 wc = dz * this%brg * this%dbtheta(n, idelay)
6109 wc0 = dz0 * this%brg * this%dbtheta0(n, idelay)
6110 v = dsn0 * wc0 * h0 - dsn * wc * h
6111 dwc = dwc + v * tled
6128 integer(I4B),
intent(in) :: ib
6129 real(DP),
intent(in) :: hcell
6130 real(DP),
intent(in) :: hcellold
6131 real(DP),
intent(inout) :: comp
6132 real(DP),
intent(inout) :: compi
6133 real(DP),
intent(inout) :: compe
6135 integer(I4B) :: idelay
6136 integer(I4B) :: ielastic
6137 integer(I4B) :: node
6153 idelay = this%idelay(ib)
6154 ielastic = this%ielastic(ib)
6155 node = this%nodelist(ib)
6161 call this%csub_calc_sat(node, hcell, hcellold, snnew, snold)
6164 if (this%thickini(ib) >
dzero)
then
6165 fmult = this%dbdzini(1, idelay)
6166 do n = 1, this%ndelaycells
6167 h = this%dbh(n, idelay)
6168 h0 = this%dbh0(n, idelay)
6169 call this%csub_delay_calc_sat(node, idelay, n, h, h0, dsn, dsn0)
6170 call this%csub_delay_calc_ssksske(ib, n, hcell, ssk, sske)
6171 if (ielastic /= 0)
then
6172 v1 = dsn * ssk * this%dbes(n, idelay) - sske * this%dbes0(n, idelay)
6175 v1 = dsn * ssk * (this%dbes(n, idelay) - this%dbpcs(n, idelay))
6176 v2 = dsn0 * sske * (this%dbpcs(n, idelay) - this%dbes0(n, idelay))
6178 v = (v1 + v2) * fmult
6182 this%dbcomp(n, idelay) = v * snnew
6185 if (this%idbconvert(n, idelay) /= 0)
then
6186 compi = compi + v1 * fmult
6187 compe = compe + v2 * fmult
6189 compe = compe + (v1 + v2) * fmult
6195 comp = comp * this%rnb(ib)
6196 compi = compi * this%rnb(ib)
6197 compe = compe * this%rnb(ib)
6208 integer(I4B),
intent(in) :: ib
6210 integer(I4B) :: idelay
6219 idelay = this%idelay(ib)
6225 do n = 1, this%ndelaycells
6228 comp = this%dbtcomp(n, idelay) + this%dbcomp(n, idelay)
6232 comp = comp / this%rnb(ib)
6235 if (abs(comp) >
dzero)
then
6236 thick = this%dbdzini(n, idelay)
6237 theta = this%dbthetaini(n, idelay)
6238 call this%csub_adj_matprop(comp, thick, theta)
6239 if (thick <=
dzero)
then
6240 write (
errmsg,
'(2(a,i0),a,g0,a)') &
6241 'Adjusted thickness for delay interbed (', ib, &
6242 ') cell (', n,
') is less than or equal to 0 (', thick,
').'
6245 if (theta <=
dzero)
then
6246 write (
errmsg,
'(2(a,i0),a,g0,a)') &
6247 'Adjusted theta for delay interbed (', ib, &
6248 ') cell (', n,
'is less than or equal to 0 (', theta,
').'
6251 this%dbdz(n, idelay) = thick
6252 this%dbtheta(n, idelay) = theta
6253 tthick = tthick + thick
6254 wtheta = wtheta + thick * theta
6256 thick = this%dbdz(n, idelay)
6257 theta = this%dbtheta(n, idelay)
6258 tthick = tthick + thick
6259 wtheta = wtheta + thick * theta
6265 if (tthick >
dzero)
then
6266 wtheta = wtheta / tthick
6271 this%thick(ib) = tthick
6272 this%theta(ib) = wtheta
6288 integer(I4B),
intent(in) :: ib
6289 real(DP),
intent(inout) :: hcof
6290 real(DP),
intent(inout) :: rhs
6292 integer(I4B) :: idelay
6297 idelay = this%idelay(ib)
6300 if (this%thickini(ib) >
dzero)
then
6302 c1 =
dtwo * this%kv(ib) / this%dbdzini(1, idelay)
6303 rhs = -c1 * this%dbh(1, idelay)
6305 this%kv(ib) / this%dbdzini(this%ndelaycells, idelay)
6306 rhs = rhs - c2 * this%dbh(this%ndelaycells, idelay)
6321 integer(I4B),
intent(in) :: ib
6322 integer(I4B),
intent(in) :: n
6323 real(dp),
intent(in) :: hcell
6325 integer(I4B) :: idelay
6330 idelay = this%idelay(ib)
6331 c =
dtwo * this%kv(ib) / this%dbdzini(n, idelay)
6332 q = c * (hcell - this%dbh(n, idelay))
6361 integer(I4B) :: indx
6365 call this%obs%StoreObsType(
'csub', .true., indx)
6370 call this%obs%StoreObsType(
'inelastic-csub', .true., indx)
6375 call this%obs%StoreObsType(
'elastic-csub', .true., indx)
6380 call this%obs%StoreObsType(
'coarse-csub', .false., indx)
6385 call this%obs%StoreObsType(
'csub-cell', .true., indx)
6390 call this%obs%StoreObsType(
'wcomp-csub-cell', .false., indx)
6395 call this%obs%StoreObsType(
'ske', .true., indx)
6400 call this%obs%StoreObsType(
'sk', .true., indx)
6405 call this%obs%StoreObsType(
'ske-cell', .true., indx)
6410 call this%obs%StoreObsType(
'sk-cell', .true., indx)
6415 call this%obs%StoreObsType(
'gstress-cell', .false., indx)
6420 call this%obs%StoreObsType(
'estress-cell', .false., indx)
6425 call this%obs%StoreObsType(
'interbed-compaction', .true., indx)
6430 call this%obs%StoreObsType(
'inelastic-compaction', .true., indx)
6435 call this%obs%StoreObsType(
'elastic-compaction', .true., indx)
6440 call this%obs%StoreObsType(
'coarse-compaction', .false., indx)
6445 call this%obs%StoreObsType(
'inelastic-compaction-cell', .true., indx)
6450 call this%obs%StoreObsType(
'elastic-compaction-cell', .true., indx)
6455 call this%obs%StoreObsType(
'compaction-cell', .true., indx)
6460 call this%obs%StoreObsType(
'thickness', .true., indx)
6465 call this%obs%StoreObsType(
'coarse-thickness', .false., indx)
6470 call this%obs%StoreObsType(
'thickness-cell', .false., indx)
6475 call this%obs%StoreObsType(
'theta', .true., indx)
6480 call this%obs%StoreObsType(
'coarse-theta', .false., indx)
6485 call this%obs%StoreObsType(
'theta-cell', .true., indx)
6490 call this%obs%StoreObsType(
'preconstress-cell', .false., indx)
6495 call this%obs%StoreObsType(
'interbed-compaction-pct', .false., indx)
6500 call this%obs%StoreObsType(
'delay-preconstress', .false., indx)
6505 call this%obs%StoreObsType(
'delay-head', .false., indx)
6510 call this%obs%StoreObsType(
'delay-gstress', .false., indx)
6515 call this%obs%StoreObsType(
'delay-estress', .false., indx)
6520 call this%obs%StoreObsType(
'delay-compaction', .false., indx)
6525 call this%obs%StoreObsType(
'delay-thickness', .false., indx)
6530 call this%obs%StoreObsType(
'delay-theta', .false., indx)
6535 call this%obs%StoreObsType(
'delay-flowtop', .true., indx)
6540 call this%obs%StoreObsType(
'delay-flowbot', .true., indx)
6557 integer(I4B) :: idelay
6558 integer(I4B) :: ncol
6559 integer(I4B) :: node
6566 if (this%obs%npakobs > 0)
then
6567 call this%obs%obs_bd_clear()
6568 do i = 1, this%obs%npakobs
6569 obsrv => this%obs%pakobs(i)%obsrv
6570 if (obsrv%BndFound)
then
6571 if (obsrv%ObsTypeId ==
'SKE' .or. &
6572 obsrv%ObsTypeId ==
'SK' .or. &
6573 obsrv%ObsTypeId ==
'SKE-CELL' .or. &
6574 obsrv%ObsTypeId ==
'SK-CELL' .or. &
6575 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6576 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6577 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6578 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6579 obsrv%ObsTypeId ==
'PRECONSTRESS-CELL')
then
6580 if (this%gwfiss /= 0)
then
6581 call this%obs%SaveOneSimval(obsrv,
dnodata)
6584 do j = 1, obsrv%indxbnds_count
6585 n = obsrv%indxbnds(j)
6586 select case (obsrv%ObsTypeId)
6607 case (
'DELAY-HEAD',
'DELAY-PRECONSTRESS', &
6608 'DELAY-GSTRESS',
'DELAY-ESTRESS')
6609 if (n > this%ndelaycells)
then
6610 r = real(n - 1, dp) / real(this%ndelaycells, dp)
6611 idelay = int(floor(r)) + 1
6612 ncol = n - int(floor(r)) * this%ndelaycells
6617 select case (obsrv%ObsTypeId)
6619 v = this%dbh(ncol, idelay)
6620 case (
'DELAY-PRECONSTRESS')
6621 v = this%dbpcs(ncol, idelay)
6622 case (
'DELAY-GSTRESS')
6623 v = this%dbgeo(ncol, idelay)
6624 case (
'DELAY-ESTRESS')
6625 v = this%dbes(ncol, idelay)
6627 case (
'PRECONSTRESS-CELL')
6630 errmsg =
"Unrecognized observation type '"// &
6631 trim(obsrv%ObsTypeId)//
"'."
6634 call this%obs%SaveOneSimval(obsrv, v)
6639 do j = 1, obsrv%indxbnds_count
6640 n = obsrv%indxbnds(j)
6641 select case (obsrv%ObsTypeId)
6643 v = this%storagee(n) + this%storagei(n)
6644 case (
'INELASTIC-CSUB')
6645 v = this%storagei(n)
6646 case (
'ELASTIC-CSUB')
6647 v = this%storagee(n)
6648 case (
'COARSE-CSUB')
6650 case (
'WCOMP-CSUB-CELL')
6651 v = this%cell_wcstor(n)
6658 v = this%storagee(n) + this%storagei(n)
6662 case (
'COARSE-THETA')
6663 v = this%cg_theta(n)
6668 f = this%cg_thick(n) / this%cell_thick(n)
6669 v = f * this%cg_theta(n)
6671 node = this%nodelist(n)
6672 f = this%csub_calc_interbed_thickness(n) / this%cell_thick(node)
6673 v = f * this%theta(n)
6675 case (
'GSTRESS-CELL')
6677 case (
'ESTRESS-CELL')
6679 case (
'INTERBED-COMPACTION')
6681 case (
'INTERBED-COMPACTION-PCT')
6682 b0 = this%thickini(n)
6683 if (this%idelay(n) /= 0)
then
6684 b0 = b0 * this%rnb(n)
6687 case (
'INELASTIC-COMPACTION')
6689 case (
'ELASTIC-COMPACTION')
6691 case (
'COARSE-COMPACTION')
6692 v = this%cg_tcomp(n)
6693 case (
'INELASTIC-COMPACTION-CELL')
6699 case (
'ELASTIC-COMPACTION-CELL')
6703 v = this%cg_tcomp(n)
6707 case (
'COMPACTION-CELL')
6711 v = this%cg_tcomp(n)
6716 idelay = this%idelay(n)
6718 if (idelay /= 0)
then
6721 case (
'COARSE-THICKNESS')
6722 v = this%cg_thick(n)
6723 case (
'THICKNESS-CELL')
6724 v = this%cell_thick(n)
6725 case (
'DELAY-COMPACTION',
'DELAY-THICKNESS', &
6727 if (n > this%ndelaycells)
then
6728 r = real(n, dp) / real(this%ndelaycells, dp)
6729 idelay = int(floor(r)) + 1
6730 ncol = mod(n, this%ndelaycells)
6735 select case (obsrv%ObsTypeId)
6736 case (
'DELAY-COMPACTION')
6737 v = this%dbtcomp(ncol, idelay)
6738 case (
'DELAY-THICKNESS')
6739 v = this%dbdz(ncol, idelay)
6740 case (
'DELAY-THETA')
6741 v = this%dbtheta(ncol, idelay)
6743 case (
'DELAY-FLOWTOP')
6744 idelay = this%idelay(n)
6745 v = this%dbflowtop(idelay)
6746 case (
'DELAY-FLOWBOT')
6747 idelay = this%idelay(n)
6748 v = this%dbflowbot(idelay)
6750 errmsg =
"Unrecognized observation type: '"// &
6751 trim(obsrv%ObsTypeId)//
"'."
6754 call this%obs%SaveOneSimval(obsrv, v)
6758 call this%obs%SaveOneSimval(obsrv,
dnodata)
6781 character(len=LENBOUNDNAME) :: bname
6786 integer(I4B) :: idelay
6789 if (.not. this%csub_obs_supported())
then
6797 do i = 1, this%obs%npakobs
6798 obsrv => this%obs%pakobs(i)%obsrv
6801 obsrv%BndFound = .false.
6803 bname = obsrv%FeatureName
6804 if (bname /=
'')
then
6809 do j = 1, this%ninterbeds
6810 if (this%boundname(j) == bname)
then
6811 obsrv%BndFound = .true.
6812 obsrv%CurrentTimeStepEndValue =
dzero
6813 call obsrv%AddObsIndex(j)
6818 else if (obsrv%ObsTypeId ==
'GSTRESS-CELL' .or. &
6819 obsrv%ObsTypeId ==
'ESTRESS-CELL' .or. &
6820 obsrv%ObsTypeId ==
'THICKNESS-CELL' .or. &
6821 obsrv%ObsTypeId ==
'COARSE-CSUB' .or. &
6822 obsrv%ObsTypeId ==
'WCOMP-CSUB-CELL' .or. &
6823 obsrv%ObsTypeId ==
'COARSE-COMPACTION' .or. &
6824 obsrv%ObsTypeId ==
'COARSE-THETA' .or. &
6825 obsrv%ObsTypeId ==
'COARSE-THICKNESS')
then
6826 obsrv%BndFound = .true.
6827 obsrv%CurrentTimeStepEndValue =
dzero
6828 call obsrv%AddObsIndex(obsrv%NodeNumber)
6829 else if (obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6830 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6831 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6832 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6833 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
6834 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
6835 obsrv%ObsTypeId ==
'DELAY-THETA')
then
6836 if (this%ninterbeds > 0)
then
6837 n = obsrv%NodeNumber
6838 idelay = this%idelay(n)
6839 if (idelay /= 0)
then
6840 j = (idelay - 1) * this%ndelaycells + 1
6841 n2 = obsrv%NodeNumber2
6842 if (n2 < 1 .or. n2 > this%ndelaycells)
then
6843 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
6844 trim(adjustl(obsrv%ObsTypeId)),
'interbed cell must be ', &
6845 'greater than 0 and less than or equal to', this%ndelaycells, &
6846 '(specified value is ', n2,
').'
6849 j = (idelay - 1) * this%ndelaycells + n2
6851 obsrv%BndFound = .true.
6852 call obsrv%AddObsIndex(j)
6857 else if (obsrv%ObsTypeId ==
'CSUB' .or. &
6858 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
6859 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
6860 obsrv%ObsTypeId ==
'SK' .or. &
6861 obsrv%ObsTypeId ==
'SKE' .or. &
6862 obsrv%ObsTypeId ==
'THICKNESS' .or. &
6863 obsrv%ObsTypeId ==
'THETA' .or. &
6864 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
6865 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
6866 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
6867 obsrv%ObsTypeId ==
'INTERBED-COMPACTION-PCT')
then
6868 if (this%ninterbeds > 0)
then
6869 j = obsrv%NodeNumber
6870 if (j < 1 .or. j > this%ninterbeds)
then
6871 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
6872 trim(adjustl(obsrv%ObsTypeId)),
'interbed cell must be greater', &
6873 'than 0 and less than or equal to', this%ninterbeds, &
6874 '(specified value is ', j,
').'
6877 obsrv%BndFound = .true.
6878 obsrv%CurrentTimeStepEndValue =
dzero
6879 call obsrv%AddObsIndex(j)
6882 else if (obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
6883 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
6884 if (this%ninterbeds > 0)
then
6885 j = obsrv%NodeNumber
6886 if (j < 1 .or. j > this%ninterbeds)
then
6887 write (
errmsg,
'(a,2(1x,a),1x,i0,1x,a,i0,a)') &
6888 trim(adjustl(obsrv%ObsTypeId)), &
6889 'interbed cell must be greater ', &
6890 'than 0 and less than or equal to', this%ninterbeds, &
6891 '(specified value is ', j,
').'
6894 idelay = this%idelay(j)
6895 if (idelay /= 0)
then
6896 obsrv%BndFound = .true.
6897 obsrv%CurrentTimeStepEndValue =
dzero
6898 call obsrv%AddObsIndex(j)
6906 if (obsrv%ObsTypeId ==
'CSUB-CELL' .or. &
6907 obsrv%ObsTypeId ==
'SKE-CELL' .or. &
6908 obsrv%ObsTypeId ==
'SK-CELL' .or. &
6909 obsrv%ObsTypeId ==
'THETA-CELL' .or. &
6910 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION-CELL' .or. &
6911 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION-CELL' .or. &
6912 obsrv%ObsTypeId ==
'COMPACTION-CELL')
then
6913 if (.NOT. obsrv%BndFound)
then
6914 obsrv%BndFound = .true.
6915 obsrv%CurrentTimeStepEndValue =
dzero
6916 call obsrv%AddObsIndex(obsrv%NodeNumber)
6919 jloop:
do j = 1, this%ninterbeds
6920 if (this%nodelist(j) == obsrv%NodeNumber)
then
6921 obsrv%BndFound = .true.
6922 obsrv%CurrentTimeStepEndValue =
dzero
6923 call obsrv%AddObsIndex(j)
6950 integer(I4B),
intent(in) :: inunitobs
6951 integer(I4B),
intent(in) :: iout
6955 integer(I4B) :: icol, istart, istop
6956 character(len=LINELENGTH) :: string
6957 character(len=LENBOUNDNAME) :: bndname
6958 logical(LGP) :: flag_string
6959 logical(LGP) :: flag_idcellno
6960 logical(LGP) :: flag_error
6963 string = obsrv%IDstring
6964 flag_string = .true.
6965 flag_idcellno = .false.
6966 flag_error = .false.
6967 if (obsrv%ObsTypeId(1:5) ==
"DELAY" .AND. &
6968 obsrv%ObsTypeId(1:10) /=
"DELAY-FLOW")
then
6969 flag_idcellno = .true.
6978 if (obsrv%ObsTypeId ==
'CSUB' .or. &
6979 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
6980 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
6981 obsrv%ObsTypeId ==
'SK' .or. &
6982 obsrv%ObsTypeId ==
'SKE' .or. &
6983 obsrv%ObsTypeId ==
'THETA' .or. &
6984 obsrv%ObsTypeId ==
'THICKNESS' .or. &
6985 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
6986 obsrv%ObsTypeId ==
'INTERBED-COMPACTION-PCT' .or. &
6987 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
6988 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
6989 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
6990 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
6991 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
6992 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
6993 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
6994 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
6995 obsrv%ObsTypeId ==
'DELAY-THETA' .or. &
6996 obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
6997 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7001 nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
7002 iout, string, flag_string)
7005 if (obsrv%ObsTypeId ==
'SK' .or. &
7006 obsrv%ObsTypeId ==
'SKE' .or. &
7007 obsrv%ObsTypeId ==
'THETA' .or. &
7008 obsrv%ObsTypeId ==
'THICKNESS' .or. &
7009 obsrv%ObsTypeId ==
'INTERBED-COMPACTION' .or. &
7010 obsrv%ObsTypeId ==
'INELASTIC-COMPACTION' .or. &
7011 obsrv%ObsTypeId ==
'ELASTIC-COMPACTION' .or. &
7012 obsrv%ObsTypeId ==
'DELAY-HEAD' .or. &
7013 obsrv%ObsTypeId ==
'DELAY-GSTRESS' .or. &
7014 obsrv%ObsTypeId ==
'DELAY-ESTRESS' .or. &
7015 obsrv%ObsTypeId ==
'DELAY-PRECONSTRESS' .or. &
7016 obsrv%ObsTypeId ==
'DELAY-COMPACTION' .or. &
7017 obsrv%ObsTypeId ==
'DELAY-THICKNESS' .or. &
7018 obsrv%ObsTypeId ==
'DELAY-THETA')
then
7021 "BOUNDNAME ('", trim(adjustl(bndname)), &
7022 "') not allowed for CSUB observation type '", &
7023 trim(adjustl(obsrv%ObsTypeId)),
"'."
7028 else if (obsrv%ObsTypeId ==
'CSUB' .or. &
7029 obsrv%ObsTypeId ==
'INELASTIC-CSUB' .or. &
7030 obsrv%ObsTypeId ==
'ELASTIC-CSUB' .or. &
7034 obsrv%ObsTypeId ==
'DELAY-FLOWTOP' .or. &
7035 obsrv%ObsTypeId ==
'DELAY-FLOWBOT')
then
7037 obsrv%FeatureName = bndname
7041 if (flag_idcellno .EQV. .true. .AND. flag_error .EQV. .false.)
then
7046 "BOUNDNAME ('", trim(adjustl(bndname)), &
7047 "') not allowed for CSUB observation type '", &
7048 trim(adjustl(obsrv%ObsTypeId)),
"' idcellno."
7051 obsrv%NodeNumber2 = nn2
7057 obsrv%NodeNumber = nn1
7071 this%listlabel = trim(this%filtyp)//
' NO.'
7072 if (this%dis%ndim == 3)
then
7073 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
7074 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
7075 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
7076 elseif (this%dis%ndim == 2)
then
7077 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
7078 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
7080 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
7082 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'SIG0'
7083 if (this%inamedbound == 1)
then
7084 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_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 ...