[cig-commits] r18088 - in seismo/2D/SPECFEM2D/trunk: EXAMPLES/Tape2007 src/specfem2D

carltape at geodynamics.org carltape at geodynamics.org
Wed Mar 9 17:30:05 PST 2011


Author: carltape
Date: 2011-03-09 17:30:05 -0800 (Wed, 09 Mar 2011)
New Revision: 18088

Added:
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/wavefield_Tape2007_onerec.pdf
Modified:
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/Par_file_Tape2007_132rec
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/Par_file_Tape2007_onerec
   seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
Log:
testing output_wavefield_snapshot option


Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/Par_file_Tape2007_132rec
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/Par_file_Tape2007_132rec	2011-03-09 23:25:43 UTC (rev 18087)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/Par_file_Tape2007_132rec	2011-03-10 01:30:05 UTC (rev 18088)
@@ -849,7 +849,7 @@
 gnuplot                         = .false.        # generate a GNUPLOT file for the grid
 output_grid                     = .false.        # save the grid in a text file or not
 output_energy                   = .false.        # compute and output acoustic and elastic energy (slows down the code significantly)
-output_wavefield_snapshot       = .false.        # output Ux,Uy,Uz text file for each output time (big files)
+output_wavefield_snapshot       = .true.         # output Ux,Uy,Uz text file for each output time (big files)
 
 # velocity and density models
 nbmodels                        = 1              # nb of different models

Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/Par_file_Tape2007_onerec
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/Par_file_Tape2007_onerec	2011-03-09 23:25:43 UTC (rev 18087)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/Par_file_Tape2007_onerec	2011-03-10 01:30:05 UTC (rev 18088)
@@ -64,7 +64,7 @@
 gnuplot                         = .false.        # generate a GNUPLOT file for the grid
 output_grid                     = .false.        # save the grid in a text file or not
 output_energy                   = .false.        # compute and output acoustic and elastic energy (slows down the code significantly)
-output_wavefield_snapshot       = .false.        # output Ux,Uy,Uz text file for each output time (big files)
+output_wavefield_snapshot       = .true.         # output Ux,Uy,Uz text file for each output time (big files)
 
 # velocity and density models
 nbmodels                        = 1              # nb of different models

Added: seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/wavefield_Tape2007_onerec.pdf
===================================================================
(Binary files differ)


Property changes on: seismo/2D/SPECFEM2D/trunk/EXAMPLES/Tape2007/wavefield_Tape2007_onerec.pdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90	2011-03-09 23:25:43 UTC (rev 18087)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90	2011-03-10 01:30:05 UTC (rev 18088)
@@ -6556,26 +6556,6 @@
 
   endif
 
-!----------------------------------------------
-! write the full (local) wavefield to file as three components (Uy = 0 for PSV; Ux,Uz = 0 for SH)
-
-if (output_wavefield_snapshot) then
-  write(wavefield_file,"('OUTPUT_FILES/wavefield',i7.7,'_',i2.2,'_',i3.3,'.txt')") it,SIMULATION_TYPE,myrank
-  open(unit=27,file=wavefield_file,status='unknown')
-  do ispec = 1,nspec
-     do j = 1,NGLLZ
-        do i = 1,NGLLX
-           iglob = ibool(i,j,ispec)
-           write(27,'(5e16.6)') coord(1,iglob), coord(2,iglob), &
-             vector_field_display(1,iglob), &
-             vector_field_display(2,iglob), &
-             vector_field_display(3,iglob)
-        enddo
-     enddo
-  enddo
-  close(27)
-endif
-
 !
 !----  display color image
 !
@@ -6685,6 +6665,28 @@
 
   endif
 
+!----------------------------------------------
+! write the full (local) wavefield to file as three components (Uy = 0 for PSV; Ux,Uz = 0 for SH)
+! note 1: for SH case, this requires output_color_image = .true. in order to have vector_field_display
+! note 2: for MPI, it would be more convenient to output a single file rather than one for each myrank
+
+if (output_wavefield_snapshot) then
+  write(wavefield_file,"('OUTPUT_FILES/wavefield',i7.7,'_',i2.2,'_',i3.3,'.txt')") it,SIMULATION_TYPE,myrank
+  open(unit=27,file=wavefield_file,status='unknown')
+  do ispec = 1,nspec
+     do j = 1,NGLLZ
+        do i = 1,NGLLX
+           iglob = ibool(i,j,ispec)
+           write(27,'(5e16.6)') coord(1,iglob), coord(2,iglob), &
+             vector_field_display(1,iglob), &
+             vector_field_display(2,iglob), &
+             vector_field_display(3,iglob)
+        enddo
+     enddo
+  enddo
+  close(27)
+endif
+
 !----  save temporary or final seismograms
 ! suppress seismograms if we generate traces of the run for analysis with "ParaVer", because time consuming
   if(.not. GENERATE_PARAVER_TRACES) &
@@ -6695,7 +6697,7 @@
   seismo_offset = seismo_offset + seismo_current
   seismo_current = 0
 
-  endif
+  endif  ! display results for specified time step
 
 #ifdef USE_MPI
 ! add a barrier if we generate traces of the run for analysis with "ParaVer"



More information about the CIG-COMMITS mailing list