From 56e0b1bf214f00157ba6aa92d41ad299933ef0dc Mon Sep 17 00:00:00 2001
From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch>
Date: Mon, 15 Mar 2021 16:23:25 +0100
Subject: [PATCH] Allocation of Na00 arrays for diagnostics in 2D parallel

---
 src/memory.F90 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/memory.F90 b/src/memory.F90
index cf51beaa..60b52058 100644
--- a/src/memory.F90
+++ b/src/memory.F90
@@ -12,8 +12,8 @@ SUBROUTINE memory
   IMPLICIT NONE
 
   ! Moments with ghost degrees for p+2 p-2, j+1, j-1 truncations
-  CALL allocate_array(     moments_e, ipsg_e,ipeg_e, ijsg_e,ijeg_e, ikrs,ikre, ikzs,ikze, 1,ntimelevel )
-  CALL allocate_array(     moments_i, ipsg_i,ipeg_i, ijsg_i,ijeg_i, ikrs,ikre, ikzs,ikze, 1,ntimelevel )
+  CALL allocate_array( moments_e, ipsg_e,ipeg_e, ijsg_e,ijeg_e, ikrs,ikre, ikzs,ikze, 1,ntimelevel )
+  CALL allocate_array( moments_i, ipsg_i,ipeg_i, ijsg_i,ijeg_i, ikrs,ikre, ikzs,ikze, 1,ntimelevel )
 
   ! Moments right-hand-side (contains linear part of hierarchy)
   CALL allocate_array( moments_rhs_e, ips_e,ipe_e, ijs_e,ije_e, ikrs,ikre, ikzs,ikze, 1,ntimelevel )
@@ -21,6 +21,10 @@ SUBROUTINE memory
 
   ! Electrostatic potential
   CALL allocate_array(phi, ikrs,ikre, ikzs,ikze)
+  
+  ! Gyrocenter density *for 2D output*
+  CALL allocate_array(Ne00, ikrs,ikre, ikzs,ikze)
+  CALL allocate_array(Ni00, ikrs,ikre, ikzs,ikze)
 
   ! Kernel evaluation from j= -1 to jmax+1 for truncation
   CALL allocate_array(Kernel_e, ijsg_e,ijeg_e, ikrs,ikre, ikzs,ikze)
-- 
GitLab