From cd2596f3b6d892385ac236b3214127d725f8da70 Mon Sep 17 00:00:00 2001
From: Antoine <antoine.hoffmann@epfl.ch>
Date: Tue, 26 Sep 2023 17:30:51 +0200
Subject: [PATCH] the twothird rule is based on kxmin now

---
 src/grid_mod.F90 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/grid_mod.F90 b/src/grid_mod.F90
index dc58b2ab..b85b9b9b 100644
--- a/src/grid_mod.F90
+++ b/src/grid_mod.F90
@@ -543,9 +543,9 @@ CONTAINS
     ! We remove one point more if ExB is on since the moving grid
     ! can go up to kx=+-(kx_max+deltakx/2)
     IF (ABS(ExBrate) .GT. 0) THEN
-      two_third_kxmax = 2._xp/3._xp*(kx_max)
+      two_third_kxmax = 2._xp/3._xp*abs(kx_min)
     ELSE
-      two_third_kxmax = 2._xp/3._xp*kx_max
+      two_third_kxmax = 2._xp/3._xp*abs(kx_min)
     ENDIF
     ! Antialiasing filter
     DO iky = 1,local_nky
-- 
GitLab