Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Jan 20, 2025
1 parent 849578f commit 54f71c1
Show file tree
Hide file tree
Showing 11 changed files with 329 additions and 73 deletions.
2 changes: 2 additions & 0 deletions autotest/test_prt_voronoi2.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@ def build_prt_sim(name, gwf_ws, prt_ws, targets, cell_ids):
)
gwf_budget_file = gwf_ws / f"{gwf_name}.bud"
gwf_head_file = gwf_ws / f"{gwf_name}.hds"
grb_file = gwf_ws / f"{gwf_name}.disv.grb"
flopy.mf6.ModflowPrtfmi(
prt,
packagedata=[
("GWFGRID", grb_file),
("GWFHEAD", gwf_head_file),
("GWFBUDGET", gwf_budget_file),
],
Expand Down
2 changes: 1 addition & 1 deletion doc/mf6io/mf6ivar/dfn/prt-fmi.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type string
tagged false
reader urword
longname flow type
description is the word GWFBUDGET or GWFHEAD. If GWFBUDGET is specified, then the corresponding file must be a budget file from a previous GWF Model run.
description is the word GWFBUDGET, GWFHEAD, or GRB. If GWFBUDGET is specified, then the corresponding file must be a budget file from a previous GWF Model run. If GWFHead is specified, the file must be a head file. If GWFGRID is specified, the file must be a binary grid file.

block packagedata
name filein
Expand Down
1 change: 1 addition & 0 deletions msvs/mf6core.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@
<File RelativePath="..\src\Utilities\DevFeature.f90"/>
<File RelativePath="..\src\Utilities\ErrorUtil.f90"/>
<File RelativePath="..\src\Utilities\GeomUtil.f90"/>
<File RelativePath="..\src\Utilities\GridFileReader.f90"/>
<File RelativePath="..\src\Utilities\HashTable.f90"/>
<File RelativePath="..\src\Utilities\HeadFileReader.f90"/>
<File RelativePath="..\src\Utilities\HGeoUtil.f90"/>
Expand Down
3 changes: 2 additions & 1 deletion src/Model/Discretization/Dis.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module DisModule
use MemoryManagerModule, only: mem_allocate, mem_deallocate
use MemoryManagerExtModule, only: mem_set_value, memorystore_remove
use TdisModule, only: kstp, kper, pertim, totim, delt
use LongLineReaderModule, only: LongLineReaderType

implicit none
private
Expand All @@ -32,7 +33,7 @@ module DisModule
real(DP), dimension(:, :, :), pointer :: botm => null() !< top and bottom elevations for each cell (ncol, nrow, nlay)
real(DP), dimension(:), pointer, contiguous :: cellx => null() !< cell center x coordinate for column j
real(DP), dimension(:), pointer, contiguous :: celly => null() !< cell center y coordinate for row i

type(LongLineReaderType) :: line_reader
contains

procedure :: dis_df => dis3d_df
Expand Down
31 changes: 14 additions & 17 deletions src/Model/Discretization/Disu.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module DisuModule
use MemoryManagerExtModule, only: mem_set_value, memorystore_remove
use TdisModule, only: kstp, kper, pertim, totim, delt
use DisvGeom, only: line_unit_vector
use LongLineReaderModule, only: LongLineReaderType

implicit none

Expand Down Expand Up @@ -45,7 +46,7 @@ module DisuModule
integer(I4B), dimension(:), pointer, contiguous :: javert => null() ! cell vertex pointer ja array
integer(I4B), dimension(:), pointer, contiguous :: idomain => null() ! idomain (nodes)
logical(LGP) :: readFromFile ! True, when DIS is read from file (almost always)

type(LongLineReaderType) :: line_reader
contains

procedure :: dis_df => disu_df
Expand Down Expand Up @@ -122,41 +123,37 @@ module DisuModule
contains

!> @brief Create a new unstructured discretization object
!<
subroutine disu_cr(dis, name_model, input_mempath, inunit, iout)
! -- dummy
! dummy
class(DisBaseType), pointer :: dis
character(len=*), intent(in) :: name_model
character(len=*), intent(in) :: input_mempath
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
! -- local
! local
type(DisuType), pointer :: disnew
character(len=*), parameter :: fmtheader = &
"(1X, /1X, 'DISU -- UNSTRUCTURED GRID DISCRETIZATION PACKAGE,', &
&' VERSION 2 : 3/27/2014 - INPUT READ FROM MEMPATH: ', A, //)"
!
! -- Create a new discretization object

! Create a new discretization object
allocate (disnew)
dis => disnew
!
! -- Allocate scalars and assign data

! Allocate scalars and assign data
call dis%allocate_scalars(name_model, input_mempath)
dis%inunit = inunit
dis%iout = iout
!
! -- If disu is enabled

! If disu is enabled
if (inunit > 0) then
!
! -- Identify package
if (iout > 0) then
! Identify package
if (iout > 0) &
write (iout, fmtheader) dis%input_mempath
end if
!
! -- load disu

! load disu
call disnew%disu_load()
end if
!
end subroutine disu_cr

!> @brief Transfer IDM data into this discretization object
Expand Down
3 changes: 2 additions & 1 deletion src/Model/Discretization/Disv.f90
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module DisvModule
use MemoryManagerModule, only: mem_allocate, mem_deallocate, mem_setptr
use MemoryManagerExtModule, only: mem_set_value, memorystore_remove
use TdisModule, only: kstp, kper, pertim, totim, delt
use LongLineReaderModule, only: LongLineReaderType

implicit none
private
Expand All @@ -32,7 +33,7 @@ module DisvModule
real(DP), dimension(:), pointer, contiguous :: top1d => null() !< top elevations for each cell at top of model (ncpl)
real(DP), dimension(:, :), pointer, contiguous :: bot2d => null() !< bottom elevations for each cell (ncpl, nlay)
integer(I4B), dimension(:, :), pointer, contiguous :: idomain => null() !< idomain (ncpl, nlay)

type(LongLineReaderType) :: line_reader
contains

procedure :: dis_df => disv_df
Expand Down
Loading

0 comments on commit 54f71c1

Please sign in to comment.