[cig-commits] r22324 - in seismo/3D/SPECFEM3D_GLOBE/branches/undo_att: . setup src/compute_optimized_dumping_undo_att src/shared src/specfem3D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sun Jun 16 09:24:29 PDT 2013


Author: dkomati1
Date: 2013-06-16 09:24:28 -0700 (Sun, 16 Jun 2013)
New Revision: 22324

Modified:
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part1_classical.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part1_undo_att.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/setup/constants.h.in
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/compute_optimized_dumping_undo_att.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/read_compute_parameters.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/save_header_file.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/check_simulation_stability.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/initialize_simulation.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/specfem3D.F90
Log:
replaced UNDO_ATT with UNDO_ATTENUATION


Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part1_classical.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part1_classical.f90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part1_classical.f90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -464,8 +464,8 @@
                                 hdur,xi_source,eta_source,gamma_source,nu_source)
 
     ! add adjoint sources only if adjoint simulation is performed for source inversion only
-!! DK DK UNDO_ATT this must remain here even when SIMULATION_TYPE == 3 because it applies to array
-!! DK DK UNDO_ATT accel_crust_mantle rather than b_accel_crust_mantle
+!! DK DK UNDO_ATTENUATION this must remain here even when SIMULATION_TYPE == 3 because it applies to array
+!! DK DK UNDO_ATTENUATION accel_crust_mantle rather than b_accel_crust_mantle
     if (SIMULATION_TYPE == 2 .or. SIMULATION_TYPE == 3) then
       if( nadj_rec_local > 0 ) &
         call compute_add_sources_adjoint(myrank,nrec, &

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part1_undo_att.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part1_undo_att.f90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part1_undo_att.f90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -463,8 +463,8 @@
                                 hdur,xi_source,eta_source,gamma_source,nu_source)
 
     ! add adjoint sources only if adjoint simulation is performed for source inversion only
