[cig-commits] [commit] devel,master: unified syntax for endif, enddo and else if; alse removed useless white spaces (124f840)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Jun 18 15:23:18 PDT 2014


Repository : https://github.com/geodynamics/specfem2d

On branches: devel,master
Link       : https://github.com/geodynamics/specfem2d/compare/fc67e6fd7ad890705b2b72b4b3c509accb22249e...e9ca46c40131588d89d7b0883250bc6584ce6b4c

>---------------------------------------------------------------

commit 124f84039845c1d6633a5ecfdb2029dd47f04567
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Sat Apr 13 22:21:10 2013 +0000

    unified syntax for endif, enddo and else if;
    alse removed useless white spaces


>---------------------------------------------------------------

124f84039845c1d6633a5ecfdb2029dd47f04567
 INDUSTRIAL_FORMAT/interpolate.f90 |  0
 noise_layered/adj_mask.f90        | 22 +++++++++++-----------
 noise_uniform/adj_cc.f90          | 22 +++++++++++-----------
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/noise_layered/adj_mask.f90 b/noise_layered/adj_mask.f90
index cfd4312..5f214c5 100644
--- a/noise_layered/adj_mask.f90
+++ b/noise_layered/adj_mask.f90
@@ -101,7 +101,7 @@ seismo_adj(:) = 0.0d0
 open(unit=1001,file=trim(filename),status='old',action='read')
 do it = 1, nt
     read(1001,*) t(it), seismo_1(it)
-end do
+enddo
 close(1001)
 
 
@@ -113,7 +113,7 @@ do it = 2, nt-1
     if (differentiate == 1) seismo_2(it) = ( seismo_1(it+1) - seismo_1(it-1) ) / (2*dt)
     if (differentiate == 2) seismo_2(it) = ( seismo_1(it+1) - 2 * seismo_1(it) + seismo_1(it-1) ) / dt**2
 
-end do
+enddo
 
 
 !!!!!!!!!! FILTER !!!!!!!!!!!!!!!!!!!!
@@ -136,7 +136,7 @@ call FILTER(seismo_3,nt,D,G,2)
 !    G = FILTER GAIN
 !    IG = 1  one pass
 !    IG = 2  two passes
-end if
+endif
 
 
 !!!!!!!!!! WINDOW !!!!!!!!!!!!!!!!!!!!
@@ -146,14 +146,14 @@ if (use_custom_window) then
   if (it_begin < 1) it_begin = 1
   if (it_end > nt) it_end = nt
 
-elseif (use_positive_branch) then
+else if (use_positive_branch) then
   write(*,*) 'Choosing positive branch'
   it_begin = nthalf + floor(off/dt)
   it_end   = nt
   if (it_begin < nthalf) it_begin = nthalf
   if (it_end > nt) it_end = nt
 
-elseif (use_negative_branch) then
+else if (use_negative_branch) then
   write(*,*) 'Choosing negative branch'
   it_begin = 1
   it_end   = nthalf - floor(off/dt)
@@ -180,14 +180,14 @@ do it = it_begin,it_end
   if (beta<alpha/2.) then
     w(it) = 0.5*(1.+cos(2.*pi/alpha*(beta-alpha/2.)))
 
-  elseif (beta>alpha/2. .and. beta<1.-alpha/2.) then
+  else if (beta>alpha/2. .and. beta<1.-alpha/2.) then
     w(it) = 1.0
 
   else
     w(it) = 0.5*(1.+cos(2*pi/w_tukey*(beta-1.+alpha/2.)))
 
   endif
-end do
+enddo
 seismo_4 = w * seismo_3
 
 
@@ -205,7 +205,7 @@ write(*,*) 'Writing to file: '//trim(filename)//'.adj'
 do it = 1,nt
     if (.not. time_reverse) write(1002,'(f16.12,1pe18.8)'), t(it), seismo_adj(it)
     if (time_reverse) write(1002,'(f16.12,1pe18.8)'), t(it), seismo_adj(nt+1-it)
-end do
+enddo
 close(1002)
 
 write(*,*) 'Finished writing to file.'
@@ -344,7 +344,7 @@ SUBROUTINE BNDPAS(F1,F2,DELT,D,G,N)
 !     IG = 1  one pass
 !     ig = 2  two passes
 
-      IF (ISW.EQ.1) GO TO 31                                            
+      IF (ISW==1) GO TO 31
       WRITE (6,6)
     6 FORMAT ('1BNDPAS MUST BE CALLED BEFORE FILTER')
       return
@@ -389,7 +389,7 @@ SUBROUTINE BNDPAS(F1,F2,DELT,D,G,N)
    39 X(I)=XE(M)-XE(M2)-D(7)*X(I-1)-D(8)*X(I-2)
 !
 !
-      if(ig.eq.1) goto 3333                                             
+      if(ig==1) goto 3333
       XM2=X(N)
       XM1=X(N-1)
       XM=X(N-2)
