Skip to content

Commit

Permalink
Merge branch 'refs/heads/DevelopV2'
Browse files Browse the repository at this point in the history
  • Loading branch information
PauloChambelGit committed May 25, 2017
2 parents d6373cb + 015cf02 commit 8342b96
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Software/MOHIDBase1/ModuleFunctions.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5194,7 +5194,7 @@ subroutine FillMatrix3D (ILB, IUB, JLB, JUB, KLB, KUB, ComputePoints3D, OutValue
real, dimension(:,: ), pointer :: Value2D
integer, dimension(:,: ), pointer :: Map2D

integer :: k, kfirst, klast
integer :: k, kfirst, klast, i, j


!Begin-----------------------------------------------------------------
Expand All @@ -5218,10 +5218,14 @@ subroutine FillMatrix3D (ILB, IUB, JLB, JUB, KLB, KUB, ComputePoints3D, OutValue

!Search for the first layer with data
d2: do k = KLB, KUB
if (OutValues3D(ILB, JLB, k) > FillValueReal/1e4) then
do j = JLB, JUB
do i = ILB, IUB
if (OutValues3D(i, j, k) > FillValueReal/1e4) then
kfirst = k
exit
exit d2
endif
enddo
enddo
enddo d2

!Extrapolate for the bottom layers
Expand All @@ -5231,10 +5235,14 @@ subroutine FillMatrix3D (ILB, IUB, JLB, JUB, KLB, KUB, ComputePoints3D, OutValue

!Search for the last layer with data
d4: do k = KUB, KLB,-1
do j = JLB, JUB
do i = ILB, IUB
if (OutValues3D(ILB, JLB, k) > FillValueReal/1e4) then
klast = k
exit
exit d4
endif
enddo
enddo
enddo d4

!Extrapolate for the surface layers
Expand Down

0 comments on commit 8342b96

Please sign in to comment.