From b99479e722c172215dc56b5cc860320617242f81 Mon Sep 17 00:00:00 2001 From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr> Date: Fri, 3 Feb 2023 14:27:49 +0100 Subject: [PATCH] Philippe 03/02/2023: bugfix: stations + profilers: copy all available fields --- src/MNH/statprof_tools.f90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/MNH/statprof_tools.f90 b/src/MNH/statprof_tools.f90 index 0d1de4a16..79eb36b28 100644 --- a/src/MNH/statprof_tools.f90 +++ b/src/MNH/statprof_tools.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2002-2022 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2002-2023 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -400,7 +400,7 @@ SUBROUTINE PROFILER_ADD( TPPROFILER ) IMPLICIT NONE - CLASS(TSTATPROFDATA), INTENT(IN) :: TPPROFILER + CLASS(TPROFILERDATA), INTENT(IN) :: TPPROFILER INTEGER :: JS TYPE(TPROFILERDATA), DIMENSION(:), POINTER :: TZPROFILERS @@ -429,6 +429,7 @@ SUBROUTINE PROFILER_ADD( TPPROFILER ) TZPROFILERS(NUMBPROFILER_LOC)%XYMCOEF = TPPROFILER%XYMCOEF TZPROFILERS(NUMBPROFILER_LOC)%XXUCOEF = TPPROFILER%XXUCOEF TZPROFILERS(NUMBPROFILER_LOC)%XYVCOEF = TPPROFILER%XYVCOEF + TZPROFILERS(NUMBPROFILER_LOC)%CTYPE = TPPROFILER%CTYPE IF ( ASSOCIATED( TPROFILERS ) ) DEALLOCATE( TPROFILERS ) !Can be done without memory leak because allocatable arrays were !not yet allocated (will be done in PROFILER_ALLOCATE) @@ -444,7 +445,7 @@ SUBROUTINE STATION_ADD( TPSTATION ) IMPLICIT NONE - CLASS(TSTATPROFDATA), INTENT(IN) :: TPSTATION + CLASS(TSTATIONDATA), INTENT(IN) :: TPSTATION INTEGER :: JS TYPE(TSTATIONDATA), DIMENSION(:), POINTER :: TZSTATIONS @@ -473,6 +474,7 @@ SUBROUTINE STATION_ADD( TPSTATION ) TZSTATIONS(NUMBSTAT_LOC)%XYMCOEF = TPSTATION%XYMCOEF TZSTATIONS(NUMBSTAT_LOC)%XXUCOEF = TPSTATION%XXUCOEF TZSTATIONS(NUMBSTAT_LOC)%XYVCOEF = TPSTATION%XYVCOEF + TZSTATIONS(NUMBSTAT_LOC)%NK = TPSTATION%NK IF ( ASSOCIATED( TSTATIONS ) ) DEALLOCATE( TSTATIONS ) !Can be done without memory leak because allocatable arrays were !not yet allocated (will be done in STATION_ALLOCATE) -- GitLab