[cig-commits] r20390 - seismo/3D/SPECFEM3D/trunk/src/shared

danielpeter at geodynamics.org danielpeter at geodynamics.org
Tue Jun 19 15:16:09 PDT 2012


Author: danielpeter
Date: 2012-06-19 15:16:08 -0700 (Tue, 19 Jun 2012)
New Revision: 20390

Modified:
   seismo/3D/SPECFEM3D/trunk/src/shared/smooth_vol_data.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/sum_kernels.f90
Log:
updates sum_kernels and smooth_vol_data routines

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/smooth_vol_data.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/smooth_vol_data.f90	2012-06-19 22:14:47 UTC (rev 20389)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/smooth_vol_data.f90	2012-06-19 22:16:08 UTC (rev 20390)
@@ -182,8 +182,8 @@
   sigma_v2 = 2.0 * sigma_v ** 2
 
   ! checks
-  if( sigma_h2 < 1.e-30 ) stop 'error sigma_h2 zero, must non-zero'
-  if( sigma_v2 < 1.e-30 ) stop 'error sigma_v2 zero, must non-zero'
+  if( sigma_h2 < 1.e-18 ) stop 'error sigma_h2 zero, must non-zero'
+  if( sigma_v2 < 1.e-18 ) stop 'error sigma_v2 zero, must non-zero'
 
   ! adds margin to search radius
   element_size = max(sigma_h,sigma_v) * 0.5
@@ -376,30 +376,34 @@
 
   ! absorbing boundary surface
   read(27) idummy_a ! num_abs_boundary_faces
-  allocate(idummy(idummy_a), &
-          idummy_3(3,NGLLSQUARE,idummy_a), &
-          dummy_2(NGLLSQUARE,idummy_a), &
-          dummy_3(NDIM,NGLLSQUARE,idummy_a),stat=ier)
-  if( ier /= 0 ) stop 'error allocating array idummy etc.'
-  read(27) idummy ! abs_boundary_ispec
-  read(27) idummy_3 ! abs_boundary_ijk
-  read(27) dummy_2 ! abs_boundary_jacobian2Dw
-  read(27) dummy_3 ! abs_boundary_normal
-  deallocate( idummy,idummy_3,dummy_2,dummy_3)
-
+  if( idummy_a > 0 ) then
+    allocate(idummy(idummy_a), &
+            idummy_3(3,NGLLSQUARE,idummy_a), &
+            dummy_2(NGLLSQUARE,idummy_a), &
+            dummy_3(NDIM,NGLLSQUARE,idummy_a),stat=ier)
+    if( ier /= 0 ) stop 'error allocating array idummy etc.'
+    read(27) idummy ! abs_boundary_ispec
+    read(27) idummy_3 ! abs_boundary_ijk
+    read(27) dummy_2 ! abs_boundary_jacobian2Dw
+    read(27) dummy_3 ! abs_boundary_normal
+    deallocate( idummy,idummy_3,dummy_2,dummy_3)
+  endif
+  
   ! free surface
   read(27) idummy_a ! num_free_surface_faces
-  allocate(idummy(idummy_a), &
-          idummy_3(3,NGLLSQUARE,idummy_a), &
-          dummy_2(NGLLSQUARE,idummy_a), &
-          dummy_3(NDIM,NGLLSQUARE,idummy_a),stat=ier)
-  if( ier /= 0 ) stop 'error allocating array idummy etc.'
-  read(27) idummy   ! free_surface_ispec
-  read(27) idummy_3 ! free_surface_ijk
-  read(27) dummy_2  ! free_surface_jacobian2Dw
-  read(27) dummy_3  ! free_surface_normal
-  deallocate( idummy,idummy_3,dummy_2,dummy_3)
-
+  if( idummy_a > 0 ) then
+    allocate(idummy(idummy_a), &
+            idummy_3(3,NGLLSQUARE,idummy_a), &
+            dummy_2(NGLLSQUARE,idummy_a), &
+            dummy_3(NDIM,NGLLSQUARE,idummy_a),stat=ier)
+    if( ier /= 0 ) stop 'error allocating array idummy etc.'
+    read(27) idummy   ! free_surface_ispec
+    read(27) idummy_3 ! free_surface_ijk
+    read(27) dummy_2  ! free_surface_jacobian2Dw
+    read(27) dummy_3  ! free_surface_normal
+    deallocate( idummy,idummy_3,dummy_2,dummy_3)
+  endif
+  
   ! acoustic-elastic coupling surface
   read(27) idummy_a ! num_coupling_ac_el_faces
   if( idummy_a > 0 ) then

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/sum_kernels.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/sum_kernels.f90	2012-06-19 22:14:47 UTC (rev 20389)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/sum_kernels.f90	2012-06-19 22:16:08 UTC (rev 20390)
@@ -49,7 +49,7 @@
   integer, parameter :: MAX_NUM_NODES = 1000
 
   ! default list name
-  character(len=150),parameter :: kernel_file_list = 'kernels_list.txt'
+  character(len=150),parameter :: kernel_file_list = '../kernels_list.txt'
 
   ! mesh size
   integer :: NSPEC_AB, NGLOB_AB



More information about the CIG-COMMITS mailing list