[cig-commits] r19282 - seismo/3D/SPECFEM3D/trunk/utils

carltape at geodynamics.org carltape at geodynamics.org
Wed Dec 7 16:09:48 PST 2011


Author: carltape
Date: 2011-12-07 16:09:48 -0800 (Wed, 07 Dec 2011)
New Revision: 19282

Modified:
   seismo/3D/SPECFEM3D/trunk/utils/locate_partition.f90
Log:
added output file for locate_partition.f90


Modified: seismo/3D/SPECFEM3D/trunk/utils/locate_partition.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/utils/locate_partition.f90	2011-12-07 23:41:24 UTC (rev 19281)
+++ seismo/3D/SPECFEM3D/trunk/utils/locate_partition.f90	2011-12-08 00:09:48 UTC (rev 19282)
@@ -26,13 +26,15 @@
 
 ! utility to locate partition which is closest to given point location
 !
-! compile with:
+! compile with one of these (use your default):
 ! > gfortran -I src/shared -o bin/xlocate_partition utils/locate_partition.f90
-! or
 ! > ifort -assume byterecl -I src/shared -o bin/xlocate_partition utils/locate_partition.f90
+! > pgf90 -I src/shared -o bin/xlocate_partition utils/locate_partition.f90
 !
-! run with:
+! specify a target (x,y) may be in UTM, not lon-lat, then run with:
 ! > ./bin/xlocate_partition 70000.0 11000.0 -3000.0 ./in_out_files/DATABASES_MPI/
+!
+! this will generate the output file in_out_files/DATABASES_MPI/partition_bounds.dat
 
   program locate_partition
 
@@ -85,6 +87,9 @@
   print *,'----------------------------'
   print *
   
+  ! open a text file to list the maximal bounds of each partition
+  open(11,file=trim(LOCAL_PATH)//'partition_bounds.dat',status='unknown')
+
   ! loops over slices (process partitions)
   total_distance = HUGEVAL
   total_partition = -1
@@ -130,6 +135,8 @@
     print*,'  min/max z = ',minval(zstore),maxval(zstore)
     print*
     
+    write(11,'(i10,6e18.6)') iproc,minval(xstore),maxval(xstore),minval(ystore),maxval(ystore),minval(zstore),maxval(zstore)
+
     ! gets distance to target location
     call get_closest_point(target_x,target_y,target_z, &
                          NGLOB_AB,NSPEC_AB,xstore,ystore,zstore,ibool, &
@@ -148,6 +155,8 @@
 
   enddo  ! all slices for points
   
+  close(11)
+
   ! checks
   if (total_partition < 0 ) then
     print*,'Error: partition not found among ',iproc,'partitions searched'



More information about the CIG-COMMITS mailing list