Skip to content

Commit

Permalink
Updated wet/dry code in interpolation module, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli Hunter committed Nov 13, 2020
1 parent aa89605 commit 27cebed
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions ROMSPath.f90
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ subroutine ini_ROMSPath()
par(n,pVort) = 0.0
par(n,pbehaveW) = 0.0
par(n,pSSF) = 0.0
par(n,pWD) = 9999.0

Ipar(n)=0.0
Jpar(n)=0.0
Expand Down
2 changes: 2 additions & 0 deletions advection_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ SUBROUTINE find_currents(Xpar,Ypar,Zpar,ex,ix,ng,ets,Uad,Vad,Wad,tdepth,zeta)
!*******************************
! ! !Check if particle location above or below boundary, If so, place
! ! ! just within boundary (1 mm)


if (Zpar.LT.tdepth) then
Zpar = tdepth + DBLE(0.001)
!IF(TrackCollisions) hitBottom(n) = hitBottom(n) + 1
Expand Down
9 changes: 8 additions & 1 deletion boundary_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ SUBROUTINE zbounds(ng,Ipar,Jpar,Zpar,ingrid,t)
use param_mod, only: xi_rho,eta_rho
use INT_MOD, only: getInterp2D
IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN) :: Ipar,Jpar,Zpar
DOUBLE PRECISION, INTENT(IN) :: Ipar,Jpar
DOUBLE PRECISION, INTENT(INOUT) :: Zpar
INTEGER :: I,J
INTEGER, INTENT(IN) :: ng ,t
LOGICAL, INTENT(OUT) :: ingrid
Expand All @@ -167,6 +168,12 @@ SUBROUTINE zbounds(ng,Ipar,Jpar,Zpar,ingrid,t)
ingrid=.TRUE.
endif

if (Zpar.GE.tzeta) then
Zpar=tzeta-0.01D0 !set particle depth to 1 less than
ingrid=.TRUE.
endif


endif

END SUBROUTINE zbounds
Expand Down
14 changes: 11 additions & 3 deletions interpolation_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1224,9 +1224,17 @@ SUBROUTINE getcoeff(X,Y,m,cff)
W(4)=m(4)/dist(4)
WT=W(1)+W(2)+W(3)+W(4)

do i=1,4
cff(i)=W(i)/WT
enddo

if ( WT.EQ.0.0D0) then
do i=1,4
cff(i)=0.0D0
enddo
else
do i=1,4
cff(i)=W(i)/WT
enddo
endif




Expand Down

0 comments on commit 27cebed

Please sign in to comment.