[cig-commits] r18863 - seismo/2D/SPECFEM2D/trunk/src/specfem2D
rmodrak at geodynamics.org
rmodrak at geodynamics.org
Wed Aug 31 01:54:32 PDT 2011
Author: rmodrak
Date: 2011-08-31 01:54:32 -0700 (Wed, 31 Aug 2011)
New Revision: 18863
Modified:
seismo/2D/SPECFEM2D/trunk/src/specfem2D/noise_tomography.f90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
Log:
Fixes compiler warnings in noise_tomography.f90 by removing unused variables
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/noise_tomography.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/noise_tomography.f90 2011-08-31 06:17:27 UTC (rev 18862)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/noise_tomography.f90 2011-08-31 08:54:32 UTC (rev 18863)
@@ -51,23 +51,21 @@
! =============================================================================================================
! specify spatial distribution of microseismic noise sources
! USERS need to modify this subroutine to suit their own needs
- subroutine create_mask_noise(p_sv,nglob,coord,angle_noise,mask_noise)
+ subroutine create_mask_noise(nglob,coord,mask_noise)
implicit none
include "constants.h"
!input
- logical :: p_sv
integer :: nglob
- real(kind=CUSTOM_REAL) :: angle_noise
real(kind=CUSTOM_REAL), dimension(2,nglob) :: coord
!output
real(kind=CUSTOM_REAL), dimension(nglob) :: mask_noise
!local
- integer :: iglob, ios
- real(kind=CUSTOM_REAL) :: xx,zz,mask_noise_out
+ integer :: iglob
+ real(kind=CUSTOM_REAL) :: xx,zz
!specify distribution of noise sources as a function of xx, zz
do iglob = 1,nglob
@@ -136,6 +134,8 @@
!check simulation parameters
+
+ if ((NOISE_TOMOGRAPHY/=0) .and. (p_sv)) write(*,*) 'Warning: For P-SV case, noise tomography subroutines not yet fully tested.'
if (NOISE_TOMOGRAPHY==1) then
if (SIMULATION_TYPE/=1) call exit_mpi('NOISE_TOMOGRAPHY=1 requires SIMULATION_TYPE=1 -> check DATA/Par_file')
@@ -176,7 +176,7 @@
! =============================================================================================================
! read in time series based on noise spectrum and construct noise "source" array
subroutine compute_source_array_noise(p_sv,NSTEP,deltat,nglob,ibool,ispec_noise, &
- xi_noise,gamma_noise,angle_noise,xigll,zigll, &
+ xi_noise,gamma_noise,xigll,zigll, &
time_function_noise,source_array_noise)
implicit none
@@ -186,9 +186,9 @@
logical :: p_sv
integer NSTEP, ispec_noise,nglob
integer, dimension(NGLLX,NGLLZ,nglob) :: ibool
- real(kind=CUSTOM_REAL) :: deltat, xi_noise, gamma_noise, angle_noise
+ real(kind=CUSTOM_REAL) :: deltat, xi_noise, gamma_noise
- !output paramters
+ !output parameters
real(kind=CUSTOM_REAL), dimension(NSTEP) :: time_function_noise
real(kind=CUSTOM_REAL), dimension(3,NGLLX,NGLLZ,NSTEP) :: source_array_noise
@@ -204,13 +204,10 @@
real(kind=CUSTOM_REAL), dimension(NGLLZ) :: hgamma, hpgamma
- !local paramters, for method 1
+ !local parameters
real(kind=CUSTOM_REAL) ::f0_noise, aval_noise, t0_noise
- !local paramters, for method 2
- character(len=60) :: file_in_noise
-
if(METHOD == 1) then
! METHOD 1: use Ricker function
@@ -266,8 +263,7 @@
! =============================================================================================================
! inject the "source" that drives the "generating wavefield"
subroutine add_point_source_noise(p_sv,it,NSTEP,nglob,ibool,ispec_noise, &
- accel_elastic,angle_noise,time_function_noise, &
- source_array_noise)
+ accel_elastic,angle_noise,source_array_noise)
implicit none
include "constants.h"
@@ -278,7 +274,6 @@
integer, dimension(NGLLX,NGLLZ,nglob) :: ibool
real(kind=CUSTOM_REAL), dimension(3,nglob) :: accel_elastic
real(kind=CUSTOM_REAL) :: angle_noise
- real(kind=CUSTOM_REAL), dimension(NSTEP) :: time_function_noise
real(kind=CUSTOM_REAL), dimension(3,NGLLX,NGLLZ,NSTEP) :: source_array_noise
!local variables
@@ -309,7 +304,7 @@
! =============================================================================================================
! read in and inject the "source" that drives the "enemble forward wavefield"
! (recall that the ensemble forward wavefield has a spatially distributed source)
- subroutine add_surface_movie_noise(p_sv,it,NSTEP,nglob,ibool, &
+ subroutine add_surface_movie_noise(p_sv,it,NSTEP,nglob, &
accel_elastic,surface_movie_x_noise,surface_movie_y_noise, &
surface_movie_z_noise,mask_noise)
@@ -320,7 +315,6 @@
logical :: p_sv
integer :: it, NSTEP
integer :: nglob
- integer, dimension(NGLLX,NGLLZ,nglob) :: ibool
real(kind=CUSTOM_REAL), dimension(nglob) :: mask_noise
real(kind=CUSTOM_REAL), dimension(nglob) :: &
@@ -328,8 +322,8 @@
real(kind=CUSTOM_REAL), dimension(3,nglob) :: accel_elastic
!local variables
- integer :: i,j,iglob,ios
- real(kind=CUSTOM_REAL) :: factor_noise, hlagrange
+ integer :: ios
+ real(kind=CUSTOM_REAL) :: factor_noise
character(len=60) :: file_in_noise
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90 2011-08-31 06:17:27 UTC (rev 18862)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90 2011-08-31 08:54:32 UTC (rev 18863)
@@ -791,7 +791,7 @@
integer :: ispecperio, ispecperio2, ispec2, i2, j2
integer :: iglob_target_to_replace, ispec3, i3, j3
-!<RMODRAK
+!<NOISE_TOMOGRAPHY
! NOISE_TOMOGRAPHY = 0 - turn noise tomography subroutines off, resulting in
! an earthquake simulation rather than a noise simulation
@@ -819,7 +819,7 @@
surface_movie_x_noise, surface_movie_y_noise, surface_movie_z_noise
-!>RMODRAK
+!>NOISE_TOMOGRAPHY
!! DK DK Feb 2010 for periodic conditions: detect common points between left and right edges
@@ -3558,7 +3558,7 @@
! open the file in which we will store the energy curve
if(output_energy .and. myrank == 0) open(unit=IOUT_ENERGY,file='energy.dat',status='unknown')
-!<RMODRAK
+!<NOISE_TOMOGRAPHY
if (NOISE_TOMOGRAPHY /= 0) then
@@ -3582,18 +3582,18 @@
if (NOISE_TOMOGRAPHY == 1) then
call compute_source_array_noise(p_sv,NSTEP,deltat,nglob,ibool,ispec_noise, &
- xi_noise,gamma_noise,angle_noise,xigll,zigll, &
+ xi_noise,gamma_noise,xigll,zigll, &
time_function_noise,source_array_noise)
elseif (NOISE_TOMOGRAPHY == 2) then
- call create_mask_noise(p_sv,nglob,coord,angle_noise,mask_noise)
+ call create_mask_noise(nglob,coord,mask_noise)
elseif (NOISE_TOMOGRAPHY == 3) then
- call create_mask_noise(p_sv,nglob,coord,angle_noise,mask_noise)
+ call create_mask_noise(nglob,coord,mask_noise)
endif
-!>RMODRAK
+!>NOISE_TOMOGRAPHY
!
!---- s t a r t t i m e i t e r a t i o n s
@@ -4930,28 +4930,27 @@
endif ! if this processor carries the source and the source element is elastic
enddo ! do i_source=1,NSOURCES
-!<RMODRAK
+!<NOISE_TOMOGRAPHY
! inject wavefield sources for noise simulations
if (NOISE_TOMOGRAPHY == 1) then
call add_point_source_noise(p_sv,it,NSTEP,nglob,ibool,ispec_noise, &
- accel_elastic,angle_noise,time_function_noise, &
- source_array_noise)
+ accel_elastic,angle_noise,source_array_noise)
elseif (NOISE_TOMOGRAPHY == 2) then
- call add_surface_movie_noise(p_sv,it,NSTEP,nglob,ibool,accel_elastic, &
+ call add_surface_movie_noise(p_sv,it,NSTEP,nglob,accel_elastic, &
surface_movie_x_noise,surface_movie_y_noise, &
surface_movie_z_noise,mask_noise)
elseif (NOISE_TOMOGRAPHY == 3) then
- call add_surface_movie_noise(p_sv,it,NSTEP,nglob,ibool,b_accel_elastic, &
+ call add_surface_movie_noise(p_sv,it,NSTEP,nglob,b_accel_elastic, &
surface_movie_x_noise,surface_movie_y_noise, &
surface_movie_z_noise,mask_noise)
endif
-!>RMODRAK
+!>NOISE_TOMOGRAPHY
endif ! if not using an initial field
@@ -6311,11 +6310,11 @@
endif ! if(SIMULATION_TYPE == 2)
-!<RMODRAK
+!<NOISE_TOMOGRAPHY
if ( NOISE_TOMOGRAPHY == 1 ) then
call save_surface_movie_noise(p_sv,it,nglob,displ_elastic)
endif
-!>RMODRAK
+!>NOISE_TOMOGRAPHY
!
More information about the CIG-COMMITS
mailing list