From 3a1115b93edab42d4dc971b83a564b354471da68 Mon Sep 17 00:00:00 2001 From: Sibylle TECHENE <techenes@irene190.c-irene.tgcc.ccc.cea.fr> Date: Thu, 6 Jan 2022 18:36:33 +0100 Subject: [PATCH] bug fix for linssh --- src/OCE/stprk3_stg.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/OCE/stprk3_stg.F90 b/src/OCE/stprk3_stg.F90 index 6853de23..9f9357ce 100644 --- a/src/OCE/stprk3_stg.F90 +++ b/src/OCE/stprk3_stg.F90 @@ -418,8 +418,10 @@ CONTAINS CALL tra_zdf( kstp, Kbb, Kmm, Krhs, ts , Kaa ) ! vertical mixing and after tracer fields IF( ln_zdfnpc ) CALL tra_npc( kstp, Kmm, Krhs, ts , Kaa ) ! update after fields by non-penetrative convection ! - r3f(:,:) = r3fa(:,:) ! save r3fa in r3f before deallocation - DEALLOCATE( r3fa ) ! (r3f = r3f(Kbb) of the next time step) + IF( .NOT.lk_linssh ) THEN + r3f(:,:) = r3fa(:,:) ! save r3fa in r3f before deallocation + DEALLOCATE( r3fa ) ! (r3f = r3f(Kbb) of the next time step) + ENDIF ! END SELECT ! !== correction of the barotropic (all stages) ==! at Kaa = N+1/3, N+1/2 or N+1 -- GitLab