diff --git a/src/MNH/bikhardt.f90 b/src/MNH/bikhardt.f90 index 599f5217602a5b2669fba99f73f2ba61660fec94..a049ec3150b1b192aa8f41ad7d65bbb7a686c069 100644 --- a/src/MNH/bikhardt.f90 +++ b/src/MNH/bikhardt.f90 @@ -171,6 +171,7 @@ END MODULE MODI_BIKHARDT4D !! list to avoid duplication. !! V. Masson and F. Gheusi (10/10/97) bug in cyclic case !! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 +!! J.Escobar : 18/12/2015 : set valide default values in corner in // for NHALO <>1 !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -268,7 +269,8 @@ IF ( HLBCY(1) == 'CYCL' ) THEN END IF !------------------------------------------------------------------------------- ! -PFIELD2 = 0.0 +PFIELD2 = ZFIELD1(1,1,1,1) ! some valide values for missing ones +! SELECT CASE (KGRID) ! !* 2.1 Mass points @@ -286,10 +288,8 @@ SELECT CASE (KGRID) ZBMY3 = PBMY3(JEPSY) ZBMY4 = PBMY4(JEPSY) DO JI = KXOR,KXEND -!!$ IIF = IIB+JEPSX-1 +(JI-KXOR-JPHEXT)*KDXRATIO IIS = IIB+JEPSX-1+KDXRATIO/2+(JI-KXOR-JPHEXT)*KDXRATIO DO JJ = KYOR,KYEND -!!$ IJF = IJB+JEPSY-1 +(JJ-KYOR-JPHEXT)*KDYRATIO IJS = IJB+JEPSY-1+KDYRATIO/2+(JJ-KYOR-JPHEXT)*KDYRATIO ! IF (1 <= IIS .AND. IIS <= IIU .AND. 1 <= IJS .AND. IJS <= IJU) THEN diff --git a/src/MNH/flash_geom_elec.f90 b/src/MNH/flash_geom_elec.f90 index c6d39b48fed9c9e7aad230aed0769718fc915a30..ce170ef9aa4ea07baaedf2768a8c67452876ee83 100644 --- a/src/MNH/flash_geom_elec.f90 +++ b/src/MNH/flash_geom_elec.f90 @@ -81,6 +81,7 @@ END MODULE MODI_FLASH_GEOM_ELEC_n !! J-P Pinty * LA * Nov. 2013 : add flash map storage !! M. Chong * LA * Juin 2010 : add LiNOx !! C. Barthe * LACy * Jan. 2015 : convert trig. pt into lat,lon in ascii file +!! J.Escobar : 18/12/2015 : Correction of bug in bound in // for NHALO <>1 !! !------------------------------------------------------------------------------- ! @@ -308,10 +309,7 @@ CALL MYPROC_ELEC_ll(IPROC) !* 1.1 subdomains indexes ! ! beginning and end indexes of the physical subdomain -IIB = 1 + JPHEXT -IIE = SIZE(PRT,1) - JPHEXT -IJB = 1 + JPHEXT -IJE = SIZE(PRT,2) - JPHEXT +CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) IKB = 1 + JPVEXT IKE = SIZE(PRT,3) - JPVEXT IKU = SIZE(PRT,3) diff --git a/src/MNH/ini_one_wayn.f90 b/src/MNH/ini_one_wayn.f90 index d1a3f7ca4752d04b34f44a4c3b6c8545976b8a54..6db1416cb0fd1a8bd059270fae79a3a57a617c9a 100644 --- a/src/MNH/ini_one_wayn.f90 +++ b/src/MNH/ini_one_wayn.f90 @@ -141,6 +141,7 @@ SUBROUTINE INI_ONE_WAY_n(KDAD,HLUOUT,PTSTEP,KMI,KTCOUNT, & !! 07/2010 idem for ice phase chemical species !! Bosseur & Filippi 07/2013 Adds Forefire !! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 +!! J.Escobar : 18/12/2015 : Correction of bug in bound in // for NHALO <>1 !! !------------------------------------------------------------------------------ ! @@ -212,7 +213,7 @@ REAL, DIMENSION(:,:,:,:),INTENT(OUT) :: PLBXSVM ,PLBYSVM ! in x and y-dir. ! !* 0.2 declarations of local variables ! -INTEGER :: IIB,IIE,IJB,IJE +INTEGER :: IIB,IIE,IJB,IJE,IIU,IJU INTEGER :: ILBX,ILBY,ILBX2,ILBY2 REAL, DIMENSION(:,:,:), ALLOCATABLE :: ZWORK LOGICAL :: GVERT_INTERP @@ -239,11 +240,13 @@ REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: ZCHEMMI ! chemical ice phase concentra ! CALL GOTO_MODEL(KDAD) ! -CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) -IIB=IIB-JPHEXT -IIE=IIE+JPHEXT -IJB=IJB-JPHEXT -IJE=IJE+JPHEXT +!!$CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) +CALL GET_DIM_EXT_ll ('B',IIU,IJU) +IIB=1 +IIE=IIU +IJB=1 +IJE=IJU + ALLOCATE(ZWORK(IIB:IIE,IJB:IJE,SIZE(PLBXTHM,3))) ! can be smaller than child extended subdomain ! LS_FORCING routine can not correctly manage extra halo zone ! LB will be filled only with one layer halo zone for the moment diff --git a/src/MNH/ini_spawn_lsn.f90 b/src/MNH/ini_spawn_lsn.f90 index f2a63d23ed30db56a08b1dbcabba0fa7d1acbe28..8c580978621c68922036a3f52244a5b3f40c280f 100644 --- a/src/MNH/ini_spawn_lsn.f90 +++ b/src/MNH/ini_spawn_lsn.f90 @@ -139,6 +139,7 @@ END MODULE MODI_INI_SPAWN_LS_n !! 09/07/98 ( J. Stein ) bug in the storage of the interp !! coeff for U !! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 +!! J.Escobar : 18/12/2015 : Correction of bug in bound in // for NHALO <>1 !------------------------------------------------------------------------------ ! !* 0. DECLARATIONS @@ -209,7 +210,7 @@ INTEGER :: JI ! Loop index INTEGER, DIMENSION(SIZE(PZZ,1),SIZE(PZZ,2),SIZE(PCOEFLIN_LBXM,3)) :: IKLIN REAL , DIMENSION(SIZE(PZZ,1),SIZE(PZZ,2),SIZE(PCOEFLIN_LBXM,3)) :: ZCOEFLIN INTEGER :: ILBX,ILBY,ILBX2,ILBY2 -INTEGER :: IIB,IJB,IIE,IJE,IKU +INTEGER :: IIB,IJB,IIE,IJE,IIU,IJU,IKU REAL , DIMENSION(SIZE(PZZ,1),SIZE(PZZ,2),1) :: ZZSLS REAL , DIMENSION(SIZE(PZZ,1),SIZE(PZZ,2),1) :: ZZSMTLS REAL , DIMENSION(SIZE(PZZ,1),SIZE(PZZ,2),SIZE(PCOEFLIN_LBXM,3)) :: ZZSS @@ -237,11 +238,12 @@ REAL, DIMENSION(:,:,:), ALLOCATABLE :: ZTZSMT,ZZSMT ! CALL GOTO_MODEL(KDAD) ! -CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) -IIB=IIB-JPHEXT -IIE=IIE+JPHEXT -IJB=IJB-JPHEXT -IJE=IJE+JPHEXT +!!$CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) +CALL GET_DIM_EXT_ll ('B',IIU,IJU) +IIB=1 +IIE=IIU +IJB=1 +IJE=IJU ! !* 1 GATHER LS FIELD FOR THE CHILD MODEL KMI ! diff --git a/src/MNH/ion_attach_elec.f90 b/src/MNH/ion_attach_elec.f90 index 33963eb14b35e7ba0154e0bacbdc42bff88a26c6..90a6f300ec32d36d3ac48752d48f6deebcff4eed 100644 --- a/src/MNH/ion_attach_elec.f90 +++ b/src/MNH/ion_attach_elec.f90 @@ -74,6 +74,7 @@ END MODULE MODI_ION_ATTACH_ELEC !! ------------- !! Original 2010 !! Modifications: +!! J.Escobar : 18/12/2015 : Correction of bug in bound in // for NHALO <>1 !! !------------------------------------------------------------------------------- ! @@ -149,10 +150,7 @@ REAL :: ZCOMB ! Recombination ZCQD = 4 * XPI * XEPSILON * XBOLTZ / XECHARGE ZCDIF = XBOLTZ /XECHARGE ! -IIB = 1 + JPHEXT -IIE = SIZE(PTHT,1) - JPHEXT -IJB = 1 + JPHEXT -IJE = SIZE(PTHT,2) - JPHEXT +CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) IKB = 1 + JPVEXT IKE = SIZE(PTHT,3) - JPVEXT ! diff --git a/src/MNH/one_wayn.f90 b/src/MNH/one_wayn.f90 index 38f722963c258188d4641c65a9e5427f28691cb8..90ee35c4ab6399e7afb9d6fb658a39583651c161 100644 --- a/src/MNH/one_wayn.f90 +++ b/src/MNH/one_wayn.f90 @@ -189,6 +189,7 @@ SUBROUTINE ONE_WAY_n(KDAD,HLUOUT,PTSTEP,KMI,KTCOUNT, & !! 07/2010 idem for ice phase chemical species !! Bosseur & Filippi 07/2013 Adds Forefire !! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 +!! J.Escobar : 18/12/2015 : Correction of bug in bound in // for NHALO <>1 !------------------------------------------------------------------------------ ! !* 0. DECLARATIONS @@ -270,7 +271,7 @@ REAL, DIMENSION(:,:,:,:),INTENT(OUT) :: PLBXSVS ,PLBYSVS ! in x and y-dir. !* 0.2 declarations of local variables ! REAL :: ZTIME ! Interpolation length -INTEGER :: IIB,IIE,IJB,IJE +INTEGER :: IIB,IIE,IJB,IJE,IIU,IJU INTEGER :: ILBX,ILBY,ILBX2,ILBY2 REAL :: ZBIGTSTEP ! time step of the dad model ($n) REAL :: ZRV_O_RD ! = Rv / Rd @@ -306,11 +307,13 @@ CALL GOTO_MODEL(KDAD) ALLOCATE(ZJ(SIZE(XRHODJ,1),SIZE(XRHODJ,2),SIZE(XRHODJ,3))) ALLOCATE(ZRHOD(SIZE(XRHODJ,1),SIZE(XRHODJ,2),SIZE(XRHODJ,3))) ! -CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) -IIB=IIB-JPHEXT -IIE=IIE+JPHEXT -IJB=IJB-JPHEXT -IJE=IJE+JPHEXT +!!$CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) +CALL GET_DIM_EXT_ll ('B',IIU,IJU) +IIB=1 +IIE=IIU +IJB=1 +IJE=IJU + ALLOCATE(ZWORK(IIB:IIE,IJB:IJE,SIZE(PLBXTHM,3))) ! can be smaller than child extended subdomain ! LS_FORCING routine can not correctly manage extra halo zone ! LB will be filled only with one layer halo zone for the moment diff --git a/src/MNH/spawn_lsn.f90 b/src/MNH/spawn_lsn.f90 index 86c686a5d105a014f24252fe03a2e12e4b0129c8..74f43ed3e08b907f5d8a4b778f63f4b72249cd79 100644 --- a/src/MNH/spawn_lsn.f90 +++ b/src/MNH/spawn_lsn.f90 @@ -124,6 +124,7 @@ END MODULE MODI_SPAWN_LS_n !! ------------- !! Original 22/12/97 !! P. Jabouille 19/04/00 parallelisation +!! J.Escobar : 18/12/2015 : Correction of bug in bound in // for NHALO <>1 !! !------------------------------------------------------------------------------ ! @@ -180,7 +181,7 @@ REAL, DIMENSION(:,:,:), INTENT(OUT) :: PLSUS,PLSVS,PLSWS ! Large Scale source !* 0.2 declarations of local variables ! REAL :: ZTIME ! Interpolation length -INTEGER :: IIB,IJB,IIE,IJE,IKU +INTEGER :: IIB,IJB,IIE,IJE,IIU,IJU,IKU LOGICAL :: GVERT_INTERP INTEGER, DIMENSION(SIZE(PZZ,1),SIZE(PZZ,2),SIZE(PCOEFLIN_LBXM,3)) :: IKLIN REAL , DIMENSION(SIZE(PZZ,1),SIZE(PZZ,2),SIZE(PCOEFLIN_LBXM,3)) :: ZCOEFLIN @@ -210,11 +211,12 @@ REAL, DIMENSION(:,:,:), ALLOCATABLE :: Z1,Z2,Z3,Z4,Z5 ! CALL GOTO_MODEL(KDAD) ! -CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) -IIB=IIB-1 -IIE=IIE+1 -IJB=IJB-1 -IJE=IJE+1 +!!$CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) +CALL GET_DIM_EXT_ll ('B',IIU,IJU) +IIB=1 +IIE=IIU +IJB=1 +IJE=IJU ! !* 1 GATHER LS FIELD FOR THE CHILD MODEL KMI !