diff --git a/doc/mf6io/mf6ivar/dfn/gwf-evt.dfn b/doc/mf6io/mf6ivar/dfn/gwf-evt.dfn index b66f62301c8..f8cc23d6d18 100644 --- a/doc/mf6io/mf6ivar/dfn/gwf-evt.dfn +++ b/doc/mf6io/mf6ivar/dfn/gwf-evt.dfn @@ -44,6 +44,7 @@ reader urword optional true longname print input to listing file description REPLACE print_input {'{#1}': 'evapotranspiration'} +mf6internal iprpak block options name print_flows @@ -52,6 +53,7 @@ reader urword optional true longname print evapotranspiration rates to listing file description REPLACE print_flows {'{#1}': 'evapotranspiration'} +mf6internal iprflow block options name save_flows @@ -60,6 +62,7 @@ reader urword optional true longname save evapotranspiration rates to budget file description REPLACE save_flows {'{#1}': 'evapotranspiration'} +mf6internal ipakcb block options name ts_filerecord @@ -143,6 +146,7 @@ reader urword optional true longname specify proportion of evapotranspiration rate at ET surface description indicates that the proportion of the evapotranspiration rate at the ET surface will be specified as PETM0 in list input. +mf6internal surfratespec # --------------------- gwf evt dimensions --------------------- @@ -184,6 +188,7 @@ shape (maxbound) reader urword longname description +mf6internal spd block period name cellid @@ -235,6 +240,7 @@ shape (nseg-1) tagged false in_record true reader urword +optional true time_series true longname proportion of ET extinction depth description is the proportion of the ET extinction depth at the bottom of a segment (dimensionless). pxdp is an array of size (nseg - 1). Values in pxdp must be greater than 0.0 and less than 1.0. pxdp values for a cell must increase monotonically. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. @@ -246,6 +252,7 @@ shape (nseg-1) tagged false in_record true reader urword +optional true time_series true longname proportion of maximum ET rate description is the proportion of the maximum ET flux rate at the bottom of a segment (dimensionless). petm is an array of size (nseg - 1). If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. @@ -273,6 +280,7 @@ optional true time_series true longname auxiliary variables description REPLACE aux {'{#1}': 'evapotranspiration'} +mf6internal auxvar block period name boundname diff --git a/doc/mf6io/mf6ivar/dfn/gwf-evta.dfn b/doc/mf6io/mf6ivar/dfn/gwf-evta.dfn index 19ca3cec45a..625886ff5f5 100644 --- a/doc/mf6io/mf6ivar/dfn/gwf-evta.dfn +++ b/doc/mf6io/mf6ivar/dfn/gwf-evta.dfn @@ -1,5 +1,6 @@ # --------------------- gwf evta options --------------------- # flopy multi-package +# modflow6 aux-sfac-param rate block options name readasarrays @@ -45,6 +46,7 @@ reader urword optional true longname print input to listing file description REPLACE print_input {'{#1}': 'evapotranspiration'} +mf6internal iprpak block options name print_flows @@ -53,6 +55,7 @@ reader urword optional true longname print evapotranspiration rates to listing file description REPLACE print_flows {'{#1}': 'evapotranspiration'} +mf6internal iprflow block options name save_flows @@ -61,6 +64,7 @@ reader urword optional true longname save CHD flows to budget file description REPLACE save_flows {'{#1}': 'evapotranspiration'} +mf6internal ipakcb block options name tas_filerecord @@ -177,6 +181,7 @@ name rate type double precision shape (ncol*nrow; ncpl) reader readarray +time_series true longname evapotranspiration surface description is the maximum ET flux rate ($LT^{-1}$). default_value 1.e-3 @@ -191,9 +196,11 @@ description is the ET extinction depth ($L$). default_value 1.0 block period -name aux(iaux) +name aux type double precision shape (ncol*nrow; ncpl) reader readarray +time_series true longname auxiliary variable iaux description is an array of values for auxiliary variable AUX(IAUX), where iaux is a value from 1 to NAUX, and AUX(IAUX) must be listed as part of the auxiliary variables. A separate array can be specified for each auxiliary variable. If an array is not specified for an auxiliary variable, then a value of zero is assigned. If the value specified here for the auxiliary variable is the same as auxmultname, then the evapotranspiration rate will be multiplied by this array. +mf6internal auxvar diff --git a/make/makefile b/make/makefile index 17e860d7f56..2743fb98deb 100644 --- a/make/makefile +++ b/make/makefile @@ -6,36 +6,35 @@ include ./makedefaults # Define the source file directories SOURCEDIR1=../src SOURCEDIR2=../src/Exchange -SOURCEDIR3=../src/Distributed -SOURCEDIR4=../src/Solution -SOURCEDIR5=../src/Solution/LinearMethods -SOURCEDIR6=../src/Solution/ParticleTracker -SOURCEDIR7=../src/Solution/PETSc -SOURCEDIR8=../src/Timing -SOURCEDIR9=../src/Utilities -SOURCEDIR10=../src/Utilities/Idm -SOURCEDIR11=../src/Utilities/Idm/selector -SOURCEDIR12=../src/Utilities/Idm/mf6blockfile -SOURCEDIR13=../src/Utilities/TimeSeries -SOURCEDIR14=../src/Utilities/Memory -SOURCEDIR15=../src/Utilities/OutputControl -SOURCEDIR16=../src/Utilities/ArrayRead +SOURCEDIR3=../src/Model +SOURCEDIR4=../src/Model/Geometry +SOURCEDIR5=../src/Model/TransportModel +SOURCEDIR6=../src/Model/ModelUtilities +SOURCEDIR7=../src/Model/Connection +SOURCEDIR8=../src/Model/GroundWaterTransport +SOURCEDIR9=../src/Model/GroundWaterFlow +SOURCEDIR10=../src/Distributed +SOURCEDIR11=../src/Solution +SOURCEDIR12=../src/Solution/PETSc +SOURCEDIR13=../src/Solution/LinearMethods +SOURCEDIR14=../src/Timing +SOURCEDIR15=../src/Utilities +SOURCEDIR16=../src/Utilities/TimeSeries SOURCEDIR17=../src/Utilities/Libraries SOURCEDIR18=../src/Utilities/Libraries/rcm -SOURCEDIR19=../src/Utilities/Libraries/blas +SOURCEDIR19=../src/Utilities/Libraries/sparsekit SOURCEDIR20=../src/Utilities/Libraries/sparskit2 -SOURCEDIR21=../src/Utilities/Libraries/daglib -SOURCEDIR22=../src/Utilities/Libraries/sparsekit -SOURCEDIR23=../src/Utilities/Vector -SOURCEDIR24=../src/Utilities/Matrix -SOURCEDIR25=../src/Utilities/Observation -SOURCEDIR26=../src/Model -SOURCEDIR27=../src/Model/Connection -SOURCEDIR28=../src/Model/GroundWaterTransport -SOURCEDIR29=../src/Model/ModelUtilities -SOURCEDIR30=../src/Model/GroundWaterFlow -SOURCEDIR31=../src/Model/TransportModel -SOURCEDIR32=../src/Model/Geometry +SOURCEDIR21=../src/Utilities/Libraries/blas +SOURCEDIR22=../src/Utilities/Libraries/daglib +SOURCEDIR23=../src/Utilities/Idm +SOURCEDIR24=../src/Utilities/Idm/selector +SOURCEDIR25=../src/Utilities/Idm/mf6blockfile +SOURCEDIR26=../src/Utilities/Matrix +SOURCEDIR27=../src/Utilities/Vector +SOURCEDIR28=../src/Utilities/Observation +SOURCEDIR29=../src/Utilities/OutputControl +SOURCEDIR30=../src/Utilities/Memory +SOURCEDIR31=../src/Utilities/ArrayRead VPATH = \ ${SOURCEDIR1} \ @@ -68,8 +67,7 @@ ${SOURCEDIR27} \ ${SOURCEDIR28} \ ${SOURCEDIR29} \ ${SOURCEDIR30} \ -${SOURCEDIR31} \ -${SOURCEDIR32} +${SOURCEDIR31} .SUFFIXES: .f90 .F90 .o @@ -109,6 +107,8 @@ $(OBJDIR)/gwf3rcha8idm.o \ $(OBJDIR)/gwf3npf8idm.o \ $(OBJDIR)/gwf3idm.o \ $(OBJDIR)/gwf3ghb8idm.o \ +$(OBJDIR)/gwf3evt8idm.o \ +$(OBJDIR)/gwf3evta8idm.o \ $(OBJDIR)/gwf3drn8idm.o \ $(OBJDIR)/gwf3disv8idm.o \ $(OBJDIR)/gwf3disu8idm.o \ diff --git a/msvs/mf6core.vfproj b/msvs/mf6core.vfproj index c7d0fdaa754..0949f90e7d7 100644 --- a/msvs/mf6core.vfproj +++ b/msvs/mf6core.vfproj @@ -133,6 +133,8 @@ + + diff --git a/src/Model/GroundWaterFlow/gwf3.f90 b/src/Model/GroundWaterFlow/gwf3.f90 index 8000150e376..6835e6c7171 100644 --- a/src/Model/GroundWaterFlow/gwf3.f90 +++ b/src/Model/GroundWaterFlow/gwf3.f90 @@ -1308,7 +1308,8 @@ subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, mempath, & call rch_create(packobj, ipakid, ipaknum, inunit, iout, this%name, & pakname, mempath) case ('EVT6') - call evt_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname) + call evt_create(packobj, ipakid, ipaknum, inunit, iout, this%name, & + pakname, mempath) case ('MAW6') call maw_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname) case ('SFR6') diff --git a/src/Model/GroundWaterFlow/gwf3dis8.f90 b/src/Model/GroundWaterFlow/gwf3dis8.f90 index c734751439f..d165c275a3f 100644 --- a/src/Model/GroundWaterFlow/gwf3dis8.f90 +++ b/src/Model/GroundWaterFlow/gwf3dis8.f90 @@ -36,7 +36,6 @@ module GwfDisModule procedure, public :: read_layer_array procedure, public :: record_srcdst_list_header procedure, public :: nlarray_to_nodelist - procedure, public :: nlarray_to_nodelist2 ! -- helper functions procedure :: get_nodenumber_idx1 procedure :: get_nodenumber_idx3 @@ -1657,100 +1656,9 @@ subroutine record_srcdst_list_header(this, text, textmodel, textpackage, & return end subroutine record_srcdst_list_header - subroutine nlarray_to_nodelist(this, nodelist, maxbnd, nbound, aname, & - inunit, iout) + subroutine nlarray_to_nodelist(this, darray, nodelist, maxbnd, nbound, aname) ! ****************************************************************************** -! nlarray_to_nodelist -- Read an integer array into nodelist. For structured -! model, integer array is layer number; for unstructured -! model, integer array is node number. -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ - ! -- modules - use InputOutputModule, only: get_node - use ConstantsModule, only: LINELENGTH - ! -- dummy - class(GwfDisType) :: this - integer(I4B), intent(in) :: maxbnd - integer(I4B), dimension(maxbnd), intent(inout) :: nodelist - integer(I4B), intent(inout) :: nbound - character(len=*), intent(in) :: aname - integer(I4B), intent(in) :: inunit - integer(I4B), intent(in) :: iout - ! -- local - integer(I4B) :: il, ir, ic, ncol, nrow, nlay, nval, nodeu, noder, ipos, ierr -! ------------------------------------------------------------------------------ - ! - ! -- set variables - nlay = this%mshape(1) - nrow = this%mshape(2) - ncol = this%mshape(3) - ! - if (this%ndim > 1) then - ! - nval = ncol * nrow - call ReadArray(inunit, this%ibuff, aname, this%ndim, ncol, nrow, nlay, & - nval, iout, 0, 0) - ! - ! -- Copy array into nodelist - ipos = 1 - ierr = 0 - do ir = 1, nrow - do ic = 1, ncol - nodeu = get_node(1, ir, ic, nlay, nrow, ncol) - il = this%ibuff(nodeu) - if (il < 1 .or. il > nlay) then - write (errmsg, '(a,1x,i0)') 'Invalid layer number:', il - call store_error(errmsg, terminate=.TRUE.) - end if - nodeu = get_node(il, ir, ic, nlay, nrow, ncol) - noder = this%get_nodenumber(nodeu, 0) - if (ipos > maxbnd) then - ierr = ipos - else - nodelist(ipos) = noder - end if - ipos = ipos + 1 - end do - end do - ! - ! -- Check for errors - nbound = ipos - 1 - if (ierr > 0) then - write (errmsg, '(a,1x,i0)') & - 'MAXBOUND dimension is too small.'// & - 'INCREASE MAXBOUND TO:', ierr - call store_error(errmsg, terminate=.TRUE.) - end if - ! - ! -- If nbound < maxbnd, then initialize nodelist to zero in this range - if (nbound < maxbnd) then - do ipos = nbound + 1, maxbnd - nodelist(ipos) = 0 - end do - end if - ! - else - ! - ! -- For unstructured, read nodelist directly, then check node numbers - call ReadArray(inunit, nodelist, aname, this%ndim, maxbnd, iout, 0) - do noder = 1, maxbnd - if (noder < 1 .or. noder > this%nodes) then - write (errmsg, '(a,1x,i0)') 'Invalid node number:', noder - call store_error(errmsg, terminate=.TRUE.) - end if - end do - nbound = maxbnd - ! - end if - ! - ! -- return - end subroutine nlarray_to_nodelist - - subroutine nlarray_to_nodelist2(this, darray, nodelist, maxbnd, nbound, aname) -! ****************************************************************************** -! nlarray_to_nodelist -- Read an integer array into nodelist. For structured +! nlarray_to_nodelist -- Convert an integer array into nodelist. For structured ! model, integer array is layer number; for unstructured ! model, integer array is node number. ! ****************************************************************************** @@ -1833,6 +1741,6 @@ subroutine nlarray_to_nodelist2(this, darray, nodelist, maxbnd, nbound, aname) end if ! ! -- return - end subroutine nlarray_to_nodelist2 + end subroutine nlarray_to_nodelist end module GwfDisModule diff --git a/src/Model/GroundWaterFlow/gwf3disv8.f90 b/src/Model/GroundWaterFlow/gwf3disv8.f90 index a62bb66b3de..505cd680e89 100644 --- a/src/Model/GroundWaterFlow/gwf3disv8.f90 +++ b/src/Model/GroundWaterFlow/gwf3disv8.f90 @@ -38,7 +38,6 @@ module GwfDisvModule procedure, public :: read_layer_array procedure, public :: record_srcdst_list_header procedure, public :: nlarray_to_nodelist - procedure, public :: nlarray_to_nodelist2 ! -- helper functions procedure :: get_nodenumber_idx1 procedure :: get_nodenumber_idx2 @@ -1909,82 +1908,9 @@ subroutine record_srcdst_list_header(this, text, textmodel, textpackage, & return end subroutine record_srcdst_list_header - subroutine nlarray_to_nodelist(this, nodelist, maxbnd, nbound, aname, & - inunit, iout) + subroutine nlarray_to_nodelist(this, darray, nodelist, maxbnd, nbound, aname) ! ****************************************************************************** -! nlarray_to_nodelist -- Read an integer array into nodelist. For structured -! model, integer array is layer number; for unstructured -! model, integer array is node number. -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ - ! -- modules - use InputOutputModule, only: get_node - ! -- dummy - class(GwfDisvType) :: this - integer(I4B), intent(in) :: maxbnd - integer(I4B), dimension(maxbnd), intent(inout) :: nodelist - integer(I4B), intent(inout) :: nbound - character(len=*), intent(in) :: aname - integer(I4B), intent(in) :: inunit - integer(I4B), intent(in) :: iout - ! -- local - integer(I4B) :: il, ir, ic, ncol, nrow, nlay, nval, nodeu, noder, ipos, ierr -! ------------------------------------------------------------------------------ - ! - ! -- set variables - nlay = this%mshape(1) - nrow = 1 - ncol = this%mshape(2) - ! - nval = ncol * nrow - call ReadArray(inunit, this%ibuff, aname, this%ndim, nval, iout, 0) - ! - ! -- Copy array into nodelist - ipos = 1 - ierr = 0 - do ir = 1, nrow - do ic = 1, ncol - nodeu = get_node(1, ir, ic, nlay, nrow, ncol) - il = this%ibuff(nodeu) - if (il < 1 .or. il > nlay) then - write (errmsg, '(a,i0,a)') & - 'Invalid layer number (', il, ').' - call store_error(errmsg, terminate=.TRUE.) - end if - nodeu = get_node(il, ir, ic, nlay, nrow, ncol) - noder = this%get_nodenumber(nodeu, 0) - if (ipos > maxbnd) then - ierr = ipos - else - nodelist(ipos) = noder - end if - ipos = ipos + 1 - end do - end do - ! - ! -- Check for errors - nbound = ipos - 1 - if (ierr > 0) then - write (errmsg, '(a,i0,a)') & - 'MAXBOUND dimension is too small. Increase MAXBOUND to ', ierr, '.' - call store_error(errmsg, terminate=.TRUE.) - end if - ! - ! -- If nbound < maxbnd, then initialize nodelist to zero in this range - if (nbound < maxbnd) then - do ipos = nbound + 1, maxbnd - nodelist(ipos) = 0 - end do - end if - ! - ! -- return - end subroutine nlarray_to_nodelist - - subroutine nlarray_to_nodelist2(this, darray, nodelist, maxbnd, nbound, aname) -! ****************************************************************************** -! nlarray_to_nodelist -- Read an integer array into nodelist. For structured +! nlarray_to_nodelist -- Convert an integer array into nodelist. For structured ! model, integer array is layer number; for unstructured ! model, integer array is node number. ! ****************************************************************************** @@ -2050,6 +1976,6 @@ subroutine nlarray_to_nodelist2(this, darray, nodelist, maxbnd, nbound, aname) end if ! ! -- return - end subroutine nlarray_to_nodelist2 + end subroutine nlarray_to_nodelist end module GwfDisvModule diff --git a/src/Model/GroundWaterFlow/gwf3evt8.f90 b/src/Model/GroundWaterFlow/gwf3evt8.f90 index 37652b31151..f3efa402208 100644 --- a/src/Model/GroundWaterFlow/gwf3evt8.f90 +++ b/src/Model/GroundWaterFlow/gwf3evt8.f90 @@ -1,17 +1,16 @@ module EvtModule ! - use KindModule, only: DP, I4B + use KindModule, only: DP, I4B, LGP use ConstantsModule, only: DZERO, DONE, LENFTYPE, LENPACKAGENAME, MAXCHARLEN, & IWETLAKE use MemoryHelperModule, only: create_mem_path use BndModule, only: BndType - use SimModule, only: store_error, store_error_unit, count_errors + use BndExtModule, only: BndExtType + use SimModule, only: store_error, store_error_filename, count_errors use SimVariablesModule, only: errmsg use ObsModule, only: DefaultObsIdProcessor - use TimeArraySeriesLinkModule, only: TimeArraySeriesLinkType - use TimeSeriesLinkModule, only: TimeSeriesLinkType, & - GetTimeSeriesLinkFromList use BlockParserModule, only: BlockParserType + use CharacterStringModule, only: CharacterStringType use MatrixBaseModule ! implicit none @@ -23,21 +22,28 @@ module EvtModule character(len=LENPACKAGENAME) :: text = ' EVT' character(len=LENPACKAGENAME) :: texta = ' EVTA' ! - type, extends(BndType) :: EvtType + type, extends(BndExtType) :: EvtType ! -- logicals - logical, private :: segsdefined = .true. - logical, private :: fixed_cell = .false. - logical, private :: read_as_arrays = .false. - logical, private :: surfratespecified = .false. + logical, pointer, private :: segsdefined + logical, pointer, private :: fixed_cell + logical, pointer, private :: read_as_arrays + logical, pointer, private :: surfratespecified ! -- integers - integer(I4B), pointer :: inievt => null() - integer(I4B), pointer, private :: nseg => null() + integer(I4B), pointer, private :: nseg => null() !< number of ET segments ! -- arrays + real(DP), dimension(:), pointer, contiguous :: surface => null() !< elevation of the ET surface + real(DP), dimension(:), pointer, contiguous :: rate => null() !< maximum ET flux rate + real(DP), dimension(:), pointer, contiguous :: depth => null() !< ET extinction depth + real(DP), dimension(:, :), pointer, contiguous :: pxdp => null() !< proportion of ET extinction depth at bottom of segment + real(DP), dimension(:, :), pointer, contiguous :: petm => null() !< proportion of max ET flux rate at bottom of segment + real(DP), dimension(:), pointer, contiguous :: petm0 => null() !< proportion of max ET flux rate that will apply when head is at or above ET surface integer(I4B), dimension(:), pointer, contiguous :: nodesontop => null() contains procedure :: evt_allocate_scalars - procedure :: bnd_options => evt_options - procedure :: read_dimensions => evt_read_dimensions + procedure :: allocate_arrays => evt_allocate_arrays + procedure :: source_options => evt_source_options + procedure :: source_dimensions => evt_source_dimensions + procedure :: evt_log_options procedure :: read_initial_attr => evt_read_initial_attr procedure :: bnd_rp => evt_rp procedure :: set_nodesontop @@ -45,32 +51,18 @@ module EvtModule procedure :: bnd_fc => evt_fc procedure :: bnd_da => evt_da procedure :: define_listlabel => evt_define_listlabel - procedure, private :: evt_rp_array - procedure, private :: evt_rp_list + procedure :: bound_value => evt_bound_value procedure, private :: default_nodelist procedure, private :: check_pxdp ! -- for observations procedure, public :: bnd_obs_supported => evt_obs_supported procedure, public :: bnd_df_obs => evt_df_obs - ! -- for time series - procedure, public :: bnd_rp_ts => evt_rp_ts end type EvtType - ! EVT uses BndType%bound array columns: - ! Index Description old name Keyword - ! (1,n) ET Surface elevation ETSS SURFACE - ! (2,n) Max ET Rate ETSR RATE - ! (3,n) Extinction Depth ETSX DEPTH - ! Used only if nseg > 1 and surfratespecified is false: - ! 4->2+nseg Proportion of Extinction Depth PXDP PXDP - ! 3+nseg->3+2(nseg-1) Proportion of Max ET Rate PETM PETM - ! If nseg > 1 and surfratespecified is true: - ! 4->3+nseg Proportion of Extinction Depth PXDP PXDP - ! 4+nseg->3+2(nseg) Proportion of Max ET Rate PETM PETM - contains - subroutine evt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname) + subroutine evt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & + mempath) ! ****************************************************************************** ! evt_create -- Create a new Evapotranspiration Segments Package ! Subroutine: (1) create new-style package @@ -87,6 +79,7 @@ subroutine evt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname) integer(I4B), intent(in) :: iout character(len=*), intent(in) :: namemodel character(len=*), intent(in) :: pakname + character(len=*), intent(in) :: mempath ! -- local type(EvtType), pointer :: evtobj ! ------------------------------------------------------------------------------ @@ -96,7 +89,7 @@ subroutine evt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname) packobj => evtobj ! ! -- create name and memory path - call packobj%set_names(ibcnum, namemodel, pakname, ftype) + call packobj%set_names(ibcnum, namemodel, pakname, ftype, mempath) packobj%text = text ! ! -- allocate scalars @@ -112,10 +105,6 @@ subroutine evt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname) packobj%ncolbnd = 3 ! Assumes NSEG = 1 and SURF_RATE_SPECIFIED=False packobj%iscloc = 2 ! sfac applies to max. ET rate packobj%ictMemPath = create_mem_path(namemodel, 'NPF') - ! indxconvertflux is Column index of bound that will be multiplied by - ! cell area to convert flux rates to flow rates - packobj%indxconvertflux = 2 - packobj%AllowTimeArraySeries = .true. ! ! -- return return @@ -129,41 +118,166 @@ subroutine evt_allocate_scalars(this) ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ ! -- modules - use MemoryManagerModule, only: mem_allocate + use MemoryManagerModule, only: mem_allocate, mem_setptr ! -- dummy class(EvtType), intent(inout) :: this ! ------------------------------------------------------------------------------ ! ! -- call standard BndType allocate scalars - call this%BndType%allocate_scalars() + call this%BndExtType%allocate_scalars() ! ! -- allocate the object and assign values to object variables - call mem_allocate(this%inievt, 'INIEVT', this%memoryPath) call mem_allocate(this%nseg, 'NSEG', this%memoryPath) ! + ! -- allocate internal members + allocate (this%segsdefined) + allocate (this%fixed_cell) + allocate (this%read_as_arrays) + allocate (this%surfratespecified) + ! ! -- Set values - this%inievt = 0 this%nseg = 1 + this%segsdefined = .true. this%fixed_cell = .false. + this%read_as_arrays = .false. + this%surfratespecified = .false. ! ! -- return return end subroutine evt_allocate_scalars - subroutine evt_options(this, option, found) + subroutine evt_allocate_arrays(this, nodelist, auxvar) +! ****************************************************************************** +! chd_allocate_arrays -- allocate arrays +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ + ! -- modules + use MemoryManagerModule, only: mem_allocate, mem_setptr, mem_checkin + ! -- dummy + class(EvtType) :: this + integer(I4B), dimension(:), pointer, contiguous, optional :: nodelist + real(DP), dimension(:, :), pointer, contiguous, optional :: auxvar + ! -- local +! ------------------------------------------------------------------------------ + ! + ! -- call standard BndType allocate scalars + call this%BndExtType%allocate_arrays(nodelist, auxvar) + ! + ! -- set EVT input context pointers + call mem_setptr(this%surface, 'SURFACE', this%input_mempath) + call mem_setptr(this%rate, 'RATE', this%input_mempath) + call mem_setptr(this%depth, 'DEPTH', this%input_mempath) + ! + ! -- checkin EVT input context pointers + call mem_checkin(this%surface, 'SURFACE', this%memoryPath, & + 'SURFACE', this%input_mempath) + call mem_checkin(this%rate, 'RATE', this%memoryPath, & + 'RATE', this%input_mempath) + call mem_checkin(this%depth, 'DEPTH', this%memoryPath, & + 'DEPTH', this%input_mempath) + ! + ! -- set list input segment descriptors + if (.not. this%read_as_arrays) then + if (this%nseg > 1) then + ! + ! -- set pxdp and petm input context pointers + call mem_setptr(this%pxdp, 'PXDP', this%input_mempath) + call mem_setptr(this%petm, 'PETM', this%input_mempath) + ! + ! -- checkin pxdp and petm input context pointers + call mem_checkin(this%pxdp, 'PXDP', this%memoryPath, & + 'PXDP', this%input_mempath) + call mem_checkin(this%petm, 'PETM', this%memoryPath, & + 'PETM', this%input_mempath) + end if + ! + if (this%surfratespecified) then + ! + ! -- set petm0 input context pointer + call mem_setptr(this%petm0, 'PETM0', this%input_mempath) + ! + ! -- cehckin petm0 input context pointer + call mem_checkin(this%petm0, 'PETM0', this%memoryPath, & + 'PETM0', this%input_mempath) + end if + end if + ! + ! -- return + return + end subroutine evt_allocate_arrays + + subroutine evt_source_options(this) +! ****************************************************************************** +! evt_source_options -- source options specific to EvtType +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ + ! -- modules + use MemoryManagerExtModule, only: mem_set_value + use IdmGwfDfnSelectorModule, only: GwfParamFoundType + ! -- dummy + class(EvtType), intent(inout) :: this + ! -- local + type(GwfParamFoundType) :: found +! ------------------------------------------------------------------------------ + ! + ! -- source common bound options + call this%BndExtType%source_options() + ! + ! -- update defaults with idm sourced values + call mem_set_value(this%fixed_cell, 'FIXED_CELL', & + this%input_mempath, found%fixed_cell) + call mem_set_value(this%read_as_arrays, 'READASARRAYS', & + this%input_mempath, found%readasarrays) + call mem_set_value(this%surfratespecified, 'SURFRATESPEC', & + this%input_mempath, found%surfratespec) + ! + if (found%readasarrays) then + if (this%dis%supports_layers()) then + this%text = texta + else + errmsg = 'READASARRAYS option is not compatible with selected'// & + ' discretization type.' + call store_error(errmsg) + call store_error_filename(this%input_fname) + end if + end if + ! + if (found%readasarrays .and. found%surfratespec) then + if (this%read_as_arrays) then + errmsg = 'READASARRAYS option is not compatible with the'// & + ' SURF_RATE_SPECIFIED option.' + call store_error(errmsg) + call store_error_filename(this%input_fname) + end if + end if + ! + ! -- log evt specific options + call this%evt_log_options(found) + ! + ! -- return + return + end subroutine evt_source_options + + subroutine evt_log_options(this, found) ! ****************************************************************************** -! evt_options -- set options specific to EvtType -! evt_options overrides BndType%bnd_options +! evt_log_options -- source options specific to EvtType ! ****************************************************************************** ! ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ + ! -- modules + use MemoryManagerModule, only: mem_reallocate, mem_setptr + use MemoryManagerExtModule, only: mem_set_value + use CharacterStringModule, only: CharacterStringType + use IdmGwfDfnSelectorModule, only: GwfParamFoundType ! -- dummy class(EvtType), intent(inout) :: this - character(len=*), intent(inout) :: option - logical, intent(inout) :: found + type(GwfParamFoundType), intent(in) :: found ! -- local - character(len=MAXCHARLEN) :: ermsg ! -- formats character(len=*), parameter :: fmtihact = & &"(4x, 'EVAPOTRANSPIRATION WILL BE APPLIED TO HIGHEST ACTIVE CELL.')" @@ -177,70 +291,45 @@ subroutine evt_options(this, option, found) &"(4x, 'ET RATE AT SURFACE WILL BE AS SPECIFIED BY PETM0.')" ! ------------------------------------------------------------------------------ ! - ! -- Check for FIXED_CELL AND LAYERED - select case (option) - case ('FIXED_CELL') - this%fixed_cell = .true. + ! -- log found options + write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text)) & + //' OPTIONS' + ! + if (found%fixed_cell) then write (this%iout, fmtfixedcell) - found = .true. - case ('SURF_RATE_SPECIFIED') - this%surfratespecified = .true. - write (this%iout, fmtsrs) - found = .true. - ! - if (this%read_as_arrays) then - ermsg = 'READASARRAYS option is not compatible with the'// & - ' SURF_RATE_SPECIFIED option.' - call store_error(ermsg) - call this%parser%StoreErrorUnit() - end if - case ('READASARRAYS') - if (this%dis%supports_layers()) then - this%read_as_arrays = .true. - this%text = texta - else - ermsg = 'READASARRAYS option is not compatible with selected'// & - ' discretization type.' - call store_error(ermsg) - call this%parser%StoreErrorUnit() - end if - ! - if (this%surfratespecified) then - ermsg = 'READASARRAYS option is not compatible with the'// & - ' SURF_RATE_SPECIFIED option.' - call store_error(ermsg) - call this%parser%StoreErrorUnit() - end if - ! - ! -- Write option + end if + ! + if (found%readasarrays) then write (this%iout, fmtreadasarrays) - ! - found = .true. - case default - ! - ! -- No options found - found = .false. - end select + end if + ! + if (found%surfratespec) then + write (this%iout, fmtsrs) + end if + ! + ! -- close logging block + write (this%iout, '(1x,a)') & + 'END OF '//trim(adjustl(this%text))//' OPTIONS' ! ! -- return return - end subroutine evt_options - subroutine evt_read_dimensions(this) + end subroutine evt_log_options + + subroutine evt_source_dimensions(this) ! ****************************************************************************** -! bnd_read_dimensions -- Read the dimensions for this package +! bnd_source_dimensions -- Source the dimensions for this package ! ****************************************************************************** ! ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ - use ConstantsModule, only: LINELENGTH - use SimModule, only: store_error, store_error_unit + ! -- modules + use MemoryManagerExtModule, only: mem_set_value + use GwfEvtInputModule, only: GwfEvtParamFoundType ! -- dummy class(EvtType), intent(inout) :: this ! -- local - character(len=LINELENGTH) :: keyword - integer(I4B) :: ierr - logical :: isfound, endOfBlock + type(GwfEvtParamFoundType) :: found ! -- format character(len=*), parameter :: fmtnsegerr = & &"('Error: In EVT, NSEG must be > 0 but is specified as ',i0)" @@ -251,79 +340,63 @@ subroutine evt_read_dimensions(this) ! (2) READASARRAYS option has been specified. if (this%read_as_arrays) then this%maxbound = this%dis%get_ncpl() + ! + ! -- verify dimensions were set + if (this%maxbound <= 0) then + write (errmsg, '(a)') & + 'MAXBOUND must be an integer greater than zero.' + call store_error(errmsg) + call store_error_filename(this%input_fname) + end if + ! else - ! -- get dimensions block - call this%parser%GetBlock('DIMENSIONS', isfound, ierr, & - supportOpenClose=.true.) ! - ! -- parse dimensions block if detected - if (isfound) then - write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text))// & - ' DIMENSIONS' - do - call this%parser%GetNextLine(endOfBlock) - if (endOfBlock) exit - call this%parser%GetStringCaps(keyword) - select case (keyword) - case ('MAXBOUND') - if (this%read_as_arrays) then - errmsg = 'When READASARRAYS option is used for the selected'// & - ' discretization package, MAXBOUND may not be specified.' - call store_error(errmsg) - call this%parser%StoreErrorUnit() - else - this%maxbound = this%parser%GetInteger() - write (this%iout, '(4x,a,i7)') 'MAXBOUND = ', this%maxbound - end if - case ('NSEG') - this%nseg = this%parser%GetInteger() - write (this%iout, '(4x,a,i0)') 'NSEG = ', this%nseg - if (this%nseg < 1) then - write (errmsg, fmtnsegerr) this%nseg - call store_error(errmsg) - call this%parser%StoreErrorUnit() - elseif (this%nseg > 1) then - ! NSEG>1 is supported only if readasarrays is false - if (this%read_as_arrays) then - errmsg = 'In the EVT package, NSEG cannot be greater than 1'// & - ' when READASARRAYS is used.' - call store_error(errmsg) - call this%parser%StoreErrorUnit() - end if - ! -- Recalculate number of columns required in bound array. - if (this%surfratespecified) then - this%ncolbnd = 4 + 2 * (this%nseg - 1) - else - this%ncolbnd = 3 + 2 * (this%nseg - 1) - end if - elseif (this%nseg == 1) then - ! if surf_rate_specified is true, will still read petm0 - if (this%surfratespecified) then - this%ncolbnd = this%ncolbnd + 1 - end if - end if - case default - write (errmsg, '(a,a)') & - 'Unknown '//trim(this%text)//' DIMENSION: ', trim(keyword) - call store_error(errmsg) - call this%parser%StoreErrorUnit() - end select - end do + ! -- source maxbound + call this%BndExtType%source_dimensions() + ! + ! -- log found options + write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text)) & + //' DIMENSIONS' + ! + ! -- update defaults with idm sourced values + call mem_set_value(this%nseg, 'NSEG', this%input_mempath, found%nseg) + ! + if (found%nseg) then ! - write (this%iout, '(1x,a)') & - 'END OF '//trim(adjustl(this%text))//' DIMENSIONS' - else - call store_error('Required DIMENSIONS block not found.') - call this%parser%StoreErrorUnit() + write (this%iout, '(4x,a,i0)') 'NSEG = ', this%nseg + ! + if (this%nseg < 1) then + write (errmsg, fmtnsegerr) this%nseg + call store_error(errmsg) + call store_error_filename(this%input_fname) + ! + elseif (this%nseg > 1) then + ! NSEG>1 is supported only if readasarrays is false + if (this%read_as_arrays) then + errmsg = 'In the EVT package, NSEG cannot be greater than 1'// & + ' when READASARRAYS is used.' + call store_error(errmsg) + call store_error_filename(this%input_fname) + end if + ! -- Recalculate number of columns required in bound array. + if (this%surfratespecified) then + this%ncolbnd = 4 + 2 * (this%nseg - 1) + else + this%ncolbnd = 3 + 2 * (this%nseg - 1) + end if + ! + elseif (this%nseg == 1) then + ! if surf_rate_specified is true, will still read petm0 + if (this%surfratespecified) then + this%ncolbnd = this%ncolbnd + 1 + end if + end if end if - end if - ! - ! -- verify dimensions were set - if (this%maxbound <= 0) then - write (errmsg, '(a)') & - 'MAXBOUND must be an integer greater than zero.' - call store_error(errmsg) - call this%parser%StoreErrorUnit() + ! + ! -- close logging block + write (this%iout, '(1x,a)') & + 'END OF '//trim(adjustl(this%text))//' DIMENSIONS' + ! end if ! ! -- Call define_listlabel to construct the list label that is written @@ -332,7 +405,7 @@ subroutine evt_read_dimensions(this) ! ! -- return return - end subroutine evt_read_dimensions + end subroutine evt_source_dimensions subroutine evt_read_initial_attr(this) ! ****************************************************************************** @@ -355,131 +428,47 @@ end subroutine evt_read_initial_attr subroutine evt_rp(this) ! ****************************************************************************** ! evt_rp -- Read and Prepare -! Read new boundaries +! Subroutine: (1) read itmp +! (2) read new boundaries if itmp>0 ! ****************************************************************************** ! ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ - ! -- modules - use ConstantsModule, only: LINELENGTH - use TdisModule, only: kper, nper - use SimModule, only: store_error - use ArrayHandlersModule, only: ifind + use TdisModule, only: kper + implicit none ! -- dummy class(EvtType), intent(inout) :: this ! -- local - integer(I4B) :: ierr - integer(I4B) :: node, n - integer(I4B) :: inievt, inrate, insurf, indepth - integer(I4B) :: kpxdp, kpetm - logical :: isfound, supportopenclose - character(len=LINELENGTH) :: line, msg - ! -- formats - character(len=*), parameter :: fmtblkerr = & - &"('Error. Looking for BEGIN PERIOD iper. Found ', a, ' instead.')" - character(len=*), parameter :: fmtlsp = & - &"(1X,/1X,'REUSING ',A,'S FROM LAST STRESS PERIOD')" - character(len=*), parameter :: fmtnbd = & - "(1X,/1X,'THE NUMBER OF ACTIVE ',A,'S (',I6,& - &') IS GREATER THAN MAXIMUM(',I6,')')" ! ------------------------------------------------------------------------------ ! - ! -- Set ionper to the stress period number for which a new block of data - ! will be read. - if (this%inunit == 0) return - ! - ! -- get stress period data - if (this%ionper < kper) then - ! - ! -- get period block - supportopenclose = .not. this%read_as_arrays - ! When reading a list, OPEN/CLOSE is handled by list reader, - ! so supportOpenClose needs to be false in call the GetBlock. - ! When reading as arrays, set supportOpenClose as desired. - call this%parser%GetBlock('PERIOD', isfound, ierr, & - blockRequired=.false.) - if (isfound) then - ! - ! -- read ionper and check for increasing period numbers - call this%read_check_ionper() - else - ! - ! -- PERIOD block not found - if (ierr < 0) then - ! -- End of file found; data applies for remainder of simulation. - this%ionper = nper + 1 - else - ! -- Found invalid block - call this%parser%GetCurrentLine(line) - write (errmsg, fmtblkerr) adjustl(trim(line)) - call store_error(errmsg) - call this%parser%StoreErrorUnit() - end if - end if - end if + if (this%iper /= kper) return ! - ! -- Read data if ionper == kper - inrate = 0 - insurf = 0 - indepth = 0 - inievt = 0 - if (this%ionper == kper) then - ! - ! -- Remove all time-series links associated with this package - call this%TsManager%Reset(this%packName) - call this%TasManager%Reset(this%packName) + if (this%read_as_arrays) then ! - ! -- Read IEVT, SURFACE, RATE, DEPTH, PXDP, PETM, and AUX - ! variables, if any - kpetm = 0 - kpxdp = 0 + ! -- update nodelist based on IRCH input + call nodelist_update(this%nodelist, this%nbound, this%maxbound, & + this%dis, this%input_mempath) ! - if (.not. this%read_as_arrays) then - ! -- Read EVT input as a list - call this%evt_rp_list(inrate) - else - ! -- Read Evt input as arrays - call this%evt_rp_array(line, inrate, insurf, indepth, & - kpxdp, kpetm) - end if - ! - ! -- Ensure that all required PXDP and PETM arrays - ! have been defined or redefined. - if (this%surfratespecified) then - if (kpxdp == this%nseg .and. kpetm == this%nseg) then - this%segsdefined = .true. - end if - else - if (kpxdp == this%nseg - 1 .and. kpxdp == this%nseg - 1) then - this%segsdefined = .true. - end if - end if - if (.not. this%segsdefined) then - msg = 'Error in EVT input: Definition of PXDP or PETM is incomplete.' - call store_error(msg) - call this%parser%StoreErrorUnit() - end if else - write (this%iout, fmtlsp) trim(this%filtyp) - end if - ! - ! -- If rate was read, then multiply by cell area. If inrate = 2, then - ! rate is begin managed as a time series, and the time series object - ! will multiply the rate by the cell area. - if (inrate == 1) then - do n = 1, this%nbound - node = this%nodelist(n) - if (node > 0) then - this%bound(2, n) = this%bound(2, n) * this%dis%get_area(node) - end if - end do + ! + ! -- process the input list arrays + call this%BndExtType%bnd_rp() ! ! -- ensure pxdp is monotonically increasing if (this%nseg > 1) then call this%check_pxdp() end if + ! + ! -- Write the list to iout if requested + if (this%iprpak /= 0) then + call this%write_list() + end if + ! end if ! + ! -- copy nodelist to nodesontop if not fixed cell + if (.not. this%fixed_cell) call this%set_nodesontop() + ! ! -- return return end subroutine evt_rp @@ -518,7 +507,7 @@ subroutine check_pxdp(this) ! ! -- set and check pxdp2 if (i < this%nseg) then - pxdp2 = this%bound(i + 3, n) + pxdp2 = this%pxdp(i, n) if (pxdp2 <= DZERO .or. pxdp2 >= DONE) then call this%dis%noder_to_string(node, nodestr) write (errmsg, fmtpxdp0) pxdp2, trim(nodestr) @@ -631,11 +620,16 @@ subroutine evt_cf(this, reset_mover) ! -- if ibound is positive and not overlain by a lake, then add terms if (this%ibound(node) > 0 .and. this%ibound(node) /= IWETLAKE) then ! - c = this%bound(2, i) ! RATE -- max. ET rate - s = this%bound(1, i) ! SURFACE -- ET surface elevation + if (this%iauxmultcol > 0) then + c = this%rate(i) * this%dis%get_area(node) * & + this%auxvar(this%iauxmultcol, i) + else + c = this%rate(i) * this%dis%get_area(node) + end if + s = this%surface(i) h = this%xnew(node) if (this%surfratespecified) then - petm0 = this%bound(4 + 2 * (this%nseg - 1), i) ! PETM0 + petm0 = this%petm0(i) end if ! ! -- If head in cell is greater than or equal to SURFACE, ET is constant @@ -650,7 +644,7 @@ subroutine evt_cf(this, reset_mover) else ! -- If depth to water >= extinction depth, then ET is 0 d = S - h - x = this%bound(3, i) ! DEPTH -- extinction depth + x = this%depth(i) if (d < x) then ! -- Variable range. add ET terms to both RHS and HCOF. if (this%nseg > 1) then @@ -673,8 +667,8 @@ subroutine evt_cf(this, reset_mover) end if ! -- Initialize indices to point to elements preceding ! pxdp1 and petm1 (values for lower end of segment 1). - idxdepth = 3 - idxrate = 2 + this%nseg + idxdepth = 0 + idxrate = 0 ! -- Iterate through segments to find segment that contains ! current depth of head below ET surface. segloop: do iseg = 1, this%nseg @@ -685,8 +679,8 @@ subroutine evt_cf(this, reset_mover) idxdepth = idxdepth + 1 idxrate = idxrate + 1 ! -- Get proportions for lower end of segment - pxdp2 = this%bound(idxdepth, i) - petm2 = this%bound(idxrate, i) + pxdp2 = this%pxdp(idxdepth, i) + petm2 = this%petm(idxrate, i) else pxdp2 = DONE petm2 = DZERO @@ -773,350 +767,35 @@ subroutine evt_da(this) ! ! -- arrays if (associated(this%nodesontop)) deallocate (this%nodesontop) + call mem_deallocate(this%surface, 'SURFACE', this%memoryPath) + call mem_deallocate(this%rate, 'RATE', this%memoryPath) + call mem_deallocate(this%depth, 'DEPTH', this%memoryPath) + ! + if (.not. this%read_as_arrays) then + if (this%nseg > 1) then + call mem_deallocate(this%pxdp, 'PXDP', this%memoryPath) + call mem_deallocate(this%petm, 'PETM', this%memoryPath) + end if + ! + if (this%surfratespecified) then + call mem_deallocate(this%petm0, 'PETM0', this%memoryPath) + end if + end if ! ! -- scalars - call mem_deallocate(this%inievt) call mem_deallocate(this%nseg) + deallocate (this%segsdefined) + deallocate (this%fixed_cell) + deallocate (this%read_as_arrays) + deallocate (this%surfratespecified) ! ! -- Deallocate parent package - call this%BndType%bnd_da() + call this%BndExtType%bnd_da() ! ! -- return return end subroutine evt_da - subroutine evt_rp_array(this, line, inrate, insurf, indepth, & - kpxdp, kpetm) -! ****************************************************************************** -! evt_rp_array -- Read and Prepare EVT as arrays -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ - ! -- modules - use ConstantsModule, only: LENTIMESERIESNAME, LINELENGTH - use SimModule, only: store_error - use ArrayHandlersModule, only: ifind - ! -- dummy - class(EvtType), intent(inout) :: this - character(len=LINELENGTH), intent(inout) :: line - integer(I4B), intent(inout) :: inrate - integer(I4B), intent(inout) :: insurf - integer(I4B), intent(inout) :: indepth - integer(I4B), intent(inout) :: kpxdp - integer(I4B), intent(inout) :: kpetm - ! -- local - integer(I4B) :: n - integer(I4B) :: indx, ipos - integer(I4B) :: jcol, jauxcol, lpos, ivarsread - character(len=LENTIMESERIESNAME) :: tasName - character(len=24), dimension(6) :: aname - character(len=100) :: ermsg, keyword, atemp - logical :: found, endOfBlock - logical :: convertFlux - ! - ! -- these time array series pointers need to be non-contiguous - ! beacuse a slice of bound is passed - real(DP), dimension(:), pointer :: bndArrayPtr => null() - real(DP), dimension(:), pointer :: auxArrayPtr => null() - real(DP), dimension(:), pointer :: auxMultArray => null() - type(TimeArraySeriesLinkType), pointer :: tasLink => null() - ! -- formats - character(len=*), parameter :: fmtevtauxmult = & - "(4x, 'THE ET RATE ARRAY IS BEING MULTIPLED BY THE AUXILIARY ARRAY WITH & - &THE NAME: ', A)" - ! -- data - data aname(1)/' LAYER OR NODE INDEX'/ - data aname(2)/' ET SURFACE'/ - data aname(3)/' EVAPOTRANSPIRATION RATE'/ - data aname(4)/' EXTINCTION DEPTH'/ - data aname(5)/'EXTINCT. DEP. PROPORTION'/ - data aname(6)/' ET RATE PROPORTION'/ -! ------------------------------------------------------------------------------ - ! - ! -- Initialize - jauxcol = 0 - ivarsread = 0 - ! - ! -- Read IEVT, SURFACE, RATE, DEPTH, PXDP, PETM, and AUX - ! as arrays - kpetm = 0 - kpxdp = 0 - do - call this%parser%GetNextLine(endOfBlock) - if (endOfBlock) exit - call this%parser%GetStringCaps(keyword) - ! - ! -- Parse the keywords - select case (keyword) - case ('IEVT') - ! - ! -- Check to see if other variables have already been read. If so, - ! then terminate with an error that IEVT must be read first. - if (ivarsread > 0) then - call store_error('IEVT is not first variable in & - &period block or it is specified more than once.') - call this%parser%StoreErrorUnit() - end if - ! - ! -- Read the IEVT array - call this%dis%nlarray_to_nodelist(this%nodelist, this%maxbound, & - this%nbound, aname(1), & - this%parser%iuactive, this%iout) - ! - ! -- set flag to indicate that IEVT has been read - this%inievt = 1 - ! - ! -- if highest_active option set, then need to store nodelist - ! in the nodesontop array - if (.not. this%fixed_cell) call this%set_nodesontop() - ! - case ('SURFACE') - ! - if (this%inievt == 0) then - call store_error('IEVT must be read at least once & - &prior to reading the SURFACE array.') - call this%parser%StoreErrorUnit() - end if - ! - ! -- Read the surface array, then indicate - ! that surface array was read by setting insurf - call this%dis%read_layer_array(this%nodelist, this%bound, this%ncolbnd, & - this%maxbound, 1, aname(2), & - this%parser%iuactive, this%iout) - insurf = 1 - ! - case ('RATE') - ! - ! -- Look for keyword TIMEARRAYSERIES and time-array series - ! name on line, following RATE - call this%parser%GetStringCaps(keyword) - if (keyword == 'TIMEARRAYSERIES') then - ! -- Get time-array series name - call this%parser%GetStringCaps(tasName) - ! -- Ensure that time-array series has been defined and that name - ! of time-array series is valid. - jcol = 2 ! for max ET rate - bndArrayPtr => this%bound(jcol, :) - ! Make a time-array-series link and add it to the list of links - ! contained in the TimeArraySeriesManagerType object. - convertflux = .true. - call this%TasManager%MakeTasLink(this%packName, bndArrayPtr, & - this%iprpak, tasName, 'RATE', & - convertFlux, this%nodelist, & - this%parser%iuactive) - lpos = this%TasManager%CountLinks() - tasLink => this%TasManager%GetLink(lpos) - inrate = 2 - else - ! - ! -- Read the Max. ET Rate array, then indicate - ! that rate array was read by setting inrate - call this%dis%read_layer_array(this%nodelist, this%bound, & - this%ncolbnd, this%maxbound, 2, & - aname(3), this%parser%iuactive, & - this%iout) - inrate = 1 - end if - ! - case ('DEPTH') - ! - if (this%inievt == 0) then - call store_error('IEVT must be read at least once & - &prior to reading the DEPTH array.') - call this%parser%StoreErrorUnit() - end if - ! - ! -- Read the extinction-depth array, then indicate - ! that depth array was read by setting indepth - call this%dis%read_layer_array(this%nodelist, this%bound, this%ncolbnd, & - this%maxbound, 3, aname(4), & - this%parser%iuactive, this%iout) - indepth = 1 - ! - case ('PXDP') - if (this%nseg < 2) then - ermsg = 'EVT input: PXDP cannot be specified when NSEG < 2' - call store_error(ermsg) - call this%parser%StoreErrorUnit() - end if - ! - if (this%inievt == 0) then - call store_error('IEVT must be read at least once & - &prior to reading any PXDP array.') - call this%parser%StoreErrorUnit() - end if - ! - ! -- Assign column for this PXDP vector in bound array - kpxdp = kpxdp + 1 - if (kpxdp < this%nseg - 1) this%segsdefined = .false. - if (kpxdp > this%nseg - 1) then - ermsg = 'EVT: Number of PXDP arrays exceeds NSEG-1.' - call store_error(ermsg) - call this%parser%StoreErrorUnit() - end if - indx = 3 + kpxdp - ! - ! -- Read the PXDP array - call this%dis%read_layer_array(this%nodelist, this%bound, this%ncolbnd, & - this%maxbound, indx, aname(5), & - this%parser%iuactive, this%iout) - ! - case ('PETM') - if (this%nseg < 2) then - ermsg = 'EVT input: PETM cannot be specified when NSEG < 2' - call store_error(ermsg) - call this%parser%StoreErrorUnit() - end if - ! - if (this%inievt == 0) then - call store_error('IEVT must be read at least once & - &prior to reading any PETM array.') - call this%parser%StoreErrorUnit() - end if - ! - ! -- Assign column for this PETM vector in bound array - kpetm = kpetm + 1 - if (kpetm < this%nseg - 1) this%segsdefined = .false. - if (kpetm > this%nseg - 1) then - ermsg = 'EVT: Number of PETM arrays exceeds NSEG-1.' - call store_error(ermsg) - call this%parser%StoreErrorUnit() - end if - indx = 3 + this%nseg - 1 + kpetm - ! - ! -- Read the PETM array - call this%dis%read_layer_array(this%nodelist, this%bound, this%ncolbnd, & - this%maxbound, indx, aname(6), & - this%parser%iuactive, this%iout) - ! - case default - ! - ! -- Check for auxname, and if found, then read into auxvar array - found = .false. - ipos = ifind(this%auxname, keyword) - if (ipos > 0) then - found = .true. - atemp = keyword - ! - ! -- Look for keyword TIMEARRAYSERIES and time-array series - ! name on line, following auxname - call this%parser%GetStringCaps(keyword) - if (keyword == 'TIMEARRAYSERIES') then - ! -- Get time-array series name - call this%parser%GetStringCaps(tasName) - jauxcol = jauxcol + 1 - auxArrayPtr => this%auxvar(jauxcol, :) - ! Make a time-array-series link and add it to the list of links - ! contained in the TimeArraySeriesManagerType object. - convertflux = .false. - call this%TasManager%MakeTasLink(this%packName, auxArrayPtr, & - this%iprpak, tasName, & - this%auxname(ipos), convertFlux, & - this%nodelist, this%parser%iuactive) - else - ! - ! -- Read the aux variable array - call this%dis%read_layer_array(this%nodelist, this%auxvar, & - this%naux, this%maxbound, ipos, & - atemp, this%parser%iuactive, & - this%iout) - end if - end if - ! - ! -- Nothing found - if (.not. found) then - call this%parser%GetCurrentLine(line) - call store_error('Looking for valid variable name. Found: ') - call store_error(trim(line)) - call this%parser%StoreErrorUnit() - end if - ! - ! If this aux variable has been designated as a multiplier array - ! by presence of AUXMULTNAME, set local pointer appropriately. - if (this%iauxmultcol > 0 .and. this%iauxmultcol == ipos) then - auxMultArray => this%auxvar(this%iauxmultcol, :) - end if - end select - ! - ! -- Increment the number of variables read - ivarsread = ivarsread + 1 - ! - end do - ! - ! -- Ensure that all required PXDP and PETM arrays - ! have been defined or redefined. - if (kpxdp == this%nseg - 1 .and. kpxdp == this%nseg - 1) then - this%segsdefined = .true. - end if - if (.not. this%segsdefined) then - ermsg = 'EVT input: Definition of PXDP or PETM is incomplete.' - call store_error(ermsg) - call this%parser%StoreErrorUnit() - end if - ! - ! If the multiplier-array pointer has been assigned and - ! stress is controlled by a time-array series, assign - ! multiplier-array pointer in time-array series link. - if (associated(auxMultArray)) then - if (associated(tasLink)) then - tasLink%RMultArray => auxMultArray - end if - end if - ! - ! -- If et rate was read and auxmultcol was specified, then multiply - ! the et rate by the multplier column - if (inrate == 1 .and. this%iauxmultcol > 0) then - write (this%iout, fmtevtauxmult) this%auxname(this%iauxmultcol) - do n = 1, this%nbound - this%bound(this%iscloc, n) = this%bound(this%iscloc, n) * & - this%auxvar(this%iauxmultcol, n) - end do - end if - ! - return - end subroutine evt_rp_array - - subroutine evt_rp_list(this, inrate) -! ****************************************************************************** -! evt_rp_list -- Read and Prepare EVT as a list -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ - ! -- dummy - class(EvtType), intent(inout) :: this - integer(I4B), intent(inout) :: inrate - ! -- local - integer(I4B) :: maxboundorig, nlist -! ------------------------------------------------------------------------------ - ! - nlist = -1 - maxboundorig = this%maxbound - call this%dis%read_list(this%parser%line_reader, & - this%parser%iuactive, this%iout, this%iprpak, & - nlist, this%inamedbound, this%iauxmultcol, & - this%nodelist, this%bound, this%auxvar, & - this%auxname, this%boundname, this%listlabel, & - this%packName, this%tsManager, this%iscloc, & - this%indxconvertflux) - this%nbound = nlist - if (this%maxbound > maxboundorig) then - ! -- The arrays that belong to BndType have been extended. - ! Now, EVT array nodesontop needs to be recreated. - if (associated(this%nodesontop)) then - deallocate (this%nodesontop) - end if - end if - if (.not. this%fixed_cell) call this%set_nodesontop() - inrate = 1 - ! - ! -- terminate the period block - call this%parser%terminateblock() - ! - return - end subroutine evt_rp_list - subroutine evt_define_listlabel(this) ! ****************************************************************************** ! define_listlabel -- Define the list heading that is written to iout when @@ -1215,8 +894,7 @@ subroutine default_nodelist(this) end do end do ! - ! Set flag that indicates IEVT has been assigned, and assign nbound. - this%inievt = 1 + ! -- assign nbound. this%nbound = ipos - 1 ! ! -- if fixed_cell option not set, then need to store nodelist @@ -1267,43 +945,122 @@ subroutine evt_df_obs(this) return end subroutine evt_df_obs - ! -- Procedure related to time series - - subroutine evt_rp_ts(this) ! ****************************************************************************** -! evt_rp_ts -- Assign tsLink%Text appropriately for -! all time series in use by package. -! In EVT package the SURFACE, RATE, DEPTH, PXDP, and PETM variables -! can be controlled by time series. -! Define Text only when time series is used for SURFACE, RATE, or DEPTH. +! evt_bound_value -- return requested boundary value ! ****************************************************************************** ! ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ - ! -- dummy - class(EvtType), intent(inout) :: this + function evt_bound_value(this, col, row) result(bndval) + ! -- modules + use ConstantsModule, only: DZERO + ! -- dummy variables + class(EvtType), intent(inout) :: this !< BndExtType object + integer(I4B), intent(in) :: col + integer(I4B), intent(in) :: row + ! -- result + real(DP) :: bndval ! -- local - integer(I4B) :: i, nlinks - type(TimeSeriesLinkType), pointer :: tslink => null() -! ------------------------------------------------------------------------------ + integer(I4B) :: idx ! - nlinks = this%TsManager%boundtslinks%Count() - do i = 1, nlinks - tslink => GetTimeSeriesLinkFromList(this%TsManager%boundtslinks, i) - if (associated(tslink)) then - select case (tslink%JCol) - case (1) - tslink%Text = 'SURFACE' - case (2) - tslink%Text = 'RATE' - case (3) - tslink%Text = 'DEPTH' - end select + ! -- initialize + idx = 0 + ! + select case (col) + case (1) + bndval = this%surface(row) + case (2) + if (this%iauxmultcol > 0) then + bndval = this%rate(row) * this%auxvar(this%iauxmultcol, row) + else + bndval = this%rate(row) end if - end do + case (3) + bndval = this%depth(row) + case default + if (col > 0) then + if (this%nseg > 1) then + if (col < (3 + this%nseg)) then + idx = col - 3 + bndval = this%pxdp(idx, row) + else if (col < (3 + (2 * this%nseg) - 1)) then + idx = col - (3 + this%nseg - 1) + bndval = this%petm(idx, row) + else if (col == (3 + (2 * this%nseg) - 1)) then + if (this%surfratespecified) then + idx = 1 + bndval = this%petm0(row) + end if + end if + else if (this%surfratespecified) then + if (col == 4) then + idx = 1 + bndval = this%petm0(row) + end if + end if + end if + ! + ! -- set error if idx not found + if (idx == 0) then + write (errmsg, '(a,i0,a)') & + 'Programming error. EVT bound value requested column '& + &'outside range of ncolbnd (', this%ncolbnd, ').' + call store_error(errmsg) + call store_error_filename(this%input_fname) + end if + ! + end select + ! + ! -- return + return + end function evt_bound_value + + !> @brief Update the nodelist based on IEVT input + !! + !! This is a module scoped routine to check for IEVT + !! input. If array input was provided, INIEVT and IEVT + !! will be allocated in the input context. If the read + !! state variable INIEVT is set to 1 during this period + !! update, IEVT input was read and is used here to update + !! the nodelist. + !! + !< + subroutine nodelist_update(nodelist, nbound, maxbound, & + dis, input_mempath) + ! -- modules + use MemoryManagerModule, only: mem_setptr + use BaseDisModule, only: DisBaseType + ! -- dummy + integer(I4B), dimension(:), contiguous, & + pointer, intent(inout) :: nodelist + class(DisBaseType), pointer, intent(in) :: dis + character(len=*), intent(in) :: input_mempath + integer(I4B), intent(inout) :: nbound + integer(I4B), intent(in) :: maxbound + character(len=24) :: aname = ' LAYER OR NODE INDEX' + ! -- local + integer(I4B), dimension(:), contiguous, & + pointer :: ievt => null() + integer(I4B), pointer :: inievt => NULL() ! + ! -- set pointer to input context INIEVT + call mem_setptr(inievt, 'INIEVT', input_mempath) + ! + ! -- check INIEVT read state + if (inievt == 1) then + ! -- ievt was read this period + ! + ! -- set pointer to input context IEVT + call mem_setptr(ievt, 'IEVT', input_mempath) + ! + ! -- update nodelist + call dis%nlarray_to_nodelist(ievt, nodelist, & + maxbound, nbound, aname) + end if + ! + ! -- return return - end subroutine evt_rp_ts + end subroutine nodelist_update end module EvtModule diff --git a/src/Model/GroundWaterFlow/gwf3evt8idm.f90 b/src/Model/GroundWaterFlow/gwf3evt8idm.f90 new file mode 100644 index 00000000000..309d9fa5090 --- /dev/null +++ b/src/Model/GroundWaterFlow/gwf3evt8idm.f90 @@ -0,0 +1,566 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module GwfEvtInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public gwf_evt_param_definitions + public gwf_evt_aggregate_definitions + public gwf_evt_block_definitions + public GwfEvtParamFoundType + public gwf_evt_multi_package + public gwf_evt_aux_sfac_param + + type GwfEvtParamFoundType + logical :: fixed_cell = .false. + logical :: auxiliary = .false. + logical :: auxmultname = .false. + logical :: boundnames = .false. + logical :: iprpak = .false. + logical :: iprflow = .false. + logical :: ipakcb = .false. + logical :: ts_filerecord = .false. + logical :: ts6 = .false. + logical :: filein = .false. + logical :: ts6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: surfratespec = .false. + logical :: maxbound = .false. + logical :: nseg = .false. + logical :: cellid = .false. + logical :: surface = .false. + logical :: rate = .false. + logical :: depth = .false. + logical :: pxdp = .false. + logical :: petm = .false. + logical :: petm0 = .false. + logical :: auxvar = .false. + logical :: boundname = .false. + end type GwfEvtParamFoundType + + logical :: gwf_evt_multi_package = .true. + + character(len=LENVARNAME) :: gwf_evt_aux_sfac_param = '' + + type(InputParamDefinitionType), parameter :: & + gwfevt_fixed_cell = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'FIXED_CELL', & ! tag name + 'FIXED_CELL', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_auxiliary = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_auxmultname = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'AUXMULTNAME', & ! tag name + 'AUXMULTNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_boundnames = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'BOUNDNAMES', & ! tag name + 'BOUNDNAMES', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_iprpak = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPRPAK', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_iprflow = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPRFLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_ipakcb = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_ts_filerecord = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'TS_FILERECORD', & ! tag name + 'TS_FILERECORD', & ! fortran variable + 'RECORD TS6 FILEIN TS6_FILENAME', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_ts6 = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'TS6', & ! tag name + 'TS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_filein = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_ts6_filename = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'TS6_FILENAME', & ! tag name + 'TS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_obs_filerecord = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_obs6 = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_obs6_filename = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_surfratespec = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'OPTIONS', & ! block + 'SURF_RATE_SPECIFIED', & ! tag name + 'SURFRATESPEC', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_maxbound = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'DIMENSIONS', & ! block + 'MAXBOUND', & ! tag name + 'MAXBOUND', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_nseg = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'DIMENSIONS', & ! block + 'NSEG', & ! tag name + 'NSEG', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_cellid = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'CELLID', & ! tag name + 'CELLID', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_surface = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'SURFACE', & ! tag name + 'SURFACE', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_rate = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'RATE', & ! tag name + 'RATE', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_depth = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'DEPTH', & ! tag name + 'DEPTH', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_pxdp = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'PXDP', & ! tag name + 'PXDP', & ! fortran variable + 'DOUBLE1D', & ! type + 'NSEG-1', & ! shape + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_petm = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'PETM', & ! tag name + 'PETM', & ! fortran variable + 'DOUBLE1D', & ! type + 'NSEG-1', & ! shape + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_petm0 = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'PETM0', & ! tag name + 'PETM0', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_auxvar = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUXVAR', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevt_boundname = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'BOUNDNAME', & ! tag name + 'BOUNDNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwf_evt_param_definitions(*) = & + [ & + gwfevt_fixed_cell, & + gwfevt_auxiliary, & + gwfevt_auxmultname, & + gwfevt_boundnames, & + gwfevt_iprpak, & + gwfevt_iprflow, & + gwfevt_ipakcb, & + gwfevt_ts_filerecord, & + gwfevt_ts6, & + gwfevt_filein, & + gwfevt_ts6_filename, & + gwfevt_obs_filerecord, & + gwfevt_obs6, & + gwfevt_obs6_filename, & + gwfevt_surfratespec, & + gwfevt_maxbound, & + gwfevt_nseg, & + gwfevt_cellid, & + gwfevt_surface, & + gwfevt_rate, & + gwfevt_depth, & + gwfevt_pxdp, & + gwfevt_petm, & + gwfevt_petm0, & + gwfevt_auxvar, & + gwfevt_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + gwfevt_spd = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVT', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID SURFACE RATE DEPTH PXDP PETM PETM0 AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwf_evt_aggregate_definitions(*) = & + [ & + gwfevt_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + gwf_evt_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .true., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module GwfEvtInputModule diff --git a/src/Model/GroundWaterFlow/gwf3evta8idm.f90 b/src/Model/GroundWaterFlow/gwf3evta8idm.f90 new file mode 100644 index 00000000000..1c896f7d661 --- /dev/null +++ b/src/Model/GroundWaterFlow/gwf3evta8idm.f90 @@ -0,0 +1,424 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module GwfEvtaInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public gwf_evta_param_definitions + public gwf_evta_aggregate_definitions + public gwf_evta_block_definitions + public GwfEvtaParamFoundType + public gwf_evta_multi_package + public gwf_evta_aux_sfac_param + + type GwfEvtaParamFoundType + logical :: readasarrays = .false. + logical :: fixed_cell = .false. + logical :: auxiliary = .false. + logical :: auxmultname = .false. + logical :: iprpak = .false. + logical :: iprflow = .false. + logical :: ipakcb = .false. + logical :: tas_filerecord = .false. + logical :: tas6 = .false. + logical :: filein = .false. + logical :: tas6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: ievt = .false. + logical :: surface = .false. + logical :: rate = .false. + logical :: depth = .false. + logical :: auxvar = .false. + end type GwfEvtaParamFoundType + + logical :: gwf_evta_multi_package = .true. + + character(len=LENVARNAME) :: gwf_evta_aux_sfac_param = 'RATE' + + type(InputParamDefinitionType), parameter :: & + gwfevta_readasarrays = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'READASARRAYS', & ! tag name + 'READASARRAYS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_fixed_cell = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'FIXED_CELL', & ! tag name + 'FIXED_CELL', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_auxiliary = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'AUXILIARY', & ! tag name + 'AUXILIARY', & ! fortran variable + 'STRING', & ! type + 'NAUX', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_auxmultname = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'AUXMULTNAME', & ! tag name + 'AUXMULTNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_iprpak = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_INPUT', & ! tag name + 'IPRPAK', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_iprflow = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'PRINT_FLOWS', & ! tag name + 'IPRFLOW', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_ipakcb = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'SAVE_FLOWS', & ! tag name + 'IPAKCB', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_tas_filerecord = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'TAS_FILERECORD', & ! tag name + 'TAS_FILERECORD', & ! fortran variable + 'RECORD TAS6 FILEIN TAS6_FILENAME', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_tas6 = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'TAS6', & ! tag name + 'TAS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_filein = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'FILEIN', & ! tag name + 'FILEIN', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_tas6_filename = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'TAS6_FILENAME', & ! tag name + 'TAS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_obs_filerecord = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'OBS_FILERECORD', & ! tag name + 'OBS_FILERECORD', & ! fortran variable + 'RECORD OBS6 FILEIN OBS6_FILENAME', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_obs6 = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6', & ! tag name + 'OBS6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_obs6_filename = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'OPTIONS', & ! block + 'OBS6_FILENAME', & ! tag name + 'OBS6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_ievt = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'PERIOD', & ! block + 'IEVT', & ! tag name + 'IEVT', & ! fortran variable + 'INTEGER1D', & ! type + 'NCPL', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_surface = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'PERIOD', & ! block + 'SURFACE', & ! tag name + 'SURFACE', & ! fortran variable + 'DOUBLE1D', & ! type + 'NCPL', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_rate = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'PERIOD', & ! block + 'RATE', & ! tag name + 'RATE', & ! fortran variable + 'DOUBLE1D', & ! type + 'NCPL', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_depth = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'PERIOD', & ! block + 'DEPTH', & ! tag name + 'DEPTH', & ! fortran variable + 'DOUBLE1D', & ! type + 'NCPL', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfevta_auxvar = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'EVTA', & ! subcomponent + 'PERIOD', & ! block + 'AUX', & ! tag name + 'AUXVAR', & ! fortran variable + 'DOUBLE2D', & ! type + 'NAUX NCPL', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwf_evta_param_definitions(*) = & + [ & + gwfevta_readasarrays, & + gwfevta_fixed_cell, & + gwfevta_auxiliary, & + gwfevta_auxmultname, & + gwfevta_iprpak, & + gwfevta_iprflow, & + gwfevta_ipakcb, & + gwfevta_tas_filerecord, & + gwfevta_tas6, & + gwfevta_filein, & + gwfevta_tas6_filename, & + gwfevta_obs_filerecord, & + gwfevta_obs6, & + gwfevta_obs6_filename, & + gwfevta_ievt, & + gwfevta_surface, & + gwfevta_rate, & + gwfevta_depth, & + gwfevta_auxvar & + ] + + type(InputParamDefinitionType), parameter :: & + gwf_evta_aggregate_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputBlockDefinitionType), parameter :: & + gwf_evta_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'PERIOD', & ! blockname + .true., & ! required + .false., & ! aggregate + .true. & ! block_variable + ) & + ] + +end module GwfEvtaInputModule diff --git a/src/Model/GroundWaterFlow/gwf3rch8.f90 b/src/Model/GroundWaterFlow/gwf3rch8.f90 index 539ba60b092..5656350df6d 100644 --- a/src/Model/GroundWaterFlow/gwf3rch8.f90 +++ b/src/Model/GroundWaterFlow/gwf3rch8.f90 @@ -695,8 +695,8 @@ subroutine nodelist_update(nodelist, nbound, maxbound, & call mem_setptr(irch, 'IRCH', input_mempath) ! ! -- update nodelist - call dis%nlarray_to_nodelist2(irch, nodelist, & - maxbound, nbound, aname) + call dis%nlarray_to_nodelist(irch, nodelist, & + maxbound, nbound, aname) end if ! ! -- return diff --git a/src/Model/ModelUtilities/BoundaryPackageExt.f90 b/src/Model/ModelUtilities/BoundaryPackageExt.f90 index b72c12c6929..96b154e9125 100644 --- a/src/Model/ModelUtilities/BoundaryPackageExt.f90 +++ b/src/Model/ModelUtilities/BoundaryPackageExt.f90 @@ -418,7 +418,7 @@ subroutine source_dimensions(this) ! ! -- open dimensions logging block write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text))// & - ' DIMENSIONS' + ' BASE DIMENSIONS' ! ! -- update defaults with idm sourced values call mem_set_value(this%maxbound, 'MAXBOUND', this%input_mempath, & @@ -428,7 +428,7 @@ subroutine source_dimensions(this) ! ! -- close logging block write (this%iout, '(1x,a)') & - 'END OF '//trim(adjustl(this%text))//' DIMENSIONS' + 'END OF '//trim(adjustl(this%text))//' BASE DIMENSIONS' ! ! -- verify dimensions were set if (this%maxbound <= 0) then diff --git a/src/Model/ModelUtilities/DiscretizationBase.f90 b/src/Model/ModelUtilities/DiscretizationBase.f90 index 78bea23b746..adcbe831379 100644 --- a/src/Model/ModelUtilities/DiscretizationBase.f90 +++ b/src/Model/ModelUtilities/DiscretizationBase.f90 @@ -105,7 +105,6 @@ module BaseDisModule procedure, private :: record_srcdst_list_entry generic, public :: record_mf6_list_entry => record_srcdst_list_entry procedure, public :: nlarray_to_nodelist - procedure, public :: nlarray_to_nodelist2 procedure, public :: highest_active procedure, public :: get_area procedure, public :: get_area_factor @@ -1413,40 +1412,9 @@ subroutine record_srcdst_list_entry(this, ibdchn, noder, noder2, q, & return end subroutine record_srcdst_list_entry - subroutine nlarray_to_nodelist(this, nodelist, maxbnd, nbound, aname, & - inunit, iout) + subroutine nlarray_to_nodelist(this, darray, nodelist, maxbnd, nbound, aname) ! ****************************************************************************** -! nlarray_to_nodelist -- Read an integer array into nodelist. For structured -! model, integer array is layer number; for unstructured -! model, integer array is node number. -! ****************************************************************************** -! -! SPECIFICATIONS: -! ------------------------------------------------------------------------------ - ! -- modules - use SimModule, only: store_error - use ConstantsModule, only: LINELENGTH - ! -- dummy - class(DisBaseType) :: this - integer(I4B), intent(in) :: maxbnd - integer(I4B), dimension(maxbnd), intent(inout) :: nodelist - integer(I4B), intent(inout) :: nbound - character(len=*), intent(in) :: aname - integer(I4B), intent(in) :: inunit - integer(I4B), intent(in) :: iout - ! - ! -- - errmsg = 'Programmer error: nlarray_to_nodelist needs to be & - &overridden in any DIS type that extends DisBaseType' - call store_error(errmsg, terminate=.TRUE.) - ! - ! -- return - return - end subroutine nlarray_to_nodelist - - subroutine nlarray_to_nodelist2(this, darray, nodelist, maxbnd, nbound, aname) -! ****************************************************************************** -! nlarray_to_nodelist -- Read an integer array into nodelist. For structured +! nlarray_to_nodelist -- Convert an integer array into nodelist. For structured ! model, integer array is layer number; for unstructured ! model, integer array is node number. ! ****************************************************************************** @@ -1471,7 +1439,7 @@ subroutine nlarray_to_nodelist2(this, darray, nodelist, maxbnd, nbound, aname) ! ! -- return return - end subroutine nlarray_to_nodelist2 + end subroutine nlarray_to_nodelist subroutine highest_active(this, n, ibound) ! ****************************************************************************** diff --git a/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 b/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 index 5bac4554e36..b4c7448a245 100644 --- a/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 +++ b/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 @@ -10,6 +10,8 @@ module IdmGwfDfnSelectorModule use GwfDisuInputModule use GwfDisvInputModule use GwfDrnInputModule + use GwfEvtInputModule + use GwfEvtaInputModule use GwfGhbInputModule use GwfNpfInputModule use GwfRchInputModule @@ -87,6 +89,20 @@ module IdmGwfDfnSelectorModule logical :: icubicsfac = .false. logical :: elev = .false. logical :: cond = .false. + logical :: fixed_cell = .false. + logical :: surfratespec = .false. + logical :: nseg = .false. + logical :: surface = .false. + logical :: rate = .false. + logical :: depth = .false. + logical :: pxdp = .false. + logical :: petm = .false. + logical :: petm0 = .false. + logical :: readasarrays = .false. + logical :: tas_filerecord = .false. + logical :: tas6 = .false. + logical :: tas6_filename = .false. + logical :: ievt = .false. logical :: bhead = .false. logical :: cellavg = .false. logical :: ithickstrt = .false. @@ -121,12 +137,7 @@ module IdmGwfDfnSelectorModule logical :: angle2 = .false. logical :: angle3 = .false. logical :: wetdry = .false. - logical :: fixed_cell = .false. logical :: recharge = .false. - logical :: readasarrays = .false. - logical :: tas_filerecord = .false. - logical :: tas6 = .false. - logical :: tas6_filename = .false. logical :: irch = .false. logical :: stage = .false. logical :: rbot = .false. @@ -177,6 +188,10 @@ function gwf_param_definitions(subcomponent) result(input_definition) call set_param_pointer(input_definition, gwf_disv_param_definitions) case ('DRN') call set_param_pointer(input_definition, gwf_drn_param_definitions) + case ('EVT') + call set_param_pointer(input_definition, gwf_evt_param_definitions) + case ('EVTA') + call set_param_pointer(input_definition, gwf_evta_param_definitions) case ('GHB') call set_param_pointer(input_definition, gwf_ghb_param_definitions) case ('NPF') @@ -211,6 +226,10 @@ function gwf_aggregate_definitions(subcomponent) result(input_definition) call set_param_pointer(input_definition, gwf_disv_aggregate_definitions) case ('DRN') call set_param_pointer(input_definition, gwf_drn_aggregate_definitions) + case ('EVT') + call set_param_pointer(input_definition, gwf_evt_aggregate_definitions) + case ('EVTA') + call set_param_pointer(input_definition, gwf_evta_aggregate_definitions) case ('GHB') call set_param_pointer(input_definition, gwf_ghb_aggregate_definitions) case ('NPF') @@ -245,6 +264,10 @@ function gwf_block_definitions(subcomponent) result(input_definition) call set_block_pointer(input_definition, gwf_disv_block_definitions) case ('DRN') call set_block_pointer(input_definition, gwf_drn_block_definitions) + case ('EVT') + call set_block_pointer(input_definition, gwf_evt_block_definitions) + case ('EVTA') + call set_block_pointer(input_definition, gwf_evta_block_definitions) case ('GHB') call set_block_pointer(input_definition, gwf_ghb_block_definitions) case ('NPF') @@ -278,6 +301,10 @@ function gwf_idm_multi_package(subcomponent) result(multi_package) multi_package = gwf_disv_multi_package case ('DRN') multi_package = gwf_drn_multi_package + case ('EVT') + multi_package = gwf_evt_multi_package + case ('EVTA') + multi_package = gwf_evta_multi_package case ('GHB') multi_package = gwf_ghb_multi_package case ('NPF') @@ -314,6 +341,10 @@ function gwf_idm_sfac_param(subcomponent) result(sfac_param) sfac_param = gwf_disv_aux_sfac_param case ('DRN') sfac_param = gwf_drn_aux_sfac_param + case ('EVT') + sfac_param = gwf_evt_aux_sfac_param + case ('EVTA') + sfac_param = gwf_evta_aux_sfac_param case ('GHB') sfac_param = gwf_ghb_aux_sfac_param case ('NPF') @@ -351,6 +382,10 @@ function gwf_idm_integrated(subcomponent) result(integrated) integrated = .true. case ('DRN') integrated = .true. + case ('EVT') + integrated = .true. + case ('EVTA') + integrated = .true. case ('GHB') integrated = .true. case ('NPF') diff --git a/src/meson.build b/src/meson.build index 731b30ad3fe..e86adab8e17 100644 --- a/src/meson.build +++ b/src/meson.build @@ -61,6 +61,8 @@ modflow_sources = files( 'Model' / 'GroundWaterFlow' / 'gwf3drn8.f90', 'Model' / 'GroundWaterFlow' / 'gwf3drn8idm.f90', 'Model' / 'GroundWaterFlow' / 'gwf3evt8.f90', + 'Model' / 'GroundWaterFlow' / 'gwf3evt8idm.f90', + 'Model' / 'GroundWaterFlow' / 'gwf3evta8idm.f90', 'Model' / 'GroundWaterFlow' / 'gwf3ghb8.f90', 'Model' / 'GroundWaterFlow' / 'gwf3ghb8idm.f90', 'Model' / 'GroundWaterFlow' / 'gwf3hfb8.f90', diff --git a/utils/idmloader/scripts/dfn2f90.py b/utils/idmloader/scripts/dfn2f90.py index cc27bf78010..5bd0555817e 100644 --- a/utils/idmloader/scripts/dfn2f90.py +++ b/utils/idmloader/scripts/dfn2f90.py @@ -988,6 +988,14 @@ def _write_master_component(self, fh=None): Path("../../../doc/mf6io/mf6ivar/dfn", "gwf-drn.dfn"), Path("../../../src/Model/GroundWaterFlow", "gwf3drn8idm.f90"), ], + [ + Path("../../../doc/mf6io/mf6ivar/dfn", "gwf-evt.dfn"), + Path("../../../src/Model/GroundWaterFlow", "gwf3evt8idm.f90"), + ], + [ + Path("../../../doc/mf6io/mf6ivar/dfn", "gwf-evta.dfn"), + Path("../../../src/Model/GroundWaterFlow", "gwf3evta8idm.f90"), + ], [ Path("../../../doc/mf6io/mf6ivar/dfn", "gwf-ghb.dfn"), Path("../../../src/Model/GroundWaterFlow", "gwf3ghb8idm.f90"), diff --git a/utils/mf5to6/make/makefile b/utils/mf5to6/make/makefile index 781a93242a8..bc180329a32 100644 --- a/utils/mf5to6/make/makefile +++ b/utils/mf5to6/make/makefile @@ -5,10 +5,10 @@ include ./makedefaults # Define the source file directories SOURCEDIR1=../src -SOURCEDIR2=../src/NWT -SOURCEDIR3=../src/LGR -SOURCEDIR4=../src/Preproc -SOURCEDIR5=../src/MF2005 +SOURCEDIR2=../src/LGR +SOURCEDIR3=../src/Preproc +SOURCEDIR4=../src/MF2005 +SOURCEDIR5=../src/NWT SOURCEDIR6=../../../src/Utilities/Memory SOURCEDIR7=../../../src/Utilities/TimeSeries SOURCEDIR8=../../../src/Utilities