Juan 2/10/2015: modif for JPHEXT(JPVEXT) variable in budget box definition
authorJuan Escobar <juan.escobar@aero.obs-mip.fr>
Fri, 2 Oct 2015 15:13:08 +0000 (15:13 +0000)
committerPhilippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Thu, 19 May 2016 14:44:49 +0000 (16:44 +0200)
src/MNH/end_cart_compress.f90
src/MNH/ini_budget.f90
src/MNH/mask_compress.f90
src/MNH/write_diachro.f90

index d7829dc..e5908e8 100644 (file)
@@ -94,6 +94,7 @@ END MODULE MODI_END_CART_COMPRESS
 !!    MODIFICATIONS
 !!    -------------
 !!      Original     4/06/99 
+!!      J.Escobar       02/10/2015 modif for JPHEXT(JPVEXT) variable 
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -159,7 +160,7 @@ ELSE IF (LBU_ICP.AND..NOT.LBU_JCP) THEN ! compress along x direction,
     ZVAR2D(1,NBUSJL:NBUSJH,:)=PVARS(1,:,:)
   ENDIF 
   CALL SUM_DIM1_ll(ZVAR2D,ZWORK2D,IINFO_ll)
-  PCOMPRESS(1,:,:)=ZWORK2D(NBUJL:NBUJH,:)
+  PCOMPRESS(1,:,:)=ZWORK2D(NBUJL+JPHEXT:NBUJH+JPHEXT,:)
   DEALLOCATE(ZVAR2D,ZWORK2D)
 !
 ELSE IF (.NOT.LBU_ICP.AND.LBU_JCP) THEN  ! compress along y direction,
@@ -177,9 +178,9 @@ ELSE IF (.NOT.LBU_ICP.AND.LBU_JCP) THEN  ! compress along y direction,
     ZVAR2D(NBUSIL:NBUSIH,1,:)=PVARS(:,1,:)
   ENDIF
   CALL SUM_DIM1_ll(ZVAR2D,ZWORK2D,IINFO_ll)
-  PCOMPRESS(:,1,:)=ZWORK2D(NBUIL:NBUIH,:)
+  PCOMPRESS(:,1,:)=ZWORK2D(NBUIL+JPHEXT:NBUIH+JPHEXT,:)
   DEALLOCATE(ZVAR2D,ZWORK2D)
 !
 END IF
 !
-END FUNCTION END_CART_COMPRESS                           
\ No newline at end of file
+END FUNCTION END_CART_COMPRESS                           
index 03556cc..eb30c4a 100644 (file)
@@ -151,6 +151,7 @@ END MODULE MODI_INI_BUDGET
 !!                                terms in term 2DFRC search for modif PP . but Not very clean! 
 !!      C .Lac          27/05/14    add negative corrections for chemical species
 !!      C.Lac           29/01/15  Correction for NSV_USER
+!!      J.Escobar       02/10/2015 modif for JPHEXT(JPVEXT) variable  
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -293,7 +294,7 @@ IF (CBUTYPE=='CART') THEN              ! cartesian case only
     NBUJMAX_ll = NBUJH - NBUJL +1
   END IF
 !
-  CALL GET_INTERSECTION_ll(NBUIL,NBUJL,NBUIH,NBUJH, &
+  CALL GET_INTERSECTION_ll(NBUIL+JPHEXT,NBUJL+JPHEXT,NBUIH+JPHEXT,NBUJH+JPHEXT, &
       NBUSIL,NBUSJL,NBUSIH,NBUSJH,"PHYS",IINFO_ll)
   IF ( IINFO_ll /= 1 ) THEN ! 
     IF (LBU_ICP) THEN 
index ae81d4e..b03f274 100644 (file)
@@ -83,6 +83,7 @@ END MODULE MODI_MASK_COMPRESS
 !!                                               sub-domain in x and y directions
 !!                                            permutation of the two dimensions of the
 !!                                            ZCOMP array : first is K, second is mask number
+!!      J.Escobar       02/10/2015 modif for JPHEXT(JPVEXT) variable  
 !----------------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -126,7 +127,7 @@ CALL GET_INDICE_ll(IIB,IJB,IIE,IJE)
 !
 ZVARS=0.
 DO IK=1, NBUKH-NBUKL+1
-  ZVARS(IIB:IIE,IJB:IJE,IK)=PVARS(IIB:IIE, IJB:IJE , IK+NBUKL-1)
+  ZVARS(IIB:IIE,IJB:IJE,IK)=PVARS(IIB:IIE, IJB:IJE , IK+NBUKL+JPVEXT-1)
 END DO
 !
 !-------------------------------------------------------------------------------
index a301f3b..cbcb29e 100644 (file)
@@ -68,6 +68,7 @@
 !!                                            add the initialization of the dimensions of
 !!                                          MASK array in MASK case with write outside the 
 !!                                          routine.
+!!      J.Escobar       02/10/2015 modif for JPHEXT(JPVEXT) variable  
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -439,7 +440,7 @@ DO J = 1,IP
 IF (PRESENT(OICP) .AND. PRESENT(OJCP)) THEN
   IF(HTYPE == 'CART' .AND. .NOT. OICP .AND. .NOT. OJCP) THEN
     CALL FMWRITBOX(HFILEDIA,YRECFM,HLUOUTDIA,'BUDGET',PVAR(:,:,:,:,:,J),KGRID(J), &
-                   YCOMMENT,KIL,KIH,KJL,KJH,IRESPDIA)
+                   YCOMMENT,KIL+JPHEXT,KIH+JPHEXT,KJL+JPHEXT,KJH+JPHEXT,IRESPDIA)
   ELSE
     CALL FMWRIT(HFILEDIA,YRECFM,HLUOUTDIA,'--',PVAR(:,:,:,:,:,J),KGRID(J),   &
                 ILENCH,YCOMMENT,IRESPDIA)