From 648e28cff18599c2795fa7e721e58ba6ce88b340 Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Wed, 13 Sep 2023 13:41:06 +0200
Subject: [PATCH] Philippe 13/09/2023: profilers: do computation only if
 profiler is locally present

---
 src/MNH/profilern.f90 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/MNH/profilern.f90 b/src/MNH/profilern.f90
index 425ddf294..f95533090 100644
--- a/src/MNH/profilern.f90
+++ b/src/MNH/profilern.f90
@@ -212,6 +212,8 @@ IF ( .NOT. TPROFILERS_TIME%STORESTEP_CHECK_AND_SET( IN ) ) RETURN !No profiler s
 !*      8.   DATA RECORDING
 !            --------------
 !
+IF ( NUMBPROFILER_LOC == 0 ) RETURN ! No profiler on this process
+
 ZTEMP(:,:,:)=PTH(:,:,:)*(PP(:,:,:)/ XP00) **(XRD/XCPD)
 ! Theta_v
 ZTHV(:,:,:) = PTH(:,:,:) / (1.+WATER_SUM(PR(:,:,:,:)))*(1.+PR(:,:,:,1)/ZRDSRV)
-- 
GitLab