Skip to content

Commit

Permalink
fix(dis): cellxy in DIS (#239)
Browse files Browse the repository at this point in the history
- fixed how celly is determined from column numbers
  • Loading branch information
mjr-deltares authored and langevin-usgs committed Oct 31, 2019
1 parent 24d98eb commit cf315c9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Model/GroundWaterFlow/gwf3dis8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -682,14 +682,15 @@ subroutine grid_finalize(this)
enddo
enddo
!
! -- fill x,y coordinate arrays
! -- fill x,y coordinate arrays
this%cellx(1) = DHALF*this%delr(1)
this%celly(1) = DHALF*this%delc(1)
this%celly(this%nrow) = DHALF*this%delc(this%nrow)
do j = 2, this%ncol
this%cellx(j) = this%cellx(j-1) + DHALF*this%delr(j-1) + DHALF*this%delr(j)
enddo
do i = 2, this%nrow
this%celly(i) = this%celly(i-1) + DHALF*this%delc(i-1) + DHALF*this%delc(i)
! -- row number increases in negative y direction:
do i = this%nrow-1, 1, -1
this%celly(i) = this%celly(i+1) + DHALF*this%delc(i+1) + DHALF*this%delc(i)
enddo
!
! -- create and fill the connections object
Expand Down

0 comments on commit cf315c9

Please sign in to comment.