From 95e2e155b78e9eb256f83b5f9708cdff4cdb447d Mon Sep 17 00:00:00 2001
From: Christine Lac <christine.lac@meteo.fr>
Date: Fri, 5 May 2017 17:31:45 +0200
Subject: [PATCH] profilern.f90 : correction on PRT indices

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

diff --git a/src/MNH/profilern.f90 b/src/MNH/profilern.f90
index 64ed6ad1b..2c6bb6108 100644
--- a/src/MNH/profilern.f90
+++ b/src/MNH/profilern.f90
@@ -407,13 +407,13 @@ ZTHV(:,:,:) = PTH(:,:,:) / (1.+WATER_SUM(PR(:,:,:,:)))*(1.+PR(:,:,:,1)/ZRDSRV)
 ZTEMPV(:,:,:)=ZTHV(:,:,:)*(PP(:,:,:)/ XP00) **(XRD/XCPD)
 CALL GPS_ZENITH_GRID(PR(:,:,:,1),ZTEMP,PP,ZZTD,ZZHD,ZZWD)
 ! Kunkel formulation
-IF (SIZE(PR,2) >= 2) THEN
+IF (SIZE(PR,4) >= 2) THEN
   WHERE ( PR(:,:,:,2) /=0 )
     ZVISIKUN(:,:,:) =0.027/(PR(:,:,:,2)*PRHODREF(:,:,:))**0.88
   END WHERE
 END IF
 ! Gultepe formulation
-IF ((SIZE(PR,2) >= 2) .AND. NSV_C2R2END /= 0 ) THEN 
+IF ((SIZE(PR,4) >= 2) .AND. NSV_C2R2END /= 0 ) THEN 
   WHERE ( (PR(:,:,:,2) /=0. ) .AND. (PSV(:,:,:,NSV_C2R2BEG+1) /=0. ) )
     ZVISI(:,:,:) =1.002/(PR(:,:,:,2)*PRHODREF(:,:,:)*PSV(:,:,:,NSV_C2R2BEG+1))**0.6473
   END WHERE
-- 
GitLab