diff --git a/src/Model/GroundWaterFlow/gwf3chd8.f90 b/src/Model/GroundWaterFlow/gwf3chd8.f90 index 4ffea249f3e..73ea6390a61 100644 --- a/src/Model/GroundWaterFlow/gwf3chd8.f90 +++ b/src/Model/GroundWaterFlow/gwf3chd8.f90 @@ -231,7 +231,7 @@ subroutine chd_ck(this) ! -- accumulate errors if (this%head_mult(i) < bt .and. this%icelltype(node) /= 0) then call this%dis%noder_to_string(node, nodestr) - write (errmsg, fmt=fmtchderr) i, this%head(i), bt, trim(nodestr) + write (errmsg, fmt=fmtchderr) i, this%head_mult(i), bt, trim(nodestr) call store_error(errmsg) end if end do diff --git a/src/Model/GroundWaterFlow/gwf3chd8idm.f90 b/src/Model/GroundWaterFlow/gwf3chd8idm.f90 index b15ff8f9213..78f5c565e44 100644 --- a/src/Model/GroundWaterFlow/gwf3chd8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3chd8idm.f90 @@ -9,7 +9,6 @@ module GwfChdInputModule public gwf_chd_block_definitions public GwfChdParamFoundType public gwf_chd_multi_package - public gwf_chd_aux_sfac_param type GwfChdParamFoundType logical :: auxiliary = .false. @@ -35,8 +34,6 @@ module GwfChdInputModule logical :: gwf_chd_multi_package = .true. - character(len=LENVARNAME) :: gwf_chd_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfchd_auxiliary = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3dis8idm.f90 b/src/Model/GroundWaterFlow/gwf3dis8idm.f90 index 2df7e2258ac..35a4db3f326 100644 --- a/src/Model/GroundWaterFlow/gwf3dis8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3dis8idm.f90 @@ -9,7 +9,6 @@ module GwfDisInputModule public gwf_dis_block_definitions public GwfDisParamFoundType public gwf_dis_multi_package - public gwf_dis_aux_sfac_param type GwfDisParamFoundType logical :: length_units = .false. @@ -29,8 +28,6 @@ module GwfDisInputModule logical :: gwf_dis_multi_package = .false. - character(len=LENVARNAME) :: gwf_dis_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfdis_length_units = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3disu8idm.f90 b/src/Model/GroundWaterFlow/gwf3disu8idm.f90 index c41538095c8..f19bfebac36 100644 --- a/src/Model/GroundWaterFlow/gwf3disu8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3disu8idm.f90 @@ -9,7 +9,6 @@ module GwfDisuInputModule public gwf_disu_block_definitions public GwfDisuParamFoundType public gwf_disu_multi_package - public gwf_disu_aux_sfac_param type GwfDisuParamFoundType logical :: length_units = .false. @@ -43,8 +42,6 @@ module GwfDisuInputModule logical :: gwf_disu_multi_package = .false. - character(len=LENVARNAME) :: gwf_disu_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfdisu_length_units = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3disv8idm.f90 b/src/Model/GroundWaterFlow/gwf3disv8idm.f90 index 42de109815c..657d138186f 100644 --- a/src/Model/GroundWaterFlow/gwf3disv8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3disv8idm.f90 @@ -9,7 +9,6 @@ module GwfDisvInputModule public gwf_disv_block_definitions public GwfDisvParamFoundType public gwf_disv_multi_package - public gwf_disv_aux_sfac_param type GwfDisvParamFoundType logical :: length_units = .false. @@ -35,8 +34,6 @@ module GwfDisvInputModule logical :: gwf_disv_multi_package = .false. - character(len=LENVARNAME) :: gwf_disv_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfdisv_length_units = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3drn8idm.f90 b/src/Model/GroundWaterFlow/gwf3drn8idm.f90 index f9865faa74d..ddd87932b4c 100644 --- a/src/Model/GroundWaterFlow/gwf3drn8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3drn8idm.f90 @@ -9,7 +9,6 @@ module GwfDrnInputModule public gwf_drn_block_definitions public GwfDrnParamFoundType public gwf_drn_multi_package - public gwf_drn_aux_sfac_param type GwfDrnParamFoundType logical :: auxiliary = .false. @@ -38,8 +37,6 @@ module GwfDrnInputModule logical :: gwf_drn_multi_package = .true. - character(len=LENVARNAME) :: gwf_drn_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfdrn_auxiliary = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3evt8.f90 b/src/Model/GroundWaterFlow/gwf3evt8.f90 index ffc03d02eb9..6dd83a01db6 100644 --- a/src/Model/GroundWaterFlow/gwf3evt8.f90 +++ b/src/Model/GroundWaterFlow/gwf3evt8.f90 @@ -217,11 +217,12 @@ subroutine evt_source_options(this) ! ------------------------------------------------------------------------------ ! -- modules use MemoryManagerExtModule, only: mem_set_value - use IdmGwfDfnSelectorModule, only: GwfParamFoundType ! -- dummy class(EvtType), intent(inout) :: this ! -- local - type(GwfParamFoundType) :: found + logical(LGP) :: found_fixed_cell = .false. + logical(LGP) :: found_readasarrays = .false. + logical(LGP) :: found_surfratespec = .false. ! ------------------------------------------------------------------------------ ! ! -- source common bound options @@ -229,13 +230,13 @@ subroutine evt_source_options(this) ! ! -- update defaults with idm sourced values call mem_set_value(this%fixed_cell, 'FIXED_CELL', & - this%input_mempath, found%fixed_cell) + this%input_mempath, found_fixed_cell) call mem_set_value(this%read_as_arrays, 'READASARRAYS', & - this%input_mempath, found%readasarrays) + this%input_mempath, found_readasarrays) call mem_set_value(this%surfratespecified, 'SURFRATESPEC', & - this%input_mempath, found%surfratespec) + this%input_mempath, found_surfratespec) ! - if (found%readasarrays) then + if (found_readasarrays) then if (this%dis%supports_layers()) then this%text = texta else @@ -246,7 +247,7 @@ subroutine evt_source_options(this) end if end if ! - if (found%readasarrays .and. found%surfratespec) then + 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.' @@ -256,13 +257,15 @@ subroutine evt_source_options(this) end if ! ! -- log evt specific options - call this%evt_log_options(found) + call this%evt_log_options(found_fixed_cell, found_readasarrays, & + found_surfratespec) ! ! -- return return end subroutine evt_source_options - subroutine evt_log_options(this, found) + subroutine evt_log_options(this, found_fixed_cell, found_readasarrays, & + found_surfratespec) ! ****************************************************************************** ! evt_log_options -- source options specific to EvtType ! ****************************************************************************** @@ -273,10 +276,11 @@ subroutine evt_log_options(this, found) 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 - type(GwfParamFoundType), intent(in) :: found + logical(LGP), intent(in) :: found_fixed_cell + logical(LGP), intent(in) :: found_readasarrays + logical(LGP), intent(in) :: found_surfratespec ! -- local ! -- formats character(len=*), parameter :: fmtihact = & @@ -295,15 +299,15 @@ subroutine evt_log_options(this, found) write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text)) & //' OPTIONS' ! - if (found%fixed_cell) then + if (found_fixed_cell) then write (this%iout, fmtfixedcell) end if ! - if (found%readasarrays) then + if (found_readasarrays) then write (this%iout, fmtreadasarrays) end if ! - if (found%surfratespec) then + if (found_surfratespec) then write (this%iout, fmtsrs) end if ! @@ -325,11 +329,10 @@ subroutine evt_source_dimensions(this) ! ------------------------------------------------------------------------------ ! -- modules use MemoryManagerExtModule, only: mem_set_value - use GwfEvtInputModule, only: GwfEvtParamFoundType ! -- dummy class(EvtType), intent(inout) :: this ! -- local - type(GwfEvtParamFoundType) :: found + logical(LGP) :: found_nseg = .false. ! -- format character(len=*), parameter :: fmtnsegerr = & &"('Error: In EVT, NSEG must be > 0 but is specified as ',i0)" @@ -359,9 +362,9 @@ subroutine evt_source_dimensions(this) //' DIMENSIONS' ! ! -- update defaults with idm sourced values - call mem_set_value(this%nseg, 'NSEG', this%input_mempath, found%nseg) + call mem_set_value(this%nseg, 'NSEG', this%input_mempath, found_nseg) ! - if (found%nseg) then + if (found_nseg) then ! write (this%iout, '(4x,a,i0)') 'NSEG = ', this%nseg ! diff --git a/src/Model/GroundWaterFlow/gwf3evt8idm.f90 b/src/Model/GroundWaterFlow/gwf3evt8idm.f90 index 309d9fa5090..9ed6fe5ba12 100644 --- a/src/Model/GroundWaterFlow/gwf3evt8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3evt8idm.f90 @@ -9,7 +9,6 @@ module GwfEvtInputModule public gwf_evt_block_definitions public GwfEvtParamFoundType public gwf_evt_multi_package - public gwf_evt_aux_sfac_param type GwfEvtParamFoundType logical :: fixed_cell = .false. @@ -42,8 +41,6 @@ module GwfEvtInputModule logical :: gwf_evt_multi_package = .true. - character(len=LENVARNAME) :: gwf_evt_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfevt_fixed_cell = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3evta8idm.f90 b/src/Model/GroundWaterFlow/gwf3evta8idm.f90 index b8e526a8f5d..a5f9a6ea56d 100644 --- a/src/Model/GroundWaterFlow/gwf3evta8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3evta8idm.f90 @@ -9,7 +9,6 @@ module GwfEvtaInputModule public gwf_evta_block_definitions public GwfEvtaParamFoundType public gwf_evta_multi_package - public gwf_evta_aux_sfac_param type GwfEvtaParamFoundType logical :: readasarrays = .false. @@ -35,8 +34,6 @@ module GwfEvtaInputModule logical :: gwf_evta_multi_package = .true. - character(len=LENVARNAME) :: gwf_evta_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfevta_readasarrays = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3ghb8idm.f90 b/src/Model/GroundWaterFlow/gwf3ghb8idm.f90 index 76e782fb3d2..2774d26c883 100644 --- a/src/Model/GroundWaterFlow/gwf3ghb8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3ghb8idm.f90 @@ -9,7 +9,6 @@ module GwfGhbInputModule public gwf_ghb_block_definitions public GwfGhbParamFoundType public gwf_ghb_multi_package - public gwf_ghb_aux_sfac_param type GwfGhbParamFoundType logical :: auxiliary = .false. @@ -36,8 +35,6 @@ module GwfGhbInputModule logical :: gwf_ghb_multi_package = .true. - character(len=LENVARNAME) :: gwf_ghb_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfghb_auxiliary = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3idm.f90 b/src/Model/GroundWaterFlow/gwf3idm.f90 index a4896b01229..8b8acf82eeb 100644 --- a/src/Model/GroundWaterFlow/gwf3idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3idm.f90 @@ -9,7 +9,6 @@ module GwfNamInputModule public gwf_nam_block_definitions public GwfNamParamFoundType public gwf_nam_multi_package - public gwf_nam_aux_sfac_param type GwfNamParamFoundType logical :: list = .false. @@ -26,8 +25,6 @@ module GwfNamInputModule logical :: gwf_nam_multi_package = .false. - character(len=LENVARNAME) :: gwf_nam_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfnam_list = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3npf8idm.f90 b/src/Model/GroundWaterFlow/gwf3npf8idm.f90 index 68c1a610a1c..b4e7f4e7ac2 100644 --- a/src/Model/GroundWaterFlow/gwf3npf8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3npf8idm.f90 @@ -9,7 +9,6 @@ module GwfNpfInputModule public gwf_npf_block_definitions public GwfNpfParamFoundType public gwf_npf_multi_package - public gwf_npf_aux_sfac_param type GwfNpfParamFoundType logical :: ipakcb = .false. @@ -53,8 +52,6 @@ module GwfNpfInputModule logical :: gwf_npf_multi_package = .false. - character(len=LENVARNAME) :: gwf_npf_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfnpf_ipakcb = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3rch8.f90 b/src/Model/GroundWaterFlow/gwf3rch8.f90 index cc028332757..6cb0bf716c0 100644 --- a/src/Model/GroundWaterFlow/gwf3rch8.f90 +++ b/src/Model/GroundWaterFlow/gwf3rch8.f90 @@ -164,12 +164,12 @@ subroutine rch_source_options(this) ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ use MemoryManagerExtModule, only: mem_set_value - use IdmGwfDfnSelectorModule, only: GwfParamFoundType implicit none ! -- dummy class(RchType), intent(inout) :: this ! -- local - type(GwfParamFoundType) :: found + logical(LGP) :: found_fixed_cell = .false. + logical(LGP) :: found_readasarrays = .false. ! ------------------------------------------------------------------------------ ! ! -- source common bound options @@ -177,11 +177,11 @@ subroutine rch_source_options(this) ! ! -- update defaults with idm sourced values call mem_set_value(this%fixed_cell, 'FIXED_CELL', this%input_mempath, & - found%fixed_cell) + found_fixed_cell) call mem_set_value(this%read_as_arrays, 'READASARRAYS', this%input_mempath, & - found%readasarrays) + found_readasarrays) ! - if (found%readasarrays) then + if (found_readasarrays) then if (this%dis%supports_layers()) then this%text = texta else @@ -193,24 +193,24 @@ subroutine rch_source_options(this) end if ! ! -- log rch params - call this%log_rch_options(found) + call this%log_rch_options(found_fixed_cell, found_readasarrays) ! ! -- return return end subroutine rch_source_options - subroutine log_rch_options(this, found) + subroutine log_rch_options(this, found_fixed_cell, found_readasarrays) ! ****************************************************************************** ! log_rch_options -- log options specific to RchType ! ****************************************************************************** ! ! SPECIFICATIONS: ! ------------------------------------------------------------------------------ - use IdmGwfDfnSelectorModule, only: GwfParamFoundType implicit none ! -- dummy class(RchType), intent(inout) :: this - type(GwfParamFoundType), intent(in) :: found + logical(LGP), intent(in) :: found_fixed_cell + logical(LGP), intent(in) :: found_readasarrays ! -- local ! -- formats character(len=*), parameter :: fmtfixedcell = & @@ -223,11 +223,11 @@ subroutine log_rch_options(this, found) write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text)) & //' OPTIONS' ! - if (found%fixed_cell) then + if (found_fixed_cell) then write (this%iout, fmtfixedcell) end if ! - if (found%readasarrays) then + if (found_readasarrays) then write (this%iout, fmtreadasarrays) end if ! diff --git a/src/Model/GroundWaterFlow/gwf3rch8idm.f90 b/src/Model/GroundWaterFlow/gwf3rch8idm.f90 index 53cef25d879..a39fff2acda 100644 --- a/src/Model/GroundWaterFlow/gwf3rch8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3rch8idm.f90 @@ -9,7 +9,6 @@ module GwfRchInputModule public gwf_rch_block_definitions public GwfRchParamFoundType public gwf_rch_multi_package - public gwf_rch_aux_sfac_param type GwfRchParamFoundType logical :: fixed_cell = .false. @@ -35,8 +34,6 @@ module GwfRchInputModule logical :: gwf_rch_multi_package = .true. - character(len=LENVARNAME) :: gwf_rch_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfrch_fixed_cell = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3rcha8idm.f90 b/src/Model/GroundWaterFlow/gwf3rcha8idm.f90 index 7eab5d49acf..d692d12ee29 100644 --- a/src/Model/GroundWaterFlow/gwf3rcha8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3rcha8idm.f90 @@ -9,7 +9,6 @@ module GwfRchaInputModule public gwf_rcha_block_definitions public GwfRchaParamFoundType public gwf_rcha_multi_package - public gwf_rcha_aux_sfac_param type GwfRchaParamFoundType logical :: readasarrays = .false. @@ -33,8 +32,6 @@ module GwfRchaInputModule logical :: gwf_rcha_multi_package = .true. - character(len=LENVARNAME) :: gwf_rcha_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfrcha_readasarrays = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3riv8idm.f90 b/src/Model/GroundWaterFlow/gwf3riv8idm.f90 index 5b2b81ad9de..b32255ad30f 100644 --- a/src/Model/GroundWaterFlow/gwf3riv8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3riv8idm.f90 @@ -9,7 +9,6 @@ module GwfRivInputModule public gwf_riv_block_definitions public GwfRivParamFoundType public gwf_riv_multi_package - public gwf_riv_aux_sfac_param type GwfRivParamFoundType logical :: auxiliary = .false. @@ -37,8 +36,6 @@ module GwfRivInputModule logical :: gwf_riv_multi_package = .true. - character(len=LENVARNAME) :: gwf_riv_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfriv_auxiliary = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterFlow/gwf3wel8idm.f90 b/src/Model/GroundWaterFlow/gwf3wel8idm.f90 index 0dc8ad3e8f1..5b3b6b68d2f 100644 --- a/src/Model/GroundWaterFlow/gwf3wel8idm.f90 +++ b/src/Model/GroundWaterFlow/gwf3wel8idm.f90 @@ -9,7 +9,6 @@ module GwfWelInputModule public gwf_wel_block_definitions public GwfWelParamFoundType public gwf_wel_multi_package - public gwf_wel_aux_sfac_param type GwfWelParamFoundType logical :: auxiliary = .false. @@ -40,8 +39,6 @@ module GwfWelInputModule logical :: gwf_wel_multi_package = .true. - character(len=LENVARNAME) :: gwf_wel_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwfwel_auxiliary = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterTransport/gwt1cnc1idm.f90 b/src/Model/GroundWaterTransport/gwt1cnc1idm.f90 index 98fba5e2882..2edbab4bfe5 100644 --- a/src/Model/GroundWaterTransport/gwt1cnc1idm.f90 +++ b/src/Model/GroundWaterTransport/gwt1cnc1idm.f90 @@ -9,7 +9,6 @@ module GwtCncInputModule public gwt_cnc_block_definitions public GwtCncParamFoundType public gwt_cnc_multi_package - public gwt_cnc_aux_sfac_param type GwtCncParamFoundType logical :: auxiliary = .false. @@ -34,8 +33,6 @@ module GwtCncInputModule logical :: gwt_cnc_multi_package = .true. - character(len=LENVARNAME) :: gwt_cnc_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwtcnc_auxiliary = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterTransport/gwt1dis1idm.f90 b/src/Model/GroundWaterTransport/gwt1dis1idm.f90 index fe2f22614c1..9a0330c9461 100644 --- a/src/Model/GroundWaterTransport/gwt1dis1idm.f90 +++ b/src/Model/GroundWaterTransport/gwt1dis1idm.f90 @@ -9,7 +9,6 @@ module GwtDisInputModule public gwt_dis_block_definitions public GwtDisParamFoundType public gwt_dis_multi_package - public gwt_dis_aux_sfac_param type GwtDisParamFoundType logical :: length_units = .false. @@ -29,8 +28,6 @@ module GwtDisInputModule logical :: gwt_dis_multi_package = .false. - character(len=LENVARNAME) :: gwt_dis_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwtdis_length_units = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterTransport/gwt1disu1idm.f90 b/src/Model/GroundWaterTransport/gwt1disu1idm.f90 index 758e756997e..00197215915 100644 --- a/src/Model/GroundWaterTransport/gwt1disu1idm.f90 +++ b/src/Model/GroundWaterTransport/gwt1disu1idm.f90 @@ -9,7 +9,6 @@ module GwtDisuInputModule public gwt_disu_block_definitions public GwtDisuParamFoundType public gwt_disu_multi_package - public gwt_disu_aux_sfac_param type GwtDisuParamFoundType logical :: length_units = .false. @@ -43,8 +42,6 @@ module GwtDisuInputModule logical :: gwt_disu_multi_package = .false. - character(len=LENVARNAME) :: gwt_disu_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwtdisu_length_units = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterTransport/gwt1disv1idm.f90 b/src/Model/GroundWaterTransport/gwt1disv1idm.f90 index 4b888a8329e..615cc025374 100644 --- a/src/Model/GroundWaterTransport/gwt1disv1idm.f90 +++ b/src/Model/GroundWaterTransport/gwt1disv1idm.f90 @@ -9,7 +9,6 @@ module GwtDisvInputModule public gwt_disv_block_definitions public GwtDisvParamFoundType public gwt_disv_multi_package - public gwt_disv_aux_sfac_param type GwtDisvParamFoundType logical :: length_units = .false. @@ -35,8 +34,6 @@ module GwtDisvInputModule logical :: gwt_disv_multi_package = .false. - character(len=LENVARNAME) :: gwt_disv_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwtdisv_length_units = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterTransport/gwt1dsp1idm.f90 b/src/Model/GroundWaterTransport/gwt1dsp1idm.f90 index 9c1ca7fbfe1..8b7a4e74332 100644 --- a/src/Model/GroundWaterTransport/gwt1dsp1idm.f90 +++ b/src/Model/GroundWaterTransport/gwt1dsp1idm.f90 @@ -9,7 +9,6 @@ module GwtDspInputModule public gwt_dsp_block_definitions public GwtDspParamFoundType public gwt_dsp_multi_package - public gwt_dsp_aux_sfac_param type GwtDspParamFoundType logical :: xt3d_off = .false. @@ -24,8 +23,6 @@ module GwtDspInputModule logical :: gwt_dsp_multi_package = .false. - character(len=LENVARNAME) :: gwt_dsp_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwtdsp_xt3d_off = InputParamDefinitionType & ( & diff --git a/src/Model/GroundWaterTransport/gwt1idm.f90 b/src/Model/GroundWaterTransport/gwt1idm.f90 index 21fe34b8ba7..d2289c5c688 100644 --- a/src/Model/GroundWaterTransport/gwt1idm.f90 +++ b/src/Model/GroundWaterTransport/gwt1idm.f90 @@ -9,7 +9,6 @@ module GwtNamInputModule public gwt_nam_block_definitions public GwtNamParamFoundType public gwt_nam_multi_package - public gwt_nam_aux_sfac_param type GwtNamParamFoundType logical :: list = .false. @@ -23,8 +22,6 @@ module GwtNamInputModule logical :: gwt_nam_multi_package = .false. - character(len=LENVARNAME) :: gwt_nam_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & gwtnam_list = InputParamDefinitionType & ( & diff --git a/src/Model/ModelUtilities/BoundaryPackageExt.f90 b/src/Model/ModelUtilities/BoundaryPackageExt.f90 index 96b154e9125..3063311b002 100644 --- a/src/Model/ModelUtilities/BoundaryPackageExt.f90 +++ b/src/Model/ModelUtilities/BoundaryPackageExt.f90 @@ -47,6 +47,23 @@ module BndExtModule procedure :: bound_value end type BndExtType + !> @ brief BndExtFoundType + !! + !! This type is used to simplify the tracking of common parameters + !! that are sourced from the input context. + !< + type BndExtFoundType + logical :: naux = .false. + logical :: ipakcb = .false. + logical :: iprpak = .false. + logical :: iprflow = .false. + logical :: boundnames = .false. + logical :: auxmultname = .false. + logical :: inewton = .false. + logical :: auxiliary = .false. + logical :: maxbound = .false. + end type BndExtFoundType + contains !> @ brief Define boundary package options and dimensions @@ -252,17 +269,15 @@ subroutine source_options(this) use InputOutputModule, only: GetUnit, openfile use CharacterStringModule, only: CharacterStringType use IdmLoadModule, only: filein_fname - use IdmGwfDfnSelectorModule, only: GwfParamFoundType ! -- dummy variables class(BndExtType), intent(inout) :: this !< BndExtType object ! -- local variables + type(BndExtFoundType) :: found character(len=LENAUXNAME) :: sfacauxname integer(I4B) :: n - type(GwfParamFoundType) :: found - logical :: found_naux ! ! -- update defaults with idm sourced values - call mem_set_value(this%naux, 'NAUX', this%input_mempath, found_naux) + call mem_set_value(this%naux, 'NAUX', this%input_mempath, found%naux) call mem_set_value(this%ipakcb, 'IPAKCB', this%input_mempath, found%ipakcb) call mem_set_value(this%iprpak, 'IPRPAK', this%input_mempath, found%iprpak) call mem_set_value(this%iprflow, 'IPRFLOW', this%input_mempath, found%iprflow) @@ -276,7 +291,7 @@ subroutine source_options(this) call this%log_options(found, sfacauxname) ! ! -- reallocate aux arrays if aux variables provided - if (found_naux .and. this%naux > 0) then + if (found%naux .and. this%naux > 0) then call mem_reallocate(this%auxname, LENAUXNAME, this%naux, & 'AUXNAME', this%memoryPath) call mem_reallocate(this%auxname_cst, LENAUXNAME, this%naux, & @@ -349,10 +364,9 @@ end subroutine source_options !< subroutine log_options(this, found, sfacauxname) ! -- modules - use IdmGwfDfnSelectorModule, only: GwfParamFoundType ! -- dummy variables class(BndExtType), intent(inout) :: this !< BndExtType object - type(GwfParamFoundType), intent(in) :: found + type(BndExtFoundType), intent(in) :: found character(len=*), intent(in) :: sfacauxname ! -- local variables ! -- format @@ -410,11 +424,10 @@ end subroutine log_options !< subroutine source_dimensions(this) use MemoryManagerExtModule, only: mem_set_value - use IdmGwfDfnSelectorModule, only: GwfParamFoundType ! -- dummy variables class(BndExtType), intent(inout) :: this !< BndExtType object ! -- local variables - type(GwfParamFoundType) :: found + type(BndExtFoundType) :: found ! ! -- open dimensions logging block write (this%iout, '(/1x,a)') 'PROCESSING '//trim(adjustl(this%text))// & diff --git a/src/Utilities/Idm/mf6blockfile/StressGridInput.f90 b/src/Utilities/Idm/mf6blockfile/StressGridInput.f90 index 833f0e0ff8c..57f344ce77b 100644 --- a/src/Utilities/Idm/mf6blockfile/StressGridInput.f90 +++ b/src/Utilities/Idm/mf6blockfile/StressGridInput.f90 @@ -233,10 +233,8 @@ subroutine ingrid_reset(this) use MemoryManagerModule, only: mem_deallocate, mem_setptr, get_isize use InputDefinitionModule, only: InputParamDefinitionType use DefinitionSelectModule, only: get_param_definition_type - use IdmDfnSelectorModule, only: idm_sfac_param class(StressGridInputType), intent(inout) :: this !< StressGridInputType type(InputParamDefinitionType), pointer :: idt - character(len=LENVARNAME) :: sfac_param integer(I4B) :: n ! if (this%tas_active /= 0) then @@ -258,18 +256,6 @@ subroutine ingrid_reset(this) ! -- set definition idt => this%mf6_input%param_dfns(this%idt_idxs(n)) ! - ! -- set sfac param (e.g. EVT6 'rate', RCH6 'recharge') - sfac_param = idm_sfac_param(this%mf6_input%component_type, & - this%mf6_input%subcomponent_type) - ! - if (idt%mf6varname == sfac_param) then - if (this%tas_active == 0) then - ! -- reinit if TAS is not active - call this%bndctx%param_init(idt%datatype, idt%mf6varname, & - this%mf6_input%mempath, this%sourcename) - end if - end if - ! ! -- reset read state this%param_reads(n)%invar = 0 diff --git a/src/Utilities/Idm/selector/IdmDfnSelector.f90 b/src/Utilities/Idm/selector/IdmDfnSelector.f90 index 6c57db9a78b..7d24008ae5d 100644 --- a/src/Utilities/Idm/selector/IdmDfnSelector.f90 +++ b/src/Utilities/Idm/selector/IdmDfnSelector.f90 @@ -15,7 +15,6 @@ module IdmDfnSelectorModule public :: aggregate_definitions public :: block_definitions public :: idm_multi_package - public :: idm_sfac_param public :: idm_integrated public :: idm_component @@ -91,25 +90,6 @@ function idm_multi_package(component, subcomponent) result(multi_package) return end function idm_multi_package - function idm_sfac_param(component, subcomponent) result(sfac_param) - character(len=*), intent(in) :: component - character(len=*), intent(in) :: subcomponent - character(len=LENVARNAME) :: sfac_param - select case (component) - case ('GWF') - sfac_param = gwf_idm_sfac_param(subcomponent) - case ('GWT') - sfac_param = gwt_idm_sfac_param(subcomponent) - case ('SIM') - sfac_param = sim_idm_sfac_param(subcomponent) - case default - call store_error('Idm selector component not found; '//& - &'component="'//trim(component)//& - &'", subcomponent="'//trim(subcomponent)//'".', .true.) - end select - return - end function idm_sfac_param - function idm_integrated(component, subcomponent) result(integrated) character(len=*), intent(in) :: component character(len=*), intent(in) :: subcomponent diff --git a/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 b/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 index b4c7448a245..daa1162dd4e 100644 --- a/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 +++ b/src/Utilities/Idm/selector/IdmGwfDfnSelector.f90 @@ -22,143 +22,12 @@ module IdmGwfDfnSelectorModule implicit none private - public :: GwfParamFoundType public :: gwf_param_definitions public :: gwf_aggregate_definitions public :: gwf_block_definitions public :: gwf_idm_multi_package - public :: gwf_idm_sfac_param public :: gwf_idm_integrated - type GwfParamFoundType - 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 :: inewton = .false. - logical :: maxbound = .false. - logical :: cellid = .false. - logical :: head = .false. - logical :: auxvar = .false. - logical :: boundname = .false. - logical :: length_units = .false. - logical :: nogrb = .false. - logical :: xorigin = .false. - logical :: yorigin = .false. - logical :: angrot = .false. - logical :: nlay = .false. - logical :: nrow = .false. - logical :: ncol = .false. - logical :: delr = .false. - logical :: delc = .false. - logical :: top = .false. - logical :: botm = .false. - logical :: idomain = .false. - logical :: voffsettol = .false. - logical :: nodes = .false. - logical :: nja = .false. - logical :: nvert = .false. - logical :: bot = .false. - logical :: area = .false. - logical :: iac = .false. - logical :: ja = .false. - logical :: ihc = .false. - logical :: cl12 = .false. - logical :: hwva = .false. - logical :: angldegx = .false. - logical :: iv = .false. - logical :: xv = .false. - logical :: yv = .false. - logical :: icell2d = .false. - logical :: xc = .false. - logical :: yc = .false. - 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 :: 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. - logical :: cvoptions = .false. - logical :: ivarcv = .false. - logical :: idewatcv = .false. - logical :: iperched = .false. - logical :: rewet_record = .false. - logical :: irewet = .false. - logical :: wetfct = .false. - logical :: iwetit = .false. - logical :: ihdwet = .false. - logical :: xt3doptions = .false. - logical :: ixt3d = .false. - logical :: ixt3drhs = .false. - logical :: isavspdis = .false. - logical :: isavsat = .false. - logical :: ik22overk = .false. - logical :: ik33overk = .false. - logical :: tvk_filerecord = .false. - logical :: tvk6 = .false. - logical :: tvk6_filename = .false. - logical :: iusgnrhc = .false. - logical :: inwtupw = .false. - logical :: satmin = .false. - logical :: satomega = .false. - logical :: icelltype = .false. - logical :: k = .false. - logical :: k22 = .false. - logical :: k33 = .false. - logical :: angle1 = .false. - logical :: angle2 = .false. - logical :: angle3 = .false. - logical :: wetdry = .false. - logical :: recharge = .false. - logical :: irch = .false. - logical :: stage = .false. - logical :: rbot = .false. - logical :: flowred = .false. - logical :: afrcsv_rec = .false. - logical :: afrcsv = .false. - logical :: fileout = .false. - logical :: afrcsvfile = .false. - logical :: q = .false. - logical :: list = .false. - logical :: print_input = .false. - logical :: print_flows = .false. - logical :: save_flows = .false. - logical :: newtonoptions = .false. - logical :: newton = .false. - logical :: under_relaxation = .false. - logical :: ftype = .false. - logical :: fname = .false. - logical :: pname = .false. - end type GwfParamFoundType - contains subroutine set_param_pointer(input_dfn, input_dfn_target) @@ -327,46 +196,6 @@ function gwf_idm_multi_package(subcomponent) result(multi_package) return end function gwf_idm_multi_package - function gwf_idm_sfac_param(subcomponent) result(sfac_param) - character(len=*), intent(in) :: subcomponent - character(len=LENVARNAME) :: sfac_param - select case (subcomponent) - case ('CHD') - sfac_param = gwf_chd_aux_sfac_param - case ('DIS') - sfac_param = gwf_dis_aux_sfac_param - case ('DISU') - 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 ('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') - sfac_param = gwf_npf_aux_sfac_param - case ('RCH') - sfac_param = gwf_rch_aux_sfac_param - case ('RCHA') - sfac_param = gwf_rcha_aux_sfac_param - case ('RIV') - sfac_param = gwf_riv_aux_sfac_param - case ('WEL') - sfac_param = gwf_wel_aux_sfac_param - case ('NAM') - sfac_param = gwf_nam_aux_sfac_param - case default - call store_error('Idm selector subcomponent not found; '//& - &'component="GWF"'//& - &', subcomponent="'//trim(subcomponent)//'".', .true.) - end select - return - end function gwf_idm_sfac_param - function gwf_idm_integrated(subcomponent) result(integrated) character(len=*), intent(in) :: subcomponent logical :: integrated diff --git a/src/Utilities/Idm/selector/IdmGwtDfnSelector.f90 b/src/Utilities/Idm/selector/IdmGwtDfnSelector.f90 index a48af422cad..72b56b37b8b 100644 --- a/src/Utilities/Idm/selector/IdmGwtDfnSelector.f90 +++ b/src/Utilities/Idm/selector/IdmGwtDfnSelector.f90 @@ -14,84 +14,12 @@ module IdmGwtDfnSelectorModule implicit none private - public :: GwtParamFoundType public :: gwt_param_definitions public :: gwt_aggregate_definitions public :: gwt_block_definitions public :: gwt_idm_multi_package - public :: gwt_idm_sfac_param public :: gwt_idm_integrated - type GwtParamFoundType - logical :: length_units = .false. - logical :: nogrb = .false. - logical :: xorigin = .false. - logical :: yorigin = .false. - logical :: angrot = .false. - logical :: nlay = .false. - logical :: nrow = .false. - logical :: ncol = .false. - logical :: delr = .false. - logical :: delc = .false. - logical :: top = .false. - logical :: botm = .false. - logical :: idomain = .false. - logical :: voffsettol = .false. - logical :: nodes = .false. - logical :: nja = .false. - logical :: nvert = .false. - logical :: bot = .false. - logical :: area = .false. - logical :: iac = .false. - logical :: ja = .false. - logical :: ihc = .false. - logical :: cl12 = .false. - logical :: hwva = .false. - logical :: angldegx = .false. - logical :: iv = .false. - logical :: xv = .false. - logical :: yv = .false. - logical :: icell2d = .false. - logical :: xc = .false. - logical :: yc = .false. - logical :: ncvert = .false. - logical :: icvert = .false. - logical :: ncpl = .false. - logical :: xt3d_off = .false. - logical :: xt3d_rhs = .false. - logical :: diffc = .false. - logical :: alh = .false. - logical :: alv = .false. - logical :: ath1 = .false. - logical :: ath2 = .false. - logical :: atv = .false. - logical :: auxiliary = .false. - logical :: auxmultname = .false. - logical :: boundnames = .false. - logical :: iprflow = .false. - logical :: ipakcb = .false. - logical :: iprpak = .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 :: maxbound = .false. - logical :: cellid = .false. - logical :: tspvar = .false. - logical :: auxvar = .false. - logical :: boundname = .false. - logical :: list = .false. - logical :: print_input = .false. - logical :: print_flows = .false. - logical :: save_flows = .false. - logical :: ftype = .false. - logical :: fname = .false. - logical :: pname = .false. - end type GwtParamFoundType - contains subroutine set_param_pointer(input_dfn, input_dfn_target) @@ -196,30 +124,6 @@ function gwt_idm_multi_package(subcomponent) result(multi_package) return end function gwt_idm_multi_package - function gwt_idm_sfac_param(subcomponent) result(sfac_param) - character(len=*), intent(in) :: subcomponent - character(len=LENVARNAME) :: sfac_param - select case (subcomponent) - case ('DIS') - sfac_param = gwt_dis_aux_sfac_param - case ('DISU') - sfac_param = gwt_disu_aux_sfac_param - case ('DISV') - sfac_param = gwt_disv_aux_sfac_param - case ('DSP') - sfac_param = gwt_dsp_aux_sfac_param - case ('CNC') - sfac_param = gwt_cnc_aux_sfac_param - case ('NAM') - sfac_param = gwt_nam_aux_sfac_param - case default - call store_error('Idm selector subcomponent not found; '//& - &'component="GWT"'//& - &', subcomponent="'//trim(subcomponent)//'".', .true.) - end select - return - end function gwt_idm_sfac_param - function gwt_idm_integrated(subcomponent) result(integrated) character(len=*), intent(in) :: subcomponent logical :: integrated diff --git a/src/Utilities/Idm/selector/IdmSimDfnSelector.f90 b/src/Utilities/Idm/selector/IdmSimDfnSelector.f90 index 297cf83564f..bf18e39f182 100644 --- a/src/Utilities/Idm/selector/IdmSimDfnSelector.f90 +++ b/src/Utilities/Idm/selector/IdmSimDfnSelector.f90 @@ -9,34 +9,12 @@ module IdmSimDfnSelectorModule implicit none private - public :: SimParamFoundType public :: sim_param_definitions public :: sim_aggregate_definitions public :: sim_block_definitions public :: sim_idm_multi_package - public :: sim_idm_sfac_param public :: sim_idm_integrated - type SimParamFoundType - logical :: continue = .false. - logical :: nocheck = .false. - logical :: prmem = .false. - logical :: maxerrors = .false. - logical :: print_input = .false. - logical :: tdis6 = .false. - logical :: mtype = .false. - logical :: mfname = .false. - logical :: mname = .false. - logical :: exgtype = .false. - logical :: exgfile = .false. - logical :: exgmnamea = .false. - logical :: exgmnameb = .false. - logical :: mxiter = .false. - logical :: slntype = .false. - logical :: slnfname = .false. - logical :: slnmnames = .false. - end type SimParamFoundType - contains subroutine set_param_pointer(input_dfn, input_dfn_target) @@ -101,20 +79,6 @@ function sim_idm_multi_package(subcomponent) result(multi_package) return end function sim_idm_multi_package - function sim_idm_sfac_param(subcomponent) result(sfac_param) - character(len=*), intent(in) :: subcomponent - character(len=LENVARNAME) :: sfac_param - select case (subcomponent) - case ('NAM') - sfac_param = sim_nam_aux_sfac_param - case default - call store_error('Idm selector subcomponent not found; '//& - &'component="SIM"'//& - &', subcomponent="'//trim(subcomponent)//'".', .true.) - end select - return - end function sim_idm_sfac_param - function sim_idm_integrated(subcomponent) result(integrated) character(len=*), intent(in) :: subcomponent logical :: integrated diff --git a/src/simnamidm.f90 b/src/simnamidm.f90 index 984eea00804..f2a53f30a12 100644 --- a/src/simnamidm.f90 +++ b/src/simnamidm.f90 @@ -9,7 +9,6 @@ module SimNamInputModule public sim_nam_block_definitions public SimNamParamFoundType public sim_nam_multi_package - public sim_nam_aux_sfac_param type SimNamParamFoundType logical :: continue = .false. @@ -33,8 +32,6 @@ module SimNamInputModule logical :: sim_nam_multi_package = .false. - character(len=LENVARNAME) :: sim_nam_aux_sfac_param = '' - type(InputParamDefinitionType), parameter :: & simnam_continue = InputParamDefinitionType & ( & diff --git a/utils/idmloader/scripts/dfn2f90.py b/utils/idmloader/scripts/dfn2f90.py index fce6a6d7423..965cdff2b34 100644 --- a/utils/idmloader/scripts/dfn2f90.py +++ b/utils/idmloader/scripts/dfn2f90.py @@ -28,7 +28,6 @@ def __init__( self._aggregate_varnames = [] self._warnings = [] self._multi_package = False - self._aux_sfac_param = f"''" self.component, self.subcomponent = self._dfnfspec.stem.upper().split("-") @@ -36,7 +35,7 @@ def __init__( self._set_var_d() self._set_param_strs() - def add_dfn_entry(self, dfn_d=None, varnames=None): + def add_dfn_entry(self, dfn_d=None): c_key = f"{self.component.upper()}" sc_key = f"{self.subcomponent.upper()}" @@ -45,14 +44,6 @@ def add_dfn_entry(self, dfn_d=None, varnames=None): dfn_d[c_key].append(sc_key) - for var in self._param_varnames: - v = var.split( - f"{self.component.lower()}{self.subcomponent.lower()}_" - )[1] - v = f"{self.component.lower()}_{v}" - if v not in varnames: - varnames.append(v) - def write_f90(self, ofspec=None): with open(ofspec, "w") as f: @@ -83,12 +74,6 @@ def write_f90(self, ofspec=None): f"{self.subcomponent.lower()}_multi_package = {smult}\n\n" ) - # aux sfac col - f.write( - f" character(len=LENVARNAME) :: {self.component.lower()}_" - f"{self.subcomponent.lower()}_aux_sfac_param = {self._aux_sfac_param}\n\n" - ) - # params if len(self._param_varnames): f.write(self._param_str) @@ -176,8 +161,6 @@ def _set_var_d(self): # flopy multi-package if "flopy multi-package" in line.strip(): self._multi_package = True - if "modflow6 aux-sfac-param" in line.strip(): - self._aux_sfac_param = f"'{line.strip().split()[-1].upper()}'" continue ll = line.strip().split() @@ -490,9 +473,7 @@ def _source_file_header(self, component, subcomponent): f" public {component.capitalize()}{subcomponent.capitalize()}" f"ParamFoundType\n" f" public {component.lower()}_{subcomponent.lower()}_" - f"multi_package\n" - f" public {component.lower()}_{subcomponent.lower()}_" - f"aux_sfac_param\n\n" + f"multi_package\n\n" ) return s @@ -547,7 +528,6 @@ def __init__( """IdmDfnSelector init""" self._d = dfn_d - self._v = varnames def write(self): self._write_selectors() @@ -561,25 +541,17 @@ def _write_master(self): self._write_master_defn(fh, defn="aggregate", dtype="param") self._write_master_defn(fh, defn="block", dtype="block") self._write_master_multi(fh) - self._write_master_sfaccol(fh) self._write_master_integration(fh) self._write_master_component(fh) fh.write(f"end module IdmDfnSelectorModule\n") def _write_selectors(self): for c in self._d: - component_vars = [] - for var in self._v: - tokens = var.split("_", 1) - if (tokens[0].upper() == c): - component_vars.append(tokens[1]) - ofspec = ( f"../../../src/Utilities/Idm/selector/Idm{c.title()}DfnSelector.f90" ) with open(ofspec, "w") as fh: self._write_selector_decl(fh, component=c, sc_list=self._d[c]) - self._write_selector_foundtype(fh, component=c, varnames=component_vars) self._write_selector_helpers(fh) self._write_selector_defn( fh, component=c, sc_list=self._d[c], defn="param", dtype="param" @@ -591,7 +563,6 @@ def _write_selectors(self): fh, component=c, sc_list=self._d[c], defn="block", dtype="block" ) self._write_selector_multi(fh, component=c, sc_list=self._d[c]) - self._write_selector_sfaccol(fh, component=c, sc_list=self._d[c]) self._write_selector_integration(fh, component=c, sc_list=self._d[c]) fh.write(f"end module Idm{c.title()}DfnSelectorModule\n") @@ -620,31 +591,16 @@ def _write_selector_decl(self, fh=None, component=None, sc_list=None): s += ( f"\n implicit none\n" f" private\n" - f" public :: {c.capitalize()}ParamFoundType\n" f" public :: {c.lower()}_param_definitions\n" f" public :: {c.lower()}_aggregate_definitions\n" f" public :: {c.lower()}_block_definitions\n" f" public :: {c.lower()}_idm_multi_package\n" - f" public :: {c.lower()}_idm_sfac_param\n" f" public :: {c.lower()}_idm_integrated\n\n" ) + s += (f"contains\n\n") fh.write(s) - def _write_selector_foundtype(self, fh=None, component=None, varnames=None): - - fh.write( - f" type {component.capitalize()}" - f"ParamFoundType\n" - ) - for var in varnames: - fh.write(f" logical :: {var} = .false.\n") - fh.write( - f" end type {component.capitalize()}" - f"ParamFoundType\n\n" - ) - fh.write(f"contains\n\n") - def _write_selector_helpers(self, fh=None): s = ( f" subroutine set_param_pointer(input_dfn, input_dfn_target)\n" @@ -731,38 +687,6 @@ def _write_selector_multi(self, fh=None, component=None, sc_list=None): fh.write(s) - def _write_selector_sfaccol(self, fh=None, component=None, sc_list=None): - c = component - - s = ( - f" function {c.lower()}_idm_sfac_param(subcomponent) " - f"result(sfac_param)\n" - f" character(len=*), intent(in) :: subcomponent\n" - f" character(len=LENVARNAME) :: sfac_param\n" - f" select case (subcomponent)\n" - ) - - for sc in sc_list: - s += ( - f" case ('{sc}')\n" - f" sfac_param = {c.lower()}_{sc.lower()}_" - f"aux_sfac_param\n" - ) - - s += ( - f" case default\n" - f" call store_error('Idm selector subcomponent " - f"not found; '//&\n" - f" &'component=\"{c.upper()}\"'//&\n" - f" &', subcomponent=\"'//trim(subcomponent)" - f"//'\".', .true.)\n" - f" end select\n" - f" return\n" - f" end function {c.lower()}_idm_sfac_param\n\n" - ) - - fh.write(s) - def _write_selector_integration(self, fh=None, component=None, sc_list=None): c = component @@ -814,7 +738,6 @@ def _write_master_decl(self, fh=None): f" public :: aggregate_definitions\n" f" public :: block_definitions\n" f" public :: idm_multi_package\n" - f" public :: idm_sfac_param\n" f" public :: idm_integrated\n" f" public :: idm_component\n\n" f"contains\n\n" @@ -880,36 +803,6 @@ def _write_master_multi(self, fh=None): fh.write(s) - def _write_master_sfaccol(self, fh=None): - s = ( - f" function idm_sfac_param(component, subcomponent) " - f"result(sfac_param)\n" - f" character(len=*), intent(in) :: component\n" - f" character(len=*), intent(in) :: subcomponent\n" - f" character(len=LENVARNAME) :: sfac_param\n" - f" select case (component)\n" - ) - - for c in dfn_d: - s += ( - f" case ('{c}')\n" - f" sfac_param = {c.lower()}_idm_" - f"sfac_param(subcomponent)\n" - ) - - s += ( - f" case default\n" - f" call store_error('Idm selector component not found; '//&\n" - f" &'component=\"'//trim(component)//&\n" - f" &'\", subcomponent=\"'//trim(subcomponent)" - f"//'\".', .true.)\n" - f" end select\n" - f" return\n" - f" end function idm_sfac_param\n\n" - ) - - fh.write(s) - def _write_master_integration(self, fh=None): s = ( f" function idm_integrated(component, subcomponent) " @@ -1055,13 +948,12 @@ def _write_master_component(self, fh=None): ] dfn_d = {} - varnames = [] for dfn in dfns: converter = Dfn2F90(dfnfspec=dfn[0]) converter.write_f90(ofspec=dfn[1]) converter.warn() - converter.add_dfn_entry(dfn_d=dfn_d, varnames=varnames) + converter.add_dfn_entry(dfn_d=dfn_d) - selectors = IdmDfnSelector(dfn_d=dfn_d, varnames=varnames) + selectors = IdmDfnSelector(dfn_d=dfn_d) selectors.write() print("\n...done.")