From 7345130880c86e07a6a8b8f9c2fb79a836da8503 Mon Sep 17 00:00:00 2001 From: Eric Morway Date: Tue, 7 Nov 2023 13:44:51 -0800 Subject: [PATCH] changes in response to: https://github.com/MODFLOW-USGS/modflow6/pull/1428#discussion_r1385450154 https://github.com/MODFLOW-USGS/modflow6/pull/1428#discussion_r1385453809 https://github.com/MODFLOW-USGS/modflow6/pull/1428#discussion_r1385455884 --- src/Model/GroundWaterTransport/gwt1lkt1.f90 | 8 ++++---- src/Model/GroundWaterTransport/gwt1mwt1.f90 | 8 ++++---- src/Model/GroundWaterTransport/gwt1sft1.f90 | 8 ++++---- src/Model/GroundWaterTransport/gwt1uzt1.f90 | 8 ++++---- src/Model/TransportModel/tsp1apt1.f90 | 9 ++++----- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/Model/GroundWaterTransport/gwt1lkt1.f90 b/src/Model/GroundWaterTransport/gwt1lkt1.f90 index 03cac82c448..e8775deec83 100644 --- a/src/Model/GroundWaterTransport/gwt1lkt1.f90 +++ b/src/Model/GroundWaterTransport/gwt1lkt1.f90 @@ -34,7 +34,7 @@ module GwtLktModule use KindModule, only: DP, I4B - use ConstantsModule, only: DZERO, DONE, LINELENGTH, LENVARNAME + use ConstantsModule, only: DZERO, DONE, LINELENGTH use SimModule, only: store_error use BndModule, only: BndType, GetBndFromList use TspFmiModule, only: TspFmiType @@ -106,9 +106,9 @@ subroutine lkt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & character(len=*), intent(in) :: pakname type(TspFmiType), pointer :: fmi real(DP), intent(in), pointer :: eqnsclfac !< governing equation scale factor - character(len=LENVARNAME), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType - character(len=LENVARNAME), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType - character(len=LENVARNAME), intent(in) :: dvua !< For GWT, set to "M" in TspAptType + character(len=*), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType + character(len=*), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType + character(len=*), intent(in) :: dvua !< For GWT, set to "M" in TspAptType ! -- local type(GwtLktType), pointer :: lktobj ! diff --git a/src/Model/GroundWaterTransport/gwt1mwt1.f90 b/src/Model/GroundWaterTransport/gwt1mwt1.f90 index 5e75e15474c..842a051235f 100644 --- a/src/Model/GroundWaterTransport/gwt1mwt1.f90 +++ b/src/Model/GroundWaterTransport/gwt1mwt1.f90 @@ -35,7 +35,7 @@ module GwtMwtModule use KindModule, only: DP, I4B - use ConstantsModule, only: DZERO, LINELENGTH, LENVARNAME + use ConstantsModule, only: DZERO, LINELENGTH use SimModule, only: store_error use BndModule, only: BndType, GetBndFromList use TspFmiModule, only: TspFmiType @@ -99,9 +99,9 @@ subroutine mwt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & character(len=*), intent(in) :: pakname type(TspFmiType), pointer :: fmi real(DP), intent(in), pointer :: eqnsclfac !< governing equation scale factor - character(len=LENVARNAME), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType - character(len=LENVARNAME), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType - character(len=LENVARNAME), intent(in) :: dvua !< For GWT, set to "M" in TspAptType + character(len=*), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType + character(len=*), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType + character(len=*), intent(in) :: dvua !< For GWT, set to "M" in TspAptType ! -- local type(GwtMwtType), pointer :: mwtobj ! diff --git a/src/Model/GroundWaterTransport/gwt1sft1.f90 b/src/Model/GroundWaterTransport/gwt1sft1.f90 index 9df4c3c4509..fc6ffafc171 100644 --- a/src/Model/GroundWaterTransport/gwt1sft1.f90 +++ b/src/Model/GroundWaterTransport/gwt1sft1.f90 @@ -33,7 +33,7 @@ module GwtSftModule use KindModule, only: DP, I4B - use ConstantsModule, only: DZERO, DONE, LINELENGTH, LENVARNAME + use ConstantsModule, only: DZERO, DONE, LINELENGTH use SimModule, only: store_error use BndModule, only: BndType, GetBndFromList use TspFmiModule, only: TspFmiType @@ -103,9 +103,9 @@ subroutine sft_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & character(len=*), intent(in) :: pakname type(TspFmiType), pointer :: fmi real(DP), intent(in), pointer :: eqnsclfac !< governing equation scale factor - character(len=LENVARNAME), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType - character(len=LENVARNAME), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType - character(len=LENVARNAME), intent(in) :: dvua !< For GWT, set to "M" in TspAptType + character(len=*), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType + character(len=*), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType + character(len=*), intent(in) :: dvua !< For GWT, set to "M" in TspAptType ! -- local type(GwtSftType), pointer :: sftobj ! diff --git a/src/Model/GroundWaterTransport/gwt1uzt1.f90 b/src/Model/GroundWaterTransport/gwt1uzt1.f90 index c9a0fd6f29d..4006062fb28 100644 --- a/src/Model/GroundWaterTransport/gwt1uzt1.f90 +++ b/src/Model/GroundWaterTransport/gwt1uzt1.f90 @@ -27,7 +27,7 @@ module GwtUztModule use KindModule, only: DP, I4B - use ConstantsModule, only: DZERO, DONE, LINELENGTH, LENVARNAME + use ConstantsModule, only: DZERO, DONE, LINELENGTH use SimModule, only: store_error use BndModule, only: BndType, GetBndFromList use TspFmiModule, only: TspFmiType @@ -91,9 +91,9 @@ subroutine uzt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, & character(len=*), intent(in) :: pakname type(TspFmiType), pointer :: fmi real(DP), intent(in), pointer :: eqnsclfac !< governing equation scale factor - character(len=LENVARNAME), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType - character(len=LENVARNAME), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType - character(len=LENVARNAME), intent(in) :: dvua !< For GWT, set to "M" in TspAptType + character(len=*), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType + character(len=*), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType + character(len=*), intent(in) :: dvua !< For GWT, set to "M" in TspAptType ! -- local type(GwtUztType), pointer :: uztobj ! diff --git a/src/Model/TransportModel/tsp1apt1.f90 b/src/Model/TransportModel/tsp1apt1.f90 index c16fc40f9cc..4d2bb855b0d 100644 --- a/src/Model/TransportModel/tsp1apt1.f90 +++ b/src/Model/TransportModel/tsp1apt1.f90 @@ -60,7 +60,7 @@ module TspAptModule public :: apt_process_obsID12 character(len=LENFTYPE) :: ftype = 'APT' - character(len=16) :: text = ' APT' + character(len=LENVARNAME) :: text = ' APT' character(len=LENVARNAME) :: tsptype = 'GWT' !< to be removed once TSP refactor is further sorted out type, extends(BndType) :: TspAptType @@ -80,7 +80,6 @@ module TspAptModule integer(I4B), pointer :: idxprepak => null() !< budget-object index that precedes package-specific budget objects integer(I4B), pointer :: idxlastpak => null() !< budget-object index of last package-specific budget object real(DP), dimension(:), pointer, contiguous :: strt => null() !< starting feature concentration (or temperature) - real(DP), dimension(:), pointer, contiguous :: ktf => null() !< thermal conductivity between the apt and groundwater cell real(DP), dimension(:), pointer, contiguous :: rfeatthk => null() !< thickness of streambed/lakebed/filter-pack material through which thermal conduction occurs integer(I4B), dimension(:), pointer, contiguous :: idxlocnode => null() !< map position in global rhs and x array of pack entry integer(I4B), dimension(:), pointer, contiguous :: idxpakdiag => null() !< map diag position of feature in global amat @@ -1039,7 +1038,7 @@ subroutine apt_ot_dv(this, idvsave, idvprint) end if this%dbuff(n) = c end do - write (text, '(a)') str_pad_left(this%depvartype, 16) + write (text, '(a)') str_pad_left(this%depvartype, LENVARNAME) call ulasav(this%dbuff, text, kstp, kper, pertim, totim, & this%ncv, 1, 1, ibinun) end if @@ -2280,7 +2279,7 @@ subroutine apt_fill_budobj(this, x, flowja) nlist = this%ncv call this%budobj%budterm(idx)%reset(nlist) do j = 1, nlist - call this%apt_fmvr_term(j, n1, n2, q) ! kluge note: don't really need to do this in apt_fmvr_term now, since no override by uze + call this%apt_fmvr_term(j, n1, n2, q) call this%budobj%budterm(idx)%update_term(n1, n1, q) call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout) end do @@ -2420,7 +2419,7 @@ subroutine apt_fmvr_term(this, ientry, n1, n2, rrate, & ! -- Calculate MVR-related terms n1 = ientry n2 = n1 - if (present(rrate)) rrate = this%qmfrommvr(n1) ! presumably in terms of energy already for heat transport??? + if (present(rrate)) rrate = this%qmfrommvr(n1) ! NOTE: When bringing in GWE, ensure this is in terms of energy. Might need to apply eqnsclfac here. if (present(rhsval)) rhsval = this%qmfrommvr(n1) if (present(hcofval)) hcofval = DZERO !