Skip to content

Commit

Permalink
Merge pull request #633 from FESOM/refactoring_bugfix_cavity
Browse files Browse the repository at this point in the history
bug fix: use_cavity_fw2press does not work
  • Loading branch information
patrickscholz authored Oct 8, 2024
2 parents e900ff0 + acf43fc commit fe4330e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/oce_ale.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1926,10 +1926,12 @@ subroutine compute_ssh_rhs_ale(dynamics, partit, mesh)
!$OMP DO
do n=1,myDim_nod2D
nzmin = ulevels_nod2D(n)
if (ulevels_nod2D(n)>1 .and. use_cavity_fw2press ) then
if (ulevels_nod2D(n)>1) then
! use_cavity_fw2press=.true.: adds freshwater under the cavity thereby
! increasing the local pressure
ssh_rhs(n)=ssh_rhs(n)-alpha*water_flux(n)*areasvol(nzmin,n)
if (use_cavity_fw2press) then
ssh_rhs(n)=ssh_rhs(n)-alpha*water_flux(n)*areasvol(nzmin,n)
end if
else
ssh_rhs(n)=ssh_rhs(n)-alpha*water_flux(n)*areasvol(nzmin,n)+(1.0_WP-alpha)*ssh_rhs_old(n)
end if
Expand Down

0 comments on commit fe4330e

Please sign in to comment.