-!! DK DK UNDO_ATT this must remain here even when SIMULATION_TYPE == 3 because it applies to array
-!! DK DK UNDO_ATT accel_crust_mantle rather than b_accel_crust_mantle
+!! DK DK UNDO_ATTENUATION this must remain here even when SIMULATION_TYPE == 3 because it applies to array
+!! DK DK UNDO_ATTENUATION accel_crust_mantle rather than b_accel_crust_mantle
     if (SIMULATION_TYPE == 2 .or. SIMULATION_TYPE == 3) then
       if( nadj_rec_local > 0 ) &
         call compute_add_sources_adjoint(myrank,nrec, &

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att.f90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/part2_undo_att.f90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -59,12 +59,12 @@
       !       for reconstructing the rotational contributions
       if(CUSTOM_REAL == SIZE_REAL) then
         time = sngl((dble(NSTEP-it)*DT-t0)*scale_t_inv)
-if(UNDO_ATT)then
+if(UNDO_ATTENUATION)then
         time = sngl((dble(NSTEP-(iteration_on_subset*NT_DUMP-it_of_this_subset+1))*DT-t0)*scale_t_inv)
 endif
       else
         time = (dble(NSTEP-it)*DT-t0)*scale_t_inv
-if(UNDO_ATT)then
+if(UNDO_ATTENUATION)then
         time = (dble(NSTEP-(iteration_on_subset*NT_DUMP-it_of_this_subset+1))*DT-t0)*scale_t_inv
 endif
       endif
@@ -121,7 +121,7 @@
     ! Stacey absorbing boundaries
     if(NCHUNKS_VAL /= 6 .and. ABSORBING_CONDITIONS) then
       if (SIMULATION_TYPE == 3) then
-if(UNDO_ATT)then
+if(UNDO_ATTENUATION)then
       call compute_stacey_outer_core_forward(ichunk,SAVE_FORWARD, &
                               it,ibool_outer_core, &
                               b_veloc_outer_core,b_accel_outer_core, &
@@ -473,7 +473,7 @@
     ! Stacey
     if(NCHUNKS_VAL /= 6 .and. ABSORBING_CONDITIONS) then
       if(SIMULATION_TYPE == 3) then
-if(UNDO_ATT)then
+if(UNDO_ATTENUATION)then
       call compute_stacey_crust_mantle_forward(ichunk, &
                               it,SAVE_FORWARD,ibool_crust_mantle, &
                               b_veloc_crust_mantle,b_accel_crust_mantle, &
@@ -517,7 +517,7 @@
 
     ! add adjoint sources and add sources for backward/reconstructed wavefield
     if (SIMULATION_TYPE == 3) then
-if(UNDO_ATT)then
+if(UNDO_ATTENUATION)then
       call compute_add_sources_backward(myrank,NSOURCES,NSTEP, &
                                 b_accel_crust_mantle,sourcearrays, &
                                 DT,t0,tshift_cmt,hdur_gaussian,ibool_crust_mantle, &
@@ -532,7 +532,7 @@
 endif
     endif
 
-if(.not. UNDO_ATT)then
+if(.not. UNDO_ATTENUATION)then
     if ( NOISE_TOMOGRAPHY == 3 ) then
         ! third step of noise tomography, i.e., read the surface movie saved at every timestep
         ! use the movie to reconstruct the ensemble forward wavefield
@@ -879,7 +879,7 @@
     ! note: this is done here after the Newmark time scheme, otherwise the indexing for sources
     !          and adjoint sources will become more complicated
     !          that is, index it for adjoint sources will match index NSTEP - 1 for backward/reconstructed wavefields
-if(.not. UNDO_ATT)then
+if(.not. UNDO_ATTENUATION)then
     if(SIMULATION_TYPE == 3 .and. it == 1) then
       call read_forward_arrays(myrank, &
                     b_displ_crust_mantle,b_veloc_crust_mantle,b_accel_crust_mantle, &

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/setup/constants.h.in
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/setup/constants.h.in	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/setup/constants.h.in	2013-06-16 16:24:28 UTC (rev 22324)
@@ -51,8 +51,8 @@
   integer, parameter :: ELEMENTS_NONBLOCKING_OC = 3000
 
 !! DK DK to undo attenuation
-  logical, parameter :: UNDO_ATT = .true. ! .false.
-  integer, parameter :: NT_DUMP = 50   !! DK DK how often we dump restart files to undo attenuation
+  logical, parameter :: UNDO_ATTENUATION = .true. ! .false.
+  integer, parameter :: NT_DUMP = 100   !! DK DK how often we dump restart files to undo attenuation
 
 !*********************************************************************************************************
 ! added these parameters for the future GPU version of the solver with mesh coloring

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/compute_optimized_dumping_undo_att.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/compute_optimized_dumping_undo_att.f90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/compute_optimized_dumping_undo_att/compute_optimized_dumping_undo_att.f90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -328,10 +328,10 @@
   print *,'*******************************************************************************'
   print *
 
-  if(.not. UNDO_ATT) then
+  if(.not. UNDO_ATTENUATION) then
     print *
     print *,'*******************************************************************************'
-    print *,'BEWARE, UNDO_ATT is .false. and thus undoing is currently'
+    print *,'BEWARE, UNDO_ATTENUATION is .false. and thus undoing is currently'
     print *,'turned off, i.e. the above estimates are currently NOT USED.'
     print *,'*******************************************************************************'
     print *

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/read_compute_parameters.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/read_compute_parameters.f90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/read_compute_parameters.f90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -228,7 +228,7 @@
   NSTEP = 100 * (int(RECORD_LENGTH_IN_MINUTES * 60.d0 / (100.d0*DT)) + 1)
 
 !! DK DK make sure NSTEP is a multiple of NT_DUMP
-  if(UNDO_ATT .and. mod(NSTEP,NT_DUMP) /= 0) NSTEP = (NSTEP/NT_DUMP + 1)*NT_DUMP
+  if(UNDO_ATTENUATION .and. mod(NSTEP,NT_DUMP) /= 0) NSTEP = (NSTEP/NT_DUMP + 1)*NT_DUMP
 
 ! if doing benchmark runs to measure scaling of the code for a limited number of time steps only
   if (DO_BENCHMARK_RUN_ONLY) NSTEP = NSTEP_FOR_BENCHMARK

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/save_header_file.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/save_header_file.f90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/shared/save_header_file.f90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -539,7 +539,7 @@
     ! mimicking average (not full) effect of attenuation on apparent velocities, not amplitudes. that is,
     ! phase shifts will be partially accounted for, but amplitudes will differ in adjoint simulations
     if( ATTENUATION ) then
-      if(UNDO_ATT)then  
+      if(UNDO_ATTENUATION)then  
          !ZN in undoing attenuation we do not have to use the mimmic way for inclusion of visoelastic effect
          write(IOUT,*) 'logical, parameter :: PARTIAL_PHYS_DISPERSION_ONLY = .false.'
       else

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/check_simulation_stability.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/check_simulation_stability.f90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/check_simulation_stability.f90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -109,7 +109,7 @@
       write(IMAIN,*) 'Max non-dimensional potential Ufluid in fluid in all slices for back prop.= ',Ufluidnorm_all
     endif
 
-!! DK DK UNDO_ATT
+!! DK DK UNDO_ATTENUATION
 
     ! information about the current run only
     SHOW_SEPARATE_RUN_INFORMATION = NUMBER_OF_RUNS > 1 .and. NUMBER_OF_THIS_RUN < NUMBER_OF_RUNS
@@ -266,7 +266,7 @@
     write(IMAIN,*)
 
     ! write time stamp file to give information about progression of simulation
-!! DK DK UNDO_ATT
+!! DK DK UNDO_ATTENUATION
     if(SIMULATION_TYPE == 1) then
 !     write(outputname,"('/timestamp',i6.6)") it
       write(outputname,"('/timestamp_forward',i6.6)") it

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/initialize_simulation.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/initialize_simulation.f90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/initialize_simulation.f90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -392,7 +392,7 @@
     if ( ATTENUATION_VAL) then
       ! checks mimic flag:
       ! attenuation for adjoint simulations must have PARTIAL_PHYS_DISPERSION_ONLY set by xcreate_header_file
-      if(.not. UNDO_ATT)then
+      if(.not. UNDO_ATTENUATION)then
         if( PARTIAL_PHYS_DISPERSION_ONLY .eqv. .false. ) &
           call exit_MPI(myrank,'error in compiled attenuation parameters, please recompile solver 17b')
       endif

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/specfem3D.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/specfem3D.F90	2013-06-16 07:57:50 UTC (rev 22323)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/undo_att/src/specfem3D/specfem3D.F90	2013-06-16 16:24:28 UTC (rev 22324)
@@ -1890,7 +1890,7 @@
                     two_omega_earth,A_array_rotation,B_array_rotation, &
                     b_two_omega_earth, SIMULATION_TYPE)
 
-  if(UNDO_ATT) then
+  if(UNDO_ATTENUATION) then
    b_deltat = deltat
    b_deltatover2 = deltatover2
    b_deltatsqover2 = deltatsqover2
@@ -1922,7 +1922,7 @@
                 alphaval,betaval,gammaval,b_alphaval,b_betaval,b_gammaval, &
                 deltat,b_deltat,LOCAL_PATH)
 
-  if(UNDO_ATT) then
+  if(UNDO_ATTENUATION) then
    b_alphaval = alphaval
    b_betaval = betaval
    b_gammaval = gammaval
@@ -2046,8 +2046,8 @@
   ! note: for SIMULATION_TYPE 3 simulations, the stored wavefields
   !          will be read in the time loop after the Newmark time scheme update.
   !          this makes indexing and timing easier to match with adjoint wavefields indexing.
-if(UNDO_ATT) then
-  if(NUMBER_OF_THIS_RUN > 1) stop 'we currently do not support NUMBER_OF_THIS_RUN > 1 in the case of UNDO_ATT'
+if(UNDO_ATTENUATION) then
+  if(NUMBER_OF_THIS_RUN > 1) stop 'we currently do not support NUMBER_OF_THIS_RUN > 1 in the case of UNDO_ATTENUATION'
   ! define correct time steps if restart files
   if(NUMBER_OF_RUNS < 1 .or. NUMBER_OF_RUNS > NSTEP) &
     stop 'number of restart runs can not be less than 1 or greater than NSTEP'
@@ -2149,7 +2149,7 @@
 ! ************* MAIN LOOP OVER THE TIME STEPS *************
 ! *********************************************************
 
-if(.not. UNDO_ATT) then
+if(.not. UNDO_ATTENUATION) then
 
   do it = it_begin,it_end
 
@@ -2176,10 +2176,10 @@
 !
   enddo   ! end of main time loop
 
-else ! if UNDO_ATT
+else ! if UNDO_ATTENUATION
 
 !! DK DK this should not be difficult to fix and test, but not done yet by lack of time
-  if(NUMBER_OF_RUNS /= 1) stop 'NUMBER_OF_RUNS should be == 1 for now when using UNDO_ATT'
+  if(NUMBER_OF_RUNS /= 1) stop 'NUMBER_OF_RUNS should be == 1 for now when using UNDO_ATTENUATION'
 
 !
 !-------------------------------------------------------------------------------
@@ -2390,7 +2390,7 @@
   if( ier /= 0 ) call exit_mpi(myrank,'error synchronize closing snapshots')
 
   ! save files to local disk or tape system if restart file
-  if(.not. UNDO_ATT) call save_forward_arrays(myrank,SIMULATION_TYPE,SAVE_FORWARD, &
+  if(.not. UNDO_ATTENUATION) call save_forward_arrays(myrank,SIMULATION_TYPE,SAVE_FORWARD, &
                     NUMBER_OF_RUNS,NUMBER_OF_THIS_RUN, &
                     displ_crust_mantle,veloc_crust_mantle,accel_crust_mantle, &
                     displ_inner_core,veloc_inner_core,accel_inner_core, &



More information about the CIG-COMMITS mailing list