Juan 21/09/2015: for JPHEXT<> 1 missing correction (due to upgrad to 52 ) on LB...
authorJuan Escobar <juan.escobar@aero.obs-mip.fr>
Mon, 21 Sep 2015 14:20:00 +0000 (14:20 +0000)
committerPhilippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Thu, 19 May 2016 14:44:49 +0000 (16:44 +0200)
src/LIB/SURCOUCHE/src/fmread_ll.f90

index dcac539..05945de 100644 (file)
@@ -1845,13 +1845,13 @@ IF (ASSOCIATED(TZFD)) THEN
       ALLOCATE(Z3D(KL3D,SIZE(PLB,2),SIZE(PLB,3)))
       Z3D = 0.0
       IF (LPACK .AND. L2D) THEN
-        TX3DP=>Z3D(:,2:2,:)
+        TX3DP=>Z3D(:,JPHEXT+1:JPHEXT+1,:)
         IF (ASSOCIATED(TZFD%CDF)) THEN
            CALL NCREAD(TZFD%CDF%NCID,HRECFM,TX3DP,TZFMH,IRESP)
         ELSE
            CALL FM_READ_ll(TZFD%FLU,HRECFM,.TRUE.,SIZE(TX3DP),TX3DP,TZFMH,IRESP)
         END IF
-        Z3D(:,:,:) = SPREAD(Z3D(:,2,:),DIM=2,NCOPIES=3)
+        Z3D(:,:,:) = SPREAD(Z3D(:,JPHEXT+1,:),DIM=2,NCOPIES=2*JPHEXT+1)
       ELSE
          IF (ASSOCIATED(TZFD%CDF)) THEN
             CALL NCREAD(TZFD%CDF%NCID,HRECFM,Z3D,TZFMH,IRESP)
@@ -1869,8 +1869,8 @@ IF (ASSOCIATED(TZFD)) THEN
       ELSE
          CALL FM_READ_ll(TZFD%FLU,HRECFM,.TRUE.,SIZE(Z3D),Z3D,TZFMH,IRESP)
       END IF
-         PLB(:,1:KRIM+1,:)          = Z3D(:,1:KRIM+1,:)
-      PLB(:,KRIM+2:2*(KRIM+1),:) = Z3D(:,KL3D-KRIM:KL3D,:)
+      PLB(:,1:KRIM+JPHEXT,:)          = Z3D(:,1:KRIM+JPHEXT,:)
+      PLB(:,KRIM+JPHEXT+1:2*(KRIM+JPHEXT),:) = Z3D(:,KL3D-KRIM-JPHEXT+1:KL3D,:)
     END IF
     IF (IRESP /= 0) GOTO 1000
   ELSE                 ! multiprocessor execution
@@ -1881,13 +1881,13 @@ IF (ASSOCIATED(TZFD)) THEN
         ALLOCATE(Z3D(KL3D,IJMAX_ll+2*JPHEXT,SIZE(PLB,3)))
         Z3D = 0.0
         IF (LPACK .AND. L2D) THEN
-          TX3DP=>Z3D(:,2:2,:)
+          TX3DP=>Z3D(:,JPHEXT+1:JPHEXT+1,:)
           IF (ASSOCIATED(TZFD%CDF)) THEN
              CALL NCREAD(TZFD%CDF%NCID,HRECFM,TX3DP,TZFMH,IRESP)
           ELSE
              CALL FM_READ_ll(TZFD%FLU,HRECFM,.TRUE.,SIZE(TX3DP),TX3DP,TZFMH,IRESP)
           END IF
-          Z3D(:,:,:) = SPREAD(Z3D(:,2,:),DIM=2,NCOPIES=3)
+          Z3D(:,:,:) = SPREAD(Z3D(:,JPHEXT+1,:),DIM=2,NCOPIES=2*JPHEXT+1)
         ELSE
            IF (ASSOCIATED(TZFD%CDF)) THEN
               CALL NCREAD(TZFD%CDF%NCID,HRECFM,Z3D,TZFMH,IRESP)