Juan 19/01/2016 : correction bornes series sans JPHEXT ni JPVEXT
authorGaelle Tanguy <gaelle.tanguy@meteo.fr>
Tue, 19 Jan 2016 13:03:51 +0000 (13:03 +0000)
committerPhilippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Thu, 19 May 2016 14:44:49 +0000 (16:44 +0200)
src/MNH/default_desfmn.f90
src/MNH/ini_seriesn.f90
src/MNH/seriesn.f90

index ec5d84a..2076ca1 100644 (file)
@@ -1083,18 +1083,18 @@ IF (KMI == 1) THEN
   LSURF        = .FALSE.
 ENDIF
 !
-NIBOXL = 1 + JPHEXT
-NIBOXH = 1 + 2*JPHEXT
-NJBOXL = 1 + JPHEXT
-NJBOXH = 1 + 2*JPHEXT
-NKCLS  = 1 + JPVEXT
-NKLOW  = 1 + JPVEXT
-NKMID  = 1 + JPVEXT
-NKUP   = 1 + JPVEXT
-NKCLA  = 1 + JPVEXT
+NIBOXL = 1 !+ JPHEXT
+NIBOXH = 1 !+ 2*JPHEXT
+NJBOXL = 1 !+ JPHEXT
+NJBOXH = 1 !+ 2*JPHEXT
+NKCLS  = 1 !+ JPVEXT
+NKLOW  = 1 !+ JPVEXT
+NKMID  = 1 !+ JPVEXT
+NKUP   = 1 !+ JPVEXT
+NKCLA  = 1 !+ JPVEXT
 NBJSLICE = 1
-NJSLICEL(:) = 1 + JPHEXT
-NJSLICEH(:) = 1 + 2*JPHEXT
+NJSLICEL(:) = 1 !+ JPHEXT
+NJSLICEH(:) = 1 !+ 2*JPHEXT
 NFREQSERIES  = INT(XSEGLEN /(100.*XTSTEP) )
 NFREQSERIES  = MAX(NFREQSERIES,1)
 !
index a867fba..964e7c6 100644 (file)
@@ -103,10 +103,10 @@ CALL GET_INDICE_ll (IIB,IJB,IIE,IJE)
 IKE = NKMAX + JPVEXT
 CALL GET_DIM_EXT_ll ('B', IIU,IJU)
 CALL GET_GLOBALDIMS_ll (IIMAX_ll,IJMAX_ll)
-IIB_ll = 1 + JPHEXT
-IJB_ll = 1 + JPHEXT
-IIE_ll = IIMAX_ll + JPHEXT
-IJE_ll = IJMAX_ll + JPHEXT
+IIB_ll = 1 + JPHEXT
+IJB_ll = 1 + JPHEXT
+IIE_ll = IIMAX_ll + JPHEXT
+IJE_ll = IJMAX_ll + JPHEXT
 !
 CALL FMLOOK_ll(CLUOUT,CLUOUT,ILUOUT,IRESP)
 !
@@ -151,7 +151,7 @@ END IF
 !
 ALLOCATE(LINBOX(IIU,IJU))
 LINBOX(:,:)=.FALSE.
