From 271dd571aee4e1fb975f49682f1fdb648e1c443c Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Tue, 28 Feb 2023 10:15:23 -0300 Subject: [PATCH] FORCING: Reset forcing statistics if there is no driving. Signed-off-by: Grzegorz Kowal --- sources/forcing.F90 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sources/forcing.F90 b/sources/forcing.F90 index af248b5..2a9f53e 100644 --- a/sources/forcing.F90 +++ b/sources/forcing.F90 @@ -995,7 +995,12 @@ module forcing !------------------------------------------------------------------------------- ! - if (t < tinj_start .or. t > tinj_stop) return + if (t < tinj_start .or. t > tinj_stop) then + arms = 0.0d+00 + dinj = 0.0d+00 + rinj = 0.0d+00 + return + end if ! calculate the number of eddies to be injected during this interval ! @@ -1079,7 +1084,12 @@ module forcing !------------------------------------------------------------------------------- ! - if (t < tinj_start .or. t > tinj_stop) return + if (t < tinj_start .or. t > tinj_stop) then + arms = 0.0d+00 + dinj = 0.0d+00 + rinj = 0.0d+00 + return + end if ! calculate drift and diffusion coefficients ! @@ -1166,7 +1176,12 @@ module forcing !------------------------------------------------------------------------------- ! - if (t < tinj_start .or. t > tinj_stop) return + if (t < tinj_start .or. t > tinj_stop) then + arms = 0.0d+00 + dinj = 0.0d+00 + rinj = 0.0d+00 + return + end if ! determine velocify coefficients in Fourier space !