From b9ffcc237db822608eb47095b94380d758c5d92e Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Thu, 12 May 2022 10:47:41 +0200
Subject: [PATCH] Philippe 12/05/2022: write_profilern: remove ZDATA array (not
 useful anymore)

---
 src/MNH/write_profilern.f90 | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/MNH/write_profilern.f90 b/src/MNH/write_profilern.f90
index e6b744fb9..ccb4fdcd2 100644
--- a/src/MNH/write_profilern.f90
+++ b/src/MNH/write_profilern.f90
@@ -361,16 +361,13 @@ INTEGER                                              :: JSV      ! loop counter
 integer                                              :: ji
 INTEGER                                              :: ISTORE
 REAL, DIMENSION(:,:,:),                  ALLOCATABLE :: ZRHO
-REAL, DIMENSION(:,:), TARGET,            ALLOCATABLE :: ZWORK
-REAL, DIMENSION(:,:), POINTER                        :: ZDATA
+REAL, DIMENSION(:,:),                    ALLOCATABLE :: ZWORK
 REAL, DIMENSION(:,:,:,:),                ALLOCATABLE :: ZSV, ZN0, ZSIG, ZRG
 type(tbudiachrometadata)                             :: tzbudiachro
 type(tfieldmetadata_base), dimension(:), allocatable :: tzfields
 !
 !----------------------------------------------------------------------------
 
-ZDATA => Null()
-
 IKU = NKMAX + 2 * JPVEXT !Number of vertical levels
 !
 !IPROC is too large (not a big problem) due to the separation between vertical profiles and point values
@@ -435,14 +432,11 @@ if ( nsv > 0  ) then
     if ( Trim( tsvlist(jsv)%cunits ) == 'ppv' ) then
       yunits = 'ppb'
       zwork = tpprofiler%xsv(:,:,jsv) * 1.e9 !*1e9 for conversion ppv->ppb
-      zdata => zwork
     else
       yunits = Trim( tsvlist(jsv)%cunits )
       zwork = tpprofiler%xsv(:,:,jsv)
-      zdata => zwork
     end if
-    call Add_profile( tsvlist(jsv)%cmnhname, '', yunits, zdata )
-    zdata => Null()
+    call Add_profile( tsvlist(jsv)%cmnhname, '', yunits, zwork )
   end do
   Deallocate( zwork )
 
-- 
GitLab