-CALL GET_INTERSECTION_ll(NIBOXL,NJBOXL,NIBOXH,NJBOXH, &
+CALL GET_INTERSECTION_ll(NIBOXL+JPHEXT,NJBOXL+JPHEXT,NIBOXH+JPHEXT,NJBOXH+JPHEXT, &
      NIBOXSL,NJBOXSL,NIBOXSH,NJBOXSH,"PHYS",IINFO_ll)
 IF  ( IINFO_ll /= 1 ) THEN !
   DO JI=IIB,IIE
@@ -172,7 +172,7 @@ IIDIM1=0
 IF (NBJSLICE > 0 ) THEN
   ALLOCATE(LSERIES3(NBJSLICE))
   DO JJ=1,NBJSLICE
-    CALL GET_INTERSECTION_ll(IIB_ll,NJSLICEL(JJ),IIE_ll,NJSLICEH(JJ), &
+    CALL GET_INTERSECTION_ll(IIB_ll+JPHEXT,NJSLICEL(JJ)+JPHEXT,IIE_ll+JPHEXT,NJSLICEH(JJ)+JPHEXT, &
     NISL(JJ),NJSLICESL(JJ),NISH(JJ),NJSLICESH(JJ),"PHYS",IINFO_ll)
     IF  ( IINFO_ll /= 1 ) THEN !
       LSERIES3(JJ)=.TRUE.
index 86f0376..0443824 100644 (file)
@@ -656,22 +656,22 @@ IF (NBJSLICE > 0 ) THEN
 !
       ISB3=ISB3+1
       XSSERIES3(1:IIDIM1,1,1,NSCOUNTD,1,ISB3)=                         &
-                          SUM( XUT (IISL:IISH,IJSL:IJSH,NKCLS),  DIM=2 )
+                          SUM( XUT (IISL:IISH,IJSL:IJSH,NKCLS+JPVEXT),  DIM=2 )
 !
 !*      4.2  W at level KCLA
 !
       ISB3=ISB3+1
       XSSERIES3(1:IIDIM1,1,1,NSCOUNTD,1,ISB3)=                         &
-                          SUM( XWT (IISL:IISH,IJSL:IJSH,NKCLA),  DIM=2 )
+                          SUM( XWT (IISL:IISH,IJSL:IJSH,NKCLA+JPVEXT),  DIM=2 )
 !
 !*      4.3  Mean W between KLOW and KUP
 !
       ISB3=ISB3+1
       ZDIA (:,:)=0.
-      DO JK=NKLOW,NKUP
+      DO JK=NKLOW+JPVEXT,NKUP+JPVEXT
         ZDIA(:,:)= XWT(:,:,JK)*(XZZ(:,:,JK+1)-XZZ(:,:,JK)) + ZDIA(:,:)
       END DO
-      ZDIA(:,:)= ZDIA(:,:)/(XZZ(:,:,NKUP+1)-XZZ(:,:,NKLOW))
+      ZDIA(:,:)= ZDIA(:,:)/(XZZ(:,:,NKUP+JPVEXT+1)-XZZ(:,:,NKLOW+JPVEXT))
       XSSERIES3(1:IIDIM1,1,1,NSCOUNTD,1,ISB3)=                         &
                               SUM( ZDIA (IISL:IISH,IJSL:IJSH) , DIM=2 )
 !
@@ -681,13 +681,13 @@ IF (NBJSLICE > 0 ) THEN
 !
         ISB3=ISB3+1
         XSSERIES3(1:IIDIM1,1,1,NSCOUNTD,1,ISB3)=                       &
-                          SUM( XRT (IISL:IISH,IJSL:IJSH,NKCLS,1),DIM=2 )
+                          SUM( XRT (IISL:IISH,IJSL:IJSH,NKCLS+JPVEXT,1),DIM=2 )
 !
 !*      4.5  Rv at level KMID
 !
         ISB3=ISB3+1
         XSSERIES3(1:IIDIM1,1,1,NSCOUNTD,1,ISB3)=                       &
-                          SUM( XRT (IISL:IISH,IJSL:IJSH,NKMID,1),DIM=2 )
+                          SUM( XRT (IISL:IISH,IJSL:IJSH,NKMID+JPVEXT,1),DIM=2 )
 !
       END IF
 !
@@ -696,10 +696,10 @@ IF (NBJSLICE > 0 ) THEN
       IF (LUSERC) THEN
         ISB3=ISB3+1
         ZDIA (:,:)=0.
-        DO JK=IKB,NKUP
+        DO JK=IKB,NKUP+JPVEXT
           ZDIA(:,:)= XRT(:,:,JK,2)*(XZZ(:,:,JK+1)-XZZ(:,:,JK)) + ZDIA(:,:)
         END DO
-        ZDIA(:,:)= ZDIA(:,:)/(XZZ(:,:,NKUP+1)-XZZ(:,:,IKB))
+        ZDIA(:,:)= ZDIA(:,:)/(XZZ(:,:,NKUP+JPVEXT+1)-XZZ(:,:,IKB))
         XSSERIES3(1:IIDIM1,1,1,NSCOUNTD,1,ISB3)=                     &
                              SUM( ZDIA (IISL:IISH,IJSL:IJSH) , DIM=2 )
       END IF
@@ -709,7 +709,7 @@ IF (NBJSLICE > 0 ) THEN
       IF (LUSERR) THEN
         ISB3=ISB3+1
         XSSERIES3(1:IIDIM1,1,1,NSCOUNTD,1,ISB3)=                       &
-                         SUM( XRT(IISL:IISH,IJSL:IJSH,NKCLS,3) , DIM=2 )
+                         SUM( XRT(IISL:IISH,IJSL:IJSH,NKCLS+JPVEXT,3) , DIM=2 )
       END IF
     END IF
   END DO