@@ -428,7 +428,7 @@ SUBROUTINE BNDPAS(F1,F2,DELT,D,G,N)
       XE(M)=XD(M)-XD(M2)-D(5)*XE(M1)-D(6)*XE(M2)
    49 X(J)=XE(M)-XE(M2)-D(7)*X(J+1)-D(8)*X(J+2)
  3333 continue
-      if (ig.eq.1) then
+      if (ig==1) then
         gg=sqrt(g)   ! if only pass once, modify gain
       else
         gg=g
diff --git a/noise_uniform/adj_cc.f90 b/noise_uniform/adj_cc.f90
index 93707b9..d14f145 100644
--- a/noise_uniform/adj_cc.f90
+++ b/noise_uniform/adj_cc.f90
@@ -91,7 +91,7 @@ seismo_adj(:) = 0.0d0
 open(unit=1001,file=trim(file_in),status='old',action='read')
 do it = 1, nt
     read(1001,*) t(it), seismo_1(it)
-end do
+enddo
 close(1001)
 
 
@@ -103,7 +103,7 @@ do it = 2, nt-1
     if (differentiate == 1) seismo_2(it) = ( seismo_1(it+1) - seismo_1(it-1) ) / (2*dt)
     if (differentiate == 2) seismo_2(it) = ( seismo_1(it+1) - 2 * seismo_1(it) + seismo_1(it-1) ) / dt**2
 
-end do
+enddo
 
 
 !!!!!!!!!! FILTER !!!!!!!!!!!!!!!!!!!!
@@ -126,7 +126,7 @@ call FILTER(seismo_3,nt,D,G,2)
 !    G = FILTER GAIN
 !    IG = 1  one pass
 !    IG = 2  two passes
-end if
+endif
 
 
 !!!!!!!!!! WINDOW !!!!!!!!!!!!!!!!!!!!
@@ -136,14 +136,14 @@ if (use_custom_window) then
   if (it_begin < 1) it_begin = 1
   if (it_end > nt) it_end = nt
 
-elseif (use_positive_branch) then
+else if (use_positive_branch) then
   write(*,*) 'Choosing positive branch'
   it_begin = nthalf+1
   it_end   = nt
   if (it_begin < nthalf) it_begin = nthalf
   if (it_end > nt) it_end = nt
 
-elseif (use_negative_branch) then
+else if (use_negative_branch) then
   write(*,*) 'Choosing negative branch'
   it_begin = 1
   it_end   = nthalf
@@ -170,14 +170,14 @@ do it = it_begin,it_end
   if (beta<alpha/2.) then
     w(it) = 0.5*(1.+cos(2.*pi/alpha*(beta-alpha/2.)))
 
-  elseif (beta>alpha/2. .and. beta<1.-alpha/2.) then
+  else if (beta>alpha/2. .and. beta<1.-alpha/2.) then
     w(it) = 1.0
 
   else
     w(it) = 0.5*(1.+cos(2*pi/w_tukey*(beta-1.+alpha/2.)))
 
   endif
-end do
+enddo
 seismo_4 = w * seismo_3
 
 
@@ -194,7 +194,7 @@ write(*,*) 'Writing to file: '//trim(file_in)//'.adj'
 do it = 1,nt
     if (.not. time_reverse) write(1002,'(f16.12,1pe18.8)'), t(it), seismo_adj(it)
     if (time_reverse) write(1002,'(f16.12,1pe18.8)'), t(it), seismo_adj(nt+1-it)
-end do
+enddo
 close(1002)
 
 write(*,*) 'Finished writing to file.'
@@ -333,7 +333,7 @@ SUBROUTINE BNDPAS(F1,F2,DELT,D,G,N)
 !     IG = 1  one pass
 !     ig = 2  two passes
 
-      IF (ISW.EQ.1) GO TO 31                                            
+      IF (ISW==1) GO TO 31
       WRITE (6,6)
     6 FORMAT ('1BNDPAS MUST BE CALLED BEFORE FILTER')
       return
@@ -378,7 +378,7 @@ SUBROUTINE BNDPAS(F1,F2,DELT,D,G,N)
    39 X(I)=XE(M)-XE(M2)-D(7)*X(I-1)-D(8)*X(I-2)
 !
 !
-      if(ig.eq.1) goto 3333                                             
+      if(ig==1) goto 3333
       XM2=X(N)
       XM1=X(N-1)
       XM=X(N-2)
@@ -417,7 +417,7 @@ SUBROUTINE BNDPAS(F1,F2,DELT,D,G,N)
       XE(M)=XD(M)-XD(M2)-D(5)*XE(M1)-D(6)*XE(M2)
    49 X(J)=XE(M)-XE(M2)-D(7)*X(J+1)-D(8)*X(J+2)
  3333 continue
-      if (ig.eq.1) then
+      if (ig==1) then
         gg=sqrt(g)   ! if only pass once, modify gain
       else
         gg=g



More information about the CIG-COMMITS mailing list