diff --git a/src/Model/ModelUtilities/GweInputData.f90 b/src/Model/ModelUtilities/GweInputData.f90 deleted file mode 100644 index 15cbbb7900c..00000000000 --- a/src/Model/ModelUtilities/GweInputData.f90 +++ /dev/null @@ -1,228 +0,0 @@ -module GweInputDataModule - - use KindModule, only: I4B, DP - use ConstantsModule, only: DZERO, LENMEMPATH - - implicit none - private - public :: GweInputDataType - public :: gweshared_dat_cr - public :: gweshared_dat_df - public :: set_gwe_dat_ptrs - - !> Data for sharing among multiple packages. Originally read in from - !< the MST package - - type GweInputDataType - - ! dim - integer(I4B) :: nnodes !< number of cells - - ! strings - character(len=LENMEMPATH) :: memoryPath = '' !< the location in the memory manager where the variables are stored - - ! mst data to be share across multiple packages - real(DP), pointer :: rhow => null() !< Density of water (for GWE purposes, a constant scalar) - real(DP), pointer :: cpw => null() !< Heat capacity of water (non-spatially varying) - real(DP), pointer :: latheatvap => null() !< latent heat of vaporization - real(DP), dimension(:), pointer, contiguous :: rhos => null() !< Density of the aquifer material - real(DP), dimension(:), pointer, contiguous :: cps => null() !< Heat capacity of solids (spatially varying) - - contains - - ! -- public - procedure, public :: gweshared_dat_df - procedure, public :: set_gwe_dat_ptrs - procedure, public :: gweshared_dat_da - ! -- private - procedure, private :: allocate_shared_vars - procedure, private :: set_gwe_shared_scalars - procedure, private :: set_gwe_shared_arrays - - end type GweInputDataType - -contains - -!> @brief Allocate the shared data -!< - subroutine gweshared_dat_cr(this) - ! -- modules - ! -- dummy - type(GweInputDataType), pointer :: this !< the input data block - ! -- local -! ------------------------------------------------------------------- - ! - ! -- Create the object - allocate (this) - ! - ! -- return - return - end subroutine gweshared_dat_cr - -!> @brief Define the shared data -!< - subroutine gweshared_dat_df(this, nodes) - ! -- modules - ! -- dummy - class(GweInputDataType) :: this !< the input data block - integer(I4B), intent(in) :: nodes - ! -- local -! ------------------------------------------------------------------- - ! - ! -- Allocate variables - call this%allocate_shared_vars(nodes) - ! - ! -- return - return - end subroutine gweshared_dat_df - - !> @brief Define the information this object holds - !! - !! Allocate strings for storing label names - !! Intended to be analogous to allocate_scalars() - !! - !< - subroutine allocate_shared_vars(this, nodes) - ! -- modules - ! -- dummy - class(GweInputDataType) :: this !< GweCommon object - integer(I4B), intent(in) :: nodes - ! -- local - integer(I4B) :: i -! ------------------------------------------------------------------- - ! - allocate (this%cpw) - allocate (this%rhow) - allocate (this%latheatvap) - allocate (this%rhos(nodes)) - allocate (this%cps(nodes)) - ! - ! -- Initialize values - this%cpw = DZERO - this%rhow = DZERO - this%latheatvap = DZERO - do i = 1, nodes - this%cps(i) = DZERO - this%rhos(i) = DZERO - end do - ! - ! -- return - return - end subroutine allocate_shared_vars - - !> @brief Allocate and read data from MST - !! - !! MST data, including heat capacity of water (cpw), density of water - !! (rhow), latent heat of vaporization (latheatvap), heat capacity of - !! the aquifer material (cps), and density of the aquifer material - !! (rhow) is used among other packages and is therefore stored in a - !! separate class - subroutine set_gwe_dat_ptrs(this, rhow, cpw, rhos, cps, & - latheatvap) - ! -- modules - ! -- dummy - class(GweInputDataType) :: this !< the input data block - real(DP), intent(in) :: rhow !< ptr to density of water specified in MST - real(DP), intent(in) :: cpw !< ptr to heat capacity of water specified in MST - real(DP), intent(in) :: rhos !< ptr to sptially-variably density of aquifer material specified in MST - real(DP), intent(in) :: cps !< ptr to sptially-variably heat capacity of aquifer material specified in MST - real(DP), intent(in), optional :: latheatvap !< ptr to latent heat of vaporization specified in MST - ! ------------------------------------------------------------------- - ! - ! -- Allocate scalars - if (present(latheatvap)) then - call this%set_gwe_shared_scalars(rhow, cpw, latheatvap) - else - call this%set_gwe_shared_scalars(rhow, cpw) - end if - ! - ! -- Allocate arrays - call this%set_gwe_shared_arrays(rhos, cps) - ! - ! -- return - return - end subroutine set_gwe_dat_ptrs - - !> @brief Set pointers to scalars read by the MST package - !! for use by other packages - !! - !! Set pointers to GWE-related scalars and arrays for use - !! by multiple packages. For example, a package capable of - !! simulating evaporation will need access to latent heat of - !! of vaporization. - !! - !< - subroutine set_gwe_shared_scalars(this, rhow, cpw, latheatvap) - ! -- modules - ! -- dummy - class(GweInputDataType) :: this !< GweInputDataType object - real(DP), intent(in) :: rhow - real(DP), intent(in) :: cpw - real(DP), intent(in), optional :: latheatvap - ! -- local -! ------------------------------------------------------------------- - ! - ! -- Set the pointers - ! -- Fixed density of water to be used by GWE - this%rhow = rhow - ! -- Spatially constant heat capacity of water ! kluge note: "specific heat" (which is heat capacity per unit mass) is probably the more correct term - this%cpw = cpw - ! -- Latent heat of vaporization - if (present(latheatvap)) then - this%latheatvap = latheatvap - end if - ! - ! -- return - return - end subroutine set_gwe_shared_scalars - - !> @brief Set pointers to data arrays read by the MST package - !! for use by other packages - !! - !! Set pointers to GWE-related arrays for use - !! by multiple packages. - !! - !< - subroutine set_gwe_shared_arrays(this, rhos, cps) - ! -- modules - ! -- dummy - class(GweInputDataType) :: this !< GweInputDataType object - real(DP), intent(in) :: rhos - real(DP), intent(in) :: cps - ! -- local -! ------------------------------------------------------------------- - ! - ! -- Set the pointers - ! -- Spatially-variable density of aquifer solid material - this%rhos = rhos - ! -- Spatially-variable heat capacity of aquifer solid material - this%cps = cps - ! - ! -- return - return - end subroutine set_gwe_shared_arrays - - !> @ breif Deallocate memory - !! - !! Deallocate GWE shared data array memory - !! - !< - subroutine gweshared_dat_da(this) - ! -- modules - ! -- dummy - class(GweInputDataType) :: this !< the input data block - ! - ! -- Scalars - deallocate (this%latheatvap) - deallocate (this%rhow) - deallocate (this%cpw) - ! - ! -- Arrays - deallocate (this%rhos) - deallocate (this%cps) - ! - ! -- return - return - end subroutine gweshared_dat_da - -end module GweInputDataModule diff --git a/src/Model/TransportModel/tsp1cnc1.f90 b/src/Model/TransportModel/tsp1cnc1.f90 index c0d45397a8b..8160cac35cd 100644 --- a/src/Model/TransportModel/tsp1cnc1.f90 +++ b/src/Model/TransportModel/tsp1cnc1.f90 @@ -21,8 +21,6 @@ module TspCncModule ! type, extends(BndType) :: TspCncType - type(GweInputDataType), pointer :: gwecommon => null() !< pointer to shared gwe data used by multiple packages but set in mst - real(DP), dimension(:), pointer, contiguous :: ratecncin => null() !simulated flows into constant conc (excluding other concs) real(DP), dimension(:), pointer, contiguous :: ratecncout => null() !simulated flows out of constant conc (excluding to other concs) character(len=LENVARNAME) :: depvartype = '' !< stores string of dependent variable type, depending on model type @@ -53,7 +51,7 @@ module TspCncModule !! Routine points packobj to the newly created package !< subroutine cnc_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & - depvartype, gwecommon) + depvartype) ! -- dummy class(BndType), pointer :: packobj integer(I4B), intent(in) :: id @@ -63,7 +61,6 @@ subroutine cnc_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & character(len=*), intent(in) :: namemodel character(len=*), intent(in) :: pakname character(len=LENVARNAME), intent(in) :: depvartype - type(GweInputDataType), intent(in), target, optional :: gwecommon !< shared data container for use by multiple GWE packages ! -- local type(TspCncType), pointer :: cncobj ! ------------------------------------------------------------------------------ @@ -93,11 +90,6 @@ subroutine cnc_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & ! -- Store the appropriate label based on the dependent variable cncobj%depvartype = depvartype ! - ! -- Give package access to the shared heat transport variables assigned in MST - if (present(gwecommon)) then - cncobj%gwecommon => gwecommon - end if - ! ! -- Return return end subroutine cnc_create @@ -389,9 +381,6 @@ subroutine cnc_da(this) call mem_deallocate(this%ratecncin) call mem_deallocate(this%ratecncout) ! - ! -- pointers - nullify (this%gwecommon) - ! ! -- Return return end subroutine cnc_da diff --git a/src/Model/TransportModel/tsp1ssm1.f90 b/src/Model/TransportModel/tsp1ssm1.f90 index 634419ded6e..99c865fd3e9 100644 --- a/src/Model/TransportModel/tsp1ssm1.f90 +++ b/src/Model/TransportModel/tsp1ssm1.f90 @@ -36,8 +36,6 @@ module TspSsmModule !< type, extends(NumericalPackageType) :: TspSsmType - type(GweInputDataType), pointer :: gwecommon => null() !< pointer to shared gwe data used by multiple packages but set in mst - integer(I4B), pointer :: nbound !< total number of flow boundaries in this time step integer(I4B), dimension(:), pointer, contiguous :: isrctype => null() !< source type 0 is unspecified, 1 is aux, 2 is auxmixed, 3 is ssmi, 4 is ssmimixed integer(I4B), dimension(:), pointer, contiguous :: iauxpak => null() !< aux col for concentration @@ -84,7 +82,7 @@ module TspSsmModule !! and initializing the parser. !< subroutine ssm_cr(ssmobj, name_model, inunit, iout, fmi, eqnsclfac, & - depvartype, gwecommon) + depvartype) ! -- dummy type(TspSsmType), pointer :: ssmobj !< TspSsmType object character(len=*), intent(in) :: name_model !< name of the model @@ -93,7 +91,6 @@ subroutine ssm_cr(ssmobj, name_model, inunit, iout, fmi, eqnsclfac, & type(TspFmiType), intent(in), target :: fmi !< Transport FMI package real(DP), intent(in), pointer :: eqnsclfac !< governing equation scale factor character(len=LENVARNAME), intent(in) :: depvartype - type(GweInputDataType), intent(in), target, optional :: gwecommon !< shared data container for use by multiple GWE packages ! ! -- Create the object allocate (ssmobj) @@ -117,11 +114,6 @@ subroutine ssm_cr(ssmobj, name_model, inunit, iout, fmi, eqnsclfac, & ! package has access to the corresponding dependent variable type ssmobj%depvartype = depvartype ! - ! -- Give package access to the shared heat transport variables assigned in MST - if (present(gwecommon)) then - ssmobj%gwecommon => gwecommon - end if - ! ! -- Return return end subroutine ssm_cr @@ -728,9 +720,6 @@ subroutine ssm_da(this) ! -- Scalars call mem_deallocate(this%nbound) ! - ! -- Pointers - nullify (this%gwecommon) - ! ! -- deallocate parent call this%NumericalPackageType%da() !