@@ -825,7 +825,7 @@ contains
825825 real (wp) :: charvol, charpres, charvol2, charpres2
826826 integer , dimension (3 ) :: cellaux
827827 integer :: i, j, k
828- integer :: mapCells_pinf, smearGrid, smearGridz
828+ integer :: smearGrid, smearGrid_zDir
829829 logical :: celloutside
830830
831831 scoord = mtn_s(bub_id, 1 :3 , 2 )
@@ -912,16 +912,10 @@ contains
912912
913913 else if (lag_params%cluster_type >= 2 ) then
914914 ! Bubble dynamic closure from Maeda and Colonius (2018 )
915- if (lag_params%smooth_type == 1 ) then
916- mapCells_pinf = mapCells
917- else
918- mapCells_pinf = 0
919- end if
920-
921915 ! Include the cell that contains the bubble (mapCells+1 + mapCells)
922- smearGrid = mapCells_pinf - ( - mapCells_pinf) + 1
923- smearGridz = smearGrid
924- if (p == 0 ) smearGridz = 1
916+ smearGrid = 2 * mapCells + 1
917+ smearGrid_zDir = smearGrid
918+ if (p == 0 ) smearGrid_zDir = 1
925919
926920 charvol = 0._wp
927921 charpres = 0._wp
@@ -934,7 +928,7 @@ contains
934928 !$acc loop seq
935929 do j = 1 , smearGrid
936930 !$acc loop seq
937- do k = 1 , smearGridz
931+ do k = 1 , smearGrid_zDir
938932 cellaux(1 ) = cell(1 ) + i - (mapCells + 1 )
939933 cellaux(2 ) = cell(2 ) + j - (mapCells + 1 )
940934 cellaux(3 ) = cell(3 ) + k - (mapCells + 1 )
0 commit comments