Skip to content

Commit

Permalink
refactor(gwf): set ncolbnd to 0 for bound 2d array allocation in base…
Browse files Browse the repository at this point in the history
… stress packages (#1485)

* base stress packages should not allocate bound 2d array

* additional ncolbnd cleanup in EVT and CNC

---------

Co-authored-by: mjreno <mreno@IGSAAA071L00066.gs.doi.net>
  • Loading branch information
mjreno and mjreno committed Dec 16, 2023
1 parent 3a2d9a0 commit ceefe43
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 27 deletions.
2 changes: 0 additions & 2 deletions src/Model/GroundWaterFlow/gwf3chd8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ subroutine chd_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
packobj%iout = iout
packobj%id = id
packobj%ibcnum = ibcnum
packobj%ncolbnd = 1
packobj%iscloc = 1
packobj%ictMemPath = create_mem_path(namemodel, 'NPF')
!
! -- Return
Expand Down
2 changes: 0 additions & 2 deletions src/Model/GroundWaterFlow/gwf3drn8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ subroutine drn_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
packobj%iout = iout
packobj%id = id
packobj%ibcnum = ibcnum
packobj%ncolbnd = 2 ! drnelev, conductance
packobj%iscloc = 2 !sfac applies to conductance
packobj%ictMemPath = create_mem_path(namemodel, 'NPF')
!
! -- Return
Expand Down
13 changes: 0 additions & 13 deletions src/Model/GroundWaterFlow/gwf3evt8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ subroutine evt_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
packobj%iout = iout
packobj%id = id
packobj%ibcnum = ibcnum
packobj%ncolbnd = 3 ! Assumes NSEG = 1 and SURF_RATE_SPECIFIED=False
packobj%iscloc = 2 ! sfac applies to max. ET rate
packobj%ictMemPath = create_mem_path(namemodel, 'NPF')
!
! -- Return
Expand Down Expand Up @@ -348,18 +346,7 @@ subroutine evt_source_dimensions(this)
call store_error(errmsg)
call store_error_filename(this%input_fname)
end if
! -- Recalculate number of columns required in bound array.
if (this%surfratespecified) then
this%ncolbnd = 4 + 2 * (this%nseg - 1)
else
this%ncolbnd = 3 + 2 * (this%nseg - 1)
end if
!
elseif (this%nseg == 1) then
! if surf_rate_specified is true, will still read petm0
if (this%surfratespecified) then
this%ncolbnd = this%ncolbnd + 1
end if
end if
end if
!
Expand Down
2 changes: 0 additions & 2 deletions src/Model/GroundWaterFlow/gwf3ghb8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ subroutine ghb_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
packobj%iout = iout
packobj%id = id
packobj%ibcnum = ibcnum
packobj%ncolbnd = 2
packobj%iscloc = 2
packobj%ictMemPath = create_mem_path(namemodel, 'NPF')
!
! -- Return
Expand Down
2 changes: 0 additions & 2 deletions src/Model/GroundWaterFlow/gwf3rch8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ subroutine rch_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
packobj%iout = iout
packobj%id = id
packobj%ibcnum = ibcnum
packobj%ncolbnd = 1
packobj%iscloc = 1 ! sfac applies to recharge rate
packobj%ictMemPath = create_mem_path(namemodel, 'NPF')
!
! -- Return
Expand Down
2 changes: 0 additions & 2 deletions src/Model/GroundWaterFlow/gwf3riv8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ subroutine riv_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
packobj%iout = iout
packobj%id = id
packobj%ibcnum = ibcnum
packobj%ncolbnd = 3 ! stage, conductance, rbot
packobj%iscloc = 2 !sfac applies to conductance
packobj%ictMemPath = create_mem_path(namemodel, 'NPF')
!
! -- Return
Expand Down
2 changes: 0 additions & 2 deletions src/Model/GroundWaterFlow/gwf3wel8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ subroutine wel_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
packobj%iout = iout
packobj%id = id
packobj%ibcnum = ibcnum
packobj%ncolbnd = 1
packobj%iscloc = 1
packobj%ictMemPath = create_mem_path(namemodel, 'NPF')
!
! -- return
Expand Down
2 changes: 0 additions & 2 deletions src/Model/GroundWaterTransport/gwt1cnc1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ subroutine cnc_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
packobj%iout = iout
packobj%id = id
packobj%ibcnum = ibcnum
packobj%ncolbnd = 1
packobj%iscloc = 1
!
! -- Store the appropriate label based on the dependent variable
cncobj%depvartype = depvartype
Expand Down

0 comments on commit ceefe43

Please sign in to comment.