@@ -45,8 +45,8 @@ module create_meshfem_par
4545
4646 ! flag indicating whether point is in the sediments
4747 ! logical point_is_in_sediments
48- logical , dimension (:,:,:,:), allocatable :: flag_sediments
49- logical , dimension (:), allocatable :: not_fully_in_bedrock
48+ ! logical, dimension(:,:,:,:), allocatable :: flag_sediments - not used yet..
49+ ! logical, dimension(:), allocatable :: not_fully_in_bedrock
5050
5151 ! boundary parameters locator
5252 integer , dimension (:), allocatable :: ibelm_xmin,ibelm_xmax,ibelm_ymin,ibelm_ymax,ibelm_bottom,ibelm_top
@@ -146,7 +146,7 @@ subroutine create_meshfem_mesh()
146146 nspec,nglob, &
147147 prname,nodes_coords,ibool,ispec_material_id)
148148
149- ! ! setting up wavefield discontinuity interface
149+ ! setting up wavefield discontinuity interface
150150 if (IS_WAVEFIELD_DISCONTINUITY) then
151151 call find_wavefield_discontinuity_elements()
152152 endif
@@ -248,23 +248,27 @@ subroutine cmm_allocate_arrays()
248248 ! use dynamic allocation to allocate memory for arrays
249249 allocate (ibool(NGLLX_M,NGLLY_M,NGLLZ_M,nspec),stat= ier)
250250 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1257' )
251+ ibool(:,:,:,:) = 0
251252
252253 allocate (xstore(NGLLX_M,NGLLY_M,NGLLZ_M,nspec),stat= ier)
253254 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1258' )
254255 allocate (ystore(NGLLX_M,NGLLY_M,NGLLZ_M,nspec),stat= ier)
255256 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1259' )
256257 allocate (zstore(NGLLX_M,NGLLY_M,NGLLZ_M,nspec),stat= ier)
257258 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1260' )
259+ xstore(:,:,:,:) = 0.d0 ; ystore(:,:,:,:) = 0.d0 ; zstore(:,:,:,:) = 0.d0
258260
259261 ! flag indicating whether point is in the sediments
260- allocate (flag_sediments(NGLLX_M,NGLLY_M,NGLLZ_M,nspec),stat= ier)
261- if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1261' )
262- allocate (not_fully_in_bedrock(nspec),stat= ier)
263- if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1262' )
262+ ! allocate(flag_sediments(NGLLX_M,NGLLY_M,NGLLZ_M,nspec),stat=ier)
263+ ! if (ier /= 0) call exit_MPI(myrank,'error allocating array 1261')
264+ ! allocate(not_fully_in_bedrock(nspec),stat=ier)
265+ ! if (ier /= 0) call exit_MPI(myrank,'error allocating array 1262')
266+ ! flag_sediments(:,:,:,:) = .false.; not_fully_in_bedrock(:) = .false.
264267
265268 ! boundary locator
266269 allocate (iboun(6 ,nspec),stat= ier)
267270 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1263' )
271+ iboun(:,:) = .false.
268272
269273 ! boundary parameters locator
270274 allocate (ibelm_xmin(NSPEC2DMAX_XMIN_XMAX),stat= ier)
@@ -279,15 +283,19 @@ subroutine cmm_allocate_arrays()
279283 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1268' )
280284 allocate (ibelm_top(NSPEC2D_TOP),stat= ier)
281285 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1269' )
286+ ibelm_xmin(:) = 0 ; ibelm_xmax(:) = 0 ; ibelm_ymin(:) = 0 ; ibelm_ymax(:) = 0
287+ ibelm_bottom(:) = 0 ; ibelm_top(:) = 0
282288
283289 ! MPI cut-planes parameters along xi and along eta
284290 allocate (iMPIcut_xi(2 ,nspec),stat= ier)
285291 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1270' )
286292 allocate (iMPIcut_eta(2 ,nspec),stat= ier)
287293 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1271' )
294+ iMPIcut_xi(:,:) = .false. ; iMPIcut_eta(:,:) = .false.
288295
289296 allocate (ispec_material_id(nspec),stat= ier)
290297 if (ier /= 0 ) call exit_MPI(myrank,' error allocating array 1279' )
298+ ispec_material_id(:) = 0
291299
292300 ! synchronize
293301 call synchronize_all()
0 commit comments