Skip to content

Commit

Permalink
Merge pull request #1244 from MJHarrison-GFDL/ale_sponge_tracer_index…
Browse files Browse the repository at this point in the history
…_patch

*Correct indexing bug in ALE_sponge
  • Loading branch information
marshallward authored Nov 11, 2020
2 parents 6b41926 + b3656fa commit ad53667
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parameterizations/vertical/MOM_ALE_sponge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,8 @@ subroutine apply_ALE_sponge(h, dt, G, GV, US, CS, Time)
enddo
! In case data is deeper than model
hsrc(nz_data) = hsrc(nz_data) + ( zTopOfCell + G%bathyT(CS%col_i(c),CS%col_j(c)) )
CS%Ref_val(CS%fldno)%h(1:nz_data,c) = GV%Z_to_H*hsrc(1:nz_data)
CS%Ref_val(CS%fldno)%p(1:nz_data,c) = tmpT1d(1:nz_data)
CS%Ref_val(m)%h(1:nz_data,c) = GV%Z_to_H*hsrc(1:nz_data)
CS%Ref_val(m)%p(1:nz_data,c) = tmpT1d(1:nz_data)
do k=2,nz_data
! if (mask_z(i,j,k)==0.) &
if (CS%Ref_val(m)%h(k,c) <= 0.001*GV%m_to_H) &
Expand Down Expand Up @@ -1185,7 +1185,7 @@ subroutine ALE_sponge_end(CS)
if (associated(CS%Iresttime_col_v)) deallocate(CS%Iresttime_col_v)

do m=1,CS%fldno
if (associated(CS%Ref_val(CS%fldno)%p)) deallocate(CS%Ref_val(CS%fldno)%p)
if (associated(CS%Ref_val(m)%p)) deallocate(CS%Ref_val(m)%p)
enddo

deallocate(CS)
Expand Down

0 comments on commit ad53667

Please sign in to comment.