diff --git a/doc/mf6io/mf6ivar/dfn/exg-gwegwe.dfn b/doc/mf6io/mf6ivar/dfn/exg-gwegwe.dfn index f65627640ac..72dcd437bff 100644 --- a/doc/mf6io/mf6ivar/dfn/exg-gwegwe.dfn +++ b/doc/mf6io/mf6ivar/dfn/exg-gwegwe.dfn @@ -42,6 +42,7 @@ reader urword optional true longname keyword to print input to list file description keyword to indicate that the list of exchange entries will be echoed to the listing file immediately after it is read. +mf6internal iprpak block options name print_flows @@ -50,6 +51,7 @@ reader urword optional true longname keyword to print gwfgwf flows to list file description keyword to indicate that the list of exchange flow rates will be printed to the listing file for every stress period in which ``SAVE BUDGET'' is specified in Output Control. +mf6internal iprflow block options name save_flows @@ -58,6 +60,7 @@ reader urword optional true longname keyword to save GWFGWF flows description keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model provided that the Output Control for the models are set up with the ``BUDGET SAVE FILE'' option. +mf6internal ipakcb block options name adv_scheme @@ -168,6 +171,7 @@ reader urword optional true longname activate interface model on exchange description activates the interface model mechanism for calculating the coefficients at (and possibly near) the exchange. This keyword should only be used for development purposes. +mf6internal dev_ifmod_on # --------------------- exg gwegwe dimensions --------------------- @@ -185,6 +189,7 @@ description keyword and integer value specifying the number of GWE-GWE exchanges block exchangedata name exchangedata type recarray cellidm1 cellidm2 ihc cl1 cl2 hwva aux boundname +shape (nexg) reader urword optional false longname exchange data diff --git a/make/makefile b/make/makefile index 566021c74c0..47ff7265f68 100644 --- a/make/makefile +++ b/make/makefile @@ -153,6 +153,8 @@ $(OBJDIR)/gwe1cnt1idm.o \ $(OBJDIR)/gwtgwtidm.o \ $(OBJDIR)/gwfgwtidm.o \ $(OBJDIR)/gwfgwfidm.o \ +$(OBJDIR)/gwfgweidm.o \ +$(OBJDIR)/gwegweidm.o \ $(OBJDIR)/TimeArraySeries.o \ $(OBJDIR)/ObsOutputList.o \ $(OBJDIR)/Observe.o \ diff --git a/msvs/mf6core.vfproj b/msvs/mf6core.vfproj index a721c31487e..8c2f60a175d 100644 --- a/msvs/mf6core.vfproj +++ b/msvs/mf6core.vfproj @@ -94,17 +94,19 @@ - - - + + + + + diff --git a/src/Exchange/GweGweExchange.f90 b/src/Exchange/GweGweExchange.f90 index c2c127d1a3e..e60e76f5099 100644 --- a/src/Exchange/GweGweExchange.f90 +++ b/src/Exchange/GweGweExchange.f90 @@ -11,7 +11,8 @@ module GweGweExchangeModule use KindModule, only: DP, I4B, LGP use SimVariablesModule, only: errmsg, model_loc_idx - use SimModule, only: store_error + use SimModule, only: store_error, store_error_filename, & + count_errors, ustop use BaseModelModule, only: BaseModelType, GetBaseModelFromList use BaseExchangeModule, only: BaseExchangeType, AddBaseExchangeToList use ConstantsModule, only: LENBOUNDNAME, NAMEDBOUNDFLAG, LINELENGTH, & @@ -26,10 +27,6 @@ module GweGweExchangeModule use VirtualModelModule, only: VirtualModelType use ObserveModule, only: ObserveType use ObsModule, only: ObsType - use SimModule, only: count_errors, store_error, & - store_error_unit, ustop - use SimVariablesModule, only: errmsg - use BlockParserModule, only: BlockParserType use TableModule, only: TableType, table_cr use MatrixBaseModule @@ -60,8 +57,6 @@ module GweGweExchangeModule ! ! -- GWT specific option block: integer(I4B), pointer :: inewton => null() !< unneeded newton flag allows for mvt to be used here - integer(I4B), pointer :: iprflow => null() !< print flag for cell by cell flows - integer(I4B), pointer :: ipakcb => null() !< save flag for cell by cell flows integer(I4B), pointer :: iAdvScheme !< the advection scheme at the interface: !! 0 = upstream, 1 = central, 2 = TVD ! @@ -96,8 +91,7 @@ module GweGweExchangeModule procedure :: use_interface_model procedure :: allocate_scalars procedure :: allocate_arrays - procedure :: read_options - procedure :: parse_option + procedure :: source_options procedure :: read_mvt procedure :: gwe_gwe_bdsav procedure, private :: gwe_gwe_bdsav_model @@ -113,9 +107,8 @@ module GweGweExchangeModule !! !! Create a new GWT to GWT exchange object. !< - subroutine gweexchange_create(filename, name, id, m1_id, m2_id) + subroutine gweexchange_create(filename, name, id, m1_id, m2_id, input_mempath) ! -- modules - use ConstantsModule, only: LINELENGTH use BaseModelModule, only: BaseModelType use ListsModule, only: baseexchangelist use ObsModule, only: obs_cr @@ -126,6 +119,7 @@ subroutine gweexchange_create(filename, name, id, m1_id, m2_id) character(len=*) :: name !< the exchange name integer(I4B), intent(in) :: m1_id !< id for model 1 integer(I4B), intent(in) :: m2_id !< id for model 2 + character(len=*), intent(in) :: input_mempath ! -- local type(GweExchangeType), pointer :: exchange class(BaseModelType), pointer :: mb @@ -141,6 +135,7 @@ subroutine gweexchange_create(filename, name, id, m1_id, m2_id) exchange%id = id exchange%name = name exchange%memoryPath = create_mem_path(exchange%name) + exchange%input_mempath = input_mempath ! ! -- allocate scalars and set defaults call exchange%allocate_scalars() @@ -207,15 +202,9 @@ subroutine gwe_gwe_df(this) use GhostNodeModule, only: gnc_cr ! -- dummy class(GweExchangeType) :: this !< GwtExchangeType - ! -- local - integer(I4B) :: inunit ! - ! -- open the file - inunit = getunit() + ! -- log the exchange write (iout, '(/a,a)') ' Creating exchange: ', this%name - call openfile(inunit, iout, this%filename, 'GWE-GWE') - ! - call this%parser%Initialize(inunit, iout) ! ! -- Ensure models are in same solution if (associated(this%gwemodel1) .and. associated(this%gwemodel2)) then @@ -225,21 +214,21 @@ subroutine gwe_gwe_df(this) 'GWE models must be in same solution: '// & trim(this%gwemodel1%name)//' '// & trim(this%gwemodel2%name)) - call this%parser%StoreErrorUnit() + call store_error_filename(this%filename) end if end if ! - ! -- read options - call this%read_options(iout) + ! -- source options + call this%source_options(iout) ! - ! -- read dimensions - call this%read_dimensions(iout) + ! -- source dimensions + call this%source_dimensions(iout) ! ! -- allocate arrays call this%allocate_arrays() ! - ! -- read exchange data - call this%read_data(iout) + ! -- source exchange data + call this%source_data(iout) ! ! -- Read mover information if (this%inmvt > 0) then @@ -247,9 +236,6 @@ subroutine gwe_gwe_df(this) call this%mvt%mvt_df(this%gwemodel1%dis) end if ! - ! -- close the file - close (inunit) - ! ! -- Store obs call this%gwe_gwe_df_obs() if (associated(this%gwemodel1)) then @@ -658,7 +644,7 @@ end subroutine gwe_gwe_bdsav_model subroutine gwe_gwe_ot(this) ! -- modules use SimVariablesModule, only: iout - use ConstantsModule, only: DZERO, LINELENGTH + use ConstantsModule, only: DZERO ! -- dummy class(GweExchangeType) :: this !< GweExchangeType ! -- local @@ -708,195 +694,96 @@ subroutine gwe_gwe_ot(this) return end subroutine gwe_gwe_ot - !> @ brief Read options + !> @ brief Source options !! - !! Read the options block + !! Source the options block !< - subroutine read_options(this, iout) + subroutine source_options(this, iout) ! -- modules - use ConstantsModule, only: LINELENGTH, LENAUXNAME, DEM6 - use MemoryManagerModule, only: mem_allocate - use SimModule, only: store_error, store_error_unit + use ConstantsModule, only: LENVARNAME + use InputOutputModule, only: getunit, openfile + use MemoryManagerExtModule, only: mem_set_value + use CharacterStringModule, only: CharacterStringType + use ExgGwegweInputModule, only: ExgGwegweParamFoundType + use SourceCommonModule, only: filein_fname ! -- dummy class(GweExchangeType) :: this !< GweExchangeType integer(I4B), intent(in) :: iout ! -- local - character(len=LINELENGTH) :: keyword - logical :: isfound - logical :: endOfBlock - integer(I4B) :: ierr - ! - ! -- get options block - call this%parser%GetBlock('OPTIONS', isfound, ierr, & - supportOpenClose=.true., blockRequired=.false.) - ! - ! -- parse options block if detected - if (isfound) then - write (iout, '(1x,a)') 'PROCESSING GWE-GWE EXCHANGE OPTIONS' - do - call this%parser%GetNextLine(endOfBlock) - if (endOfBlock) then - exit - end if - call this%parser%GetStringCaps(keyword) - ! - ! first parse option in base - if (this%DisConnExchangeType%parse_option(keyword, iout)) then - cycle - end if - ! - ! it's probably ours - if (this%parse_option(keyword, iout)) then - cycle - end if - ! - ! unknown option - errmsg = "Unknown GWE-GWE exchange option '"//trim(keyword)//"'." - call store_error(errmsg) - call this%parser%StoreErrorUnit() - end do - ! - write (iout, '(1x,a)') 'END OF GWE-GWE EXCHANGE OPTIONS' - end if - ! - ! -- Return - return - end subroutine read_options - - !> @brief parse option from exchange file - !< - function parse_option(this, keyword, iout) result(parsed) - ! -- modules - use InputOutputModule, only: getunit, openfile - ! -- dummy - class(GweExchangeType) :: this !< GweExchangeType - character(len=LINELENGTH), intent(in) :: keyword !< the option name - integer(I4B), intent(in) :: iout !< for logging - logical(LGP) :: parsed !< true when parsed - ! -- local - character(len=LINELENGTH) :: fname - integer(I4B) :: inobs, ilen - character(len=LINELENGTH) :: subkey - ! - parsed = .true. - ! - select case (keyword) - case ('GWFMODELNAME1') - call this%parser%GetStringCaps(subkey) - ilen = len_trim(subkey) - if (ilen > LENMODELNAME) then - write (errmsg, '(a,a)') & - 'INVALID MODEL NAME: ', trim(subkey) - call store_error(errmsg) - call this%parser%StoreErrorUnit() - end if - if (this%gwfmodelname1 /= '') then - call store_error('GWFMODELNAME1 has already been set to ' & - //trim(this%gwfmodelname1)// & - '. Cannot set more than once.') - call this%parser%StoreErrorUnit() - end if - this%gwfmodelname1 = subkey(1:LENMODELNAME) + type(ExgGwegweParamFoundType) :: found + character(len=LENVARNAME), dimension(3) :: adv_scheme = & + &[character(len=LENVARNAME) :: 'UPSTREAM', 'CENTRAL', 'TVD'] + character(len=LINELENGTH) :: mvt_fname + ! + ! -- update defaults with values sourced from input context + call mem_set_value(this%gwfmodelname1, 'GWFMODELNAME1', this%input_mempath, & + found%gwfmodelname1) + call mem_set_value(this%gwfmodelname2, 'GWFMODELNAME2', this%input_mempath, & + found%gwfmodelname2) + call mem_set_value(this%iAdvScheme, 'ADV_SCHEME', this%input_mempath, & + adv_scheme, found%adv_scheme) + call mem_set_value(this%ixt3d, 'DSP_XT3D_OFF', this%input_mempath, & + found%dsp_xt3d_off) + call mem_set_value(this%ixt3d, 'DSP_XT3D_RHS', this%input_mempath, & + found%dsp_xt3d_rhs) + ! + write (iout, '(1x,a)') 'PROCESSING GWE-GWE EXCHANGE OPTIONS' + ! + ! -- source base class options + call this%DisConnExchangeType%source_options(iout) + ! + if (found%gwfmodelname1) then write (iout, '(4x,a,a)') & 'GWFMODELNAME1 IS SET TO: ', trim(this%gwfmodelname1) - case ('GWFMODELNAME2') - call this%parser%GetStringCaps(subkey) - ilen = len_trim(subkey) - if (ilen > LENMODELNAME) then - write (errmsg, '(a,a)') & - 'INVALID MODEL NAME: ', trim(subkey) - call store_error(errmsg) - call this%parser%StoreErrorUnit() - end if - if (this%gwfmodelname2 /= '') then - call store_error('GWFMODELNAME2 has already been set to ' & - //trim(this%gwfmodelname2)// & - '. Cannot set more than once.') - call this%parser%StoreErrorUnit() - end if - this%gwfmodelname2 = subkey(1:LENMODELNAME) + end if + ! + if (found%gwfmodelname2) then write (iout, '(4x,a,a)') & 'GWFMODELNAME2 IS SET TO: ', trim(this%gwfmodelname2) - case ('PRINT_FLOWS') - this%iprflow = 1 - write (iout, '(4x,a)') & - 'EXCHANGE FLOWS WILL BE PRINTED TO LIST FILES.' - case ('SAVE_FLOWS') - this%ipakcb = -1 - write (iout, '(4x,a)') & - 'EXCHANGE FLOWS WILL BE SAVED TO BINARY BUDGET FILES.' - case ('MVT6') - call this%parser%GetStringCaps(subkey) - if (subkey /= 'FILEIN') then - call store_error('MVT6 KEYWORD MUST BE FOLLOWED BY '// & - '"FILEIN" then by filename.') - call this%parser%StoreErrorUnit() - end if - call this%parser%GetString(fname) - if (fname == '') then - call store_error('NO MVT6 FILE SPECIFIED.') - call this%parser%StoreErrorUnit() - end if - this%inmvt = getunit() - call openfile(this%inmvt, iout, fname, 'MVT') - write (iout, '(4x,a)') & - 'WATER MOVER TRANSPORT INFORMATION WILL BE READ FROM ', trim(fname) - case ('OBS6') - call this%parser%GetStringCaps(subkey) - if (subkey /= 'FILEIN') then - call store_error('OBS8 KEYWORD MUST BE FOLLOWED BY '// & - '"FILEIN" then by filename.') - call this%parser%StoreErrorUnit() - end if - this%obs%active = .true. - call this%parser%GetString(this%obs%inputFilename) - inobs = GetUnit() - call openfile(inobs, iout, this%obs%inputFilename, 'OBS') - this%obs%inUnitObs = inobs - case ('ADV_SCHEME') - call this%parser%GetStringCaps(subkey) - select case (subkey) - case ('UPSTREAM') - this%iAdvScheme = 0 - case ('CENTRAL') - this%iAdvScheme = 1 - case ('TVD') - this%iAdvScheme = 2 - case default - errmsg = "Unknown weighting method for advection: '"//trim(subkey)//"'." - call store_error(errmsg) - call this%parser%StoreErrorUnit() - end select + end if + ! + if (found%adv_scheme) then + ! -- count from 0 + this%iAdvScheme = this%iAdvScheme - 1 write (iout, '(4x,a,a)') & - 'CELL AVERAGING METHOD HAS BEEN SET TO: ', trim(subkey) - case ('DSP_XT3D_OFF') + 'ADVECTION SCHEME METHOD HAS BEEN SET TO: ', & + trim(adv_scheme(this%iAdvScheme + 1)) + end if + ! + if (found%dsp_xt3d_off .and. found%dsp_xt3d_rhs) then + errmsg = 'DSP_XT3D_OFF and DSP_XT3D_RHS cannot both be set as options.' + call store_error(errmsg) + call store_error_filename(this%filename) + else if (found%dsp_xt3d_off) then this%ixt3d = 0 write (iout, '(4x,a)') 'XT3D FORMULATION HAS BEEN SHUT OFF.' - case ('DSP_XT3D_RHS') + else if (found%dsp_xt3d_rhs) then this%ixt3d = 2 write (iout, '(4x,a)') 'XT3D RIGHT-HAND SIDE FORMULATION IS SELECTED.' - case ('ADVSCHEME') - errmsg = 'ADVSCHEME is no longer a valid keyword. Use ADV_SCHEME & - &instead.' - call store_error(errmsg) - call this%parser%StoreErrorUnit() - case ('XT3D_OFF') - errmsg = 'XT3D_OFF is no longer a valid keyword. Use DSP_XT3D_OFF & - &instead.' - call store_error(errmsg) - call this%parser%StoreErrorUnit() - case ('XT3D_RHS') - errmsg = 'XT3D_RHS is no longer a valid keyword. Use DSP_XT3D_RHS & - &instead.' - call store_error(errmsg) - call this%parser%StoreErrorUnit() - case default - parsed = .false. - end select + end if ! - ! -- Return + ! -- enforce 0 or 1 MVR6_FILENAME entries in option block + if (filein_fname(mvt_fname, 'MVE6_FILENAME', this%input_mempath, & + this%filename)) then + this%inmvt = getunit() + call openfile(this%inmvt, iout, mvt_fname, 'MVT') + write (iout, '(4x,a)') 'WATER MOVER ENERGY TRANSPORT & + &INFORMATION WILL BE READ FROM ', trim(mvt_fname) + end if + ! + ! -- enforce 0 or 1 OBS6_FILENAME entries in option block + if (filein_fname(this%obs%inputFilename, 'OBS6_FILENAME', & + this%input_mempath, this%filename)) then + this%obs%active = .true. + this%obs%inUnitObs = GetUnit() + call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename, 'OBS') + end if + ! + write (iout, '(1x,a)') 'END OF GWE-GWE EXCHANGE OPTIONS' + ! + ! -- return return - end function parse_option + end subroutine source_options !> @ brief Read mover !! @@ -936,14 +823,9 @@ subroutine allocate_scalars(this) call this%DisConnExchangeType%allocate_scalars() ! call mem_allocate(this%inewton, 'INEWTON', this%memoryPath) - call mem_allocate(this%iprflow, 'IPRFLOW', this%memoryPath) - call mem_allocate(this%ipakcb, 'IPAKCB', this%memoryPath) call mem_allocate(this%inobs, 'INOBS', this%memoryPath) call mem_allocate(this%iAdvScheme, 'IADVSCHEME', this%memoryPath) this%inewton = 0 - this%iprpak = 0 - this%iprflow = 0 - this%ipakcb = 0 this%inobs = 0 this%iAdvScheme = 0 ! @@ -992,8 +874,6 @@ subroutine gwe_gwe_da(this) ! -- scalars deallocate (this%filename) call mem_deallocate(this%inewton) - call mem_deallocate(this%iprflow) - call mem_deallocate(this%ipakcb) call mem_deallocate(this%inobs) call mem_deallocate(this%iAdvScheme) call mem_deallocate(this%inmvt) @@ -1162,7 +1042,7 @@ subroutine gwe_gwe_rp_obs(this) ! ! -- write summary of error messages if (count_errors() > 0) then - call store_error_unit(this%inobs) + call store_error_filename(this%obs%inputFilename) end if ! ! -- Return @@ -1235,7 +1115,6 @@ function use_interface_model(this) result(use_im) !< subroutine gwe_gwe_save_simvals(this) ! -- dummy - use SimModule, only: store_error, store_error_unit use SimVariablesModule, only: errmsg use ConstantsModule, only: DZERO use ObserveModule, only: ObserveType @@ -1266,7 +1145,7 @@ subroutine gwe_gwe_save_simvals(this) errmsg = 'Unrecognized observation type: '// & trim(obsrv%ObsTypeId) call store_error(errmsg) - call store_error_unit(this%inobs) + call store_error_filename(this%obs%inputFilename) end select call this%obs%SaveOneSimval(obsrv, v) end do diff --git a/src/Exchange/gwegweidm.f90 b/src/Exchange/gwegweidm.f90 new file mode 100644 index 00000000000..d495d7206e5 --- /dev/null +++ b/src/Exchange/gwegweidm.f90 @@ -0,0 +1,582 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ExgGwegweInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public exg_gwegwe_param_definitions + public exg_gwegwe_aggregate_definitions + public exg_gwegwe_block_definitions + public ExgGwegweParamFoundType + public exg_gwegwe_multi_package + + type ExgGwegweParamFoundType + logical :: gwfmodelname1 = .false. + logical :: gwfmodelname2 = .false. + logical :: auxiliary = .false. + logical :: boundnames = .false. + logical :: iprpak = .false. + logical :: iprflow = .false. + logical :: ipakcb = .false. + logical :: adv_scheme = .false. + logical :: dsp_xt3d_off = .false. + logical :: dsp_xt3d_rhs = .false. + logical :: filein = .false. + logical :: mve_filerecord = .false. + logical :: mve6 = .false. + logical :: mve6_filename = .false. + logical :: obs_filerecord = .false. + logical :: obs6 = .false. + logical :: obs6_filename = .false. + logical :: dev_ifmod_on = .false. + logical :: nexg = .false. + logical :: cellidm1 = .false. + logical :: cellidm2 = .false. + logical :: ihc = .false. + logical :: cl1 = .false. + logical :: cl2 = .false. + logical :: hwva = .false. + logical :: aux = .false. + logical :: boundname = .false. + end type ExgGwegweParamFoundType + + logical :: exg_gwegwe_multi_package = .true. + + type(InputParamDefinitionType), parameter :: & + exggwegwe_gwfmodelname1 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'GWFMODELNAME1', & ! tag name + 'GWFMODELNAME1', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_gwfmodelname2 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'GWFMODELNAME2', & ! tag name + 'GWFMODELNAME2', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_auxiliary = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_boundnames = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_iprpak = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_iprflow = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_ipakcb = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_adv_scheme = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'ADV_SCHEME', & ! tag name + 'ADV_SCHEME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_dsp_xt3d_off = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'DSP_XT3D_OFF', & ! tag name + 'DSP_XT3D_OFF', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_dsp_xt3d_rhs = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'DSP_XT3D_RHS', & ! tag name + 'DSP_XT3D_RHS', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_filein = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_mve_filerecord = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'MVE_FILERECORD', & ! tag name + 'MVE_FILERECORD', & ! fortran variable + 'RECORD MVE6 FILEIN MVE6_FILENAME', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_mve6 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'MVE6', & ! tag name + 'MVE6', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_mve6_filename = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'MVE6_FILENAME', & ! tag name + 'MVE6_FILENAME', & ! fortran variable + 'STRING', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .true., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_obs_filerecord = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_obs6 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_obs6_filename = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! 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 :: & + exggwegwe_dev_ifmod_on = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'OPTIONS', & ! block + 'DEV_INTERFACEMODEL_ON', & ! tag name + 'DEV_IFMOD_ON', & ! fortran variable + 'KEYWORD', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_nexg = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'DIMENSIONS', & ! block + 'NEXG', & ! tag name + 'NEXG', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_cellidm1 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CELLIDM1', & ! tag name + 'CELLIDM1', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_cellidm2 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CELLIDM2', & ! tag name + 'CELLIDM2', & ! fortran variable + 'INTEGER1D', & ! type + 'NCELLDIM', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_ihc = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'IHC', & ! tag name + 'IHC', & ! fortran variable + 'INTEGER', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_cl1 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CL1', & ! tag name + 'CL1', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_cl2 = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'CL2', & ! tag name + 'CL2', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_hwva = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'HWVA', & ! tag name + 'HWVA', & ! fortran variable + 'DOUBLE', & ! type + '', & ! shape + .true., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_aux = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'AUX', & ! tag name + 'AUX', & ! fortran variable + 'DOUBLE1D', & ! type + 'NAUX', & ! shape + .false., & ! required + .true., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exggwegwe_boundname = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! 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 :: & + exg_gwegwe_param_definitions(*) = & + [ & + exggwegwe_gwfmodelname1, & + exggwegwe_gwfmodelname2, & + exggwegwe_auxiliary, & + exggwegwe_boundnames, & + exggwegwe_iprpak, & + exggwegwe_iprflow, & + exggwegwe_ipakcb, & + exggwegwe_adv_scheme, & + exggwegwe_dsp_xt3d_off, & + exggwegwe_dsp_xt3d_rhs, & + exggwegwe_filein, & + exggwegwe_mve_filerecord, & + exggwegwe_mve6, & + exggwegwe_mve6_filename, & + exggwegwe_obs_filerecord, & + exggwegwe_obs6, & + exggwegwe_obs6_filename, & + exggwegwe_dev_ifmod_on, & + exggwegwe_nexg, & + exggwegwe_cellidm1, & + exggwegwe_cellidm2, & + exggwegwe_ihc, & + exggwegwe_cl1, & + exggwegwe_cl2, & + exggwegwe_hwva, & + exggwegwe_aux, & + exggwegwe_boundname & + ] + + type(InputParamDefinitionType), parameter :: & + exggwegwe_exchangedata = InputParamDefinitionType & + ( & + 'EXG', & ! component + 'GWEGWE', & ! subcomponent + 'EXCHANGEDATA', & ! block + 'EXCHANGEDATA', & ! tag name + 'EXCHANGEDATA', & ! fortran variable + 'RECARRAY CELLIDM1 CELLIDM2 IHC CL1 CL2 HWVA AUX BOUNDNAME', & ! type + 'NEXG', & ! shape + .true., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) + + type(InputParamDefinitionType), parameter :: & + exg_gwegwe_aggregate_definitions(*) = & + [ & + exggwegwe_exchangedata & + ] + + type(InputBlockDefinitionType), parameter :: & + exg_gwegwe_block_definitions(*) = & + [ & + InputBlockDefinitionType( & + 'OPTIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'DIMENSIONS', & ! blockname + .true., & ! required + .false., & ! aggregate + .false. & ! block_variable + ), & + InputBlockDefinitionType( & + 'EXCHANGEDATA', & ! blockname + .true., & ! required + .true., & ! aggregate + .false. & ! block_variable + ) & + ] + +end module ExgGwegweInputModule diff --git a/src/Exchange/gwfgweidm.f90 b/src/Exchange/gwfgweidm.f90 new file mode 100644 index 00000000000..bc69319b14c --- /dev/null +++ b/src/Exchange/gwfgweidm.f90 @@ -0,0 +1,70 @@ +! ** Do Not Modify! MODFLOW 6 system generated file. ** +module ExgGwfgweInputModule + use ConstantsModule, only: LENVARNAME + use InputDefinitionModule, only: InputParamDefinitionType, & + InputBlockDefinitionType + private + public exg_gwfgwe_param_definitions + public exg_gwfgwe_aggregate_definitions + public exg_gwfgwe_block_definitions + public ExgGwfgweParamFoundType + public exg_gwfgwe_multi_package + + type ExgGwfgweParamFoundType + end type ExgGwfgweParamFoundType + + logical :: exg_gwfgwe_multi_package = .false. + + type(InputParamDefinitionType), parameter :: & + exg_gwfgwe_param_definitions(*) = & + [ & + InputParamDefinitionType & + ( & + '', & ! component + '', & ! subcomponent + '', & ! block + '', & ! tag name + '', & ! fortran variable + '', & ! type + '', & ! shape + .false., & ! required + .false., & ! multi-record + .false., & ! preserve case + .false., & ! layered + .false. & ! timeseries + ) & + ] + + type(InputParamDefinitionType), parameter :: & + exg_gwfgwe_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 :: & + exg_gwfgwe_block_definitions(*) = & + [ & + InputBlockDefinitionType & + ( & + '', & ! blockname + .false., & ! required + .false., & ! aggregate + .false. & ! block_varaible + ) & + ] + +end module ExgGwfgweInputModule diff --git a/src/SimulationCreate.f90 b/src/SimulationCreate.f90 index 723b7494e7b..ba7f3811ef1 100644 --- a/src/SimulationCreate.f90 +++ b/src/SimulationCreate.f90 @@ -448,7 +448,8 @@ subroutine exchanges_create() case ('GWE6-GWE6') write (exg_name, '(a,i0)') 'GWE-GWE_', exg_id if (.not. both_remote) then - call gweexchange_create(fname, exg_name, exg_id, m1_id, m2_id) + call gweexchange_create(fname, exg_name, exg_id, m1_id, m2_id, & + exg_mempath) end if call add_virtual_gwe_exchange(exg_name, exg_id, m1_id, m2_id) case default diff --git a/src/Utilities/Idm/selector/IdmExgDfnSelector.f90 b/src/Utilities/Idm/selector/IdmExgDfnSelector.f90 index fa6aea90bc6..558a9decc27 100644 --- a/src/Utilities/Idm/selector/IdmExgDfnSelector.f90 +++ b/src/Utilities/Idm/selector/IdmExgDfnSelector.f90 @@ -7,7 +7,9 @@ module IdmExgDfnSelectorModule InputBlockDefinitionType use ExgGwfgwfInputModule use ExgGwfgwtInputModule + use ExgGwfgweInputModule use ExgGwtgwtInputModule + use ExgGwegweInputModule implicit none private @@ -40,8 +42,12 @@ function exg_param_definitions(subcomponent) result(input_definition) call set_param_pointer(input_definition, exg_gwfgwf_param_definitions) case ('GWFGWT') call set_param_pointer(input_definition, exg_gwfgwt_param_definitions) + case ('GWFGWE') + call set_param_pointer(input_definition, exg_gwfgwe_param_definitions) case ('GWTGWT') call set_param_pointer(input_definition, exg_gwtgwt_param_definitions) + case ('GWEGWE') + call set_param_pointer(input_definition, exg_gwegwe_param_definitions) case default end select return @@ -56,8 +62,12 @@ function exg_aggregate_definitions(subcomponent) result(input_definition) call set_param_pointer(input_definition, exg_gwfgwf_aggregate_definitions) case ('GWFGWT') call set_param_pointer(input_definition, exg_gwfgwt_aggregate_definitions) + case ('GWFGWE') + call set_param_pointer(input_definition, exg_gwfgwe_aggregate_definitions) case ('GWTGWT') call set_param_pointer(input_definition, exg_gwtgwt_aggregate_definitions) + case ('GWEGWE') + call set_param_pointer(input_definition, exg_gwegwe_aggregate_definitions) case default end select return @@ -72,8 +82,12 @@ function exg_block_definitions(subcomponent) result(input_definition) call set_block_pointer(input_definition, exg_gwfgwf_block_definitions) case ('GWFGWT') call set_block_pointer(input_definition, exg_gwfgwt_block_definitions) + case ('GWFGWE') + call set_block_pointer(input_definition, exg_gwfgwe_block_definitions) case ('GWTGWT') call set_block_pointer(input_definition, exg_gwtgwt_block_definitions) + case ('GWEGWE') + call set_block_pointer(input_definition, exg_gwegwe_block_definitions) case default end select return @@ -87,8 +101,12 @@ function exg_idm_multi_package(subcomponent) result(multi_package) multi_package = exg_gwfgwf_multi_package case ('GWFGWT') multi_package = exg_gwfgwt_multi_package + case ('GWFGWE') + multi_package = exg_gwfgwe_multi_package case ('GWTGWT') multi_package = exg_gwtgwt_multi_package + case ('GWEGWE') + multi_package = exg_gwegwe_multi_package case default call store_error('Idm selector subcomponent not found; '//& &'component="EXG"'//& @@ -106,8 +124,12 @@ function exg_idm_integrated(subcomponent) result(integrated) integrated = .true. case ('GWFGWT') integrated = .true. + case ('GWFGWE') + integrated = .true. case ('GWTGWT') integrated = .true. + case ('GWEGWE') + integrated = .true. case default end select return diff --git a/src/meson.build b/src/meson.build index f68c08828e7..22a6fc81667 100644 --- a/src/meson.build +++ b/src/meson.build @@ -38,7 +38,9 @@ modflow_sources = files( 'Exchange' / 'NumericalExchange.f90', 'Exchange' / 'gwfgwfidm.f90', 'Exchange' / 'gwfgwtidm.f90', + 'Exchange' / 'gwfgweidm.f90', 'Exchange' / 'gwtgwtidm.f90', + 'Exchange' / 'gwegweidm.f90', 'Model' / 'Connection' / 'ConnectionBuilder.f90', 'Model' / 'Connection' / 'CellWithNbrs.f90', 'Model' / 'Connection' / 'CsrUtils.f90', diff --git a/utils/idmloader/scripts/dfn2f90.py b/utils/idmloader/scripts/dfn2f90.py index 43a90f9b770..71d7ecc31ef 100644 --- a/utils/idmloader/scripts/dfn2f90.py +++ b/utils/idmloader/scripts/dfn2f90.py @@ -1041,10 +1041,18 @@ def _write_master_component(self, fh=None): DFN_PATH / "exg-gwfgwt.dfn", SRC_PATH / "Exchange" / "gwfgwtidm.f90", ], + [ + DFN_PATH / "exg-gwfgwe.dfn", + SRC_PATH / "Exchange" / "gwfgweidm.f90", + ], [ DFN_PATH / "exg-gwtgwt.dfn", SRC_PATH / "Exchange" / "gwtgwtidm.f90", ], + [ + DFN_PATH / "exg-gwegwe.dfn", + SRC_PATH / "Exchange" / "gwegweidm.f90", + ], [ DFN_PATH / "sim-nam.dfn", SRC_PATH / "simnamidm.f90",