Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfct(npf/dsp): move read grid data from ar to df #1057

Merged
merged 4 commits into from
Sep 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move allocate arrays and reading grid data up to define for dsp
  • Loading branch information
mjr-deltares committed Sep 30, 2022
commit 9f406195cf60ff8c0e8c1a12f7b9227c9b6249fb
27 changes: 14 additions & 13 deletions src/Model/GroundWaterTransport/gwt1dsp.f90
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,23 @@ subroutine dsp_df(this, dis, dspOptions)
! -- Read dispersion options
if (present(dspOptions)) then
this%ixt3d = dspOptions%ixt3d
!
! -- Allocate only, grid data will not be read from file
call this%allocate_arrays(this%dis%nodes)
else
!
! -- Print a message identifying the dispersion package.
if (this%iout > 0) then
write (this%iout, fmtdsp) this%inunit
end if
!
! -- Initialize block parser
call this%parser%Initialize(this%inunit, this%iout)
call this%read_options()
call this%read_options()!
call this%allocate_arrays(this%dis%nodes)
!
! -- Read dispersion data
call this%read_data()
end if
!
! -- xt3d create
Expand Down Expand Up @@ -217,22 +229,11 @@ subroutine dsp_ar(this, ibound, porosity, grid_data)
!
! -- dsp pointers to arguments that were passed in
this%ibound => ibound
this%porosity => porosity
!
! -- Print a message identifying the dispersion package.
if (this%iout > 0) then
write (this%iout, fmtdsp) this%inunit
end if
!
! -- Allocate arrays
call this%allocate_arrays(this%dis%nodes)
this%porosity => porosity
!
if (present(grid_data)) then
! -- Set dispersion data
call this%set_data(grid_data)
else
! -- Read dispersion data
call this%read_data()
end if
!
! -- Return
Expand Down