From 97d2441a3190eb580108e56e6210a7fc0fd32841 Mon Sep 17 00:00:00 2001 From: Pengyang Song Date: Tue, 8 Oct 2024 15:07:33 +0200 Subject: [PATCH] bug fix: use_cavity_fw2press does not work --- src/oce_ale.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/oce_ale.F90 b/src/oce_ale.F90 index 5f5f05470..8006f7632 100644 --- a/src/oce_ale.F90 +++ b/src/oce_ale.F90 @@ -1784,10 +1784,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