diff --git a/doc/mf6io/mf6ivar/dfn/gwf-drn.dfn b/doc/mf6io/mf6ivar/dfn/gwf-drn.dfn index c03a1078000..4f5a2ffe90b 100644 --- a/doc/mf6io/mf6ivar/dfn/gwf-drn.dfn +++ b/doc/mf6io/mf6ivar/dfn/gwf-drn.dfn @@ -44,6 +44,7 @@ reader urword optional true longname print input to listing file description REPLACE print_input {'{#1}': 'drain'} +mf6internal iprpak block options name print_flows @@ -52,6 +53,7 @@ reader urword optional true longname print calculated flows to listing file description REPLACE print_flows {'{#1}': 'drain'} +mf6internal iprflow block options name save_flows @@ -60,6 +62,7 @@ reader urword optional true longname save CHD flows to budget file description REPLACE save_flows {'{#1}': 'drain'} +mf6internal ipakcb block options name ts_filerecord @@ -145,6 +148,16 @@ optional true longname description REPLACE mover {'{#1}': 'Drain'} +# dev options +block options +name dev_cubic_scaling +type keyword +reader urword +optional true +longname cubic-scaling +description cubic-scaling is used to scale the drain conductance +mf6internal icubicsfac + # --------------------- gwf drn dimensions --------------------- block dimensions @@ -178,6 +191,7 @@ shape (maxbound) reader urword longname description +mf6internal spd block period name cellid @@ -222,6 +236,7 @@ optional true time_series true longname auxiliary variables description REPLACE aux {'{#1}': 'drain'} +mf6internal auxvar block period name boundname diff --git a/make/makefile b/make/makefile index 82215708a26..64667ddf656 100644 --- a/make/makefile +++ b/make/makefile @@ -5,36 +5,36 @@ include ./makedefaults # Define the source file directories SOURCEDIR1=../src -SOURCEDIR2=../src/Model -SOURCEDIR3=../src/Model/TransportModel -SOURCEDIR4=../src/Model/GroundWaterFlow -SOURCEDIR5=../src/Model/Geometry +SOURCEDIR2=../src/Exchange +SOURCEDIR3=../src/Model +SOURCEDIR4=../src/Model/Geometry +SOURCEDIR5=../src/Model/TransportModel SOURCEDIR6=../src/Model/ModelUtilities -SOURCEDIR7=../src/Model/GroundWaterTransport -SOURCEDIR8=../src/Model/Connection -SOURCEDIR9=../src/Distributed -SOURCEDIR10=../src/Utilities -SOURCEDIR11=../src/Utilities/Idm -SOURCEDIR12=../src/Utilities/Idm/mf6blockfile -SOURCEDIR13=../src/Utilities/Idm/selector -SOURCEDIR14=../src/Utilities/Vector -SOURCEDIR15=../src/Utilities/Matrix -SOURCEDIR16=../src/Utilities/Observation -SOURCEDIR17=../src/Utilities/ArrayRead -SOURCEDIR18=../src/Utilities/OutputControl -SOURCEDIR19=../src/Utilities/Libraries -SOURCEDIR20=../src/Utilities/Libraries/blas -SOURCEDIR21=../src/Utilities/Libraries/rcm -SOURCEDIR22=../src/Utilities/Libraries/sparsekit -SOURCEDIR23=../src/Utilities/Libraries/sparskit2 -SOURCEDIR24=../src/Utilities/Libraries/daglib -SOURCEDIR25=../src/Utilities/Memory -SOURCEDIR26=../src/Utilities/TimeSeries -SOURCEDIR27=../src/Timing -SOURCEDIR28=../src/Solution -SOURCEDIR29=../src/Solution/PETSc -SOURCEDIR30=../src/Solution/LinearMethods -SOURCEDIR31=../src/Exchange +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/sparsekit +SOURCEDIR20=../src/Utilities/Libraries/sparskit2 +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} \ @@ -90,14 +90,9 @@ $(OBJDIR)/MemoryHelper.o \ $(OBJDIR)/CharString.o \ $(OBJDIR)/Memory.o \ $(OBJDIR)/List.o \ +$(OBJDIR)/InputDefinition.o \ $(OBJDIR)/LongLineReader.o \ $(OBJDIR)/MemoryList.o \ -$(OBJDIR)/TimeSeriesRecord.o \ -$(OBJDIR)/BlockParser.o \ -$(OBJDIR)/MemoryManager.o \ -$(OBJDIR)/InputDefinition.o \ -$(OBJDIR)/TimeSeries.o \ -$(OBJDIR)/ats.o \ $(OBJDIR)/simnamidm.o \ $(OBJDIR)/gwt1idm.o \ $(OBJDIR)/gwt1dsp1idm.o \ @@ -107,10 +102,22 @@ $(OBJDIR)/gwt1dis1idm.o \ $(OBJDIR)/gwf3wel8idm.o \ $(OBJDIR)/gwf3npf8idm.o \ $(OBJDIR)/gwf3idm.o \ +$(OBJDIR)/gwf3drn8idm.o \ $(OBJDIR)/gwf3disv8idm.o \ $(OBJDIR)/gwf3disu8idm.o \ $(OBJDIR)/gwf3dis8idm.o \ $(OBJDIR)/gwf3chd8idm.o \ +$(OBJDIR)/TimeSeriesRecord.o \ +$(OBJDIR)/BlockParser.o \ +$(OBJDIR)/MemoryManager.o \ +$(OBJDIR)/IdmSimDfnSelector.o \ +$(OBJDIR)/IdmGwtDfnSelector.o \ +$(OBJDIR)/IdmGwfDfnSelector.o \ +$(OBJDIR)/TimeSeries.o \ +$(OBJDIR)/ats.o \ +$(OBJDIR)/IdmDfnSelector.o \ +$(OBJDIR)/TimeArray.o \ +$(OBJDIR)/ArrayReaders.o \ $(OBJDIR)/TimeSeriesLink.o \ $(OBJDIR)/TimeSeriesFileList.o \ $(OBJDIR)/tdis.o \ @@ -118,63 +125,61 @@ $(OBJDIR)/HashTable.o \ $(OBJDIR)/VectorBase.o \ $(OBJDIR)/Sparse.o \ $(OBJDIR)/DisvGeom.o \ -$(OBJDIR)/ArrayReaders.o \ -$(OBJDIR)/IdmSimDfnSelector.o \ -$(OBJDIR)/IdmGwtDfnSelector.o \ -$(OBJDIR)/IdmGwfDfnSelector.o \ +$(OBJDIR)/ArrayReaderBase.o \ +$(OBJDIR)/STLVecInt.o \ +$(OBJDIR)/ModflowInput.o \ +$(OBJDIR)/MemoryManagerExt.o \ +$(OBJDIR)/TimeArraySeries.o \ $(OBJDIR)/TimeSeriesManager.o \ $(OBJDIR)/SmoothingFunctions.o \ -$(OBJDIR)/MemoryManagerExt.o \ $(OBJDIR)/MatrixBase.o \ $(OBJDIR)/ListReader.o \ $(OBJDIR)/Connections.o \ -$(OBJDIR)/IdmDfnSelector.o \ -$(OBJDIR)/TimeArray.o \ -$(OBJDIR)/ArrayReaderBase.o \ -$(OBJDIR)/ObsOutput.o \ -$(OBJDIR)/DiscretizationBase.o \ -$(OBJDIR)/STLVecInt.o \ -$(OBJDIR)/ModflowInput.o \ -$(OBJDIR)/TimeArraySeries.o \ $(OBJDIR)/Integer2dReader.o \ -$(OBJDIR)/ObsOutputList.o \ -$(OBJDIR)/Observe.o \ $(OBJDIR)/StructVector.o \ $(OBJDIR)/IdmLogger.o \ $(OBJDIR)/DefinitionSelect.o \ $(OBJDIR)/InputLoadType.o \ $(OBJDIR)/TimeArraySeriesLink.o \ +$(OBJDIR)/DiscretizationBase.o \ $(OBJDIR)/Integer1dReader.o \ $(OBJDIR)/Double2dReader.o \ $(OBJDIR)/Double1dReader.o \ -$(OBJDIR)/ObsUtility.o \ -$(OBJDIR)/ObsContainer.o \ -$(OBJDIR)/BudgetFileReader.o \ $(OBJDIR)/StructArray.o \ $(OBJDIR)/BoundInputContext.o \ $(OBJDIR)/AsciiInputLoadType.o \ $(OBJDIR)/TimeArraySeriesManager.o \ $(OBJDIR)/SourceCommon.o \ $(OBJDIR)/LayeredArrayReader.o \ +$(OBJDIR)/ObsOutput.o \ +$(OBJDIR)/StressListInput.o \ +$(OBJDIR)/StressGridInput.o \ +$(OBJDIR)/LoadMf6File.o \ +$(OBJDIR)/ObsOutputList.o \ +$(OBJDIR)/Observe.o \ +$(OBJDIR)/IdmMf6File.o \ +$(OBJDIR)/sort.o \ +$(OBJDIR)/ObsUtility.o \ +$(OBJDIR)/ObsContainer.o \ +$(OBJDIR)/BudgetFileReader.o \ +$(OBJDIR)/SourceLoad.o \ +$(OBJDIR)/ModelPackageInputs.o \ $(OBJDIR)/PackageMover.o \ $(OBJDIR)/Obs3.o \ $(OBJDIR)/NumericalPackage.o \ $(OBJDIR)/Budget.o \ $(OBJDIR)/BudgetTerm.o \ -$(OBJDIR)/StressListInput.o \ -$(OBJDIR)/StressGridInput.o \ -$(OBJDIR)/LoadMf6File.o \ -$(OBJDIR)/sort.o \ $(OBJDIR)/SfrCrossSectionUtils.o \ -$(OBJDIR)/VirtualBase.o \ +$(OBJDIR)/IdmLoad.o \ $(OBJDIR)/BoundaryPackage.o \ +$(OBJDIR)/VirtualBase.o \ $(OBJDIR)/BaseModel.o \ $(OBJDIR)/PackageBudget.o \ $(OBJDIR)/HeadFileReader.o \ $(OBJDIR)/BudgetObject.o \ -$(OBJDIR)/IdmMf6File.o \ $(OBJDIR)/SfrCrossSectionManager.o \ $(OBJDIR)/dag_module.o \ +$(OBJDIR)/BoundaryPackageExt.o \ $(OBJDIR)/VirtualDataLists.o \ $(OBJDIR)/VirtualDataContainer.o \ $(OBJDIR)/SimStages.o \ @@ -183,8 +188,6 @@ $(OBJDIR)/FlowModelInterface.o \ $(OBJDIR)/PrintSaveManager.o \ $(OBJDIR)/Xt3dAlgorithm.o \ $(OBJDIR)/gwf3tvbase8.o \ -$(OBJDIR)/SourceLoad.o \ -$(OBJDIR)/ModelPackageInputs.o \ $(OBJDIR)/gwf3sfr8.o \ $(OBJDIR)/gwf3riv8.o \ $(OBJDIR)/gwf3maw8.o \ @@ -202,7 +205,6 @@ $(OBJDIR)/OutputControlData.o \ $(OBJDIR)/gwf3ic8.o \ $(OBJDIR)/Xt3dInterface.o \ $(OBJDIR)/gwf3tvk8.o \ -$(OBJDIR)/IdmLoad.o \ $(OBJDIR)/gwf3vsc8.o \ $(OBJDIR)/GwfNpfOptions.o \ $(OBJDIR)/InterfaceMap.o \ @@ -220,7 +222,6 @@ $(OBJDIR)/gwt1mst1.o \ $(OBJDIR)/GwtDspOptions.o \ $(OBJDIR)/gwf3npf8.o \ $(OBJDIR)/GwtAdvOptions.o \ -$(OBJDIR)/BoundaryPackageExt.o \ $(OBJDIR)/gwf3tvs8.o \ $(OBJDIR)/GwfStorageUtils.o \ $(OBJDIR)/Mover.o \ diff --git a/msvs/mf6core.vfproj b/msvs/mf6core.vfproj index 9786bfb251e..cf6c91bc6eb 100644 --- a/msvs/mf6core.vfproj +++ b/msvs/mf6core.vfproj @@ -131,6 +131,7 @@ + diff --git a/src/Model/GroundWaterFlow/gwf3.f90 b/src/Model/GroundWaterFlow/gwf3.f90 index 617287c1d2f..d955ae74b10 100644 --- a/src/Model/GroundWaterFlow/gwf3.f90 +++ b/src/Model/GroundWaterFlow/gwf3.f90 @@ -1296,7 +1296,8 @@ subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, mempath, & call wel_create(packobj, ipakid, ipaknum, inunit, iout, this%name, & pakname, mempath) case ('DRN6') - call drn_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname) + call drn_create(packobj, ipakid, ipaknum, inunit, iout, this%name, & + pakname, mempath) case ('RIV6') call riv_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname) case ('GHB6') diff --git a/src/Model/GroundWaterFlow/gwf3buy8.f90 b/src/Model/GroundWaterFlow/gwf3buy8.f90 index 39fbdf5629c..2d2e26ef628 100644 --- a/src/Model/GroundWaterFlow/gwf3buy8.f90 +++ b/src/Model/GroundWaterFlow/gwf3buy8.f90 @@ -721,6 +721,7 @@ subroutine buy_cf_drn(packobj, hnew, dense, denseref) ! ------------------------------------------------------------------------------ ! -- modules use BndModule, only: BndType + use DrnModule, only: DrnType class(BndType), pointer :: packobj ! -- dummy real(DP), intent(in), dimension(:) :: hnew @@ -737,19 +738,22 @@ subroutine buy_cf_drn(packobj, hnew, dense, denseref) ! ------------------------------------------------------------------------------ ! ! -- Process density terms for each DRN - do n = 1, packobj%nbound - node = packobj%nodelist(n) - if (packobj%ibound(node) <= 0) cycle - rho = dense(node) - hbnd = packobj%bound(1, n) - cond = packobj%bound(2, n) - if (hnew(node) > hbnd) then - hcofterm = -cond * (rho / denseref - DONE) - rhsterm = hcofterm * hbnd - packobj%hcof(n) = packobj%hcof(n) + hcofterm - packobj%rhs(n) = packobj%rhs(n) + rhsterm - end if - end do + select type (packobj) + type is (DrnType) + do n = 1, packobj%nbound + node = packobj%nodelist(n) + if (packobj%ibound(node) <= 0) cycle + rho = dense(node) + hbnd = packobj%elev(n) + cond = packobj%cond(n) + if (hnew(node) > hbnd) then + hcofterm = -cond * (rho / denseref - DONE) + rhsterm = hcofterm * hbnd + packobj%hcof(n) = packobj%hcof(n) + hcofterm + packobj%rhs(n) = packobj%rhs(n) + rhsterm + end if + end do + end select ! ! -- Return return diff --git a/src/Model/GroundWaterFlow/gwf3drn8.f90 b/src/Model/GroundWaterFlow/gwf3drn8.f90 index c0b5562c555..7b3090a7f26 100644 --- a/src/Model/GroundWaterFlow/gwf3drn8.f90 +++ b/src/Model/GroundWaterFlow/gwf3drn8.f90 @@ -2,13 +2,14 @@ module DrnModule use KindModule, only: DP, I4B use ConstantsModule, only: DZERO, DONE, DTWO, & LENFTYPE, LENPACKAGENAME, LENAUXNAME, LINELENGTH + use SimVariablesModule, only: errmsg + use SimModule, only: count_errors, store_error, store_error_filename use MemoryHelperModule, only: create_mem_path use SmoothingModule, only: sQSaturation, sQSaturationDerivative, & sQuadraticSaturation use BndModule, only: BndType + use BndExtModule, only: BndExtType use ObsModule, only: DefaultObsIdProcessor - use TimeSeriesLinkModule, only: TimeSeriesLinkType, & - GetTimeSeriesLinkFromList use MatrixBaseModule ! implicit none @@ -20,14 +21,19 @@ module DrnModule character(len=LENFTYPE) :: ftype = 'DRN' character(len=LENPACKAGENAME) :: text = ' DRN' ! - type, extends(BndType) :: DrnType + type, extends(BndExtType) :: DrnType + real(DP), dimension(:), pointer, contiguous :: elev => null() !< DRN elevation + real(DP), dimension(:), pointer, contiguous :: cond => null() !< DRN conductance at aquifer interface integer(I4B), pointer :: iauxddrncol => null() integer(I4B), pointer :: icubic_scaling => null() contains procedure :: allocate_scalars => drn_allocate_scalars - procedure :: bnd_options => drn_options + procedure :: allocate_arrays => drn_allocate_arrays + procedure :: source_options => drn_options + procedure :: log_drn_options + procedure :: bnd_rp => drn_rp procedure :: bnd_ck => drn_ck procedure :: bnd_cf => drn_cf procedure :: bnd_fc => drn_fc @@ -36,16 +42,18 @@ module DrnModule procedure :: define_listlabel procedure :: get_drain_elevations procedure :: get_drain_factor + procedure :: bound_value => drn_bound_value + procedure :: cond_mult ! -- methods for observations procedure, public :: bnd_obs_supported => drn_obs_supported procedure, public :: bnd_df_obs => drn_df_obs - ! -- method for time series - procedure, public :: bnd_rp_ts => drn_rp_ts + procedure, public :: drn_store_user_cond end type DrnType contains - subroutine drn_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname) + subroutine drn_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & + mempath) ! ****************************************************************************** ! drn_create -- Create a New Drn Package ! Subroutine: (1) create new-style package @@ -62,6 +70,7 @@ subroutine drn_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(DrnType), pointer :: drnobj ! ------------------------------------------------------------------------------ @@ -71,7 +80,7 @@ subroutine drn_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname) packobj => drnobj ! ! -- 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 @@ -107,12 +116,16 @@ subroutine drn_da(this) ! ------------------------------------------------------------------------------ ! ! -- Deallocate parent package - call this%BndType%bnd_da() + call this%BndExtType%bnd_da() ! ! -- scalars call mem_deallocate(this%iauxddrncol) call mem_deallocate(this%icubic_scaling) ! + ! -- arrays + call mem_deallocate(this%elev, 'ELEV', this%memoryPath) + call mem_deallocate(this%cond, 'COND', this%memoryPath) + ! ! -- return return end subroutine drn_da @@ -129,8 +142,8 @@ subroutine drn_allocate_scalars(this) class(DrnType) :: this ! ------------------------------------------------------------------------------ ! - ! -- call standard BndType allocate scalars - call this%BndType%allocate_scalars() + ! -- call base type allocate scalars + call this%BndExtType%allocate_scalars() ! ! -- allocate the object and assign values to object variables call mem_allocate(this%iauxddrncol, 'IAUXDDRNCOL', this%memoryPath) @@ -148,56 +161,101 @@ subroutine drn_allocate_scalars(this) return end subroutine drn_allocate_scalars - subroutine drn_options(this, option, found) + subroutine drn_allocate_arrays(this, nodelist, auxvar) +! ****************************************************************************** +! drn_allocate_arrays -- allocate arrays ! ****************************************************************************** -! drn_options -- set options specific to DrnType ! -! drn_options overrides BndType%bnd_options +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ + ! -- modules + use MemoryManagerModule, only: mem_allocate, mem_setptr, mem_checkin + ! -- dummy + class(DrnType) :: this + integer(I4B), dimension(:), pointer, contiguous, optional :: nodelist + real(DP), dimension(:, :), pointer, contiguous, optional :: auxvar + ! -- local +! ------------------------------------------------------------------------------ + ! + ! -- call base type allocate arrays + call this%BndExtType%allocate_arrays(nodelist, auxvar) + ! + ! -- set drn input context pointers + call mem_setptr(this%elev, 'ELEV', this%input_mempath) + call mem_setptr(this%cond, 'COND', this%input_mempath) + ! + ! --checkin drn input context pointers + call mem_checkin(this%elev, 'ELEV', this%memoryPath, & + 'ELEV', this%input_mempath) + call mem_checkin(this%cond, 'COND', this%memoryPath, & + 'COND', this%input_mempath) + ! + ! -- return + return + end subroutine drn_allocate_arrays + + subroutine drn_rp(this) +! ****************************************************************************** +! drn_rp -- Read and prepare +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ + use TdisModule, only: kper + ! -- dummy + class(DrnType), intent(inout) :: this + ! -- local +! ------------------------------------------------------------------------------ + if (this%iper /= kper) return + ! + ! -- Call the parent class read and prepare + call this%BndExtType%bnd_rp() + ! + ! -- store user cond + if (this%ivsc == 1) then + call this%drn_store_user_cond() + end if + ! + ! -- Write the list to iout if requested + if (this%iprpak /= 0) then + call this%write_list() + end if + ! + ! -- return + return + end subroutine drn_rp + + subroutine drn_options(this) +! ****************************************************************************** +! drn_options -- source options specific to DrnType ! ****************************************************************************** ! ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ use InputOutputModule, only: urword - use SimModule, only: store_error + use MemoryManagerExtModule, only: mem_set_value + use CharacterStringModule, only: CharacterStringType + use GwfDrnInputModule, only: GwfDrnParamFoundType ! -- dummy class(DrnType), intent(inout) :: this - character(len=*), intent(inout) :: option - logical, intent(inout) :: found ! -- local - character(len=LINELENGTH) :: errmsg + type(GwfDrnParamFoundType) :: found character(len=LENAUXNAME) :: ddrnauxname integer(I4B) :: n ! ------------------------------------------------------------------------------ ! - found = .true. - select case (option) - case ('MOVER') - this%imover = 1 - write (this%iout, '(4x,A)') 'MOVER OPTION ENABLED' - case ('AUXDEPTHNAME') - call this%parser%GetStringCaps(ddrnauxname) - this%iauxddrncol = -1 - write (this%iout, '(4x,a,a)') & - 'AUXILIARY DRAIN DEPTH NAME: ', trim(ddrnauxname) - ! - ! -- right now these are options that are only available in the - ! development version and are not included in the documentation. - ! These options are only available when IDEVELOPMODE in - ! constants module is set to 1 - case ('DEV_CUBIC_SCALING') - call this%parser%DevOpt() - this%icubic_scaling = 1 - write (this%iout, '(4x,a,1x,a)') & - 'CUBIC SCALING will be used for drains with non-zero DDRN values', & - 'even if the NEWTON-RAPHSON method is not being used.' - case default - ! - ! -- No options found - found = .false. - end select + ! -- source base class options + call this%BndExtType%source_options() + ! + ! -- source drain options + call mem_set_value(this%imover, 'MOVER', this%input_mempath, found%mover) + call mem_set_value(ddrnauxname, 'AUXDEPTHNAME', this%input_mempath, & + found%auxdepthname) + call mem_set_value(this%icubic_scaling, 'ICUBICSFAC', this%input_mempath, & + found%icubicsfac) ! - ! -- DDRN was specified, so find column of auxvar that will be used - if (this%iauxddrncol < 0) then + if (found%auxdepthname) then + this%iauxddrncol = -1 ! ! -- Error if no aux variable specified if (this%naux == 0) then @@ -225,10 +283,50 @@ subroutine drn_options(this, option, found) end if end if ! + if (found%icubicsfac) then + call this%parser%DevOpt() + end if + ! + ! -- log DRN specific options + call this%log_drn_options(found) + ! ! -- return return end subroutine drn_options + !> @ brief Log DRN specific package options + !< + subroutine log_drn_options(this, found) + ! -- modules + use GwfDrnInputModule, only: GwfDrnParamFoundType + ! -- dummy variables + class(DrnType), intent(inout) :: this !< BndExtType object + type(GwfDrnParamFoundType), intent(in) :: found + ! -- local variables + ! -- format + ! + ! -- log found options + write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text)) & + //' OPTIONS' + ! + if (found%mover) then + write (this%iout, '(4x,A)') 'MOVER OPTION ENABLED' + end if + ! + if (found%icubicsfac) then + write (this%iout, '(4x,a,1x,a)') & + 'CUBIC SCALING will be used for drains with non-zero DDRN values', & + 'even if the NEWTON-RAPHSON method is not being used.' + end if + ! + ! -- close logging block + write (this%iout, '(1x,a)') & + 'END OF '//trim(adjustl(this%text))//' OPTIONS' + ! + ! -- return + return + end subroutine log_drn_options + subroutine drn_ck(this) ! ****************************************************************************** ! drn_ck -- Check drain boundary condition data @@ -237,12 +335,9 @@ subroutine drn_ck(this) ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ ! -- modules - use ConstantsModule, only: LINELENGTH - use SimModule, only: store_error, count_errors, store_error_unit ! -- dummy class(DrnType), intent(inout) :: this ! -- local - character(len=LINELENGTH) :: errmsg integer(I4B) :: i integer(I4B) :: node real(DP) :: bt @@ -280,7 +375,7 @@ subroutine drn_ck(this) ! ! -- write summary of drain package error messages if (count_errors() > 0) then - call store_error_unit(this%inunit) + call store_error_filename(this%input_fname) end if ! ! -- return @@ -328,7 +423,8 @@ subroutine drn_cf(this, reset_mover) end if ! ! -- set local variables for this drain - cdrn = this%bound(2, i) + cdrn = this%cond_mult(i) + ! ! -- calculate the drainage scaling factor call this%get_drain_factor(i, fact, drnbot) @@ -383,7 +479,7 @@ subroutine drn_fc(this, rhs, ia, idxglo, matrix_sln) ! -- If mover is active and this drain is discharging, ! store available water (as positive value). if (this%imover == 1 .and. fact > DZERO) then - drncond = this%bound(2, i) + drncond = this%cond_mult(i) qdrn = fact * drncond * (this%xnew(n) - drnbot) call this%pakmvrobj%accumulate_qformvr(i, qdrn) end if @@ -431,7 +527,7 @@ subroutine drn_fn(this, rhs, ia, idxglo, matrix_sln) end if ! ! -- set local variables for this drain - cdrn = this%bound(2, i) + cdrn = this%cond_mult(i) xnew = this%xnew(node) ! ! -- calculate the drainage depth and the top and bottom of @@ -510,7 +606,7 @@ subroutine get_drain_elevations(this, i, drndepth, drntop, drnbot) ! ! -- initialize dummy and local variables drndepth = DZERO - drnelev = this%bound(1, i) + drnelev = this%elev(i) ! ! -- set the drain depth if (this%iauxddrncol > 0) then @@ -630,33 +726,71 @@ subroutine drn_df_obs(this) return end subroutine drn_df_obs - ! -- Procedure related to time series - - subroutine drn_rp_ts(this) - ! -- Assign tsLink%Text appropriately for - ! all time series in use by package. - ! In DRN package variables ELEV and COND - ! can be controlled by time series. - ! -- dummy - class(DrnType), intent(inout) :: this - ! -- local - integer(I4B) :: i, nlinks - type(TimeSeriesLinkType), pointer :: tslink => null() - ! - 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 = 'ELEV' - case (2) - tslink%Text = 'COND' - end select - end if + subroutine drn_store_user_cond(this) + ! -- modules + ! -- dummy variables + class(DrnType), intent(inout) :: this !< BndExtType object + ! -- local variables + integer(I4B) :: n + ! + ! -- store backup copy of conductance values + do n = 1, this%nbound + this%condinput(n) = this%cond_mult(n) end do ! + ! -- return + return + end subroutine drn_store_user_cond + + function cond_mult(this, row) result(cond) + ! -- modules + use ConstantsModule, only: DZERO + ! -- dummy variables + class(DrnType), intent(inout) :: this !< BndExtType object + integer(I4B), intent(in) :: row + ! -- result + real(DP) :: cond + ! + if (this%iauxmultcol > 0) then + cond = this%cond(row) * this%auxvar(this%iauxmultcol, row) + else + cond = this%cond(row) + end if + ! + ! -- return + return + end function cond_mult + +! ****************************************************************************** +! drn_bound_value -- return requested boundary value +! ****************************************************************************** +! +! SPECIFICATIONS: +! ------------------------------------------------------------------------------ + function drn_bound_value(this, col, row) result(bndval) + ! -- modules + use ConstantsModule, only: DZERO + ! -- dummy variables + class(DrnType), intent(inout) :: this !< BndExtType object + integer(I4B), intent(in) :: col + integer(I4B), intent(in) :: row + ! -- result + real(DP) :: bndval + ! + select case (col) + case (1) + bndval = this%elev(row) + case (2) + bndval = this%cond_mult(row) + case default + errmsg = 'Programming error. DRN bound value requested column '& + &'outside range of ncolbnd (2).' + call store_error(errmsg) + call store_error_filename(this%input_fname) + end select + ! + ! -- return return - end subroutine drn_rp_ts + end function drn_bound_value end module DrnModule diff --git a/src/Model/GroundWaterFlow/gwf3drn8idm.f90 b/src/Model/GroundWaterFlow/gwf3drn8idm.f90 new file mode 100644 index 00000000000..f9865faa74d --- /dev/null +++ b/src/Model/GroundWaterFlow/gwf3drn8idm.f90 @@ -0,0 +1,490 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module GwfDrnInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public gwf_drn_param_definitions + public gwf_drn_aggregate_definitions + public gwf_drn_block_definitions + public GwfDrnParamFoundType + public gwf_drn_multi_package + public gwf_drn_aux_sfac_param + + type GwfDrnParamFoundType + logical :: auxiliary = .false. + logical :: auxmultname = .false. + logical :: auxdepthname = .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 :: mover = .false. + logical :: icubicsfac = .false. + logical :: maxbound = .false. + logical :: cellid = .false. + logical :: elev = .false. + logical :: cond = .false. + logical :: auxvar = .false. + logical :: boundname = .false. + end type GwfDrnParamFoundType + + logical :: gwf_drn_multi_package = .true. + + character(len=LENVARNAME) :: gwf_drn_aux_sfac_param = '' + + type(InputParamDefinitionType), parameter :: & + gwfdrn_auxiliary = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_auxmultname = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_auxdepthname = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! subcomponent + 'OPTIONS', & ! block + 'AUXDEPTHNAME', & ! tag name + 'AUXDEPTHNAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfdrn_boundnames = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_iprpak = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_iprflow = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_ipakcb = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_ts_filerecord = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_ts6 = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_filein = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_ts6_filename = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_obs_filerecord = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_obs6 = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_obs6_filename = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_mover = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! subcomponent + 'OPTIONS', & ! block + 'MOVER', & ! tag name + 'MOVER', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfdrn_icubicsfac = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! subcomponent + 'OPTIONS', & ! block + 'DEV_CUBIC_SCALING', & ! tag name + 'ICUBICSFAC', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfdrn_maxbound = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_cellid = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_elev = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! subcomponent + 'PERIOD', & ! block + 'ELEV', & ! tag name + 'ELEV', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfdrn_cond = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! subcomponent + 'PERIOD', & ! block + 'COND', & ! tag name + 'COND', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .true. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwfdrn_auxvar = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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 :: & + gwfdrn_boundname = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! 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_drn_param_definitions(*) = & + [ & + gwfdrn_auxiliary, & + gwfdrn_auxmultname, & + gwfdrn_auxdepthname, & + gwfdrn_boundnames, & + gwfdrn_iprpak, & + gwfdrn_iprflow, & + gwfdrn_ipakcb, & + gwfdrn_ts_filerecord, & + gwfdrn_ts6, & + gwfdrn_filein, & + gwfdrn_ts6_filename, & + gwfdrn_obs_filerecord, & + gwfdrn_obs6, & + gwfdrn_obs6_filename, & + gwfdrn_mover, & + gwfdrn_icubicsfac, & + gwfdrn_maxbound, & + gwfdrn_cellid, & + gwfdrn_elev, & + gwfdrn_cond, & + gwfdrn_auxvar, & + gwfdrn_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + gwfdrn_spd = InputParamDefinitionType & + ( & + 'GWF', & ! component + 'DRN', & ! subcomponent + 'PERIOD', & ! block + 'STRESS_PERIOD_DATA', & ! tag name + 'SPD', & ! fortran variable + 'RECARRAY CELLID ELEV COND AUX BOUNDNAME', & ! type + 'MAXBOUND', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + gwf_drn_aggregate_definitions(*) = & + [ & + gwfdrn_spd & + ] + + type(InputBlockDefinitionType), parameter :: & + gwf_drn_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 GwfDrnInputModule diff --git a/src/Model/GroundWaterFlow/gwf3vsc8.f90 b/src/Model/GroundWaterFlow/gwf3vsc8.f90 index 01a767c41bc..ef8f55d4026 100644 --- a/src/Model/GroundWaterFlow/gwf3vsc8.f90 +++ b/src/Model/GroundWaterFlow/gwf3vsc8.f90 @@ -519,6 +519,7 @@ subroutine vsc_ad_standard_bnd(packobj, hnew, visc, viscref, locelev, & ivisc, a2, a3, a4, ctemp) ! -- modules use BndModule, only: BndType + use DrnModule, only: DrnType class(BndType), pointer :: packobj ! -- dummy real(DP), intent(in), dimension(:) :: hnew @@ -551,8 +552,17 @@ subroutine vsc_ad_standard_bnd(packobj, hnew, visc, viscref, locelev, & packobj%auxvar) ! ! -- update boundary conductance based on viscosity effects - packobj%bound(2, n) = update_bnd_cond(viscbnd, viscref, & + select case (packobj%filtyp) + case ('DRN') + select type (packobj) + type is (DrnType) + packobj%cond(n) = update_bnd_cond(viscbnd, viscref, & packobj%condinput(n)) + end select + case default + packobj%bound(2, n) = update_bnd_cond(viscbnd, viscref, & + packobj%condinput(n)) + end select ! end do ! diff --git a/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 b/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 index bde123809aa..c9c15d09b60 100644 --- a/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 +++ b/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 @@ -9,6 +9,7 @@ module IdmGwfDfnSelectorModule use GwfDisInputModule use GwfDisuInputModule use GwfDisvInputModule + use GwfDrnInputModule use GwfNpfInputModule use GwfWelInputModule use GwfNamInputModule @@ -77,6 +78,11 @@ module IdmGwfDfnSelectorModule logical :: ncvert = .false. logical :: icvert = .false. logical :: ncpl = .false. + logical :: auxdepthname = .false. + logical :: mover = .false. + logical :: icubicsfac = .false. + logical :: elev = .false. + logical :: cond = .false. logical :: cellavg = .false. logical :: ithickstrt = .false. logical :: cvoptions = .false. @@ -115,7 +121,6 @@ module IdmGwfDfnSelectorModule logical :: afrcsv = .false. logical :: fileout = .false. logical :: afrcsvfile = .false. - logical :: mover = .false. logical :: q = .false. logical :: list = .false. logical :: print_input = .false. @@ -156,6 +161,8 @@ function gwf_param_definitions(subcomponent) result(input_definition) call set_param_pointer(input_definition, gwf_disu_param_definitions) case ('DISV') call set_param_pointer(input_definition, gwf_disv_param_definitions) + case ('DRN') + call set_param_pointer(input_definition, gwf_drn_param_definitions) case ('NPF') call set_param_pointer(input_definition, gwf_npf_param_definitions) case ('WEL') @@ -180,6 +187,8 @@ function gwf_aggregate_definitions(subcomponent) result(input_definition) call set_param_pointer(input_definition, gwf_disu_aggregate_definitions) case ('DISV') call set_param_pointer(input_definition, gwf_disv_aggregate_definitions) + case ('DRN') + call set_param_pointer(input_definition, gwf_drn_aggregate_definitions) case ('NPF') call set_param_pointer(input_definition, gwf_npf_aggregate_definitions) case ('WEL') @@ -204,6 +213,8 @@ function gwf_block_definitions(subcomponent) result(input_definition) call set_block_pointer(input_definition, gwf_disu_block_definitions) case ('DISV') call set_block_pointer(input_definition, gwf_disv_block_definitions) + case ('DRN') + call set_block_pointer(input_definition, gwf_drn_block_definitions) case ('NPF') call set_block_pointer(input_definition, gwf_npf_block_definitions) case ('WEL') @@ -227,6 +238,8 @@ function gwf_idm_multi_package(subcomponent) result(multi_package) multi_package = gwf_disu_multi_package case ('DISV') multi_package = gwf_disv_multi_package + case ('DRN') + multi_package = gwf_drn_multi_package case ('NPF') multi_package = gwf_npf_multi_package case ('WEL') @@ -253,6 +266,8 @@ function gwf_idm_sfac_param(subcomponent) result(sfac_param) sfac_param = gwf_disu_aux_sfac_param case ('DISV') sfac_param = gwf_disv_aux_sfac_param + case ('DRN') + sfac_param = gwf_drn_aux_sfac_param case ('NPF') sfac_param = gwf_npf_aux_sfac_param case ('WEL') @@ -280,6 +295,8 @@ function gwf_idm_integrated(subcomponent) result(integrated) integrated = .true. case ('DISV') integrated = .true. + case ('DRN') + integrated = .true. case ('NPF') integrated = .true. case ('WEL') diff --git a/src/meson.build b/src/meson.build index 95ddd9532ba..83fc181b801 100644 --- a/src/meson.build +++ b/src/meson.build @@ -59,6 +59,7 @@ modflow_sources = files( 'Model' / 'GroundWaterFlow' / 'gwf3disv8.f90', 'Model' / 'GroundWaterFlow' / 'gwf3disv8idm.f90', 'Model' / 'GroundWaterFlow' / 'gwf3drn8.f90', + 'Model' / 'GroundWaterFlow' / 'gwf3drn8idm.f90', 'Model' / 'GroundWaterFlow' / 'gwf3evt8.f90', 'Model' / 'GroundWaterFlow' / 'gwf3ghb8.f90', 'Model' / 'GroundWaterFlow' / 'gwf3hfb8.f90', diff --git a/utils/idmloader/scripts/dfn2f90.py b/utils/idmloader/scripts/dfn2f90.py index 905094238d6..1b8d67f3264 100644 --- a/utils/idmloader/scripts/dfn2f90.py +++ b/utils/idmloader/scripts/dfn2f90.py @@ -984,6 +984,10 @@ def _write_master_component(self, fh=None): Path("../../../doc/mf6io/mf6ivar/dfn", "gwf-disv.dfn"), Path("../../../src/Model/GroundWaterFlow", "gwf3disv8idm.f90"), ], + [ + Path("../../../doc/mf6io/mf6ivar/dfn", "gwf-drn.dfn"), + Path("../../../src/Model/GroundWaterFlow", "gwf3drn8idm.f90"), + ], [ Path("../../../doc/mf6io/mf6ivar/dfn", "gwf-npf.dfn"), Path("../../../src/Model/GroundWaterFlow", "gwf3npf8idm.f90"), diff --git a/utils/mf5to6/make/makefile b/utils/mf5to6/make/makefile index 61d820da428..6aeb41e0a59 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/MF2005 -SOURCEDIR3=../src/NWT -SOURCEDIR4=../src/LGR -SOURCEDIR5=../src/Preproc +SOURCEDIR2=../src/LGR +SOURCEDIR3=../src/Preproc +SOURCEDIR4=../src/MF2005 +SOURCEDIR5=../src/NWT SOURCEDIR6=../../../src/Utilities/Memory SOURCEDIR7=../../../src/Utilities/TimeSeries SOURCEDIR8=../../../src/Utilities