[cig-commits] r22472 - in seismo/3D/SPECFEM3D_GLOBE: branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries branches/SPECFEM3D_GLOBE_SUNFLOWER/src/cuda branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D trunk/src/auxiliaries trunk/src/cuda trunk/src/meshfem3D trunk/src/shared trunk/src/specfem3D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sun Jun 30 19:07:52 PDT 2013


Author: dkomati1
Date: 2013-06-30 19:07:51 -0700 (Sun, 30 Jun 2013)
New Revision: 22472

Modified:
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_paraview_strain_data.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_vol_data.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_vol_data_vtk.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/create_movie_AVS_DX.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/create_movie_GMT_global.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/cuda/specfem3D_gpu_cuda_method_stubs.c
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/add_topography.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/add_topography_410_650.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/calc_jacobian.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_central_cube.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_regions_mesh.F90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_regions_mesh_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_absorb.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_absorb_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_ellipticity.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_jacobian_boundaries.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/initialize_mesher.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/meshfem3D_models.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_atten3D_QRFSI12.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_attenuation.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_crustmaps.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_epcrust.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_gapp2.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_heterogen_mantle.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_jp1d.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_jp3d.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_s362ani.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_sea99_s.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/moho_stretching.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/save_arrays_solver_adios.F90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_chunks_data_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_data.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_data_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_faces_data_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_surface_data_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/adios_helpers.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/auto_ner.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/broadcast_compute_parameters.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/define_all_layers.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/get_timestep_and_layers.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/read_compute_parameters.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/read_value_parameters.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/compute_forces_elastic.F90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/get_attenuation.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/initialize_simulation.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/locate_sources.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/prepare_timerun.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_arrays_solver_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_attenuation_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_forward_arrays_adios.F90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_mesh_databases_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/save_forward_arrays_adios.F90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_output_SAC.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_seismograms.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_specfem_adios_header.F90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/auxiliaries/combine_vol_data_vtk.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/cuda/specfem3D_gpu_cuda_method_stubs.c
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/create_regions_mesh_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/get_absorb_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/initialize_mesher.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/save_arrays_solver_adios.F90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_chunks_data_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_data_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_faces_data_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_surface_data_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/adios_helpers.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/define_all_layers.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/get_timestep_and_layers.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_elastic.F90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_arrays_solver_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_attenuation_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_forward_arrays_adios.F90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_mesh_databases_adios.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/save_forward_arrays_adios.F90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/write_specfem_adios_header.F90
Log:
removed white spaces, changed end if to endif, changed end do to enddo, change elseif to else if


Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_paraview_strain_data.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_paraview_strain_data.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_paraview_strain_data.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -157,7 +157,7 @@
        read(27) datstore(1:npoint(iproc))
      endif
      close(27)
-    elseif(comp == 'SI1' .or. comp == 'SI2') then
+    else if(comp == 'SI1' .or. comp == 'SI2') then
      write(local_data_file,'(a,i6.6,a)') 'movie3D_SEE',it,'.bin'
      !print *, iproc,'reading from file:'//trim(prname)//trim(local_data_file)
      !print *, 'reading from file:',local_data_file

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_vol_data.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_vol_data.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_vol_data.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -370,7 +370,7 @@
       if (HIGH_RESOLUTION_MESH ) then
         if( ir==3 ) then
           npoint(it) = numpoin
-        elseif( numpoin /= npoint(it)) then
+        else if( numpoin /= npoint(it)) then
           print*,'region:',ir
           print*,'error number of points:',numpoin,npoint(it)
           stop 'different number of points (high-res)'

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_vol_data_vtk.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_vol_data_vtk.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/combine_vol_data_vtk.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -413,7 +413,7 @@
       if (HIGH_RESOLUTION_MESH ) then
         if( ir==3 ) then
           npoint(it) = numpoin
-        elseif( numpoin /= npoint(it)) then
+        else if( numpoin /= npoint(it)) then
           print*,'region:',ir
           print*,'error number of points:',numpoin,npoint(it)
           stop 'different number of points (high-res)'

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/create_movie_AVS_DX.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/create_movie_AVS_DX.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/create_movie_AVS_DX.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -395,7 +395,7 @@
 
              displn(i,j) = displx*normal_x + disply*normal_y + displz*normal_z
 
-          elseif(USE_COMPONENT == 2) then
+          else if(USE_COMPONENT == 2) then
 
              ! compute unit tangent vector to the surface (N-S)
              RRval = sqrt(xcoord**2 + ycoord**2 + zcoord**2)
@@ -413,7 +413,7 @@
 
              displn(i,j) = - (displx*thetahat_x + disply*thetahat_y + displz*thetahat_z)
 
-          elseif(USE_COMPONENT == 3) then
+          else if(USE_COMPONENT == 3) then
 
              ! compute unit tangent to the surface (E-W)
              rhoval = sqrt(xcoord**2 + ycoord**2)
@@ -445,12 +445,12 @@
               yp(ieoff+ilocnum) = dble(y(i,j))
               zp(ieoff+ilocnum) = dble(z(i,j))
               field_display(ieoff+ilocnum) = dble(displn(i,j))
-            elseif(ilocnum == 2) then
+            else if(ilocnum == 2) then
               xp(ieoff+ilocnum) = dble(x(i+1,j))
               yp(ieoff+ilocnum) = dble(y(i+1,j))
               zp(ieoff+ilocnum) = dble(z(i+1,j))
               field_display(ieoff+ilocnum) = dble(displn(i+1,j))
-            elseif(ilocnum == 3) then
+            else if(ilocnum == 3) then
               xp(ieoff+ilocnum) = dble(x(i+1,j+1))
               yp(ieoff+ilocnum) = dble(y(i+1,j+1))
               zp(ieoff+ilocnum) = dble(z(i+1,j+1))
@@ -554,9 +554,9 @@
   if(USE_OPENDX) then
     if( USE_COMPONENT == 1) then
       write(outputname,"('/DX_movie_',i6.6,'.Z.dx')") it
-    elseif( USE_COMPONENT == 2) then
+    else if( USE_COMPONENT == 2) then
       write(outputname,"('/DX_movie_',i6.6,'.N.dx')") it
-    elseif( USE_COMPONENT == 3) then
+    else if( USE_COMPONENT == 3) then
       write(outputname,"('/DX_movie_',i6.6,'.E.dx')") it
     endif
     open(unit=11,file=trim(OUTPUT_FILES)//trim(outputname),status='unknown')
@@ -565,9 +565,9 @@
     if(UNIQUE_FILE .and. iframe == 1) then
       if( USE_COMPONENT == 1) then
         outputname = '/AVS_movie_all.Z.inp'
-      elseif( USE_COMPONENT == 2) then
+      else if( USE_COMPONENT == 2) then
         outputname = '/AVS_movie_all.N.inp'
-      elseif( USE_COMPONENT == 3) then
+      else if( USE_COMPONENT == 3) then
         outputname = '/AVS_movie_all.E.inp'
       endif
       open(unit=11,file=trim(OUTPUT_FILES)//trim(outputname),status='unknown')
@@ -578,9 +578,9 @@
     else if(.not. UNIQUE_FILE) then
       if( USE_COMPONENT == 1) then
         write(outputname,"('/AVS_movie_',i6.6,'.Z.inp')") it
-      elseif( USE_COMPONENT == 2) then
+      else if( USE_COMPONENT == 2) then
         write(outputname,"('/AVS_movie_',i6.6,'.N.inp')") it
-      elseif( USE_COMPONENT == 3) then
+      else if( USE_COMPONENT == 3) then
         write(outputname,"('/AVS_movie_',i6.6,'.E.inp')") it
       endif
       open(unit=11,file=trim(OUTPUT_FILES)//trim(outputname),status='unknown')
@@ -589,9 +589,9 @@
   else if(USE_GMT) then
     if( USE_COMPONENT == 1) then
       write(outputname,"('/gmt_movie_',i6.6,'.Z.xyz')") it
-    elseif( USE_COMPONENT == 2) then
+    else if( USE_COMPONENT == 2) then
       write(outputname,"('/gmt_movie_',i6.6,'.N.xyz')") it
-    elseif( USE_COMPONENT == 3) then
+    else if( USE_COMPONENT == 3) then
       write(outputname,"('/gmt_movie_',i6.6,'.E.xyz')") it
     endif
     open(unit=11,file=trim(OUTPUT_FILES)//trim(outputname),status='unknown')

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/create_movie_GMT_global.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/create_movie_GMT_global.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/auxiliaries/create_movie_GMT_global.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -538,7 +538,7 @@
 
                        displn(i,j) = displx*normal_x + disply*normal_y + displz*normal_z
 
-                    elseif(USE_COMPONENT == 2) then
+                    else if(USE_COMPONENT == 2) then
 
                        ! compute unit tangent vector to the surface (N-S)
                        RRval = sqrt(xcoord**2 + ycoord**2 + zcoord**2)
@@ -556,7 +556,7 @@
 
                        displn(i,j) = - (displx*thetahat_x + disply*thetahat_y + displz*thetahat_z)
 
-                    elseif(USE_COMPONENT == 3) then
+                    else if(USE_COMPONENT == 3) then
 
                        ! compute unit tangent to the surface (E-W)
                        rhoval = sqrt(xcoord**2 + ycoord**2)
@@ -852,9 +852,9 @@
         if(OUTPUT_BINARY) then
           if(USE_COMPONENT == 1) then
            write(outputname,"('bin_movie_',i6.6,'.d')") it
-          elseif(USE_COMPONENT == 2) then
+          else if(USE_COMPONENT == 2) then
            write(outputname,"('bin_movie_',i6.6,'.N')") it
-          elseif(USE_COMPONENT == 3) then
+          else if(USE_COMPONENT == 3) then
            write(outputname,"('bin_movie_',i6.6,'.E')") it
           endif
           open(unit=11,file='OUTPUT_FILES/'//trim(outputname),status='unknown', &
@@ -864,9 +864,9 @@
         else
           if(USE_COMPONENT == 1) then
            write(outputname,"('ascii_movie_',i6.6,'.d')") it
-          elseif(USE_COMPONENT == 2) then
+          else if(USE_COMPONENT == 2) then
            write(outputname,"('ascii_movie_',i6.6,'.N')") it
-          elseif(USE_COMPONENT == 3) then
+          else if(USE_COMPONENT == 3) then
            write(outputname,"('ascii_movie_',i6.6,'.E')") it
           endif
           open(unit=11,file='OUTPUT_FILES/'//trim(outputname),status='unknown', &

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/cuda/specfem3D_gpu_cuda_method_stubs.c
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/cuda/specfem3D_gpu_cuda_method_stubs.c	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/cuda/specfem3D_gpu_cuda_method_stubs.c	2013-07-01 02:07:51 UTC (rev 22472)
@@ -1,4 +1,4 @@
-/* 
+/*
 !=====================================================================
 !
 !          S p e c f e m 3 D  G l o b e  V e r s i o n  5 . 1
@@ -34,8 +34,8 @@
 
 typedef float realw;
 
- 
 
+
 //
 // src/cuda/assemble_MPI_scalar_cuda.cu
 //
@@ -43,12 +43,12 @@
 void FC_FUNC_(transfer_boun_pot_from_device,
               TRANSFER_BOUN_POT_FROM_DEVICE)(long* Mesh_pointer_f,
                                              realw* send_potential_dot_dot_buffer,
-                                             int* FORWARD_OR_ADJOINT){} 
+                                             int* FORWARD_OR_ADJOINT){}
 
 void FC_FUNC_(transfer_asmbl_pot_to_device,
               TRANSFER_ASMBL_POT_TO_DEVICE)(long* Mesh_pointer,
                                             realw* buffer_recv_scalar,
-                                            int* FORWARD_OR_ADJOINT) {} 
+                                            int* FORWARD_OR_ADJOINT) {}
 
 
 //
@@ -59,13 +59,13 @@
               TRANSFER_BOUN_ACCEL_FROM_DEVICE)(long* Mesh_pointer_f,
                                                   realw* send_accel_buffer,
                                                   int* IREGION,
-                                                  int* FORWARD_OR_ADJOINT){} 
+                                                  int* FORWARD_OR_ADJOINT){}
 
 void FC_FUNC_(transfer_asmbl_accel_to_device,
               TRANSFER_ASMBL_ACCEL_TO_DEVICE)(long* Mesh_pointer,
                                               realw* buffer_recv_vector,
                                               int* IREGION,
-                                              int* FORWARD_OR_ADJOINT) {} 
+                                              int* FORWARD_OR_ADJOINT) {}
 
 
 //
@@ -73,58 +73,58 @@
 //
 
 void FC_FUNC_(pause_for_debug,
-              PAUSE_FOR_DEBUG)() {} 
+              PAUSE_FOR_DEBUG)() {}
 
 void FC_FUNC_(output_free_device_memory,
-              OUTPUT_FREE_DEVICE_MEMORY)(int* myrank) {} 
+              OUTPUT_FREE_DEVICE_MEMORY)(int* myrank) {}
 
 void FC_FUNC_(get_free_device_memory,
-              get_FREE_DEVICE_MEMORY)(realw* free, realw* used, realw* total ) {} 
+              get_FREE_DEVICE_MEMORY)(realw* free, realw* used, realw* total ) {}
 
 void FC_FUNC_(check_norm_acoustic_from_device,
               CHECK_NORM_ACOUSTIC_FROM_DEVICE)(realw* norm,
                                                   long* Mesh_pointer_f,
-                                                  int* SIMULATION_TYPE) {} 
+                                                  int* SIMULATION_TYPE) {}
 
 void FC_FUNC_(check_norm_elastic_from_device,
               CHECK_NORM_ELASTIC_FROM_DEVICE)(realw* norm,
                                               long* Mesh_pointer_f,
-                                              int* SIMULATION_TYPE) {} 
+                                              int* SIMULATION_TYPE) {}
 
 void FC_FUNC_(check_norm_strain_from_device,
               CHECK_NORM_STRAIN_FROM_DEVICE)(realw* strain_norm,
                                              realw* strain_norm2,
-                                             long* Mesh_pointer_f) {} 
+                                             long* Mesh_pointer_f) {}
 
  void FC_FUNC_(check_max_norm_displ_gpu,
- CHECK_MAX_NORM_DISPL_GPU)(int* size, realw* displ,long* Mesh_pointer_f,int* announceID) {} 
+ CHECK_MAX_NORM_DISPL_GPU)(int* size, realw* displ,long* Mesh_pointer_f,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_vector,
- CHECK_MAX_NORM_VECTOR)(int* size, realw* vector1, int* announceID) {} 
+ CHECK_MAX_NORM_VECTOR)(int* size, realw* vector1, int* announceID) {}
 
  void FC_FUNC_(check_max_norm_displ,
- CHECK_MAX_NORM_DISPL)(int* size, realw* displ, int* announceID) {} 
+ CHECK_MAX_NORM_DISPL)(int* size, realw* displ, int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_displ_gpu,
- CHECK_MAX_NORM_B_DISPL_GPU)(int* size, realw* b_displ,long* Mesh_pointer_f,int* announceID) {} 
+ CHECK_MAX_NORM_B_DISPL_GPU)(int* size, realw* b_displ,long* Mesh_pointer_f,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_accel_gpu,
- CHECK_MAX_NORM_B_ACCEL_GPU)(int* size, realw* b_accel,long* Mesh_pointer_f,int* announceID) {} 
+ CHECK_MAX_NORM_B_ACCEL_GPU)(int* size, realw* b_accel,long* Mesh_pointer_f,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_veloc_gpu,
- CHECK_MAX_NORM_B_VELOC_GPU)(int* size, realw* b_veloc,long* Mesh_pointer_f,int* announceID) {} 
+ CHECK_MAX_NORM_B_VELOC_GPU)(int* size, realw* b_veloc,long* Mesh_pointer_f,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_displ,
- CHECK_MAX_NORM_B_DISPL)(int* size, realw* b_displ,int* announceID) {} 
+ CHECK_MAX_NORM_B_DISPL)(int* size, realw* b_displ,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_accel,
- CHECK_MAX_NORM_B_ACCEL)(int* size, realw* b_accel,int* announceID) {} 
+ CHECK_MAX_NORM_B_ACCEL)(int* size, realw* b_accel,int* announceID) {}
 
  void FC_FUNC_(check_error_vectors,
- CHECK_ERROR_VECTORS)(int* sizef, realw* vector1,realw* vector2) {} 
+ CHECK_ERROR_VECTORS)(int* sizef, realw* vector1,realw* vector2) {}
 
  void FC_FUNC_(get_max_accel,
- GET_MAX_ACCEL)(int* itf,int* sizef,long* Mesh_pointer) {} 
+ GET_MAX_ACCEL)(int* itf,int* sizef,long* Mesh_pointer) {}
 
 
 //
@@ -134,12 +134,12 @@
 void FC_FUNC_(compute_add_sources_el_cuda,
               COMPUTE_ADD_SOURCES_EL_CUDA)(long* Mesh_pointer_f,
                                            int* NSOURCESf,
-                                           double* h_stf_pre_compute) {} 
+                                           double* h_stf_pre_compute) {}
 
 void FC_FUNC_(compute_add_sources_el_s3_cuda,
               COMPUTE_ADD_SOURCES_EL_S3_CUDA)(long* Mesh_pointer_f,
                                               int* NSOURCESf,
-                                              double* h_stf_pre_compute) {} 
+                                              double* h_stf_pre_compute) {}
 
 void FC_FUNC_(add_sources_el_sim_type_2_or_3,
               ADD_SOURCES_EL_SIM_TYPE_2_OR_3)(long* Mesh_pointer,
@@ -147,7 +147,7 @@
                                               realw* h_adj_sourcearrays,
                                               int* h_islice_selected_rec,
                                               int* h_ispec_selected_rec,
-                                              int* time_index) {} 
+                                              int* time_index) {}
 
 
 //
@@ -155,20 +155,20 @@
 //
 
 void FC_FUNC_(compute_coupling_fluid_cmb_cuda,
-              COMPUTE_COUPLING_FLUID_CMB_CUDA)(long* Mesh_pointer_f) {} 
+              COMPUTE_COUPLING_FLUID_CMB_CUDA)(long* Mesh_pointer_f) {}
 
 void FC_FUNC_(compute_coupling_fluid_icb_cuda,
-              COMPUTE_COUPLING_FLUID_ICB_CUDA)(long* Mesh_pointer_f) {} 
+              COMPUTE_COUPLING_FLUID_ICB_CUDA)(long* Mesh_pointer_f) {}
 
 void FC_FUNC_(compute_coupling_cmb_fluid_cuda,
-              COMPUTE_COUPLING_CMB_FLUID_CUDA)(long* Mesh_pointer_f) {} 
+              COMPUTE_COUPLING_CMB_FLUID_CUDA)(long* Mesh_pointer_f) {}
 
 void FC_FUNC_(compute_coupling_icb_fluid_cuda,
-              COMPUTE_COUPLING_ICB_FLUID_CUDA)(long* Mesh_pointer_f) {} 
+              COMPUTE_COUPLING_ICB_FLUID_CUDA)(long* Mesh_pointer_f) {}
 
 void FC_FUNC_(compute_coupling_ocean_cuda,
               COMPUTE_COUPLING_OCEAN_CUDA)(long* Mesh_pointer_f,
-                                           int* NCHUNKS_VAL) {} 
+                                           int* NCHUNKS_VAL) {}
 
 
 //
@@ -177,7 +177,7 @@
 
 void FC_FUNC_(compute_forces_crust_mantle_cuda,
               COMPUTE_FORCES_CRUST_MANTLE_CUDA)(long* Mesh_pointer_f,
-                                                int* iphase) {} 
+                                                int* iphase) {}
 
 
 //
@@ -186,7 +186,7 @@
 
 void FC_FUNC_(compute_forces_inner_core_cuda,
               COMPUTE_FORCES_INNER_CORE_CUDA)(long* Mesh_pointer_f,
-                                              int* iphase) {} 
+                                              int* iphase) {}
 
 
 //
@@ -197,7 +197,7 @@
               COMPUTE_FORCES_OUTER_CORE_CUDA)(long* Mesh_pointer_f,
                                               int* iphase,
                                               realw* time_f,
-                                              realw* b_time_f) {} 
+                                              realw* b_time_f) {}
 
 
 //
@@ -205,22 +205,22 @@
 //
 
 void FC_FUNC_(compute_kernels_cm_cuda,
-              COMPUTE_KERNELS_CM_CUDA)(long* Mesh_pointer,realw* deltat_f) {} 
+              COMPUTE_KERNELS_CM_CUDA)(long* Mesh_pointer,realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_ic_cuda,
-              COMPUTE_KERNELS_IC_CUDA)(long* Mesh_pointer,realw* deltat_f) {} 
+              COMPUTE_KERNELS_IC_CUDA)(long* Mesh_pointer,realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_oc_cuda,
-              COMPUTE_KERNELS_OC_CUDA)(long* Mesh_pointer,realw* deltat_f) {} 
+              COMPUTE_KERNELS_OC_CUDA)(long* Mesh_pointer,realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_strgth_noise_cu,
               COMPUTE_KERNELS_STRGTH_NOISE_CU)(long* Mesh_pointer,
                                                realw* h_noise_surface_movie,
-                                               realw* deltat_f) {} 
+                                               realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_hess_cuda,
               COMPUTE_KERNELS_HESS_CUDA)(long* Mesh_pointer,
-                                         realw* deltat_f) {} 
+                                         realw* deltat_f) {}
 
 
 //
@@ -230,7 +230,7 @@
 void FC_FUNC_(compute_stacey_acoustic_cuda,
               COMPUTE_STACEY_ACOUSTIC_CUDA)(long* Mesh_pointer_f,
                                             realw* absorb_potential,
-                                            int* itype) {} 
+                                            int* itype) {}
 
 
 //
@@ -240,7 +240,7 @@
 void FC_FUNC_(compute_stacey_elastic_cuda,
               COMPUTE_STACEY_ELASTIC_CUDA)(long* Mesh_pointer_f,
                                                 realw* absorb_field,
-                                                int* itype) {} 
+                                                int* itype) {}
 
 
 //
@@ -248,10 +248,10 @@
 //
 
 void FC_FUNC_(initialize_cuda_device,
-              INITIALIZE_CUDA_DEVICE)(int* myrank_f,int* ncuda_devices) { 
+              INITIALIZE_CUDA_DEVICE)(int* myrank_f,int* ncuda_devices) {
  fprintf(stderr,"ERROR: GPU_MODE enabled without GPU/CUDA Support. To enable GPU support, reconfigure with --with-cuda flag.\n");
  exit(1);
-} 
+}
 
 
 //
@@ -265,7 +265,7 @@
                                              realw* deltatover2_F,
                                              realw* b_deltat_F,
                                              realw* b_deltatsqover2_F,
-                                             realw* b_deltatover2_F) {} 
+                                             realw* b_deltatover2_F) {}
 
 void FC_FUNC_(it_update_displacement_cm_cuda,
               IT_UPDATE_DISPLACMENT_CM_CUDA)(long* Mesh_pointer_f,
@@ -274,7 +274,7 @@
                                              realw* deltatover2_F,
                                              realw* b_deltat_F,
                                              realw* b_deltatsqover2_F,
-                                             realw* b_deltatover2_F) {} 
+                                             realw* b_deltatover2_F) {}
 
 void FC_FUNC_(it_update_displacement_oc_cuda,
               IT_UPDATE_DISPLACEMENT_OC_cuda)(long* Mesh_pointer_f,
@@ -283,55 +283,55 @@
                                                realw* deltatover2_F,
                                                realw* b_deltat_F,
                                                realw* b_deltatsqover2_F,
-                                               realw* b_deltatover2_F) {} 
+                                               realw* b_deltatover2_F) {}
 
 void FC_FUNC_(kernel_3_a_cuda,
               KERNEL_3_A_CUDA)(long* Mesh_pointer,
                                realw* deltatover2_F,
                                int* SIMULATION_TYPE_f,
                                realw* b_deltatover2_F,
-                               int* NCHUNKS_VAL) {} 
+                               int* NCHUNKS_VAL) {}
 
 void FC_FUNC_(kernel_3_b_cuda,
               KERNEL_3_B_CUDA)(long* Mesh_pointer,
                                realw* deltatover2_F,
                                int* SIMULATION_TYPE_f,
-                               realw* b_deltatover2_F) {} 
+                               realw* b_deltatover2_F) {}
 
 void FC_FUNC_(kernel_3_outer_core_cuda,
               KERNEL_3_OUTER_CORE_CUDA)(long* Mesh_pointer,
                                         realw* deltatover2_F,
                                         int* SIMULATION_TYPE_f,
-                                        realw* b_deltatover2_F) {} 
+                                        realw* b_deltatover2_F) {}
 
 
 //
 // src/cuda/noise_tomography_cuda.cu
 //
 
-void FC_FUNC_(fortranflush,FORTRANFLUSH)(int* rank){} 
+void FC_FUNC_(fortranflush,FORTRANFLUSH)(int* rank){}
 
-void FC_FUNC_(fortranprint,FORTRANPRINT)(int* id) {} 
+void FC_FUNC_(fortranprint,FORTRANPRINT)(int* id) {}
 
-void FC_FUNC_(fortranprintf,FORTRANPRINTF)(realw* val) {} 
+void FC_FUNC_(fortranprintf,FORTRANPRINTF)(realw* val) {}
 
-void FC_FUNC_(fortranprintd,FORTRANPRINTD)(double* val) {} 
+void FC_FUNC_(fortranprintd,FORTRANPRINTD)(double* val) {}
 
-void FC_FUNC_(make_displ_rand,MAKE_DISPL_RAND)(long* Mesh_pointer_f,realw* h_displ) {} 
+void FC_FUNC_(make_displ_rand,MAKE_DISPL_RAND)(long* Mesh_pointer_f,realw* h_displ) {}
 
 void FC_FUNC_(noise_transfer_surface_to_host,
               NOISE_TRANSFER_SURFACE_TO_HOST)(long* Mesh_pointer_f,
-                                              realw* h_noise_surface_movie) {} 
+                                              realw* h_noise_surface_movie) {}
 
 void FC_FUNC_(noise_add_source_master_rec_cu,
               NOISE_ADD_SOURCE_MASTER_REC_CU)(long* Mesh_pointer_f,
                                               int* it_f,
                                               int* irec_master_noise_f,
-                                              int* islice_selected_rec) {} 
+                                              int* islice_selected_rec) {}
 
 void FC_FUNC_(noise_add_surface_movie_cuda,
               NOISE_ADD_SURFACE_MOVIE_CUDA)(long* Mesh_pointer_f,
-                                            realw* h_noise_surface_movie) {} 
+                                            realw* h_noise_surface_movie) {}
 
 
 //
@@ -375,7 +375,7 @@
                                         int* ANISOTROPIC_KL_f,
                                         int* APPROXIMATE_HESS_KL_f,
                                         realw* deltat_f,
-                                        realw* b_deltat_f) {} 
+                                        realw* b_deltat_f) {}
 
 void FC_FUNC_(prepare_fields_rotation_device,
               PREPARE_FIELDS_ROTATION_DEVICE)(long* Mesh_pointer_f,
@@ -385,7 +385,7 @@
                                               realw* b_two_omega_earth_f,
                                               realw* b_A_array_rotation,
                                               realw* b_B_array_rotation,
-                                              int* NSPEC_OUTER_CORE_ROTATION) {} 
+                                              int* NSPEC_OUTER_CORE_ROTATION) {}
 
 void FC_FUNC_(prepare_fields_gravity_device,
               PREPARE_FIELDS_gravity_DEVICE)(long* Mesh_pointer_f,
@@ -399,7 +399,7 @@
                                              realw* minus_g_icb,
                                              realw* minus_g_cmb,
                                              double* RHO_BOTTOM_OC,
-                                             double* RHO_TOP_OC) {} 
+                                             double* RHO_TOP_OC) {}
 
 void FC_FUNC_(prepare_fields_attenuat_device,
               PREPARE_FIELDS_ATTENUAT_DEVICE)(long* Mesh_pointer_f,
@@ -428,7 +428,7 @@
                                                  realw* factor_common_inner_core,
                                                  realw* one_minus_sum_beta_inner_core,
                                                  realw* alphaval,realw* betaval,realw* gammaval,
-                                                 realw* b_alphaval,realw* b_betaval,realw* b_gammaval) {} 
+                                                 realw* b_alphaval,realw* b_betaval,realw* b_gammaval) {}
 
 void FC_FUNC_(prepare_fields_strain_device,
               PREPARE_FIELDS_STRAIN_DEVICE)(long* Mesh_pointer_f,
@@ -455,7 +455,7 @@
                                             realw* b_epsilondev_xz_inner_core,
                                             realw* b_epsilondev_yz_inner_core,
                                             realw* eps_trace_over_3_inner_core,
-                                            realw* b_eps_trace_over_3_inner_core) {} 
+                                            realw* b_eps_trace_over_3_inner_core) {}
 
 void FC_FUNC_(prepare_fields_absorb_device,
               PREPARE_FIELDS_ABSORB_DEVICE)(long* Mesh_pointer_f,
@@ -484,7 +484,7 @@
                                             int* ibelm_ymin_outer_core,int* ibelm_ymax_outer_core,
                                             realw* jacobian2D_xmin_outer_core, realw* jacobian2D_xmax_outer_core,
                                             realw* jacobian2D_ymin_outer_core, realw* jacobian2D_ymax_outer_core,
-                                            realw* vp_outer_core) {} 
+                                            realw* vp_outer_core) {}
 
 void FC_FUNC_(prepare_mpi_buffers_device,
               PREPARE_MPI_BUFFERS_DEVICE)(long* Mesh_pointer_f,
@@ -499,7 +499,7 @@
                                           int* num_interfaces_outer_core,
                                           int* max_nibool_interfaces_oc,
                                           int* nibool_interfaces_outer_core,
-                                          int* ibool_interfaces_outer_core){} 
+                                          int* ibool_interfaces_outer_core){}
 
 void FC_FUNC_(prepare_fields_noise_device,
               PREPARE_FIELDS_NOISE_DEVICE)(long* Mesh_pointer_f,
@@ -511,14 +511,14 @@
                                            realw* normal_y_noise,
                                            realw* normal_z_noise,
                                            realw* mask_noise,
-                                           realw* jacobian2D_top_crust_mantle) {} 
+                                           realw* jacobian2D_top_crust_mantle) {}
 
 void FC_FUNC_(prepare_oceans_device,
               PREPARE_OCEANS_DEVICE)(long* Mesh_pointer_f,
                                      int* npoin_oceans,
                                      int* h_iglob_ocean_load,
                                      realw* h_rmass_ocean_load_selected,
-                                     realw* h_normal_ocean_load) {} 
+                                     realw* h_normal_ocean_load) {}
 
 void FC_FUNC_(prepare_crust_mantle_device,
              PREPARE_CRUST_MANTLE_DEVICE)(long* Mesh_pointer_f,
@@ -551,7 +551,7 @@
                                           int* NCHUNKS_VAL,
                                           int* num_colors_outer,
                                           int* num_colors_inner,
-                                          int* num_elem_colors) {} 
+                                          int* num_elem_colors) {}
 
 void FC_FUNC_(prepare_outer_core_device,
               PREPARE_OUTER_CORE_DEVICE)(long* Mesh_pointer_f,
@@ -576,7 +576,7 @@
                                          int* h_ibelm_bottom_outer_core,
                                          int* num_colors_outer,
                                          int* num_colors_inner,
-                                         int* num_elem_colors) {} 
+                                         int* num_elem_colors) {}
 
 void FC_FUNC_(prepare_inner_core_device,
               PREPARE_INNER_CORE_DEVICE)(long* Mesh_pointer_f,
@@ -598,11 +598,11 @@
                                          int* h_ibelm_top_inner_core,
                                          int* num_colors_outer,
                                          int* num_colors_inner,
-                                         int* num_elem_colors) {} 
+                                         int* num_elem_colors) {}
 
 void FC_FUNC_(prepare_cleanup_device,
               PREPARE_CLEANUP_DEVICE)(long* Mesh_pointer_f,
-              int* NCHUNKS_VAL) {} 
+              int* NCHUNKS_VAL) {}
 
 
 //
@@ -610,88 +610,88 @@
 //
 
 void FC_FUNC_(transfer_fields_cm_to_device,
-              TRANSFER_FIELDS_CM_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_CM_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_ic_to_device,
-              TRANSFER_FIELDS_IC_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_IC_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_oc_to_device,
-              TRANSFER_FIELDS_OC_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_OC_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_cm_to_device,
               TRANSFER_FIELDS_B_CM_TO_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                              long* Mesh_pointer_f) {} 
+                                              long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_ic_to_device,
               TRANSFER_FIELDS_B_IC_TO_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                              long* Mesh_pointer_f) {} 
+                                              long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_oc_to_device,
               TRANSFER_FIELDS_B_OC_TO_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                              long* Mesh_pointer_f) {} 
+                                              long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_cm_from_device,
-              TRANSFER_FIELDS_CM_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_CM_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_ic_from_device,
-              TRANSFER_FIELDS_IC_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_IC_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_oc_from_device,
-              TRANSFER_FIELDS_OC_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_OC_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_cm_from_device,
               TRANSFER_B_FIELDS_CM_FROM_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                                long* Mesh_pointer_f) {} 
+                                                long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_ic_from_device,
               TRANSFER_B_FIELDS_IC_FROM_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                                long* Mesh_pointer_f) {} 
+                                                long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_oc_from_device,
               TRANSFER_B_FIELDS_OC_FROM_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                                long* Mesh_pointer_f) {} 
+                                                long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_displ_cm_from_device,
-              TRANSFER_DISPL_CM_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_DISPL_CM_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_displ_cm_from_device,
-              TRANSFER_B_DISPL_CM_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_B_DISPL_CM_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_displ_ic_from_device,
-              TRANSFER_DISPL_IC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_DISPL_IC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_displ_ic_from_device,
-              TRANSFER_B_DISPL_IC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_B_DISPL_IC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_displ_oc_from_device,
-              TRANSFER_DISPL_OC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_DISPL_OC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_displ_oc_from_device,
-              TRANSFER_B_DISPL_OC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_B_DISPL_OC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_veloc_cm_from_device,
-              TRANSFER_VELOC_CM_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {} 
+              TRANSFER_VELOC_CM_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_veloc_ic_from_device,
-              TRANSFER_VELOC_IC_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {} 
+              TRANSFER_VELOC_IC_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_veloc_oc_from_device,
-              TRANSFER_VELOC_OC_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {} 
+              TRANSFER_VELOC_OC_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_accel_cm_to_device,
-              TRANSFER_ACCEL_CM_TO_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_ACCEL_CM_TO_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_accel_cm_from_device,
-              TRANSFER_ACCEL_CM_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_ACCEL_CM_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_accel_cm_from_device,
-              TRANSFER_B_ACCEL_CM_FROM_DEVICE)(int* size, realw* b_accel,long* Mesh_pointer_f) {} 
+              TRANSFER_B_ACCEL_CM_FROM_DEVICE)(int* size, realw* b_accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_accel_ic_from_device,
-              TRANSFER_ACCEL_IC_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_ACCEL_IC_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_accel_oc_from_device,
-              TRANSFER_ACCEL_OC_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_ACCEL_OC_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_strain_cm_from_device,
               TRANSFER_STRAIN_CM_FROM_DEVICE)(long* Mesh_pointer,
@@ -700,7 +700,7 @@
                                                   realw* epsilondev_yy,
                                                   realw* epsilondev_xy,
                                                   realw* epsilondev_xz,
-                                                  realw* epsilondev_yz) {} 
+                                                  realw* epsilondev_yz) {}
 
 void FC_FUNC_(transfer_b_strain_cm_to_device,
               TRANSFER_B_STRAIN_CM_TO_DEVICE)(long* Mesh_pointer,
@@ -708,7 +708,7 @@
                                               realw* epsilondev_yy,
                                               realw* epsilondev_xy,
                                               realw* epsilondev_xz,
-                                              realw* epsilondev_yz) {} 
+                                              realw* epsilondev_yz) {}
 
 void FC_FUNC_(transfer_strain_ic_from_device,
               TRANSFER_STRAIN_IC_FROM_DEVICE)(long* Mesh_pointer,
@@ -717,7 +717,7 @@
                                               realw* epsilondev_yy,
                                               realw* epsilondev_xy,
                                               realw* epsilondev_xz,
-                                              realw* epsilondev_yz) {} 
+                                              realw* epsilondev_yz) {}
 
 void FC_FUNC_(transfer_b_strain_ic_to_device,
               TRANSFER_B_STRAIN_IC_TO_DEVICE)(long* Mesh_pointer,
@@ -725,7 +725,7 @@
                                               realw* epsilondev_yy,
                                               realw* epsilondev_xy,
                                               realw* epsilondev_xz,
-                                              realw* epsilondev_yz) {} 
+                                              realw* epsilondev_yz) {}
 
 void FC_FUNC_(transfer_b_rmemory_cm_to_device,
               TRANSFER_B_RMEMORY_CM_TO_DEVICE)(long* Mesh_pointer,
@@ -733,7 +733,7 @@
                                               realw* b_R_yy,
                                               realw* b_R_xy,
                                               realw* b_R_xz,
-                                              realw* b_R_yz) {} 
+                                              realw* b_R_yz) {}
 
 void FC_FUNC_(transfer_b_rmemory_ic_to_device,
               TRANSFER_B_RMEMORY_IC_TO_DEVICE)(long* Mesh_pointer,
@@ -741,17 +741,17 @@
                                               realw* b_R_yy,
                                               realw* b_R_xy,
                                               realw* b_R_xz,
-                                              realw* b_R_yz) {} 
+                                              realw* b_R_yz) {}
 
 void FC_FUNC_(transfer_rotation_from_device,
               TRANSFER_ROTATION_FROM_DEVICE)(long* Mesh_pointer,
                                              realw* A_array_rotation,
-                                             realw* B_array_rotation) {} 
+                                             realw* B_array_rotation) {}
 
 void FC_FUNC_(transfer_b_rotation_to_device,
               TRANSFER_B_ROTATION_TO_DEVICE)(long* Mesh_pointer,
                                               realw* A_array_rotation,
-                                              realw* B_array_rotation) {} 
+                                              realw* B_array_rotation) {}
 
 void FC_FUNC_(transfer_kernels_cm_to_host,
               TRANSFER_KERNELS_CM_TO_HOST)(long* Mesh_pointer,
@@ -759,30 +759,30 @@
                                            realw* h_alpha_kl,
                                            realw* h_beta_kl,
                                            realw* h_cijkl_kl,
-                                           int* NSPEC) {} 
+                                           int* NSPEC) {}
 
 void FC_FUNC_(transfer_kernels_ic_to_host,
               TRANSFER_KERNELS_IC_TO_HOST)(long* Mesh_pointer,
                                            realw* h_rho_kl,
                                            realw* h_alpha_kl,
                                            realw* h_beta_kl,
-                                           int* NSPEC) {} 
+                                           int* NSPEC) {}
 
 void FC_FUNC_(transfer_kernels_oc_to_host,
               TRANSFER_KERNELS_OC_TO_HOST)(long* Mesh_pointer,
                                            realw* h_rho_kl,
                                            realw* h_alpha_kl,
-                                           int* NSPEC) {} 
+                                           int* NSPEC) {}
 
 void FC_FUNC_(transfer_kernels_noise_to_host,
               TRANSFER_KERNELS_NOISE_TO_HOST)(long* Mesh_pointer,
                                               realw* h_Sigma_kl,
-                                              int* NSPEC) {} 
+                                              int* NSPEC) {}
 
 void FC_FUNC_(transfer_kernels_hess_cm_tohost,
               TRANSFER_KERNELS_HESS_CM_TOHOST)(long* Mesh_pointer,
                                               realw* h_hess_kl,
-                                              int* NSPEC) {} 
+                                              int* NSPEC) {}
 
 
 //
@@ -802,5 +802,5 @@
                                                int* number_receiver_global,
                                                int* ispec_selected_rec,
                                                int* ispec_selected_source,
-                                               int* ibool) {} 
+                                               int* ibool) {}
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/add_topography.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/add_topography.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/add_topography.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -159,19 +159,19 @@
            ! also make sure factor makes sense
            if(gamma < -0.02 .or. gamma > 1.02) then
                 call exit_MPI(myrank,'incorrect value of factor for topography gll points')
-           end if
+           endif
            !
 
            ! since not all GLL points are exactlly at R220, use a small
            ! tolerance for R220 detection
            if (abs(gamma) < SMALLVAL) then
                gamma = 0.0
-           end if
+           endif
            xstore(i,j,k,ispec) = xstore(i,j,k,ispec)*(ONE + gamma * elevation / r)
            ystore(i,j,k,ispec) = ystore(i,j,k,ispec)*(ONE + gamma * elevation / r)
            zstore(i,j,k,ispec) = zstore(i,j,k,ispec)*(ONE + gamma * elevation / r)
 
-        end do
-     end do
-  end do
+        enddo
+     enddo
+  enddo
   end subroutine add_topography_gll

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/add_topography_410_650.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/add_topography_410_650.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/add_topography_410_650.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -74,13 +74,13 @@
       xelm(ia) = xelm(ia)*(ONE + gamma * topo410 / r)
       yelm(ia) = yelm(ia)*(ONE + gamma * topo410 / r)
       zelm(ia) = zelm(ia)*(ONE + gamma * topo410 / r)
-    elseif(r>= R771/R_EARTH .and. r <= R670/R_EARTH) then
+    else if(r>= R771/R_EARTH .and. r <= R670/R_EARTH) then
 ! stretching between R771 and R670
       gamma = (r - R771/R_EARTH) / (R670/R_EARTH - R771/R_EARTH)
       xelm(ia) = xelm(ia)*(ONE + gamma * topo650 / r)
       yelm(ia) = yelm(ia)*(ONE + gamma * topo650 / r)
       zelm(ia) = zelm(ia)*(ONE + gamma * topo650 / r)
-    elseif(r > R670/R_EARTH .and. r < R400/R_EARTH) then
+    else if(r > R670/R_EARTH .and. r < R400/R_EARTH) then
 ! stretching between R670 and R400
       gamma = (R400/R_EARTH - r) / (R400/R_EARTH - R670/R_EARTH)
       xelm(ia) = xelm(ia)*(ONE + (topo410 + gamma * (topo650 - topo410)) / r)
@@ -149,13 +149,13 @@
                 xstore(i,j,k,ispec) = xstore(i,j,k,ispec)*(ONE + gamma * topo410 / r)
                 ystore(i,j,k,ispec) = ystore(i,j,k,ispec)*(ONE + gamma * topo410 / r)
                 zstore(i,j,k,ispec) = zstore(i,j,k,ispec)*(ONE + gamma * topo410 / r)
-        elseif(r>= R771/R_EARTH .and. r <= R670/R_EARTH) then
+        else if(r>= R771/R_EARTH .and. r <= R670/R_EARTH) then
         ! stretching between R771 and R670
                 gamma = (r - R771/R_EARTH) / (R670/R_EARTH - R771/R_EARTH)
                 xstore(i,j,k,ispec) = xstore(i,j,k,ispec)*(ONE + gamma * topo650 / r)
                 ystore(i,j,k,ispec) = ystore(i,j,k,ispec)*(ONE + gamma * topo650 / r)
                 zstore(i,j,k,ispec) = zstore(i,j,k,ispec)*(ONE + gamma * topo650 / r)
-        elseif(r > R670/R_EARTH .and. r < R400/R_EARTH) then
+        else if(r > R670/R_EARTH .and. r < R400/R_EARTH) then
         ! stretching between R670 and R400
                 gamma = (R400/R_EARTH - r) / (R400/R_EARTH - R670/R_EARTH)
                 xstore(i,j,k,ispec) = xstore(i,j,k,ispec)*(ONE + (topo410 + gamma * (topo650 - topo410)) / r)
@@ -165,7 +165,7 @@
         if(gamma < -0.0001 .or. gamma > 1.0001) call exit_MPI(myrank,'incorrect value of gamma for 410-650 topography')
 
         enddo
-     end do
-  end do
+     enddo
+  enddo
 
   end subroutine add_topography_410_650_gll

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/calc_jacobian.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/calc_jacobian.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/calc_jacobian.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -143,28 +143,28 @@
               sumdershapeeta = sumdershapeeta + hlagrange_eta
               sumdershapegamma = sumdershapegamma + hlagrange_gamma
 
-            end do
-          end do
-        end do
+            enddo
+          enddo
+        enddo
 
         ! Check the lagrange polynomial and its derivative
         if (abs(xmesh - xstore(i,j,k,ispec)) > TINYVAL &
           .or. abs(ymesh - ystore(i,j,k,ispec)) > TINYVAL &
           .or. abs(zmesh - zstore(i,j,k,ispec)) > TINYVAL ) then
           call exit_MPI(myrank,'new mesh are wrong in recalc_jacobian_gall3D.f90')
-        end if
+        endif
         if(abs(sumshape-one) >  TINYVAL) then
           call exit_MPI(myrank,'error shape functions in calc_jacobian_gll3D.f90')
-        end if
+        endif
         if(abs(sumdershapexi) >  TINYVAL) then
           call exit_MPI(myrank,'error derivative xi in calc_jacobian_gll3D.f90')
-        end if
+        endif
         if(abs(sumdershapeeta) >  TINYVAL) then
           call exit_MPI(myrank,'error derivative eta in calc_jacobian_gll3D.f90')
-        end if
+        endif
         if(abs(sumdershapegamma) >  TINYVAL) then
           call exit_MPI(myrank,'error derivative gamma in calc_jacobian_gll3D.f90')
-        end if
+        endif
 
         ! jacobian calculation
         jacobian = xxi*(yeta*zgamma-ygamma*zeta) - &
@@ -181,7 +181,7 @@
             (PI_OVER_TWO-theta)*RADIANS_TO_DEGREES,phi*RADIANS_TO_DEGREES
           print*,'  jacobian: ',jacobian
           call exit_MPI(myrank,'3D Jacobian undefined in calc_jacobian_gll3D.f90')
-        end if
+        endif
 
         !     invert the relation (Fletcher p. 50 vol. 2)
         jacobian_inv = ONE / jacobian
@@ -319,16 +319,16 @@
             .or. abs(ymesh - yelm2D(i,j)) > TINYVAL &
             .or. abs(zmesh - zelm2D(i,j)) > TINYVAL ) then
            call exit_MPI(myrank,'new boundary mesh is wrong in calc_jacobian_gll2D')
-        end if
+        endif
         if (abs(sumshape-one) >  TINYVAL) then
            call exit_MPI(myrank,'error shape functions in calc_jacobian_gll2D')
-        end if
+        endif
         if (abs(sumdershapexi) >  TINYVAL) then
            call exit_MPI(myrank,'error derivative xi in calc_jacobian_gll2D')
-        end if
+        endif
         if (abs(sumdershapeeta) >  TINYVAL) then
            call exit_MPI(myrank,'error derivative eta in calc_jacobian_gll2D')
-        end if
+        endif
 
         ! calculates j2D acobian
         unx = yxi*zeta - yeta*zxi
@@ -354,8 +354,8 @@
            normal(2,i,j,ispecb) = uny * jacobian_inv
            normal(3,i,j,ispecb) = unz * jacobian_inv
         endif
-     end do
-  end do
+     enddo
+  enddo
 
   end subroutine calc_jacobian_gll2D
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_central_cube.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_central_cube.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_central_cube.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -230,7 +230,7 @@
         if (mod(NPROC_XI,2)/=0 .and. NPROC_XI > 1) then
           if (ichunk == CHUNK_AB) then
             nz_inf_limit = ((nz_central_cube*2)/NPROC_XI)*floor(NPROC_XI/2.d0)
-          elseif (ichunk == CHUNK_AB_ANTIPODE) then
+          else if (ichunk == CHUNK_AB_ANTIPODE) then
             nz_inf_limit = ((nz_central_cube*2)/NPROC_XI)*ceiling(NPROC_XI/2.d0)
           endif
         else

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_regions_mesh.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_regions_mesh.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_regions_mesh.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -496,7 +496,7 @@
     nspec_att = 1
     allocate(Qmu_store(1,1,1,nspec_att), &
             tau_e_store(N_SLS,1,1,1,nspec_att),stat=ier)
-  end if
+  endif
   if(ier /= 0) stop 'error in allocate 1'
 
   ! array with model density
@@ -1216,7 +1216,7 @@
           stat=ier)
   if(ier /= 0) stop 'error in allocate 21'
 
-  if (ADIOS_FOR_AVS_DX) then 
+  if (ADIOS_FOR_AVS_DX) then
     call crm_save_mesh_files_adios(nspec,npointot,iregion_code, &
         num_ibool_AVS_DX, mask_ibool)
   else

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_regions_mesh_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_regions_mesh_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/create_regions_mesh_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -73,7 +73,7 @@
 
   ! create a prefix for the file name such as LOCAL_PATH/regX_
   call create_name_database_adios(reg_name,iregion_code,LOCAL_PATH)
-  outputname = trim(reg_name) // "AVS_DX.bp" 
+  outputname = trim(reg_name) // "AVS_DX.bp"
   write(group_name,"('SPECFEM3D_GLOBE_AVS_DX_reg',i1)") iregion_code
   call world_size(sizeprocs) ! TODO keep it in parameters
   ! Alias COMM_WORLD to use ADIOS
@@ -88,7 +88,7 @@
   !--- Define ADIOS variables -----------------------------
   call define_AVS_DX_global_data_adios(adios_group, myrank, nspec, ibool, &
       npointot, mask_ibool, group_size_inc, avs_dx_global_vars)
-    
+
   call define_AVS_DX_global_faces_data_adios (adios_group, &
       myrank, prname, nspec, iMPIcut_xi,iMPIcut_eta, &
       ibool,idoubling,xstore,ystore,zstore,num_ibool_AVS_DX,mask_ibool, &

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_absorb.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_absorb.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_absorb.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -135,12 +135,12 @@
     call exit_MPI(myrank,'ispecb5 should equal NSPEC2D_BOTTOM in absorbing boundary detection')
 
   ! save these temporary arrays for the solver for Stacey conditions
-  ! This files will be saved with the help of ADIOS if the 
+  ! This files will be saved with the help of ADIOS if the
   ! ADIOS_FOR_ARRAYS_SOLVER flag is set to true in the Par_file
   if (ADIOS_FOR_ARRAYS_SOLVER) then
     call get_absorb_adios(myrank, iregion, nimin, nimax, njmin, njmax, &
         nkmin_xi, nkmin_eta, NSPEC2DMAX_XMIN_XMAX,NSPEC2DMAX_YMIN_YMAX)
-  else  
+  else
     open(unit=27,file=prname(1:len_trim(prname))//'stacey.bin', &
           status='unknown',form='unformatted',action='write',iostat=ier)
     if( ier /= 0 ) call exit_MPI(myrank,'error opening stacey.bin file')

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_absorb_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_absorb_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_absorb_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -28,11 +28,11 @@
 !-------------------------------------------------------------------------------
 !> \file get_absorb_adios.f90
 !! \brief Function to write stacey boundary condition to disk with ADIOS.
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 
 !===============================================================================
-!> \brief Write stacey boundary conditions to a single file using ADIOS 
+!> \brief Write stacey boundary conditions to a single file using ADIOS
 !!
 !! \param myrank The MPI rank of the current process
 !! \param iregion The region the absorbing conditon is written for. Check
@@ -47,7 +47,7 @@
 !!                             in argument
 !! \param NSPEC2DMAX_YMIN_YMAX Integer to compute the size of the arrays
 !!                             in argument
-!! 
+!!
 !! \note This routine only call adios to write the file to disk, Note that he
 !!       necessary data preparation is done by the get_absorb() routine.
 subroutine get_absorb_adios(myrank, iregion, nimin, nimax, njmin, njmax, &
@@ -82,14 +82,14 @@
   call create_name_database_adios(reg_name,iregion,LOCAL_PATH)
 
   ! Postpend the actual file name.
-  outputname = trim(reg_name) // "stacey.bp" 
+  outputname = trim(reg_name) // "stacey.bp"
 
   ! save these temporary arrays for the solver for Stacey conditions
   write(group_name,"('SPECFEM3D_GLOBE_STACEY_reg',i1)") iregion
   call world_size(sizeprocs) ! TODO keep it in parameters
   ! Alias COMM_WORLD to use ADIOS
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
-  ! set the adios group size to 0 before incremented by calls to 
+  ! set the adios group size to 0 before incremented by calls to
   ! helpers functions.
   group_size_inc = 0
   call adios_declare_group(adios_group, group_name, &
@@ -99,7 +99,7 @@
   call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
   !--- Define ADIOS variables -----------------------------
-  local_dim = 2*NSPEC2DMAX_XMIN_XMAX 
+  local_dim = 2*NSPEC2DMAX_XMIN_XMAX
   call define_adios_global_integer_1d_array(adios_group, "njmin", &
       local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "njmax", &
@@ -121,7 +121,7 @@
                          adios_totalsize, adios_err)
 
   !--- Schedule writes for the previously defined ADIOS variables
-  local_dim = 2*NSPEC2DMAX_XMIN_XMAX 
+  local_dim = 2*NSPEC2DMAX_XMIN_XMAX
   call adios_set_path (adios_handle, "njmin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -137,7 +137,7 @@
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", nkmin_xi, adios_err)
 
-  local_dim = 2*NSPEC2DMAX_YMIN_YMAX 
+  local_dim = 2*NSPEC2DMAX_YMIN_YMAX
   call adios_set_path (adios_handle, "nimin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_ellipticity.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_ellipticity.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_ellipticity.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -105,8 +105,8 @@
            ystore(i,j,k,ispec)=ystore(i,j,k,ispec)*factor
            zstore(i,j,k,ispec)=zstore(i,j,k,ispec)*factor
 
-        end do
-      end do
-  end do
+        enddo
+      enddo
+  enddo
   end subroutine get_ellipticity_gll
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_jacobian_boundaries.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_jacobian_boundaries.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/get_jacobian_boundaries.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -150,13 +150,13 @@
                 xelm2D(j,k) = xstore(1,j,k,ispec)
                 yelm2D(j,k) = ystore(1,j,k,ispec)
                 zelm2D(j,k) = zstore(1,j,k,ispec)
-             end do
-          end do
+             enddo
+          enddo
           ! recalculate jacobian according to 2D GLL points
           call calc_jacobian_gll2D(myrank,ispecb1,xelm2D,yelm2D,zelm2D, &
                           yigll,zigll,jacobian2D_xmin,normal_xmin,&
                           NGLLY,NGLLZ,NSPEC2DMAX_XMIN_XMAX)
-     end if
+     endif
     endif
 
   ! on boundary: xmax
@@ -206,13 +206,13 @@
                 xelm2D(j,k) = xstore(NGLLX,j,k,ispec)
                 yelm2D(j,k) = ystore(NGLLX,j,k,ispec)
                 zelm2D(j,k) = zstore(NGLLX,j,k,ispec)
-             end do
-          end do
+             enddo
+          enddo
           ! recalculate jacobian according to 2D GLL points
           call calc_jacobian_gll2D(myrank,ispecb2,xelm2D,yelm2D,zelm2D,&
                           yigll,zigll,jacobian2D_xmax,normal_xmax,&
                           NGLLY,NGLLZ,NSPEC2DMAX_XMIN_XMAX)
-       end if
+       endif
     endif
 
   ! on boundary: ymin
@@ -262,13 +262,13 @@
                 xelm2D(i,k) = xstore(i,1,k,ispec)
                 yelm2D(i,k) = ystore(i,1,k,ispec)
                 zelm2D(i,k) = zstore(i,1,k,ispec)
-             end do
-          end do
+             enddo
+          enddo
           ! recalcualte 2D jacobian according to GLL points
           call calc_jacobian_gll2D(myrank,ispecb3,xelm2D,yelm2D,zelm2D,&
                           xigll,zigll,jacobian2D_ymin,normal_ymin,&
                           NGLLX,NGLLZ,NSPEC2DMAX_YMIN_YMAX)
-     end if
+     endif
     endif
 
   ! on boundary: ymax
@@ -318,13 +318,13 @@
                 xelm2D(i,k) = xstore(i,NGLLY,k,ispec)
                 yelm2D(i,k) = ystore(i,NGLLY,k,ispec)
                 zelm2D(i,k) = zstore(i,NGLLY,k,ispec)
-             end do
-          end do
+             enddo
+          enddo
           ! recalculate jacobian for 2D GLL points
           call calc_jacobian_gll2D(myrank,ispecb4,xelm2D,yelm2D,zelm2D,&
                           xigll,zigll,jacobian2D_ymax,normal_ymax,&
                           NGLLX,NGLLZ,NSPEC2DMAX_YMIN_YMAX)
-      end if
+      endif
     endif
 
   ! on boundary: bottom
@@ -373,13 +373,13 @@
                 xelm2D(i,j) = xstore(i,j,1,ispec)
                 yelm2D(i,j) = ystore(i,j,1,ispec)
                 zelm2D(i,j) = zstore(i,j,1,ispec)
-             end do
-          end do
+             enddo
+          enddo
           ! recalcuate 2D jacobian according to GLL points
           call calc_jacobian_gll2D(myrank,ispecb5,xelm2D,yelm2D,zelm2D,&
                           xigll,yigll,jacobian2D_bottom,normal_bottom,&
                           NGLLX,NGLLY,NSPEC2D_BOTTOM)
-     end if
+     endif
 
     endif
 
@@ -428,14 +428,14 @@
                 xelm2D(i,j) = xstore(i,j,NGLLZ,ispec)
                 yelm2D(i,j) = ystore(i,j,NGLLZ,ispec)
                 zelm2D(i,j) = zstore(i,j,NGLLZ,ispec)
-             end do
-          end do
+             enddo
+          enddo
           ! recalcuate jacobian according to 2D gll points
           call calc_jacobian_gll2D(myrank,ispecb6,xelm2D,yelm2D,zelm2D,&
                                   xigll,yigll,jacobian2D_top,normal_top,&
                                   NGLLX,NGLLY,NSPEC2D_TOP)
 
-      end if
+      endif
 
     endif
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/initialize_mesher.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/initialize_mesher.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/initialize_mesher.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -142,7 +142,7 @@
                 HONOR_1D_SPHERICAL_MOHO,CRUSTAL,ONE_CRUST,CASE_3D,TRANSVERSE_ISOTROPY, &
                 ISOTROPIC_3D_MANTLE,ANISOTROPIC_3D_MANTLE,HETEROGEN_3D_MANTLE, &
                 ATTENUATION,ATTENUATION_NEW,ATTENUATION_3D,ANISOTROPIC_INNER_CORE,NOISE_TOMOGRAPHY)
-  ! broadcasts optional ADIOS_ENABLED 
+  ! broadcasts optional ADIOS_ENABLED
   call broadcast_adios_parameters(myrank,ADIOS_ENABLED, &
       ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER, &
       ADIOS_FOR_SOLVER_MESHFILES, ADIOS_FOR_AVS_DX)

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/meshfem3D_models.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/meshfem3D_models.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/meshfem3D_models.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -792,7 +792,7 @@
 !          moho=0.0d0
 !          found_crust = .false.
           call model_epcrust(lat,lon,r,vpc,vsc,rhoc,moho,found_crust,elem_in_crust)
-!      end if
+!      endif
 
     case default
       stop 'crustal model type not defined'
@@ -911,7 +911,7 @@
 
     end select
 
-  end if
+  endif
 
   ! Get tau_e from tau_s and Qmu
   call model_attenuation_getstored_tau(Qmu, T_c_source, tau_s, tau_e, AM_V, AM_S, AS_V)

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_atten3D_QRFSI12.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_atten3D_QRFSI12.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_atten3D_QRFSI12.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -141,7 +141,7 @@
     j=0
     do l=0,MAXL_Q
       do m=0,l
-        if(m.eq.0)then
+        if(m==0)then
           j=j+1
           read(10,*)ll,mm,v1
           QRFSI12_Q_dqmu(k,j)=v1
@@ -728,15 +728,15 @@
 !!$       XCOSEC(I)=0.
 !!$       XP(I)=0.
 !!$      enddo
-!!$      IF(L.GT.1.AND.ABS(THETA).GT.1.E-5) GO TO 3
+!!$      IF(L>1.AND.ABS(THETA)>1.E-5) GO TO 3
 !!$      X(1)=FCT
-!!$      IF(L.EQ.0) RETURN
+!!$      IF(L==0) RETURN
 !!$      X(1)=CT*FCT
 !!$      X(2)=-ST*FCT/DSFL3
 !!$      XP(1)=-ST*FCT
 !!$      XP(2)=-.5D0*CT*FCT*DSFL3
-!!$      IF(ABS(THETA).LT.1.E-5) XCOSEC(2)=XP(2)
-!!$      IF(ABS(THETA).GE.1.E-5) XCOSEC(2)=X(2)/ST
+!!$      IF(ABS(THETA)<1.E-5) XCOSEC(2)=XP(2)
+!!$      IF(ABS(THETA)>=1.E-5) XCOSEC(2)=X(2)/ST
 !!$      RETURN
 !!$    3 X1=1.D0
 !!$      X2=CT
@@ -758,7 +758,7 @@
 !!$      XCOSEC(2)=X(2)*COSEC
 !!$      XP(2)=-XP(2)/SFL3
 !!$      SUM=SUM+2.D0*X(2)*X(2)
-!!$      IF(SUM-COMPAR.GT.SMALL) RETURN
+!!$      IF(SUM-COMPAR>SMALL) RETURN
 !!$      X1=X3
 !!$      X2=-X2/DSQRT(dble(FLOAT(L*(L+1))))
 !!$      DO  I=3,MP1
@@ -768,7 +768,7 @@
 !!$       XM=K
 !!$       X3=-(2.D0*COT*(XM-1.D0)*X2+F2*X1)/F1
 !!$       SUM=SUM+2.D0*X3*X3
-!!$       IF(SUM-COMPAR.GT.SMALL.AND.I.NE.LP1) RETURN
+!!$       IF(SUM-COMPAR>SMALL.AND.I/=LP1) RETURN
 !!$       X(I)=X3
 !!$       XCOSEC(I)=X(I)*COSEC
 !!$       X1=X2

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_attenuation.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_attenuation.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_attenuation.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -298,12 +298,12 @@
   else if(REFERENCE_1D_MODEL == REFERENCE_MODEL_SEA1D) then
      AM_V%Qr(:)     = SEA1DM_V_radius_sea1d(:)
      AM_V%Qmu(:)    = SEA1DM_V_Qmu_sea1d(:)
-  end if
+  endif
 
   do i = 1, AM_V%Qn
     call model_attenuation_getstored_tau(AM_V%Qmu(i), AM_V%QT_c_source, AM_V%Qtau_s, tau_e, AM_V, AM_S,AS_V)
     AM_V%Qtau_e(:,i) = tau_e(:)
-  end do
+  enddo
 
   ! re-defines 1D models with crustal modification if necessary
   if( CRUSTAL ) then
@@ -780,7 +780,7 @@
         demon = 1.0d0 + w**2 * tau_s(j)**2
         A(i) = A(i) + ((1.0d0 + (w**2 * tau_e(j) * tau_s(j)))/ demon)
         B(i) = B(i) + ((w * (tau_e(j) - tau_s(j))) / demon)
-     end do
+     enddo
 !     write(*,*)A(i),B(i),10**f(i)
   enddo
 
@@ -1102,7 +1102,7 @@
      itercount = itercount + 1
      if (prnt == 3) then
         write(*,*)itercount, func_evals, fv(1), how
-     elseif (prnt == 4) then
+     else if (prnt == 4) then
         write(*,*)
         write(*,*)'How: ',how
         write(*,*)'v: ',v

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_crustmaps.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_crustmaps.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_crustmaps.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -563,7 +563,7 @@
        velsl(i)=weightul*velocsnp(i)+weightur*velocsnp(i)+&
                weightll*velocs(1,ileftlng,i)+weightlr*velocs(1,irightlng,i)
       enddo
-    elseif(iupcolat==180*CRUSTMAP_RESOLUTION) then
+    else if(iupcolat==180*CRUSTMAP_RESOLUTION) then
       ! south pole
       do i=1,NLAYERS_CRUSTMAP
        thickl(i)=weightul*thickness(iupcolat,ileftlng,i)+weightur*thickness(iupcolat,irightlng,i)+&

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_epcrust.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_epcrust.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_epcrust.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -138,8 +138,8 @@
       vp_ep(ilon,jlat,1:3) = tmp(7:9)
       vs_ep(ilon,jlat,1:3) = tmp(10:12)
       rho_ep(ilon,jlat,1:3) = tmp(13:15)
-    end do
-  end do
+    enddo
+  enddo
   close(1001)
 
   end subroutine read_epcrust_model
@@ -171,7 +171,7 @@
   !if ( lat < EPCRUST_LAT_MIN .or. lat > EPCRUST_LAT_MAX &
   !        .or. lon < EPCRUST_LON_MIN .or. lon > EPCRUST_LON_MAX ) then
   !        stop 'incorrect enter EPCRUST model, check lat and lon'
-  !end if
+  !endif
 
   vp = ZERO
   vs = ZERO
@@ -201,8 +201,8 @@
       vpsmooth(:)=vpsmooth(:)+weightl*vp_ep(ilon,jlat,:)
       vssmooth(:)=vssmooth(:)+weightl*vs_ep(ilon,jlat,:)
       rhosmooth(:)=rhosmooth(:)+weightl*rho_ep(ilon,jlat,:)
-    end do
-  end if
+    enddo
+  endif
 
   !topo=(R_EARTH_KM+z0)/R_EARTH_KM
   !basement=(R_EARTH_KM+z0-zsmooth(1))/R_EARTH_KM
@@ -232,14 +232,14 @@
     rho=rhosmooth(3)
   else
     found_crust=.false.
-  end if
+  endif
 
   if (found_crust ) then
     scaleval=dsqrt(PI*GRAV*RHOAV)
     vp=vp*1000.d0/(R_EARTH*scaleval)
     vs=vs*1000.d0/(R_EARTH*scaleval)
     rho=rho*1000.d0/RHOAV
-  end if
+  endif
 
   !moho = -(z0-zsmooth(1)-zsmooth(2)-zsmooth(3))/R_EARTH_KM
   moho = (zsmooth(1)+zsmooth(2)+zsmooth(3))/R_EARTH_KM
@@ -248,7 +248,7 @@
   cut=7.0/R_EARTH_KM
   if ( moho < cut ) then
     moho = cut
-  end if
+  endif
 
   end subroutine model_epcrust
 
@@ -284,7 +284,7 @@
           print*, 'error cap:', cap_degree_EP
           print*, 'lat/lon:', x,y
           stop 'error cap_degree too small'
-  end if
+  endif
 
   CAP=cap_degree_EP * DEGREES_TO_RADIANS
   dtheta=0.5d0*CAP/dble(NTHETA_EP)
@@ -335,20 +335,20 @@
               xx(j)=0.0d0
               do k = 1,3
                       xx(j)=xx(j)+rotation_matrix(j,k)*xc(k)
-              end do
-      end do
+              enddo
+      enddo
       call xyz_2_rthetaphi_dble(xx(1),xx(2),xx(3),r_rot,theta_rot,phi_rot)
       call reduce(theta_rot,phi_rot)
       x1(i)=phi_rot*RADIANS_TO_DEGREES
       y1(i)=(PI_OVER_TWO-theta_rot)*RADIANS_TO_DEGREES
       if (x1(i) > 180.d0) x1(i)=x1(i)-360.d0
-    end do
-  end do
+    enddo
+  enddo
 
   if (abs(total-1.0d0) > 0.001d0) then
     print*,'error cap:',total,cap_degree_EP
     stop
-  end if
+  endif
 
   end subroutine epcrust_smooth_base
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_gapp2.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_gapp2.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_gapp2.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -201,21 +201,21 @@
     d=R_EARTH_-radius*R_EARTH_
 
     call d2id(d,nnr,dep,id,icon)
-    if(icon.ne.0) then
+    if(icon/=0) then
        write(6,*)icon
        write(6,*) radius,theta,phi,dvp,dvs,drho
     endif
 
     ! latitude
-    if(theta.ge.PI) then
+    if(theta>=PI) then
        ia = na
     else
        ia = theta / dtheta + 1
     endif
     ! longitude
-    if(phi .lt. 0.0d0) phi = phi + 2.*PI
+    if(phi < 0.0d0) phi = phi + 2.*PI
     io=phi / dphi + 1
-    if(io.gt.no) io=io-no
+    if(io>no) io=io-no
 
     ! velocity and density perturbations
     dvp = vp3(ia,io,id)/100.d0
@@ -246,20 +246,20 @@
     icon=0
     dmax=di(mr)
     dmin=di(0)
-    if(d.gt.dmax) then
+    if(d>dmax) then
        icon=99
-    else if(d.lt.dmin) then
+    else if(d<dmin) then
        icon=-99
-    else if(d.eq.dmax) then
+    else if(d==dmax) then
        id=mr+1
     else
        do i = 0, mr
-          if(d.lt.di(i)) then
+          if(d<di(i)) then
              id=i
              goto 900
           endif
        enddo
-    end if
+    endif
 900 continue
 
 !..................................................................

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_heterogen_mantle.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_heterogen_mantle.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_heterogen_mantle.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -114,7 +114,7 @@
 
   do i = 1,j
     read(10,rec=i,fmt='(F20.15)') HMM_rho_in(i)
-  end do
+  enddo
 
   close(10)
 
@@ -220,6 +220,6 @@
     drho = 0.
     dvp = 0.
     dvs = 0.
-  end if
+  endif
 
   end subroutine model_heterogen_mantle

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_jp1d.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_jp1d.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_jp1d.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -195,7 +195,7 @@
      vs = 3.5d0
      Qmu=600.0d0
      Qkappa=57827.0d0
-  end if
+  endif
 
 
 ! non-dimensionalize

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_jp3d.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_jp3d.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_jp3d.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -267,17 +267,17 @@
 !   when LAY = 2, the focus is in the lower crust;
 !   when LAY = 3, the focus is in the mantle wedge;
 !   when LAY = 4, the focus is beneath the plate boundary.
-  IF(HE.LE.H1)                   THEN
+  IF(HE<=H1)                   THEN
      LAY = 1
      found_crust = .true.
-  ELSE IF(HE.GT.H1.AND.HE.LE.H2) THEN
+  ELSE IF(HE>H1.AND.HE<=H2) THEN
      LAY = 2
      found_crust = .true.
-  ELSE IF(HE.GT.H2.AND.HE.LE.H3) THEN
+  ELSE IF(HE>H2.AND.HE<=H3) THEN
      LAY = 3
   ELSE
      LAY = 4
-  END IF
+  endif
 
   CALL VEL1D(HE,vp,LAY,1)
   CALL VEL1D(HE,vs,LAY,2)
@@ -289,13 +289,13 @@
   vs = vs*(1.0d0+dvs)
 
 ! determine rho
-  if(LAY .eq. 1) then
+  if(LAY == 1) then
      rho=2.6
   endif
-  if(LAY .eq. 2) then
+  if(LAY == 2) then
      rho=2.9
   endif
-  if(LAY .GT. 2) then
+  if(LAY > 2) then
      rho=3.3+(vs-4.4)*0.66667
   endif
 ! non-dimensionalize
@@ -426,7 +426,7 @@
       DO 10 I  = 1,IPMAX
       IP1      = IP+1
       PNOW     = (FLOAT(I)-PLX)/100.0
-      IF(PNOW.GE.PNX(IP1))   IP = IP1
+      IF(PNOW>=PNX(IP1))   IP = IP1
       IPLOCX(I)= IP
 10    CONTINUE
       RLX      = 1.0-RNX(1)*100.0
@@ -435,7 +435,7 @@
       DO 20 I  = 1,IRMAX
       IR1      = IR+1
       RNOW     = (FLOAT(I)-RLX)/100.0
-      IF(RNOW.GE.RNX(IR1))   IR = IR1
+      IF(RNOW>=RNX(IR1))   IR = IR1
       IRLOCX(I)= IR
 20    CONTINUE
       HLX      = 1.0-HNX(1)
@@ -444,7 +444,7 @@
       DO 30 I  = 1,IHMAX
       IH1      = IH+1
       HNOW     = FLOAT(I)-HLX
-      IF(HNOW.GE.HNX(IH1))   IH = IH1
+      IF(HNOW>=HNX(IH1))   IH = IH1
       IHLOCX(I)= IH
 30    CONTINUE
       RETURN
@@ -469,14 +469,14 @@
   JP3DM_P     = 90.0-PE/DEGREES_TO_RADIANS
   JP3DM_R     = RE/DEGREES_TO_RADIANS
   JP3DM_H     = HE
-  IF(LAY.LE.3)       THEN
+  IF(LAY<=3)       THEN
      CALL PRHF(JP3DM_IPLOCA,JP3DM_IRLOCA,JP3DM_IHLOCA,JP3DM_PLA,JP3DM_RLA,JP3DM_HLA, &
           JP3DM_PNA,JP3DM_RNA,JP3DM_HNA,MPA,MRA,MHA,MKA)
-  ELSE IF(LAY.EQ.4)  THEN
+  ELSE IF(LAY==4)  THEN
      CALL PRHF(JP3DM_IPLOCB,JP3DM_IRLOCB,JP3DM_IHLOCB,JP3DM_PLB,JP3DM_RLB,JP3DM_HLB, &
           JP3DM_PNB,JP3DM_RNB,JP3DM_HNB,MPB,MRB,MHB,MKB)
   ELSE
-  END IF
+  endif
 
   JP3DM_WV(1) = JP3DM_PF1*JP3DM_RF1*JP3DM_HF1
   JP3DM_WV(2) = JP3DM_PF*JP3DM_RF1*JP3DM_HF1
@@ -488,12 +488,12 @@
   JP3DM_WV(8) = JP3DM_PF*JP3DM_RF*JP3DM_HF
 
   !   calculate velocity
-  IF(LAY.LE.3)      THEN
+  IF(LAY<=3)      THEN
      CALL VABPS(MPA,MRA,MHA,JP3DM_VELAP,V)
-  ELSE IF(LAY.EQ.4) THEN
+  ELSE IF(LAY==4) THEN
      CALL VABPS(MPB,MRB,MHB,JP3DM_VELBP,V)
   ELSE
-  END IF
+  endif
 
   RETURN
   END SUBROUTINE VEL3
@@ -600,12 +600,12 @@
 
         DO 1 I = 1,50
            I1     = I+1
-           IF(P.GE.JP3DM_PN(I).AND.P.LT.JP3DM_PN(I1)) GO TO 11
+           IF(P>=JP3DM_PN(I).AND.P<JP3DM_PN(I1)) GO TO 11
 1          CONTINUE
 11         CONTINUE
            DO 2 J = 1,62
               J1     = J+1
-              IF(R.GE.JP3DM_RRN(J).AND.R.LT.JP3DM_RRN(J1)) GO TO 22
+              IF(R>=JP3DM_RRN(J).AND.R<JP3DM_RRN(J1)) GO TO 22
 2             CONTINUE
 22            CONTINUE
               PF    = (P-JP3DM_PN(I))/(JP3DM_PN(I1)-JP3DM_PN(I))
@@ -616,17 +616,17 @@
               WV2   = PF*RF1
               WV3   = PF1*RF
               WV4   = PF*RF
-              IF(IJK.EQ.1)       THEN
+              IF(IJK==1)       THEN
                  HE  = WV1*JP3DM_DEPA(I,J)  + WV2*JP3DM_DEPA(I1,J) &
                       + WV3*JP3DM_DEPA(I,J1) + WV4*JP3DM_DEPA(I1,J1)
-              ELSE IF(IJK.EQ.2)  THEN
+              ELSE IF(IJK==2)  THEN
                  HE  = WV1*JP3DM_DEPB(I,J)  + WV2*JP3DM_DEPB(I1,J) &
                       + WV3*JP3DM_DEPB(I,J1) + WV4*JP3DM_DEPB(I1,J1)
-              ELSE IF(IJK.EQ.3)  THEN
+              ELSE IF(IJK==3)  THEN
                  HE  = WV1*JP3DM_DEPC(I,J)  + WV2*JP3DM_DEPC(I1,J) &
                       + WV3*JP3DM_DEPC(I,J1) + WV4*JP3DM_DEPC(I1,J1)
               ELSE
-              END IF
+              endif
   RETURN
   END SUBROUTINE HLAY
 
@@ -641,8 +641,8 @@
 
   A1    = dmin1(C1,C2)
   A2    = dmax1(C1,C2)
-  IF(C.LT.A1)   C = A1
-  IF(C.GT.A2)   C = A2
+  IF(C<A1)   C = A1
+  IF(C>A2)   C = A2
 
   END SUBROUTINE LIMIT
 
@@ -661,22 +661,22 @@
   integer :: IPS,LAY
   double precision :: HE,V,VM,HM
 
-  IF(LAY.EQ.1)      THEN
+  IF(LAY==1)      THEN
     V    = 6.0
-    IF(IPS.EQ.2)    V = 3.5
-  ELSE IF(LAY.EQ.2) THEN
+    IF(IPS==2)    V = 3.5
+  ELSE IF(LAY==2) THEN
     V    = 6.7
-    IF(IPS.EQ.2)    V = 3.8
-  ELSE IF(LAY.GE.3) THEN
+    IF(IPS==2)    V = 3.8
+  ELSE IF(LAY>=3) THEN
     HM   = 40.0
-    IF(HE.LT.HM)    THEN
+    IF(HE<HM)    THEN
       CALL JPMODEL(IPS,HM,VM)
       V  = VM-(HM-HE)*0.003
     ELSE
       CALL JPMODEL(IPS,HE,V)
-    END IF
+    endif
   ELSE
-  END IF
+  endif
 
   RETURN
   END
@@ -738,16 +738,16 @@
       K1     = K+1
       H1     = JP3DM_DEPJ(K)
       H2     = JP3DM_DEPJ(K1)
-      IF(H.GE.H1.AND.H.LT.H2) GO TO 3
+      IF(H>=H1.AND.H<H2) GO TO 3
 2     CONTINUE
 3     CONTINUE
 
   H12    = (H-H1)/(H2-H1)
-  IF(IPS.EQ.1)  THEN
+  IF(IPS==1)  THEN
      V   = (JP3DM_VP(K1)-JP3DM_VP(K))*H12+JP3DM_VP(K)
   ELSE
      V   = (JP3DM_VS(K1)-JP3DM_VS(K))*H12+JP3DM_VS(K)
-  END IF
+  endif
 
   RETURN
   END

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_s362ani.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_s362ani.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_s362ani.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -168,11 +168,11 @@
   lu=1                    ! --- log unit: input 3-D model
   if(THREE_D_MODEL  ==  THREE_D_MODEL_S362ANI) then
     modeldef='DATA/s362ani/S362ANI'
-  elseif(THREE_D_MODEL  ==  THREE_D_MODEL_S362WMANI) then
+  else if(THREE_D_MODEL  ==  THREE_D_MODEL_S362WMANI) then
     modeldef='DATA/s362ani/S362WMANI'
-  elseif(THREE_D_MODEL  ==  THREE_D_MODEL_S362ANI_PREM) then
+  else if(THREE_D_MODEL  ==  THREE_D_MODEL_S362ANI_PREM) then
     modeldef='DATA/s362ani/S362ANI_PREM'
-  elseif(THREE_D_MODEL  ==  THREE_D_MODEL_S29EA) then
+  else if(THREE_D_MODEL  ==  THREE_D_MODEL_S29EA) then
     modeldef='DATA/s362ani/S2.9EA'
   else
     stop 'unknown 3D model in read_model_s362ani'

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_sea99_s.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_sea99_s.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/model_sea99_s.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -170,15 +170,15 @@
 
   !----------------------- depth in the model ------------------
   dep=R_EARTH_KM*(R_UNIT_SPHERE - radius)
-  if (dep .le. sea99_depth(1)) then
+  if (dep <= sea99_depth(1)) then
      id1 = 1
      xd1 = 0
-  else if (dep .ge. sea99_depth(sea99_ndep)) then
+  else if (dep >= sea99_depth(sea99_ndep)) then
      id1 = sea99_ndep
      xd1 = 0
   else
      do i = 2, sea99_ndep
-        if (dep .le. sea99_depth(i)) then
+        if (dep <= sea99_depth(i)) then
            id1 = i-1
            xd1 = (dep-sea99_depth(i-1)) / (sea99_depth(i) - sea99_depth(i-1))
            exit

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/moho_stretching.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/moho_stretching.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/moho_stretching.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -137,8 +137,8 @@
           ! tolerance for R220 detection, fix R220
           if (abs(gamma) < SMALLVAL) then
             gamma = 0.0d0
-          end if
-        end if
+          endif
+        endif
 
         if(gamma < -0.0001d0 .or. gamma > 1.0001d0) &
           call exit_MPI(myrank,'incorrect value of gamma for moho from crust 2.0')
@@ -164,15 +164,15 @@
           ! tolerance for R220 detection, fix R220
           if (abs(gamma) < SMALLVAL) then
             gamma = 0.0d0
-          end if
-        end if
+          endif
+        endif
 
         if(gamma < -0.0001d0 .or. gamma > 1.0001d0) &
           call exit_MPI(myrank,'incorrect value of gamma for moho from crust 2.0')
 
         call move_point(ia,xelm,yelm,zelm,x,y,z,gamma,elevation,r)
 
-      end if
+      endif
 
     endif ! TOPOGRAPHY
 
@@ -187,16 +187,16 @@
       count_mantle = count_mantle + 1
     endif
 
-  end do
+  enddo
 
   ! sets flag when all corners are above moho
   if( count_crust == NGNOD) then
     elem_in_crust = .true.
-  end if
+  endif
   ! sets flag when all corners are below moho
   if( count_mantle == NGNOD) then
     elem_in_mantle = .true.
-  end if
+  endif
 
   ! small stretch check: stretching should affect only points above R220
   if( r*R_EARTH < R220 ) then
@@ -297,16 +297,16 @@
       count_mantle = count_mantle + 1
     endif
 
-  end do
+  enddo
 
   ! sets flag when all corners are above moho
   if( count_crust == NGNOD) then
     elem_in_crust = .true.
-  end if
+  endif
   ! sets flag when all corners are below moho
   if( count_mantle == NGNOD) then
     elem_in_mantle = .true.
-  end if
+  endif
 
   ! small stretch check: stretching should affect only points above R220
   if( r*R_EARTH < R220 ) then
@@ -376,10 +376,10 @@
       gamma = (( r - R60)/( R35 - R60)) ! keeps r60 fixed
       if (abs(gamma)<SMALLVAL) then
         gamma=0.0d0
-      end if
+      endif
     else
       gamma=0.0d0
-    end if
+    endif
     if(gamma < -0.0001d0 .or. gamma > 1.0001d0) &
       stop 'incorrect value of gamma for moho from crust 2.0'
 
@@ -396,10 +396,10 @@
       gamma=((r-R60)/(R35-R60)) ! keeps r60 fixed
       if (abs(gamma)<SMALLVAL) then
         gamma=0.0d0
-      end if
+      endif
     else
       gamma=0.0d0
-    end if
+    endif
     if(gamma < -0.0001d0 .or. gamma > 1.0001d0) &
       stop 'incorrect value of gamma for moho from crust 2.0'
 
@@ -417,13 +417,13 @@
         gamma=(r-R220/R_EARTH)/(R60-R220/R_EARTH)
         if (abs(gamma)<SMALLVAL) then
           gamma=0.0d0
-        end if
+        endif
       else
         gamma=0.0d0
-      end if
+      endif
 
       call move_point(ia,xelm,yelm,zelm,x,y,z,gamma,elevation,r)
-    end if
+    endif
 
   else if (moho > R25) then
     ! moho above r25
@@ -436,10 +436,10 @@
       gamma=(r-R60)/(R35-R60) ! keeps r60 fixed
       if (abs(gamma)<SMALLVAL) then
         gamma=0.0d0
-      end if
+      endif
     else
       gamma=0.0d0
-    end if
+    endif
     if(gamma < -0.0001d0 .or. gamma > 1.0001d0) &
       stop 'incorrect value of gamma for moho from crust 2.0'
 
@@ -457,14 +457,14 @@
         gamma=(r-R25)/(R15-R25) ! keeps mesh at r25 fixed
         if (abs(gamma)<SMALLVAL) then
           gamma=0.0d0
-        end if
+        endif
       else
         gamma=0.0d0
-      end if
+      endif
 
       call move_point(ia,xelm,yelm,zelm,x,y,z,gamma,elevation,r)
-    end if
-  end if
+    endif
+  endif
 
   end subroutine stretch_deep_moho
 
@@ -524,10 +524,10 @@
       gamma = ((r-R220/R_EARTH)/(R35-R220/R_EARTH))
       if (abs(gamma)<SMALLVAL) then
         gamma=0.0d0
-      end if
+      endif
     else
       gamma=0.0d0
-    end if
+    endif
     if(gamma < -0.0001d0 .or. gamma > 1.0001d0) &
       stop 'incorrect value of gamma for moho from crust 2.0'
 
@@ -544,10 +544,10 @@
       gamma=((r-R220/R_EARTH)/(R35-R220/R_EARTH))
       if (abs(gamma)<SMALLVAL) then
         gamma=0.0d0
-      end if
+      endif
     else
       gamma=0.0d0
-    end if
+    endif
     if(gamma < -0.0001d0 .or. gamma > 1.0001d0) &
       stop 'incorrect value of gamma for moho from crust 2.0'
 
@@ -564,10 +564,10 @@
       gamma=(r-R220/R_EARTH)/(R35-R220/R_EARTH)
       if (abs(gamma)<SMALLVAL) then
         gamma=0.0d0
-      end if
+      endif
     else
       gamma=0.0d0
-    end if
+    endif
     if(gamma < -0.0001d0 .or. gamma > 1.0001d0) &
       stop 'incorrect value of gamma for moho from crust 2.0'
 
@@ -582,13 +582,13 @@
         gamma=(r-R25)/(R15-R25)
         if (abs(gamma)<SMALLVAL) then
           gamma=0.0d0
-        end if
+        endif
       else
         gamma=0.0d0
-      end if
+      endif
 
       call move_point(ia,xelm,yelm,zelm,x,y,z,gamma,elevation,r)
-    end if
+    endif
   endif
 
   end subroutine stretch_moho
@@ -699,7 +699,7 @@
 !    if(r >= RMOHO/R_EARTH) then
 !! stretching above the Moho
 !      gamma = (1.0d0 - r) / (1.0d0 - RMOHO/R_EARTH)
-!    elseif(r>= R220/R_EARTH .and. r< RMOHO/R_EARTH) then
+!    else if(r>= R220/R_EARTH .and. r< RMOHO/R_EARTH) then
 !! stretching between R220 and RMOHO
 !      gamma = (r - R220/R_EARTH) / (RMOHO/R_EARTH - R220/R_EARTH)
 !    endif

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/save_arrays_solver_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/save_arrays_solver_adios.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/save_arrays_solver_adios.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -28,7 +28,7 @@
 !-------------------------------------------------------------------------------
 !> \file get_absorb_adios.f90
 !! \brief Function to write stacey boundary condition to disk with ADIOS.
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 
 !===============================================================================
@@ -41,9 +41,9 @@
 !! \param ibool Array of information on every mesh point
 !! \param iregion_code The region the absorbing conditon is written for. Check
 !!                     constant.h files to see what these regions are.
-!! \param xstore Array with the x coordinates of the mesh points 
-!! \param ystore Array with the y coordinates of the mesh points 
-!! \param zstore Array with the z coordinates of the mesh points 
+!! \param xstore Array with the x coordinates of the mesh points
+!! \param ystore Array with the y coordinates of the mesh points
+!! \param zstore Array with the z coordinates of the mesh points
 !! \param NSPEC2DMAX_XMIN_XMAX Integer to compute the size of the arrays
 !!                             in argument
 !! \param NSPEC2DMAX_YMIN_YMAX Integer to compute the size of the arrays
@@ -127,14 +127,14 @@
   !---------------------------------------------------------
 
   ! create the name for the database of the current slide and region
-  outputname = trim(reg_name) // "solver_data.bp" 
+  outputname = trim(reg_name) // "solver_data.bp"
 
   ! save arrays for the solver to run.
   write(group_name,"('SPECFEM3D_GLOBE_ARRAYS_SOLVER_reg',i1)") iregion_code
   call world_size(sizeprocs) ! TODO keep it in parameters
   ! Alias COMM_WORLD to use ADIOS
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
-  ! set the adios group size to 0 before incremented by calls to 
+  ! set the adios group size to 0 before incremented by calls to
   ! helpers functions.
   group_size_inc = 0
   call adios_declare_group(adios_group, group_name, &
@@ -150,7 +150,7 @@
   call define_adios_integer_scalar (adios_group, "nglob", "", &
       group_size_inc)
 
-  local_dim = nglob 
+  local_dim = nglob
   call define_adios_global_real_1d_array(adios_group, "xstore", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "ystore", &
@@ -209,7 +209,7 @@
   call define_adios_global_real_1d_array(adios_group, "gammazstore", &
       local_dim, group_size_inc)
 
-  local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani 
+  local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani
   if(iregion_code /= IREGION_OUTER_CORE) then
     !   save anisotropy in the inner core only
     if(ANISOTROPIC_INNER_CORE .and. iregion_code == IREGION_INNER_CORE) then
@@ -379,7 +379,7 @@
   call adios_write(adios_handle, "nspec", nspec, adios_err)
   call adios_write(adios_handle, "nglob", nglob, adios_err)
 
-  local_dim = nglob 
+  local_dim = nglob
   call adios_set_path (adios_handle, "xstore", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -389,7 +389,7 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", tmp_array_y, adios_err)
-  
+
   call adios_set_path (adios_handle, "zstore", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -497,7 +497,7 @@
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", gammazstore, adios_err)
 
-  local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani 
+  local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani
   if(iregion_code /= IREGION_OUTER_CORE) then
     !   save anisotropy in the inner core only
     if(ANISOTROPIC_INNER_CORE .and. iregion_code == IREGION_INNER_CORE) then
@@ -699,11 +699,11 @@
   !---------------------------------------------------------
 
   ! Postpend the actual file name.
-  outputname = trim(reg_name) // "boundary.bp" 
+  outputname = trim(reg_name) // "boundary.bp"
 
-  ! save boundary arrays in ADIOS files 
+  ! save boundary arrays in ADIOS files
   write(group_name,"('SPECFEM3D_GLOBE_BOUNDARY_reg',i1)") iregion_code
-  ! set the adios group size to 0 before incremented by calls to 
+  ! set the adios group size to 0 before incremented by calls to
   ! helpers functions.
   group_size_inc = 0
   call adios_declare_group(adios_group, group_name, &
@@ -723,73 +723,73 @@
       group_size_inc)
   call define_adios_integer_scalar (adios_group, "NSPEC2D_TOP", "", &
       group_size_inc)
-  
+
   !local_dim = NSPEC2DMAX_XMIN_YMAX
-  local_dim = size (ibelm_xmin) 
+  local_dim = size (ibelm_xmin)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_xmin", &
       local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_xmax", &
       local_dim, group_size_inc)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (ibelm_ymin) 
+  local_dim = size (ibelm_ymin)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_ymin", &
       local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_ymax", &
       local_dim, group_size_inc)
 
   !local_dim = NSPEC2D_BOTTOM
-  local_dim = size (ibelm_bottom) 
+  local_dim = size (ibelm_bottom)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_bottom", &
       local_dim, group_size_inc)
 
   !local_dim = NSPEC2D_TOP
-  local_dim = size (ibelm_top) 
+  local_dim = size (ibelm_top)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_top", &
       local_dim, group_size_inc)
 
   !local_dim = NDIM*NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (normal_xmin) 
+  local_dim = size (normal_xmin)
   call define_adios_global_real_1d_array(adios_group, "normal_xmin", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "normal_xmax", &
       local_dim, group_size_inc)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (normal_ymin) 
+  local_dim = size (normal_ymin)
   call define_adios_global_real_1d_array(adios_group, "normal_ymin", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "normal_ymax", &
       local_dim, group_size_inc)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM
-  local_dim = size (normal_bottom) 
+  local_dim = size (normal_bottom)
   call define_adios_global_real_1d_array(adios_group, "normal_bottom", &
       local_dim, group_size_inc)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP
-  local_dim = size (normal_top) 
+  local_dim = size (normal_top)
   call define_adios_global_real_1d_array(adios_group, "normal_top", &
       local_dim, group_size_inc)
 
   !local_dim = NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (jacobian2D_xmin) 
+  local_dim = size (jacobian2D_xmin)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_xmin", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_xmax", &
       local_dim, group_size_inc)
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (jacobian2D_ymin) 
+  local_dim = size (jacobian2D_ymin)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_ymin", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_ymax", &
       local_dim, group_size_inc)
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM
-  local_dim = size (jacobian2D_bottom) 
+  local_dim = size (jacobian2D_bottom)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_bottom", &
       local_dim, group_size_inc)
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP
-  local_dim = size (jacobian2D_top) 
+  local_dim = size (jacobian2D_top)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_top", &
       local_dim, group_size_inc)
 
@@ -806,9 +806,9 @@
   call adios_write(adios_handle, "nspec2D_ymax", nspec2D_ymax, adios_err)
   call adios_write(adios_handle, "NSPEC2D_BOTTOM", NSPEC2D_BOTTOM, adios_err)
   call adios_write(adios_handle, "NSPEC2D_TOP", NSPEC2D_TOP, adios_err)
-  
+
   !local_dim = NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (ibelm_xmin) 
+  local_dim = size (ibelm_xmin)
   call adios_set_path (adios_handle, "ibelm_xmin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -819,7 +819,7 @@
   call adios_write(adios_handle, "array", ibelm_xmax, adios_err)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (ibelm_ymin) 
+  local_dim = size (ibelm_ymin)
   call adios_set_path (adios_handle, "ibelm_ymin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -830,21 +830,21 @@
   call adios_write(adios_handle, "array", ibelm_ymax, adios_err)
 
   !local_dim = NSPEC2D_BOTTOM
-  local_dim = size (ibelm_bottom) 
+  local_dim = size (ibelm_bottom)
   call adios_set_path (adios_handle, "ibelm_bottom", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", ibelm_bottom, adios_err)
 
   !local_dim = NSPEC2D_TOP
-  local_dim = size (ibelm_top) 
+  local_dim = size (ibelm_top)
   call adios_set_path (adios_handle, "ibelm_top", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", ibelm_top, adios_err)
 
   !local_dim = NDIM*NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (normal_xmin) 
+  local_dim = size (normal_xmin)
   call adios_set_path (adios_handle, "normal_xmin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -855,7 +855,7 @@
   call adios_write(adios_handle, "array", normal_xmax, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (normal_ymin) 
+  local_dim = size (normal_ymin)
   call adios_set_path (adios_handle, "normal_ymin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -866,21 +866,21 @@
   call adios_write(adios_handle, "array", normal_ymax, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM
-  local_dim = size (normal_bottom) 
+  local_dim = size (normal_bottom)
   call adios_set_path (adios_handle, "normal_bottom", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", normal_bottom, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP
-  local_dim = size (normal_top) 
+  local_dim = size (normal_top)
   call adios_set_path (adios_handle, "normal_top", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", normal_top, adios_err)
 
   !local_dim = NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (jacobian2D_xmin) 
+  local_dim = size (jacobian2D_xmin)
   call adios_set_path (adios_handle, "jacobian2D_xmin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -891,7 +891,7 @@
   call adios_write(adios_handle, "array", jacobian2D_xmax, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (jacobian2D_ymin) 
+  local_dim = size (jacobian2D_ymin)
   call adios_set_path (adios_handle, "jacobian2D_ymin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -902,14 +902,14 @@
   call adios_write(adios_handle, "array", jacobian2D_ymax, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM
-  local_dim = size (jacobian2D_bottom) 
+  local_dim = size (jacobian2D_bottom)
   call adios_set_path (adios_handle, "jacobian2D_bottom", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", jacobian2D_bottom, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP
-  local_dim = size (jacobian2D_top) 
+  local_dim = size (jacobian2D_top)
   call adios_set_path (adios_handle, "jacobian2D_top", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -923,7 +923,7 @@
   !--- Attenuation arrays ----------------------------------
   !---------------------------------------------------------
   if(ATTENUATION) then
-    outputname = trim(reg_name) // "attenuation.bp" 
+    outputname = trim(reg_name) // "attenuation.bp"
     write(group_name,"('SPECFEM3D_GLOBE_ATTENUATION_reg',i1)") iregion_code
     group_size_inc = 0
     call adios_declare_group(adios_group, group_name, &
@@ -953,17 +953,17 @@
     !--- Schedule writes for the previously defined ADIOS variables
     call adios_write(adios_handle, "T_c_source", T_c_source, adios_err)
 
-    local_dim = size (tau_s) 
+    local_dim = size (tau_s)
     call adios_set_path (adios_handle, "tau_s", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
     call adios_write(adios_handle, "array", tau_s, adios_err)
-    local_dim = size (tau_e_store) 
+    local_dim = size (tau_e_store)
     call adios_set_path (adios_handle, "tau_e_store", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
     call adios_write(adios_handle, "array", tau_e_store, adios_err)
-    local_dim = size (Qmu_store) 
+    local_dim = size (Qmu_store)
     call adios_set_path (adios_handle, "Qmu_store", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -978,7 +978,7 @@
   !--- dvp arrays ------------------------------------------
   !---------------------------------------------------------
   if(HETEROGEN_3D_MANTLE .and. iregion_code == IREGION_CRUST_MANTLE) then
-    outputname = trim(reg_name) // "dvp.bp" 
+    outputname = trim(reg_name) // "dvp.bp"
     write(group_name,"('SPECFEM3D_GLOBE_DVP_reg',i1)") iregion_code
     group_size_inc = 0
     call adios_declare_group(adios_group, group_name, &
@@ -986,7 +986,7 @@
     call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
     !--- Define ADIOS variables -----------------------------
-    local_dim = size (dvpstore) 
+    local_dim = size (dvpstore)
     call define_adios_global_real_1d_array(adios_group, "dvp", &
         local_dim, group_size_inc)
     !--- Open an ADIOS handler to the restart file. ---------
@@ -1024,7 +1024,7 @@
 
 !===============================================================================
 !> \brief Save the meshfiles that will be used by the solver in an ADIOS format.
-!! 
+!!
 !! \param myrank The MPI rank of the current process.
 !! \param iregion_code Code of the region considered. See constant.h for details
 !! \param reg_name Output file prefix with the name of the region included
@@ -1072,7 +1072,7 @@
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   ! isotropic model
-  outputname = trim(reg_name) // "solver_meshfiles.bp" 
+  outputname = trim(reg_name) // "solver_meshfiles.bp"
   write(group_name,"('SPECFEM3D_GLOBE_solver_meshfiles_reg',i1)") iregion_code
 
   group_size_inc = 0
@@ -1083,37 +1083,37 @@
 
   !--- Define ADIOS variables -----------------------------
   !--- vp arrays -------------------------------------------
-  local_dim = size (kappavstore) 
+  local_dim = size (kappavstore)
   call define_adios_global_real_1d_array(adios_group, "vp", &
       local_dim, group_size_inc)
   !--- vs arrays -------------------------------------------
-  local_dim = size (rhostore) 
+  local_dim = size (rhostore)
   call define_adios_global_real_1d_array(adios_group, "vs", &
       local_dim, group_size_inc)
   !--- rho arrays ------------------------------------------
-  local_dim = size (rhostore) 
+  local_dim = size (rhostore)
   call define_adios_global_real_1d_array(adios_group, "rho", &
       local_dim, group_size_inc)
   ! transverse isotropic model
   if( TRANSVERSE_ISOTROPY ) then
     !--- vpv arrays ----------------------------------------
-    local_dim = size (kappavstore) 
+    local_dim = size (kappavstore)
     call define_adios_global_real_1d_array(adios_group, "vpv", &
         local_dim, group_size_inc)
     !--- vph arrays ----------------------------------------
-    local_dim = size (kappavstore) 
+    local_dim = size (kappavstore)
     call define_adios_global_real_1d_array(adios_group, "vph", &
         local_dim, group_size_inc)
     !--- vsv arrays ----------------------------------------
-    local_dim = size (rhostore) 
+    local_dim = size (rhostore)
     call define_adios_global_real_1d_array(adios_group, "vsv", &
         local_dim, group_size_inc)
     !--- vsh arrays ----------------------------------------
-    local_dim = size (rhostore) 
+    local_dim = size (rhostore)
     call define_adios_global_real_1d_array(adios_group, "vsh", &
         local_dim, group_size_inc)
     !--- eta arrays ----------------------------------------
-    local_dim = size (eta_anisostore) 
+    local_dim = size (eta_anisostore)
     call define_adios_global_real_1d_array(adios_group, "eta", &
         local_dim, group_size_inc)
   endif
@@ -1132,7 +1132,7 @@
 
   !--- Schedule writes for the previously defined ADIOS variables
   !--- vp arrays -------------------------------------------
-  local_dim = size (kappavstore) 
+  local_dim = size (kappavstore)
   call adios_set_path (adios_handle, "vp", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -1140,7 +1140,7 @@
       sqrt( (kappavstore+4.*muvstore/3.)/rhostore )*scaleval1, &
       adios_err)
   !--- vs arrays -------------------------------------------
-  local_dim = size (rhostore) 
+  local_dim = size (rhostore)
   call adios_set_path (adios_handle, "vs", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -1148,7 +1148,7 @@
       sqrt( muvstore/rhostore )*scaleval1, &
       adios_err)
   !--- rho arrays ------------------------------------------
-  local_dim = size (rhostore) 
+  local_dim = size (rhostore)
   call adios_set_path (adios_handle, "rho", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -1159,7 +1159,7 @@
   ! transverse isotropic model
   if( TRANSVERSE_ISOTROPY ) then
     !--- vpv arrays ----------------------------------------
-    local_dim = size (kappavstore) 
+    local_dim = size (kappavstore)
     call adios_set_path (adios_handle, "vpv", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1167,7 +1167,7 @@
         sqrt( (kappavstore+4.*muvstore/3.)/rhostore )*scaleval1, &
         adios_err)
     !--- vph arrays ----------------------------------------
-    local_dim = size (kappavstore) 
+    local_dim = size (kappavstore)
     call adios_set_path (adios_handle, "vph", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1175,7 +1175,7 @@
         sqrt( (kappahstore+4.*muhstore/3.)/rhostore )*scaleval1, &
         adios_err)
     !--- vsv arrays ----------------------------------------
-    local_dim = size (rhostore) 
+    local_dim = size (rhostore)
     call adios_set_path (adios_handle, "vsv", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1183,7 +1183,7 @@
         sqrt( muvstore/rhostore )*scaleval1, &
         adios_err)
     !--- vsh arrays ----------------------------------------
-    local_dim = size (rhostore) 
+    local_dim = size (rhostore)
     call adios_set_path (adios_handle, "vsh", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1191,7 +1191,7 @@
         sqrt( muhstore/rhostore )*scaleval1, &
         adios_err)
     !--- eta arrays ----------------------------------------
-    local_dim = size (eta_anisostore) 
+    local_dim = size (eta_anisostore)
     call adios_set_path (adios_handle, "eta", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1254,7 +1254,7 @@
 
 !===============================================================================
 !> \brief Save the arrays use by the solver for MPI communications.
-!! 
+!!
 !! \param myrank The MPI rank of the current process.
 !! \param iregion_code Code of the region considered. See constant.h for details
 !! \param LOCAL_PATH The full path to the output directory
@@ -1309,7 +1309,7 @@
   ! create the name for the database of the current slide and region
   call create_name_database_adios(prname,iregion_code,LOCAL_PATH)
 
-  outputname = trim(prname) // "solver_data_mpi.bp" 
+  outputname = trim(prname) // "solver_data_mpi.bp"
   write(group_name,"('SPECFEM3D_GLOBE_MPI_ARRAYS_reg',i1)") iregion_code
   call world_size(sizeprocs) ! TODO keep it in parameters
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
@@ -1432,7 +1432,7 @@
 
 ! saves arrays for boundaries such as MOHO, 400 and 670 discontinuities
   use mpi
-  
+
   use meshfem3d_par,only: &
     myrank, LOCAL_PATH
 
@@ -1471,7 +1471,7 @@
   if (ispec2D_670_top /= NSPEC2D_670 .or. ispec2D_670_bot /= NSPEC2D_670) &
            call exit_mpi(myrank,'Not the same number of 670 surface elements')
 
-  outputname = trim(LOCAL_PATH) // "/boundary_disc.bp" 
+  outputname = trim(LOCAL_PATH) // "/boundary_disc.bp"
   group_name = "SPECFEM3D_GLOBE_BOUNDARY_DISC"
   call world_size(sizeprocs) ! TODO keep it in parameters
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
@@ -1498,7 +1498,7 @@
         local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_400_bot", &
         local_dim, group_size_inc)
-  local_dim = NSPEC2D_670 
+  local_dim = NSPEC2D_670
   call define_adios_global_integer_1d_array(adios_group, "ibelm_670_top", &
         local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_670_bot", &
@@ -1534,7 +1534,7 @@
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", ibelm_moho_bot, adios_err)
 
-  local_dim = NSPEC2D_400 
+  local_dim = NSPEC2D_400
   call adios_set_path (adios_handle, "ibelm_400_top", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -1578,7 +1578,7 @@
 end subroutine save_arrays_solver_boundary_adios
 
 !-------------------------------------------------------------------------------
-!> Write local, global and offset dimensions to ADIOS 
+!> Write local, global and offset dimensions to ADIOS
 !! \param adios_handle Handle to the adios file
 !! \param local_dim Number of elements to be written by one process
 !! \param sizeprocs Number of MPI processes

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_chunks_data_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_chunks_data_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_chunks_data_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -37,7 +37,7 @@
     real(kind=4), dimension(:), allocatable :: x_adios, y_adios, z_adios
     integer(kind=4), dimension(:), allocatable :: idoubling, iglob1, iglob2, &
         iglob3, iglob4
-    real, dimension(:), allocatable :: vmin, vmax 
+    real, dimension(:), allocatable :: vmin, vmax
     real, dimension(:), allocatable :: dvp, dvs
   endtype
 
@@ -183,7 +183,7 @@
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating y_adios.")
   allocate(avs_dx_adios%z_adios(npoin), stat=ierr)
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating z_adios.")
-  
+
   allocate(avs_dx_adios%vmin(npoin), stat=ierr)
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating vmin.")
   allocate(avs_dx_adios%vmax(npoin), stat=ierr)
@@ -214,7 +214,7 @@
   call define_adios_global_real_1d_array(adios_group, &
       "points_chunks_stability/vmax", npoin, group_size_inc)
   !--- Variables for AVS_DXelementschunks.txt
-  call define_adios_global_real_1d_array(adios_group, & 
+  call define_adios_global_real_1d_array(adios_group, &
       "elements_chunks/idoubling", nspecface, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, &
       "elements_chunks/num_ibool_AVS_DX_iglob1", nspecface, group_size_inc)
@@ -226,7 +226,7 @@
       "elements_chunks/num_ibool_AVS_DX_iglob4", nspecface, group_size_inc)
 
   !--- Variables for AVS_DXelementschunks_dvp_dvs.txt
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     allocate(avs_dx_adios%dvp(nspecface), stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, "Error allocating dvp.")
     allocate(avs_dx_adios%dvs(nspecface), stat=ierr)
@@ -415,7 +415,7 @@
         if(.not. mask_ibool(iglobval(4))) then
           numpoin = numpoin + 1
           num_ibool_AVS_DX(iglobval(4)) = numpoin
-          avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec)) 
+          avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec))
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(1,NGLLY,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(1,NGLLY,1,ispec))
 
@@ -504,7 +504,7 @@
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(NGLLX,1,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(NGLLX,1,1,ispec))
 
-          vmax = sqrt((kappavstore(NGLLX,1,1,ispec) & 
+          vmax = sqrt((kappavstore(NGLLX,1,1,ispec) &
               +4.*muvstore(NGLLX,1,1,ispec)/3.)/rhostore(NGLLX,1,1,ispec))
           vmin = sqrt(muvstore(NGLLX,1,1,ispec)/rhostore(NGLLX,1,1,ispec))
           ! particular case of the outer core (muvstore contains 1/rho)
@@ -524,7 +524,7 @@
         if(.not. mask_ibool(iglobval(3))) then
           numpoin = numpoin + 1
           num_ibool_AVS_DX(iglobval(3)) = numpoin
-          avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec)) 
+          avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec))
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(NGLLX,NGLLY,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(NGLLX,NGLLY,1,ispec))
 
@@ -810,7 +810,7 @@
           vmax = sqrt((kappavstore(1,NGLLY,NGLLZ,ispec) &
               + 4.*muvstore(1,NGLLY,NGLLZ,ispec)/3.) &
               / rhostore(1,NGLLY,NGLLZ,ispec))
-          vmin = sqrt(muvstore(1,NGLLY,NGLLZ,ispec) & 
+          vmin = sqrt(muvstore(1,NGLLY,NGLLZ,ispec) &
               / rhostore(1,NGLLY,NGLLZ,ispec))
           ! particular case of the outer core (muvstore contains 1/rho)
           if(idoubling(ispec) == IFLAG_OUTER_CORE_NORMAL) then
@@ -1014,7 +1014,7 @@
   !--- Variables
   integer :: npoin, nspec
   integer :: ierr
-  
+
   npoin = avs_dx_adios%npoin
   nspec = avs_dx_adios%nspecface
 
@@ -1056,27 +1056,27 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob1, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_chunks/num_ibool_AVS_DX_iglob2", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob2, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_chunks/num_ibool_AVS_DX_iglob3", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob3, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_chunks/num_ibool_AVS_DX_iglob4", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob4, ierr)
-  
 
-  if(ISOTROPIC_3D_MANTLE) then 
+
+  if(ISOTROPIC_3D_MANTLE) then
     call adios_set_path(adios_handle, "elements_chunks/dvp", ierr)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         nspec, sizeprocs)
@@ -1129,7 +1129,7 @@
   if (ierr /= 0) call exit_MPI(myrank, &
       "Error deallocating num_ibool_AVS_DX_iglob4.")
 
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     deallocate(avs_dx_adios%dvp, stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, &
         "Error deallocating dvp.")
@@ -1138,7 +1138,7 @@
         "Error deallocating dvs.")
   endif
 
-  avs_dx_adios%npoin = 0 
+  avs_dx_adios%npoin = 0
   avs_dx_adios%nspecface = 0
 end subroutine free_AVS_DX_global_chunks_data_adios
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_data.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_data.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_data.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -249,9 +249,9 @@
                 write(10,*) numpoin,sngl(xstore(i,j,k,ispec)),&
                         sngl(ystore(i,j,k,ispec)),sngl(zstore(i,j,k,ispec))
                 flag(i,j,k,ispec) = numpoin
-        end do
-        end do
-        end do
+        enddo
+        enddo
+        enddo
   enddo
 
   close(10)
@@ -282,9 +282,9 @@
                 write(10,*) nelem,iglob1, &
                         iglob2,iglob3,iglob4,&
                         iglob5,iglob6,iglob7,iglob8
-        end do
-        end do
-        end do
+        enddo
+        enddo
+        enddo
   enddo
 
   close(10)
@@ -344,7 +344,7 @@
                         Qmu(7)=dble(Qmustore(i+1,j+1,k+1,ispec))
                         Qmu(8)=dble(Qmustore(i,j+1,k+1,ispec))
                         Qmu_average=Qmu(1)
-                end if
+                endif
                 !rho_average=sum(rho(1:4))/4.d0
                 !vp_average=sum(vp(1:4))/4.d0
                 !vs_average=sum(vs(1:4))/4.d0
@@ -356,11 +356,11 @@
                         write(1001,*) nelem,rho_average,vp_average,vs_average,Qmu_average
                 else
                         write(1001,*) nelem,rho_average,vp_average,vs_average
-                end if
+                endif
 
-        end do
-        end do
-        end do
+        enddo
+        enddo
+        enddo
   enddo
 
   close(1001)

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_data_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_data_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_data_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -29,7 +29,7 @@
 !> \file write_AVS_DX_global_adios.f90
 !! \brief Define a module to hold global AVS/DX data (points and elements) and
 !!        provides function to deal with them.
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 
 !===============================================================================
@@ -193,7 +193,7 @@
   integer ispec
   integer iglob1,iglob2,iglob3,iglob4,iglob5,iglob6,iglob7,iglob8
   integer npoin,numpoin
-  
+
   type(avs_dx_global_t), intent(inout) :: avs_dx_adios
 
   integer :: ierr
@@ -255,14 +255,14 @@
     if(.not. mask_ibool(iglob3)) then
       numpoin = numpoin + 1
       num_ibool_AVS_DX(iglob3) = numpoin
-      avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec)) 
+      avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec))
       avs_dx_adios%y_adios(numpoin) = sngl(ystore(NGLLX,NGLLY,1,ispec))
       avs_dx_adios%z_adios(numpoin) = sngl(zstore(NGLLX,NGLLY,1,ispec))
     endif
     if(.not. mask_ibool(iglob4)) then
       numpoin = numpoin + 1
       num_ibool_AVS_DX(iglob4) = numpoin
-      avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec)) 
+      avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec))
       avs_dx_adios%y_adios(numpoin) = sngl(ystore(1,NGLLY,1,ispec))
       avs_dx_adios%z_adios(numpoin) = sngl(zstore(1,NGLLY,1,ispec))
     endif
@@ -349,7 +349,7 @@
   !--- Variables
   integer :: npoin, nspec
   integer :: ierr
-  
+
   npoin = avs_dx_adios%npoin
   nspec = avs_dx_adios%nspec
 
@@ -379,27 +379,27 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob1, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob2", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob2, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob3", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob3, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob4", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob4, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob5", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob5, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob6", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
@@ -463,7 +463,7 @@
   if (ierr /= 0) call exit_MPI(myrank, &
       "Error deallocating num_ibool_AVS_DX_iglob8.")
 
-  avs_dx_adios%npoin = 0 
+  avs_dx_adios%npoin = 0
   avs_dx_adios%nspec = 0
 end subroutine free_AVS_DX_global_data_adios
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_faces_data_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_faces_data_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_global_faces_data_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -174,7 +174,7 @@
   enddo
   ! count global number of AVS or DX points
   npoin = count(mask_ibool(:))
-  
+
   avs_dx_adios%npoin = npoin
   avs_dx_adios%nspecface = nspecface
 
@@ -205,7 +205,7 @@
   call define_adios_global_real_1d_array(adios_group, "points_faces/z_value", &
       npoin, group_size_inc)
   !--- Variables for AVS_DXelementsfaces.txt
-  call define_adios_global_real_1d_array(adios_group, & 
+  call define_adios_global_real_1d_array(adios_group, &
       "elements_faces/idoubling", nspecface, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, &
       "elements_faces/num_ibool_AVS_DX_iglob1", nspecface, group_size_inc)
@@ -216,7 +216,7 @@
   call define_adios_global_real_1d_array(adios_group, &
       "elements_faces/num_ibool_AVS_DX_iglob4", nspecface, group_size_inc)
 
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     allocate(avs_dx_adios%dvp(nspecface), stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, "Error allocating dvp.")
     allocate(avs_dx_adios%dvs(nspecface), stat=ierr)
@@ -383,7 +383,7 @@
         if(.not. mask_ibool(iglob4)) then
           numpoin = numpoin + 1
           num_ibool_AVS_DX(iglob4) = numpoin
-          avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec)) 
+          avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec))
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(1,NGLLY,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(1,NGLLY,1,ispec))
         endif
@@ -419,7 +419,7 @@
         if(.not. mask_ibool(iglob3)) then
           numpoin = numpoin + 1
           num_ibool_AVS_DX(iglob3) = numpoin
-          avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec)) 
+          avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec))
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(NGLLX,NGLLY,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(NGLLX,NGLLY,1,ispec))
         endif
@@ -590,7 +590,7 @@
                 ! gets reference model values:rho,vpv,vph,vsv,vsh and eta_aniso
                 call meshfem3D_models_get1D_val(myrank, iregion_code, &
                     idoubling(ispec), r, rho, vpv, vph, vsv, vsh, eta_aniso, &
-                    Qkappa, Qmu, RICB, RCMB, RTOPDDOUBLEPRIME, R80, R120, & 
+                    Qkappa, Qmu, RICB, RCMB, RTOPDDOUBLEPRIME, R80, R120, &
                     R220, R400, R600, R670, R771, RMOHO, RMIDDLE_CRUST, ROCEAN)
 
                  ! calculates isotropic values
@@ -710,7 +710,7 @@
   !--- Variables
   integer :: npoin, nspec
   integer :: ierr
-  
+
   npoin = avs_dx_adios%npoin
   nspec = avs_dx_adios%nspecface
 
@@ -741,27 +741,27 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob1, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_faces/num_ibool_AVS_DX_iglob2", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob2, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_faces/num_ibool_AVS_DX_iglob3", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob3, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_faces/num_ibool_AVS_DX_iglob4", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob4, ierr)
-  
 
-  if(ISOTROPIC_3D_MANTLE) then 
+
+  if(ISOTROPIC_3D_MANTLE) then
     call adios_set_path(adios_handle, "elements_faces/dvp", ierr)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         nspec, sizeprocs)
@@ -809,7 +809,7 @@
   if (ierr /= 0) call exit_MPI(myrank, &
       "Error deallocating num_ibool_AVS_DX_iglob4.")
 
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     deallocate(avs_dx_adios%dvp, stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, &
         "Error deallocating dvp.")
@@ -818,7 +818,7 @@
         "Error deallocating dvs.")
   endif
 
-  avs_dx_adios%npoin = 0 
+  avs_dx_adios%npoin = 0
   avs_dx_adios%nspecface = 0
 end subroutine free_AVS_DX_global_faces_data_adios
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_surface_data_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_surface_data_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/write_AVS_DX_surface_data_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -145,7 +145,7 @@
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating y_adios.")
   allocate(avs_dx_adios%z_adios(npoin), stat=ierr)
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating z_adios.")
-  
+
   ! Allocate temporary arrays for AVS/DX elements.
   allocate(avs_dx_adios%idoubling(nspecface), stat=ierr)
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating idoubling.")
@@ -166,7 +166,7 @@
   call define_adios_global_real_1d_array(adios_group, &
       "points_surfaces/z_value", npoin, group_size_inc)
   !--- Variables for AVS_DXelementschunks.txt
-  call define_adios_global_real_1d_array(adios_group, & 
+  call define_adios_global_real_1d_array(adios_group, &
       "elements_surfaces/idoubling", nspecface, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, &
       "elements_surfaces/num_ibool_AVS_DX_iglob1", nspecface, group_size_inc)
@@ -178,7 +178,7 @@
       "elements_surfaces/num_ibool_AVS_DX_iglob4", nspecface, group_size_inc)
 
   !--- Variables for AVS_DXelementschunks_dvp_dvs.txt
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     allocate(avs_dx_adios%dvp(nspecface), stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, "Error allocating dvp.")
     allocate(avs_dx_adios%dvs(nspecface), stat=ierr)
@@ -446,7 +446,7 @@
       call exit_MPI(myrank,'&
           incorrect number of surface elements in AVS or DX file creation')
 
-end subroutine prepare_AVS_DX_surfaces_data_adios 
+end subroutine prepare_AVS_DX_surfaces_data_adios
 
 !===============================================================================
 subroutine write_AVS_DX_surfaces_data_adios(adios_handle, myrank, &
@@ -462,7 +462,7 @@
   !--- Variables
   integer :: npoin, nspec
   integer :: ierr
-  
+
   npoin = avs_dx_adios%npoin
   nspec = avs_dx_adios%nspecface
 
@@ -493,27 +493,27 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob1, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_surfaces/num_ibool_AVS_DX_iglob2", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob2, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_surfaces/num_ibool_AVS_DX_iglob3", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob3, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_surfaces/num_ibool_AVS_DX_iglob4", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob4, ierr)
-  
 
-  if(ISOTROPIC_3D_MANTLE) then 
+
+  if(ISOTROPIC_3D_MANTLE) then
     call adios_set_path(adios_handle, "elements_surfaces/dvp", ierr)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         nspec, sizeprocs)
@@ -560,7 +560,7 @@
   if (ierr /= 0) call exit_MPI(myrank, &
       "Error deallocating num_ibool_AVS_DX_iglob4.")
 
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     deallocate(avs_dx_adios%dvp, stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, &
         "Error deallocating dvp.")
@@ -569,7 +569,7 @@
         "Error deallocating dvs.")
   endif
 
-  avs_dx_adios%npoin = 0 
+  avs_dx_adios%npoin = 0
   avs_dx_adios%nspecface = 0
 end subroutine free_AVS_DX_surfaces_data_adios
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/adios_helpers.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/adios_helpers.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/adios_helpers.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -29,7 +29,7 @@
 !-------------------------------------------------------------------------------
 !> \file adios_helpers.f90
 !! \brief Helpers to set up adios features.
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 
 !===============================================================================
@@ -50,12 +50,12 @@
 
 
 !===============================================================================
-!> Define an ADIOS scalar double precision variable and autoincrement 
+!> Define an ADIOS scalar double precision variable and autoincrement
 !! the adios group size by (8).
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 subroutine define_adios_double_scalar (adios_group, name, path, group_size_inc)
@@ -68,7 +68,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 6 == real(kind=8) 
+  ! adios: 6 == real(kind=8)
   call adios_define_var (adios_group, name, path, 6,  "", "", "", varid)
   group_size_inc = group_size_inc + 8
 end subroutine define_adios_double_scalar
@@ -79,7 +79,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 subroutine define_adios_integer_scalar (adios_group, name, path, group_size_inc)
@@ -92,7 +92,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 2 == integer(kind=4) 
+  ! adios: 2 == integer(kind=4)
   call adios_define_var (adios_group, name, path, adios_integer,  "", "", "", varid)
   group_size_inc = group_size_inc + 4
 end subroutine define_adios_integer_scalar
@@ -103,7 +103,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 subroutine define_adios_byte_scalar (adios_group, name, path, group_size_inc)
@@ -116,7 +116,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 0 == byte == any_data_type(kind=1) 
+  ! adios: 0 == byte == any_data_type(kind=1)
   call adios_define_var (adios_group, name, path, 0,  "", "", "", varid)
   group_size_inc = group_size_inc + 1
 end subroutine define_adios_byte_scalar
@@ -127,7 +127,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param dim The number of elements in the 1D array. Required to
 !!            correctly increment adios group size.
 !! \param dim_str The "stringified" version of dim. Needed by adios
@@ -145,7 +145,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 2 == integer 
+  ! adios: 2 == integer
   call adios_define_var (adios_group, name, path, 2,  dim_str, "", "", varid)
   group_size_inc = group_size_inc + 4*dim
 end subroutine define_adios_integer_local_array1D
@@ -156,7 +156,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param dim The number of elements in the 1D array. Required to
 !!            correctly increment adios group size.
 !! \param dim_str The "stringified" version of dim. Needed by adios
@@ -174,7 +174,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 6 == real(kind=8) 
+  ! adios: 6 == real(kind=8)
   call adios_define_var (adios_group, name, path, 6, dim_str, "", "", varid)
   group_size_inc = group_size_inc + 8*dim
 end subroutine define_adios_double_local_array1D
@@ -185,7 +185,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param len The length of the string(number of character. in Fortran
 !!            it does not include a final '\0' -- null -- character)
 !! \param group_size_inc The inout adios group size to increment
@@ -203,10 +203,10 @@
   integer                          :: length
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
-  
-  ! adios: 9 == string 
+
+  ! adios: 9 == string
   call adios_define_var (adios_group, name, path, 9,  "", "", "", varid)
-  group_size_inc = group_size_inc + 1*length 
+  group_size_inc = group_size_inc + 1*length
 end subroutine define_adios_string
 
 !===============================================================================

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/auto_ner.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/auto_ner.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/auto_ner.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -301,10 +301,10 @@
         ner_test = ner_test + 1      ! Increment ner_test and
         ratio = (dr / ner_test) / w  ! look for a better
         xi = dabs(ratio - 1.0d0)     ! solution
-     end do
+     enddo
      rt(i) = dr / NER(i) / wt        ! Find the Ratio of Top
      rb(i) = dr / NER(i) / wb        ! and Bottom for completeness
-  end do
+  enddo
 
   end subroutine auto_optimal_ner
 
@@ -359,7 +359,7 @@
         max_edgemax = MAX(max_edgemax, edgemax)
         min_edgemin = MIN(min_edgemin, edgemin)
         max_aspect_ratio = MAX(max_aspect_ratio, aspect_ratio)
-     end do
+     enddo
      xi = (max_edgemax / min_edgemin)
 !       xi = abs(rcube_test - 981.0d0) / 45.0d0
 !       write(*,'(a,5(f14.4,2x))')'rcube, xi, ximin:-',rcube_test, xi, min_edgemin,max_edgemax,max_aspect_ratio
@@ -412,7 +412,7 @@
         dist_cc_icb = dist_cc_icb * 2
      endif
      somme = somme + dist_cc_icb
-  end do
+  enddo
   dist_moy = somme / (nex_xi + 1)
   ner = nint(dist_moy / ((PI * RICB_KM) / (2*nex_xi)))
 
@@ -458,7 +458,7 @@
              sqrt( (pts(ix2,1) - pts(ix3,1))**2 + (pts(ix2,2) - pts(ix3,2))**2 )
       edgemax = MAX(edgemax, edge)
       edgemin = MIN(edgemin, edge)
-  end do
+  enddo
 
   end subroutine get_size_min_max
 
@@ -496,11 +496,11 @@
               points(k,1) = x
               points(k,2) = y
               k = k + 1
-           end do
+           enddo
            nspec_chunks = nspec_chunks + 1
-        end do
-     end do
-  end do
+        enddo
+     enddo
+  enddo
 
   nspec_cube = 0
   do ix = 0,(nex_xi-1)*2,2
@@ -510,10 +510,10 @@
            points(k,1) = x
            points(k,2) = y
            k = k + 1
-        end do
+        enddo
         nspec_cube = nspec_cube + 1
-     end do
-  end do
+     enddo
+  enddo
 
   end subroutine compute_IC_mesh
 
@@ -601,6 +601,6 @@
      temp = x
      x    = -y
      y    = temp
-  end if
+  endif
 
   end subroutine compute_coordinate

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/broadcast_compute_parameters.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/broadcast_compute_parameters.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/broadcast_compute_parameters.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -348,7 +348,7 @@
 !> Broadcast the parameters relative to ADIOS output settings.
 !! \param myrank The rank of the MPI process in COMM_WORLD
 !! \param ADIOS_ENABLED Flag to indicate ADIOS output for seismograms.
-!! \param ADIOS_FOR_FORWARD_ARRAYS Flag to indicate that intermediate and 
+!! \param ADIOS_FOR_FORWARD_ARRAYS Flag to indicate that intermediate and
 !1        forward arrays are stored with the help of ADIOS.
 subroutine broadcast_adios_parameters(myrank,ADIOS_ENABLED,  &
     ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, &
@@ -361,7 +361,7 @@
   include 'mpif.h'
   include "constants.h"
   include "precision.h"
-  
+
   integer:: myrank
   logical:: ADIOS_ENABLED, ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, &
       ADIOS_FOR_ARRAYS_SOLVER, ADIOS_FOR_SOLVER_MESHFILES, ADIOS_FOR_AVS_DX

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/define_all_layers.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/define_all_layers.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/define_all_layers.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -263,7 +263,7 @@
       rmaxs(14) = RICB / R_EARTH
       rmins(14) = R_CENTRAL_CUBE / R_EARTH
 
-    elseif (ONE_CRUST) then
+    else if (ONE_CRUST) then
 
       ! 1D models:
       ! in order to increase stability and therefore to allow cheaper
@@ -667,7 +667,7 @@
       rmaxs(15) = RICB / R_EARTH
       rmins(15) = R_CENTRAL_CUBE / R_EARTH
 
-    elseif (ONE_CRUST) then
+    else if (ONE_CRUST) then
 
       ! 1D models:
       ! in order to increase stability and therefore to allow cheaper

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/get_timestep_and_layers.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/get_timestep_and_layers.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/get_timestep_and_layers.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -284,7 +284,7 @@
   ! the 670-discontinuity is moved up to 650 km depth.
   if (REFERENCE_1D_MODEL == REFERENCE_MODEL_1DREF) then
     NER_771_670 = NER_771_670 + 1
-  end if
+  endif
 
   !----
   !----  change some values in the case of regular PREM with two crustal layers or of 3D models

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/read_compute_parameters.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/read_compute_parameters.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/read_compute_parameters.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -254,7 +254,7 @@
     if(mod(NEX_ETA/4,NPROC_ETA) /= 0) stop 'NEX_ETA must be a multiple of 4*NPROC_ETA'
     if(mod(NEX_XI/8,NPROC_XI) /=0) CUT_SUPERBRICK_XI = .true.
     if(mod(NEX_ETA/8,NPROC_ETA) /=0) CUT_SUPERBRICK_ETA = .true.
-  elseif (SUPPRESS_CRUSTAL_MESH .or. .not. ADD_4TH_DOUBLING) then
+  else if (SUPPRESS_CRUSTAL_MESH .or. .not. ADD_4TH_DOUBLING) then
     if(mod(NEX_XI,16) /= 0) stop 'NEX_XI must be a multiple of 16'
     if(mod(NEX_ETA,16) /= 0) stop 'NEX_ETA must be a multiple of 16'
     if(mod(NEX_XI/8,NPROC_XI) /= 0) stop 'NEX_XI must be a multiple of 8*NPROC_XI'

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/read_value_parameters.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/read_value_parameters.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/shared/read_value_parameters.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -38,7 +38,7 @@
   common /param_err_common/ ierr
 
   call param_read(string_read, len(string_read), name, len(name), ierr);
-  if (ierr .ne. 0) return
+  if (ierr /= 0) return
   read(string_read,*) value_to_read
 
   end subroutine read_value_integer
@@ -56,7 +56,7 @@
   common /param_err_common/ ierr
 
   call param_read(string_read, len(string_read), name, len(name), ierr);
-  if (ierr .ne. 0) return
+  if (ierr /= 0) return
   read(string_read,*) value_to_read
 
   end subroutine read_value_double_precision
@@ -74,7 +74,7 @@
   common /param_err_common/ ierr
 
   call param_read(string_read, len(string_read), name, len(name), ierr);
-  if (ierr .ne. 0) return
+  if (ierr /= 0) return
   read(string_read,*) value_to_read
 
   end subroutine read_value_logical
@@ -92,7 +92,7 @@
   common /param_err_common/ ierr
 
   call param_read(string_read, len(string_read), name, len(name), ierr);
-  if (ierr .ne. 0) return
+  if (ierr /= 0) return
   value_to_read = string_read
 
   end subroutine read_value_string
@@ -107,7 +107,7 @@
   filename = 'DATA/Par_file'
 
   call param_open(filename, len(filename), ierr);
-  if (ierr .ne. 0) return
+  if (ierr /= 0) return
 
   end subroutine open_parameter_file
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/compute_forces_elastic.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/compute_forces_elastic.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/compute_forces_elastic.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -64,7 +64,7 @@
 !        print*,'third last step',it,'Rxx:',R_xx_crust_mantle(1,1,1,1,100),epsilondev_xx_crust_mantle(1,1,1,100), &
 !          displ_crust_mantle(1,iglob),displ_crust_mantle(2,iglob),displ_crust_mantle(3,iglob)
 !      endif
-!    elseif( SIMULATION_TYPE == 3 ) then
+!    else if( SIMULATION_TYPE == 3 ) then
 !      if( it == 1 .and. myrank == 0 ) then
 !        print*,'first step',it,'Rxx:',b_R_xx_crust_mantle(1,1,1,1,100),b_epsilondev_xx_crust_mantle(1,1,1,100), &
 !          b_displ_crust_mantle(1,iglob),b_displ_crust_mantle(2,iglob),b_displ_crust_mantle(3,iglob)
@@ -589,7 +589,7 @@
 !      if( it > NSTEP - 1000 .and. myrank == 0 ) then
 !        print*,'it',it,'Rxx:',R_xx_crust_mantle(1,1,1,1,100),epsilondev_xx_crust_mantle(1,1,1,100)
 !      endif
-!    elseif( SIMULATION_TYPE == 3 ) then
+!    else if( SIMULATION_TYPE == 3 ) then
 !      if( it <= 1000 .and. myrank == 0 ) then
 !        print*,'it',it,'Rxx:',b_R_xx_crust_mantle(1,1,1,1,100),b_epsilondev_xx_crust_mantle(1,1,1,100)
 !      endif

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/get_attenuation.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/get_attenuation.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/get_attenuation.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -58,7 +58,7 @@
   ! All of the following reads use the output parameters as their temporary arrays
   ! use the filename to determine the actual contents of the read
   if (ADIOS_FOR_ARRAYS_SOLVER) then
-    call read_attenuation_adios(myrank, prname, & 
+    call read_attenuation_adios(myrank, prname, &
        factor_common, scale_factor, tau_s, vx, vy, vz, vnspec, T_c_source)
   else
     open(unit=27, file=prname(1:len_trim(prname))//'attenuation.bin', &
@@ -495,7 +495,7 @@
 !        steps(r) = i-1
 !        r = r + 1
 !     endif
-!  end do
+!  enddo
 !  steps(r) = n
 !
 !  ! Run spline for each piece

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/initialize_simulation.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/initialize_simulation.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/initialize_simulation.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -150,7 +150,7 @@
 
   ! broadcasts optional GPU_MODE
   call broadcast_gpu_parameters(myrank,GPU_MODE)
-  ! broadcasts optional ADIOS_ENABLED 
+  ! broadcasts optional ADIOS_ENABLED
   call broadcast_adios_parameters(myrank,ADIOS_ENABLED, &
       ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER, &
       ADIOS_FOR_SOLVER_MESHFILES, ADIOS_FOR_AVS_DX)

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/locate_sources.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/locate_sources.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/locate_sources.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -911,7 +911,7 @@
   else
    if(isource < 10) then
       write(plot_file,"('/plot_source_time_function',i1,'.txt')") isource
-    elseif(isource < 100) then
+    else if(isource < 100) then
       write(plot_file,"('/plot_source_time_function',i2,'.txt')") isource
     else
       write(plot_file,"('/plot_source_time_function',i3,'.txt')") isource
@@ -970,7 +970,7 @@
   else
    if(isource < 10) then
       write(plot_file,"('/plot_source_spectrum',i1,'.txt')") isource
-    elseif(isource < 100) then
+    else if(isource < 100) then
       write(plot_file,"('/plot_source_spectrum',i2,'.txt')") isource
     else
       write(plot_file,"('/plot_source_spectrum',i3,'.txt')") isource

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/prepare_timerun.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/prepare_timerun.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/prepare_timerun.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -747,7 +747,7 @@
   ! reads in attenuation values
   if (ADIOS_FOR_ARRAYS_SOLVER) then
     call create_name_database_adios(prnamel, IREGION_CRUST_MANTLE, LOCAL_PATH)
-  else 
+  else
     call create_name_database(prnamel, myrank, IREGION_CRUST_MANTLE, LOCAL_PATH)
   endif
   call get_attenuation_model_3D_or_1D(myrank, prnamel, &
@@ -857,7 +857,7 @@
         enddo
       enddo
     enddo
-  enddo ! END DO CRUST MANTLE
+  enddo ! enddo CRUST MANTLE
 
   ! rescale in inner core
   do ispec = 1,NSPEC_INNER_CORE
@@ -891,7 +891,7 @@
         enddo
       enddo
     enddo
-  enddo ! END DO INNER CORE
+  enddo ! enddo INNER CORE
 
   ! precompute Runge-Kutta coefficients
   call get_attenuation_memory_values(tau_sigma_dble, deltat, alphaval_dble, betaval_dble, gammaval_dble)

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_arrays_solver_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_arrays_solver_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_arrays_solver_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -41,7 +41,7 @@
               READ_KAPPA_MU,READ_TISO, &
               ABSORBING_CONDITIONS,LOCAL_PATH)
 
-  use mpi 
+  use mpi
   use adios_read_mod
   implicit none
 
@@ -98,7 +98,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   integer(kind=8), dimension(256),target :: selections
@@ -111,7 +111,7 @@
   call create_name_database_adios(prname, iregion_code, LOCAL_PATH)
 
   ! Postpend the actual file name.
-  file_name= trim(prname) // "solver_data.bp" 
+  file_name= trim(prname) // "solver_data.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   ! Setup the ADIOS library to read the file
@@ -136,7 +136,7 @@
 
 
   ! mesh coordinates
-  local_dim = nglob 
+  local_dim = nglob
   start(1) = local_dim*myrank; count(1) = local_dim
   sel_num = sel_num+1
   sel => selections(sel_num)
@@ -168,7 +168,7 @@
   call adios_schedule_read(adios_handle, sel, "kappavstore/array", 0, 1, &
       kappavstore, adios_err)
   call check_adios_err(myrank,adios_err)
-  if(READ_KAPPA_MU) then 
+  if(READ_KAPPA_MU) then
     call adios_schedule_read(adios_handle, sel, "muvstore/array", 0, 1, &
         muvstore, adios_err)
     call check_adios_err(myrank,adios_err)
@@ -253,7 +253,7 @@
 
 
   if(ANISOTROPIC_INNER_CORE_VAL .and. iregion_code == IREGION_INNER_CORE) then
-    local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani 
+    local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani
     start(1) = local_dim*myrank; count(1) = local_dim
     sel_num = sel_num+1
     sel => selections(sel_num)
@@ -277,7 +277,7 @@
   endif
 
   if(ANISOTROPIC_3D_MANTLE_VAL .and. iregion_code == IREGION_CRUST_MANTLE) then
-    local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani 
+    local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani
     start(1) = local_dim*myrank; count(1) = local_dim
     sel_num = sel_num+1
     sel => selections(sel_num)
@@ -378,7 +378,7 @@
   ! in the case of stacey boundary conditions, add C*deltat/2 contribution to
   ! the mass matrix on Stacey edges for the crust_mantle and outer_core regions
   ! but not for the inner_core region thus the mass matrix must be replaced by
-  ! three mass matrices including the "C" damping matrix 
+  ! three mass matrices including the "C" damping matrix
   !
   ! if absorbing_conditions are not set or if NCHUNKS=6, only one mass matrix
   ! is needed for the sake of performance, only "rmassz" array will be filled

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_attenuation_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_attenuation_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_attenuation_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -62,7 +62,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! checks if attenuation is on and anything to do
@@ -72,7 +72,7 @@
 
   ! All of the following reads use the output parameters as their temporary arrays
   ! use the filename to determine the actual contents of the read
-  file_name= trim(prname) // "attenuation.bp" 
+  file_name= trim(prname) // "attenuation.bp"
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
       "verbose=1", adios_err)
@@ -87,7 +87,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = size (tau_s) 
+  local_dim = size (tau_s)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "tau_s/array", 0, 1, &
@@ -97,7 +97,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = size (factor_common) 
+  local_dim = size (factor_common)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "tau_e_store/array", 0, 1, &
@@ -107,7 +107,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = size (scale_factor) 
+  local_dim = size (scale_factor)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "Qmu_store/array", 0, 1, &

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_forward_arrays_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_forward_arrays_adios.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_forward_arrays_adios.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -32,7 +32,7 @@
 
 !-------------------------------------------------------------------------------
 !> \brief Read forward arrays from an ADIOS file.
-!> \note read_intermediate_forward_arrays_adios() 
+!> \note read_intermediate_forward_arrays_adios()
 !!       and read_forward_arrays_adios() are not factorized, because
 !>       the latest read the bp file in "b_" prefixed arrays
 subroutine read_intermediate_forward_arrays_adios()
@@ -51,7 +51,7 @@
   character(len=150) :: file_name
   integer(kind=8) :: group_size_inc
   integer :: local_dim, global_dim, offset
-!  integer, parameter :: num_arrays = 9 ! TODO correct number 
+!  integer, parameter :: num_arrays = 9 ! TODO correct number
 !  character(len=256), dimension(num_arrays) :: local_dims1, local_dims2, &
 !      global_dims1, global_dims2, offsets1, offsets2, array_name
   ! ADIOS variables
@@ -59,11 +59,11 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
 
-  file_name = trim(LOCAL_TMP_PATH) // "/dump_all_arrays_adios.bp" 
+  file_name = trim(LOCAL_TMP_PATH) // "/dump_all_arrays_adios.bp"
   call world_size(sizeprocs)
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
@@ -72,9 +72,9 @@
   call check_adios_err(myrank,adios_err)
   call adios_read_open_file (adios_handle, file_name, 0, comm, ierr)
   call check_adios_err(myrank,adios_err)
-  
 
-  local_dim = NDIM * NGLOB_CRUST_MANTLE 
+
+  local_dim = NDIM * NGLOB_CRUST_MANTLE
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "displ_crust_mantle/array", 0, 1, &
@@ -90,7 +90,7 @@
   ! NOTE: perform reads before changing selection, otherwise it will segfault
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
-  
+
   local_dim = NDIM * NGLOB_INNER_CORE
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -237,7 +237,7 @@
 
 !-------------------------------------------------------------------------------
 !> \brief Read forward arrays from an ADIOS file.
-!> \note read_intermediate_forward_arrays_adios() 
+!> \note read_intermediate_forward_arrays_adios()
 !!       and read_forward_arrays_adios() are not factorized, because
 !>       the latest read the bp file in "b_" prefixed arrays
 subroutine read_forward_arrays_adios()
@@ -261,11 +261,11 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
 
-  file_name = trim(LOCAL_TMP_PATH) // "/save_forward_arrays.bp" 
+  file_name = trim(LOCAL_TMP_PATH) // "/save_forward_arrays.bp"
   call world_size(sizeprocs)
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
@@ -274,9 +274,9 @@
   call check_adios_err(myrank,adios_err)
   call adios_read_open_file (adios_handle, file_name, 0, comm, ierr)
   call check_adios_err(myrank,adios_err)
-  
 
-  local_dim = NDIM * NGLOB_CRUST_MANTLE 
+
+  local_dim = NDIM * NGLOB_CRUST_MANTLE
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "displ_crust_mantle/array", 0, 1, &
@@ -292,7 +292,7 @@
   ! NOTE: perform reads before changing selection, otherwise it will segfault
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
-  
+
   local_dim = NDIM * NGLOB_INNER_CORE
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_mesh_databases_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_mesh_databases_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/read_mesh_databases_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -54,7 +54,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
@@ -62,7 +62,7 @@
   ! crust and mantle
   ! create name of database
   call create_name_database_adios(prname, IREGION_CRUST_MANTLE, LOCAL_PATH)
-  file_name= trim(prname) // "boundary.bp" 
+  file_name= trim(prname) // "boundary.bp"
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
       "verbose=1", adios_err)
@@ -91,7 +91,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_XMIN_XMAX_CM
-  local_dim = size (ibelm_xmin_crust_mantle) 
+  local_dim = size (ibelm_xmin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_xmin/array", 0, 1, &
@@ -105,7 +105,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX_CM
-  local_dim = size (ibelm_ymin_crust_mantle) 
+  local_dim = size (ibelm_ymin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_ymin/array", 0, 1, &
@@ -119,7 +119,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_BOTTOM_CM
-  local_dim = size (ibelm_bottom_crust_mantle) 
+  local_dim = size (ibelm_bottom_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_bottom/array", 0, 1, &
@@ -130,7 +130,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_TOP_CM
-  local_dim = size (ibelm_top_crust_mantle) 
+  local_dim = size (ibelm_top_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_top/array", 0, 1, &
@@ -141,7 +141,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX_CM
-  local_dim = size (normal_xmin_crust_mantle) 
+  local_dim = size (normal_xmin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_xmin/array", 0, 1, &
@@ -155,7 +155,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX_CM
-  local_dim = size (normal_ymin_crust_mantle) 
+  local_dim = size (normal_ymin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_ymin/array", 0, 1, &
@@ -169,7 +169,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM_CM
-  local_dim = size (ibelm_bottom_crust_mantle) 
+  local_dim = size (ibelm_bottom_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_bottom/array", 0, 1, &
@@ -180,7 +180,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP_CM
-  local_dim = size (ibelm_top_crust_mantle) 
+  local_dim = size (ibelm_top_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_top/array", 0, 1, &
@@ -191,7 +191,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX_CM
-  local_dim = size (jacobian2D_xmin_crust_mantle) 
+  local_dim = size (jacobian2D_xmin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_xmin/array", 0, 1, &
@@ -205,7 +205,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX_CM
-  local_dim = size (jacobian2D_ymin_crust_mantle) 
+  local_dim = size (jacobian2D_ymin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_ymin/array", 0, 1, &
@@ -219,7 +219,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLY*NSPEC2D_BOTTOM_CM
-  local_dim = size (jacobian2D_bottom_crust_mantle) 
+  local_dim = size (jacobian2D_bottom_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_bottom/array", 0, 1, &
@@ -230,7 +230,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLY*NSPEC2D_TOP_CM
-  local_dim = size (jacobian2D_top_crust_mantle) 
+  local_dim = size (jacobian2D_top_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_top/array", 0, 1, &
@@ -254,7 +254,7 @@
 
   ! create name of database
   call create_name_database_adios(prname, IREGION_OUTER_CORE, LOCAL_PATH)
-  file_name= trim(prname) // "boundary.bp" 
+  file_name= trim(prname) // "boundary.bp"
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
       "verbose=1", adios_err)
@@ -285,7 +285,7 @@
   nspec2D_zmin_outer_core = NSPEC2D_BOTTOM(IREGION_OUTER_CORE)
 
   !local_dim = NSPEC2DMAX_XMIN_XMAX_OC
-  local_dim = size (ibelm_xmin_outer_core) 
+  local_dim = size (ibelm_xmin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_xmin/array", 0, 1, &
@@ -299,7 +299,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX_OC
-  local_dim = size (ibelm_ymin_outer_core) 
+  local_dim = size (ibelm_ymin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_ymin/array", 0, 1, &
@@ -313,7 +313,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_BOTTOM_OC
-  local_dim = size (ibelm_bottom_outer_core) 
+  local_dim = size (ibelm_bottom_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_bottom/array", 0, 1, &
@@ -324,7 +324,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_TOP_OC
-  local_dim = size (ibelm_top_outer_core) 
+  local_dim = size (ibelm_top_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_top/array", 0, 1, &
@@ -335,7 +335,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX_OC
-  local_dim = size (normal_xmin_outer_core) 
+  local_dim = size (normal_xmin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_xmin/array", 0, 1, &
@@ -349,7 +349,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX_OC
-  local_dim = size (normal_ymin_outer_core) 
+  local_dim = size (normal_ymin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_ymin/array", 0, 1, &
@@ -363,7 +363,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM_OC
-  local_dim = size (normal_bottom_outer_core) 
+  local_dim = size (normal_bottom_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_bottom/array", 0, 1, &
@@ -374,7 +374,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP_OC
-  local_dim = size (normal_top_outer_core) 
+  local_dim = size (normal_top_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_top/array", 0, 1, &
@@ -385,7 +385,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX_OC
-  local_dim = size (jacobian2D_xmin_outer_core) 
+  local_dim = size (jacobian2D_xmin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_xmin/array", 0, 1, &
@@ -399,7 +399,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX_OC
-  local_dim = size (jacobian2D_ymin_outer_core) 
+  local_dim = size (jacobian2D_ymin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_ymin/array", 0, 1, &
@@ -414,7 +414,7 @@
 
 
   !local_dim = NGLLX*NGLLY*NSPEC2D_BOTTOM_OC
-  local_dim = size (jacobian2D_bottom_outer_core) 
+  local_dim = size (jacobian2D_bottom_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_bottom/array", 0, 1, &
@@ -425,7 +425,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLY*NSPEC2D_TOP_OC
-  local_dim = size (jacobian2D_top_outer_core) 
+  local_dim = size (jacobian2D_top_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_top/array", 0, 1, &
@@ -448,7 +448,7 @@
 
   ! create name of database
   call create_name_database_adios(prname, IREGION_INNER_CORE, LOCAL_PATH)
-  file_name= trim(prname) // "boundary.bp" 
+  file_name= trim(prname) // "boundary.bp"
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
       "verbose=1", adios_err)
@@ -477,7 +477,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_XMIN_XMAX_IC
-  local_dim = size (ibelm_xmin_inner_core) 
+  local_dim = size (ibelm_xmin_inner_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_xmin/array", 0, 1, &
@@ -491,7 +491,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX_IC
-  local_dim = size (ibelm_ymin_inner_core) 
+  local_dim = size (ibelm_ymin_inner_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_ymin/array", 0, 1, &
@@ -505,7 +505,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_BOTTOM_IC
-  local_dim = size (ibelm_bottom_inner_core) 
+  local_dim = size (ibelm_bottom_inner_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_bottom/array", 0, 1, &
@@ -516,7 +516,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_TOP_IC
-  local_dim = size (ibelm_top_inner_core) 
+  local_dim = size (ibelm_top_inner_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_top/array", 0, 1, &
@@ -535,7 +535,7 @@
 
   ! -- Boundary Mesh for crust and mantle ---
   if (SAVE_BOUNDARY_MESH .and. SIMULATION_TYPE == 3) then
-    file_name = LOCAL_PATH // "boundary_disc.bp" 
+    file_name = LOCAL_PATH // "boundary_disc.bp"
     call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
         "verbose=1", adios_err)
     call check_adios_err(myrank,adios_err)
@@ -761,13 +761,13 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! create the name for the database of the current slide and region
   call create_name_database_adios(prname, IREGION_CRUST_MANTLE, LOCAL_PATH)
 
-  file_name= trim(prname) // "solver_data_mpi.bp" 
+  file_name= trim(prname) // "solver_data_mpi.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -894,7 +894,7 @@
     if( ierr /= 0 ) &
       call exit_mpi(myrank,'error allocating num_elem_colors_crust_mantle array')
 
-    local_dim = num_colors_outer_crust_mantle + num_colors_inner_crust_mantle 
+    local_dim = num_colors_outer_crust_mantle + num_colors_inner_crust_mantle
     start(1) = local_dim*myrank; count(1) = local_dim
     call adios_selection_boundingbox (sel , 1, start, count)
     call adios_schedule_read(adios_handle, sel, &
@@ -944,13 +944,13 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! create the name for the database of the current slide and region
   call create_name_database_adios(prname, IREGION_OUTER_CORE, LOCAL_PATH)
 
-  file_name= trim(prname) // "solver_data_mpi.bp" 
+  file_name= trim(prname) // "solver_data_mpi.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -1129,13 +1129,13 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! create the name for the database of the current slide and region
   call create_name_database_adios(prname, IREGION_INNER_CORE, LOCAL_PATH)
 
-  file_name= trim(prname) // "solver_data_mpi.bp" 
+  file_name= trim(prname) // "solver_data_mpi.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -1262,7 +1262,7 @@
     if( ierr /= 0 ) &
       call exit_mpi(myrank,'error allocating num_elem_colors_inner_core array')
 
-    local_dim = num_colors_outer_inner_core + num_colors_inner_inner_core 
+    local_dim = num_colors_outer_inner_core + num_colors_inner_inner_core
     start(1) = local_dim*myrank; count(1) = local_dim
     call adios_selection_boundingbox (sel , 1, start, count)
     call adios_schedule_read(adios_handle, sel, &
@@ -1317,7 +1317,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! crust and mantle
@@ -1325,7 +1325,7 @@
   ! create name of database
   call create_name_database_adios(reg_name, IREGION_CRUST_MANTLE, LOCAL_PATH)
 
-  file_name= trim(reg_name) // "stacey.bp" 
+  file_name= trim(reg_name) // "stacey.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -1335,7 +1335,7 @@
   call check_adios_err(myrank,adios_err)
   ! read arrays for Stacey conditions
 
-  local_dim = 2*NSPEC2DMAX_XMIN_XMAX_CM 
+  local_dim = 2*NSPEC2DMAX_XMIN_XMAX_CM
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "njmin/array", 0, 1, &
@@ -1353,7 +1353,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = 2*NSPEC2DMAX_YMIN_YMAX_CM 
+  local_dim = 2*NSPEC2DMAX_YMIN_YMAX_CM
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "nimin/array", 0, 1, &
@@ -1382,7 +1382,7 @@
   ! create name of database
   call create_name_database_adios(reg_name, IREGION_OUTER_CORE, LOCAL_PATH)
 
-  file_name= trim(reg_name) // "stacey.bp" 
+  file_name= trim(reg_name) // "stacey.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -1392,7 +1392,7 @@
   call check_adios_err(myrank,adios_err)
   ! read arrays for Stacey conditions
 
-  local_dim = 2*NSPEC2DMAX_XMIN_XMAX_OC 
+  local_dim = 2*NSPEC2DMAX_XMIN_XMAX_OC
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "njmin/array", 0, 1, &
@@ -1410,7 +1410,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = 2*NSPEC2DMAX_YMIN_YMAX_OC 
+  local_dim = 2*NSPEC2DMAX_YMIN_YMAX_OC
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "nimin/array", 0, 1, &

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/save_forward_arrays_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/save_forward_arrays_adios.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/save_forward_arrays_adios.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -33,7 +33,7 @@
 
 !-------------------------------------------------------------------------------
 !> \brief Write intermediate forward arrays in an ADIOS file.
-!! 
+!!
 !! This subroutine is only used when NUMBER_OF_RUNS > 1 and
 !! NUMBER_OF_THIS_RUN < NUMBER_OF_RUNS.
 subroutine save_intermediate_forward_arrays_adios()
@@ -57,7 +57,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid
   integer(kind=8)         :: adios_groupsize, adios_totalsize
 
-  outputname = trim(LOCAL_TMP_PATH) // "/dump_all_arrays_adios.bp" 
+  outputname = trim(LOCAL_TMP_PATH) // "/dump_all_arrays_adios.bp"
   call world_size(sizeprocs) ! TODO keep it in parameters
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
   group_size_inc = 0
@@ -95,9 +95,9 @@
 
 !-------------------------------------------------------------------------------
 !> \brief Write selected forward arrays in an ADIOS file.
-!! 
+!!
 !! This subroutine is only used for forward simualtions when
-!! SAVE_FORWARD is set to .true. It dumps the same arrays than 
+!! SAVE_FORWARD is set to .true. It dumps the same arrays than
 !! save_intermediate_forward_arrays_adios() execpt than some arrays
 !! are only dumped if ROTATION and ATTENUATION are set to .true.
 subroutine save_forward_arrays_adios()
@@ -116,7 +116,7 @@
   character(len=150) :: outputname
   integer(kind=8) :: group_size_inc
   integer :: local_dim, global_dim, offset
-!  integer, parameter :: num_arrays = 9 ! TODO correct number 
+!  integer, parameter :: num_arrays = 9 ! TODO correct number
 !  character(len=256), dimension(num_arrays) :: local_dims1, local_dims2, &
 !      global_dims1, global_dims2, offsets1, offsets2, array_name
   ! ADIOS variables
@@ -124,7 +124,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid
   integer(kind=8)         :: adios_groupsize, adios_totalsize
 
-  outputname = trim(LOCAL_TMP_PATH) // "/save_forward_arrays.bp" 
+  outputname = trim(LOCAL_TMP_PATH) // "/save_forward_arrays.bp"
   call world_size(sizeprocs)
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
   group_size_inc = 0
@@ -137,7 +137,7 @@
 
   ! Define ADIOS variables
   call define_common_forward_arrays_adios(adios_group, group_size_inc)
-  ! conditional definition of vars seem to mess with the group size, 
+  ! conditional definition of vars seem to mess with the group size,
   ! even if the variables are conditionnaly written.
 !  if (ROTATION_VAL) then
     call define_rotation_forward_arrays_adios(adios_group, group_size_inc)
@@ -190,7 +190,7 @@
 
   integer :: local_dim
 
-  local_dim = NDIM * NGLOB_CRUST_MANTLE 
+  local_dim = NDIM * NGLOB_CRUST_MANTLE
   call define_adios_global_real_1d_array(adios_group, "displ_crust_mantle", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "veloc_crust_mantle", &
@@ -312,7 +312,7 @@
 !-------------------------------------------------------------------------------
 !>  Schedule writes of ADIOS forward arrays that are always dumped.
 !! \param adios_handle The handle to the adios bp file
-!! \param group_size_inc The number of MPI processes involved in the writting 
+!! \param group_size_inc The number of MPI processes involved in the writting
 subroutine write_common_forward_arrays_adios(adios_handle, sizeprocs)
   use adios_write_mod
   use specfem_par
@@ -323,11 +323,11 @@
   implicit none
 
   integer(kind=8), intent(in) :: adios_handle
-  integer, intent(in) :: sizeprocs 
+  integer, intent(in) :: sizeprocs
 
   integer :: local_dim, adios_err
 
-  local_dim = NDIM * NGLOB_CRUST_MANTLE 
+  local_dim = NDIM * NGLOB_CRUST_MANTLE
   call adios_set_path (adios_handle, "displ_crust_mantle", adios_err)
   call check_adios_err(myrank,adios_err)
   call write_1D_global_array_adios_dims(adios_handle, local_dim, sizeprocs)
@@ -452,7 +452,7 @@
 !-------------------------------------------------------------------------------
 !>  Schedule writes of ADIOS forward arrays that are dumped if ROTATION is true.
 !! \param adios_handle The handle to the adios bp file
-!! \param group_size_inc The number of MPI processes involved in the writting 
+!! \param group_size_inc The number of MPI processes involved in the writting
 subroutine write_rotation_forward_arrays_adios(adios_handle, sizeprocs)
   use adios_write_mod
   use specfem_par
@@ -463,7 +463,7 @@
   implicit none
 
   integer(kind=8), intent(in) :: adios_handle
-  integer, intent(in) :: sizeprocs 
+  integer, intent(in) :: sizeprocs
 
   integer :: local_dim, adios_err
 
@@ -482,10 +482,10 @@
 end subroutine write_rotation_forward_arrays_adios
 
 !-------------------------------------------------------------------------------
-!>  Schedule writes of ADIOS forward arrays that are dumped if ATTENUATION 
+!>  Schedule writes of ADIOS forward arrays that are dumped if ATTENUATION
 !!  is true.
 !! \param adios_handle The handle to the adios bp file
-!! \param group_size_inc The number of MPI processes involved in the writting 
+!! \param group_size_inc The number of MPI processes involved in the writting
 subroutine write_attenuation_forward_arrays_adios(adios_handle, sizeprocs)
   use adios_write_mod
   use specfem_par
@@ -496,7 +496,7 @@
   implicit none
 
   integer(kind=8), intent(in) :: adios_handle
-  integer, intent(in) :: sizeprocs 
+  integer, intent(in) :: sizeprocs
 
   integer :: local_dim, adios_err
 
@@ -564,7 +564,7 @@
 end subroutine write_attenuation_forward_arrays_adios
 
 !-------------------------------------------------------------------------------
-!> Write local, global and offset dimensions to ADIOS 
+!> Write local, global and offset dimensions to ADIOS
 !! \param adios_handle Handle to the adios file
 !! \param local_dim Number of elements to be written by one process
 !! \param sizeprocs Number of MPI processes

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_output_SAC.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_output_SAC.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_output_SAC.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -287,10 +287,10 @@
    if (NZJDAY  > 365 .and. .not. is_leap_year(NZYEAR)) then
       NZJDAY = mod(NZJDAY,365)
       NZYEAR = yr + 1
-   elseif (NZJDAY  > 366 .and. is_leap_year(NZYEAR)) then
+   else if (NZJDAY  > 366 .and. is_leap_year(NZYEAR)) then
       NZJDAY = mod(NZJDAY,366)
       NZYEAR = yr + 1
-   elseif (NZJDAY == 366 .and. is_leap_year(NZYEAR)) then
+   else if (NZJDAY == 366 .and. is_leap_year(NZYEAR)) then
       NZJDAY = 366
    endif
   endif
@@ -632,7 +632,7 @@
 
     if (CUSTOM_REAL == SIZE_REAL) then
       call write_n_real(seismogram_tmp(iorientation,1:seismo_current),seismo_current)
-    elseif (CUSTOM_REAL == SIZE_DOUBLE) then
+    else if (CUSTOM_REAL == SIZE_DOUBLE) then
       call write_n_real(real(seismogram_tmp(iorientation,1:seismo_current)),seismo_current)
     endif
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_seismograms.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_seismograms.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_seismograms.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -422,9 +422,9 @@
       phi = backaz
       if (phi>180.) then
          phi = phi-180.
-      elseif (phi<180.) then
+      else if (phi<180.) then
          phi = phi+180.
-      elseif (phi==180.) then
+      else if (phi==180.) then
          phi = backaz
       endif
 
@@ -438,7 +438,7 @@
             seismogram_tmp(iorientation,isample) = &
                cphi * one_seismogram(1,isample) + sphi * one_seismogram(2,isample)
          enddo
-      elseif (iorientation == 5) then ! transverse component
+      else if (iorientation == 5) then ! transverse component
          do isample = 1,seismo_current
             seismogram_tmp(iorientation,isample) = &
             -1*sphi * one_seismogram(1,isample) + cphi * one_seismogram(2,isample)
@@ -615,11 +615,11 @@
   double precision DT
   character(len=2) bic
 
-  if (DT .ge. 1.0d0)  bic = 'LX'
-  if (DT .lt. 1.0d0 .and. DT .gt. 0.1d0) bic = 'MX'
-  if (DT .le. 0.1d0 .and. DT .gt. 0.0125d0) bic = 'BX'
-  if (DT .le. 0.0125d0 .and. DT .gt. 0.004d0) bic = 'HX'
-  if (DT .le. 0.004d0 .and. DT .gt. 0.001d0) bic = 'CX'
-  if (DT .le. 0.001d0) bic = 'FX'
+  if (DT >= 1.0d0)  bic = 'LX'
+  if (DT < 1.0d0 .and. DT > 0.1d0) bic = 'MX'
+  if (DT <= 0.1d0 .and. DT > 0.0125d0) bic = 'BX'
+  if (DT <= 0.0125d0 .and. DT > 0.004d0) bic = 'HX'
+  if (DT <= 0.004d0 .and. DT > 0.001d0) bic = 'CX'
+  if (DT <= 0.001d0) bic = 'FX'
 
  end subroutine band_instrument_code

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_specfem_adios_header.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_specfem_adios_header.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/write_specfem_adios_header.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -77,7 +77,7 @@
   ! integer          :: NSOURCES -> in specfem_par module
   integer,           dimension(NSOURCES) :: yr, mo, da, ho, mi
   double precision,  dimension(NSOURCES) :: sec, t_shift, hdur, lat, long, depth
-  double precision,  dimension(NSOURCES) :: mrr, mtt, mpp, mrt, mrp, mtp 
+  double precision,  dimension(NSOURCES) :: mrr, mtt, mpp, mrt, mrp, mtp
   integer :: event_name_length, datasource_length
   character(len=16):: event_name
   character(len=:), allocatable  :: datasource  ! F03 feature
@@ -85,7 +85,7 @@
   ! values from STATIONS ----------------------------------
   integer :: NSTATIONS
   integer :: station_name_length, network_name_length ! for later reading
-  character(len=:),   allocatable :: station_name, network_name 
+  character(len=:),   allocatable :: station_name, network_name
   double precision, allocatable, dimension(:) :: stlat, stlon, stele, stbur
 
   character(len=150) :: OUTPUT_FILES,LOCAL_PATH,LOCAL_TMP_PATH,MODEL
@@ -96,13 +96,13 @@
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   ! TODO: find a better name once the use of ADIOS is more completely
   !       implemented
-  character(len=256):: filename = "OUTPUT_FILES/header_specfem3d_globe.bp" 
+  character(len=256):: filename = "OUTPUT_FILES/header_specfem3d_globe.bp"
   integer(kind=8)   :: group_size_inc
   integer           :: model_length ! for later reading of MODEL
   integer           :: isource, irec, ier
 
 
-  ! only the master needs to read the values to be written 
+  ! only the master needs to read the values to be written
   if(myrank == 0) then
     call adios_declare_group (adios_group, "SPECFEM3D_GLOBE_HEADER",           &
                               "", 0, adios_err)
@@ -115,20 +115,20 @@
 
     !--*** Values read from DATA/Par_file ***
     ! extract all unmodified values from the Par_file
-    call read_parameter_file(OUTPUT_FILES,                                     & 
-        LOCAL_PATH, LOCAL_TMP_PATH, MODEL,                                     & 
+    call read_parameter_file(OUTPUT_FILES,                                     &
+        LOCAL_PATH, LOCAL_TMP_PATH, MODEL,                                     &
         NTSTEP_BETWEEN_OUTPUT_SEISMOS, NTSTEP_BETWEEN_READ_ADJSRC,             &
-        NTSTEP_BETWEEN_FRAMES, NTSTEP_BETWEEN_OUTPUT_INFO, NUMBER_OF_RUNS,     & 
+        NTSTEP_BETWEEN_FRAMES, NTSTEP_BETWEEN_OUTPUT_INFO, NUMBER_OF_RUNS,     &
         NUMBER_OF_THIS_RUN, NCHUNKS, SIMULATION_TYPE, MOVIE_VOLUME_TYPE,       &
-        MOVIE_START, MOVIE_STOP, NEX_XI, NEX_ETA, NPROC_XI, NPROC_ETA,         & 
-        ANGULAR_WIDTH_XI_IN_DEGREES, ANGULAR_WIDTH_ETA_IN_DEGREES,             & 
+        MOVIE_START, MOVIE_STOP, NEX_XI, NEX_ETA, NPROC_XI, NPROC_ETA,         &
+        ANGULAR_WIDTH_XI_IN_DEGREES, ANGULAR_WIDTH_ETA_IN_DEGREES,             &
         CENTER_LONGITUDE_IN_DEGREES, CENTER_LATITUDE_IN_DEGREES,               &
         GAMMA_ROTATION_AZIMUTH, HDUR_MOVIE, MOVIE_TOP_KM, MOVIE_BOTTOM_KM,     &
         RECORD_LENGTH_IN_MINUTES, MOVIE_EAST_DEG, MOVIE_WEST_DEG,              &
         MOVIE_NORTH_DEG, MOVIE_SOUTH_DEG, ELLIPTICITY, GRAVITY, ROTATION,      &
-        TOPOGRAPHY, OCEANS, MOVIE_SURFACE, MOVIE_VOLUME, MOVIE_COARSE,         & 
+        TOPOGRAPHY, OCEANS, MOVIE_SURFACE, MOVIE_VOLUME, MOVIE_COARSE,         &
         RECEIVERS_CAN_BE_BURIED, PRINT_SOURCE_TIME_FUNCTION, SAVE_MESH_FILES,  &
-        ATTENUATION, ATTENUATION_NEW, ABSORBING_CONDITIONS, SAVE_FORWARD,      & 
+        ATTENUATION, ATTENUATION_NEW, ABSORBING_CONDITIONS, SAVE_FORWARD,      &
         OUTPUT_SEISMOS_ASCII_TEXT, OUTPUT_SEISMOS_SAC_ALPHANUM,                &
         OUTPUT_SEISMOS_SAC_BINARY, ROTATE_SEISMOGRAMS_RT,                      &
         WRITE_SEISMOGRAMS_BY_MASTER, SAVE_ALL_SEISMOS_IN_ONE_FILE,             &
@@ -187,7 +187,7 @@
         mrr, mtt, mpp, mrt, mrp, mtp, event_name_length, event_name,           &
         datasource_length, datasource)
 
-    ! Write variables from 'STATIONS' 
+    ! Write variables from 'STATIONS'
     call write_adios_stations_variables (adios_handle,                         &
        NSTATIONS, stlat, stlon, stele, stbur, station_name_length,             &
        station_name, network_name_length, network_name)
@@ -205,7 +205,7 @@
 
 ! Imbricated/contained subroutines. The initial thougth was to do a module with
 ! public access to the write_specfem_header_adios routine and private access to
-! the other routines. The problem then is the files compilation order that 
+! the other routines. The problem then is the files compilation order that
 ! should be done very carefully. This require modifications of the Makefile
 ! which is not currently designed to do that.
 contains
@@ -221,7 +221,7 @@
   integer(kind=8), intent(inout) :: group_size_inc
   ! Variables
   integer :: pkg_str_len, conf_flags_len
- 
+
   pkg_str_len    = len_trim(PACKAGE_STRING)
   conf_flags_len = len_trim(CONFIGURE_FLAGS)
   call define_adios_integer_scalar (adios_group, "package_string_length", &
@@ -273,7 +273,7 @@
       "/specfem3D_globe_parameter_file", group_size_inc)
   call define_adios_double_scalar (adios_group, "RECORD_LENGTH_IN_MINUTES", &
       "/specfem3D_globe_parameter_file", group_size_inc)
-  !-- integer variables 
+  !-- integer variables
   call define_adios_integer_scalar (adios_group, "NTSTEP_BETWEEN_OUTPUT_SEISMOS", &
       "/specfem3D_globe_parameter_file", group_size_inc)
   call define_adios_integer_scalar (adios_group, "NTSTEP_BETWEEN_READ_ADJSRC", "/specfem3D_globe_parameter_file", group_size_inc)
@@ -376,9 +376,9 @@
   integer(kind=8), intent(inout) :: group_size_inc
   integer, intent(in) :: NSTATIONS, station_name_length, network_name_length
 
-  !-- Number of STATIONS inside the STATIONS file 
+  !-- Number of STATIONS inside the STATIONS file
   call define_adios_integer_scalar (adios_group, "NSTATIONS", "/STATIONS", group_size_inc)
-  !-- double precision arrays 
+  !-- double precision arrays
   call define_adios_double_local_array1D (adios_group, "station_latitude", "/STATIONS", NSTATIONS, "NSTATIONS", group_size_inc)
   call define_adios_double_local_array1D (adios_group, "station_longitude", "/STATIONS", NSTATIONS, "NSTATIONS", group_size_inc)
   call define_adios_double_local_array1D (adios_group, "station_elevation", "/STATIONS", NSTATIONS, "NSTATIONS", group_size_inc)
@@ -411,7 +411,7 @@
 !! \param event_name_length Variable for keeping the size of the event_name
 !!                          string
 !! \param event_name Strings to store the event name
-!! \param  datasource_length Variable for keeping the size of the datasource 
+!! \param  datasource_length Variable for keeping the size of the datasource
 !!                          string
 !! \param datasource String in which the different datasource names are
 !!                   concatenated
@@ -424,7 +424,7 @@
   ! Parameters
   integer,           dimension(NSOURCES), intent(out) :: yr, mo, da, ho, mi
   double precision,  dimension(NSOURCES), intent(out) :: sec, t_shift, hdur, lat, long, depth
-  double precision,  dimension(NSOURCES), intent(out) :: mrr, mtt, mpp, mrt, mrp, mtp 
+  double precision,  dimension(NSOURCES), intent(out) :: mrr, mtt, mpp, mrt, mrp, mtp
   integer, intent(inout) :: event_name_length, datasource_length
   character(len=16), intent(out) :: event_name
   character(len=:), allocatable, intent(out)  :: datasource  ! F03 feature
@@ -437,7 +437,7 @@
   !      routines
   call get_value_string(CMTSOLUTION, 'solver.CMTSOLUTION', 'DATA/CMTSOLUTION')
   open(unit=1,file=CMTSOLUTION,status='old',action='read')
-  datasource_length = 4*NSOURCES ! a datasource is 4 character, by convention 
+  datasource_length = 4*NSOURCES ! a datasource is 4 character, by convention
   allocate(character(len=(datasource_length)) :: datasource, stat=ier)
   if (ier /=0) &
       call exit_MPI (myrank, &
@@ -457,7 +457,7 @@
     read(string,"(a4,i5,i3,i3,i3,i3,f6.2)") datasource_tmp,yr(isource), &
         mo(isource),da(isource),ho(isource),mi(isource),sec(isource)
     datasource = datasource // datasource_tmp
-    ! read event name 
+    ! read event name
     read(1,"(a)") string
     read(string(12:len_trim(string)),*) event_name
     ! read time shift
@@ -518,7 +518,7 @@
   ! Parameters
   integer :: NSTATIONS
   integer, intent(inout) :: station_name_length, network_name_length ! for later reading
-  character(len=:), allocatable, intent(out) :: station_name, network_name 
+  character(len=:), allocatable, intent(out) :: station_name, network_name
   double precision, allocatable, dimension(:), intent(out) :: stlat, stlon, stele, stbur
   ! Local variables
   character(len=MAX_LENGTH_STATION_NAME) :: station_name_tmp
@@ -535,10 +535,10 @@
   enddo
   allocate (character (len=(MAX_LENGTH_STATION_NAME*NSTATIONS)) :: station_name)
   allocate (character (len=(MAX_LENGTH_NETWORK_NAME*NSTATIONS)) :: network_name)
-  allocate (stlat (NSTATIONS)) 
-  allocate (stlon (NSTATIONS)) 
-  allocate (stele (NSTATIONS)) 
-  allocate (stbur (NSTATIONS)) 
+  allocate (stlat (NSTATIONS))
+  allocate (stlon (NSTATIONS))
+  allocate (stele (NSTATIONS))
+  allocate (stbur (NSTATIONS))
   station_name = ""
   network_name = ""
   rewind(1)
@@ -550,8 +550,8 @@
     write(IMAIN,*) 'error reading in station ',irec
     call exit_MPI(myrank,'error reading in station in STATIONS file')
   endif
-  station_name = station_name // trim(station_name_tmp) // " " 
-  network_name = network_name // trim(network_name_tmp) // " " 
+  station_name = station_name // trim(station_name_tmp) // " "
+  network_name = network_name // trim(network_name_tmp) // " "
   enddo
   close(1)
   station_name = trim(station_name)
@@ -571,7 +571,7 @@
   integer :: pkg_str_len, conf_flags_len, adios_err
   character(len=:), allocatable :: pkg_str
   character(len=:), allocatable :: conf_flags
- 
+
   pkg_str    = trim(PACKAGE_STRING)
   conf_flags = trim(CONFIGURE_FLAGS)
 
@@ -581,7 +581,7 @@
   call adios_write (adios_handle, "package_name", pkg_str, adios_err)
   call adios_write (adios_handle, "conf_flags_len", conf_flags_len, adios_err)
   call adios_write (adios_handle, "conf_flags", conf_flags, adios_err)
-end subroutine write_adios_solver_info_variables 
+end subroutine write_adios_solver_info_variables
 
 !> \brief Wrapper to write the 'Par_file' variables into the adios header
 !! \param adios_handle The handle to the file where the variable should be
@@ -681,7 +681,7 @@
   call adios_write (adios_handle, "USE_BINARY_FOR_LARGE_FILE", USE_BINARY_FOR_LARGE_FILE, adios_err)
   call adios_write (adios_handle, "model_length", model_length, adios_err)
   call adios_write (adios_handle, "MODEL", MODEL, adios_err)
-end subroutine write_adios_par_file_variables 
+end subroutine write_adios_par_file_variables
 
 !> \brief Wrapper to write the 'CMTSOLUTION' variables into the adios header
 !! \param adios_handle The handle to the file where the variable should be
@@ -698,7 +698,7 @@
   double precision, dimension(NSOURCES), intent(in) :: sec, t_shift, hdur,     &
                                                        lat, long, depth
   double precision, dimension(NSOURCES), intent(in) :: mrr, mtt, mpp,          &
-                                                       mrt, mrp, mtp 
+                                                       mrt, mrp, mtp
   integer, intent(in) :: event_name_length, datasource_length
   character(len=16), intent(in) :: event_name
   character(len=:), allocatable, intent(in)  :: datasource  ! F03 feature
@@ -740,7 +740,7 @@
   integer(kind=8), intent(in) :: adios_handle
   integer, intent(in):: NSTATIONS
   integer, intent(in):: station_name_length, network_name_length ! for later reading
-  character(len=:), allocatable, intent(in) :: station_name, network_name 
+  character(len=:), allocatable, intent(in) :: station_name, network_name
   double precision, allocatable, dimension(:), intent(in) :: stlat, stlon,     &
                                                              stele, stbur
   ! Local variables

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/auxiliaries/combine_vol_data_vtk.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/auxiliaries/combine_vol_data_vtk.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/auxiliaries/combine_vol_data_vtk.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -413,7 +413,7 @@
       if (HIGH_RESOLUTION_MESH ) then
         if( ir==3 ) then
           npoint(it) = numpoin
-        elseif( numpoin /= npoint(it)) then
+        else if( numpoin /= npoint(it)) then
           print*,'region:',ir
           print*,'error number of points:',numpoin,npoint(it)
           stop 'different number of points (high-res)'

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/cuda/specfem3D_gpu_cuda_method_stubs.c
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/cuda/specfem3D_gpu_cuda_method_stubs.c	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/cuda/specfem3D_gpu_cuda_method_stubs.c	2013-07-01 02:07:51 UTC (rev 22472)
@@ -1,4 +1,4 @@
-/* 
+/*
 !=====================================================================
 !
 !          S p e c f e m 3 D  G l o b e  V e r s i o n  5 . 1
@@ -34,8 +34,8 @@
 
 typedef float realw;
 
- 
 
+
 //
 // src/cuda/assemble_MPI_scalar_cuda.cu
 //
@@ -43,12 +43,12 @@
 void FC_FUNC_(transfer_boun_pot_from_device,
               TRANSFER_BOUN_POT_FROM_DEVICE)(long* Mesh_pointer_f,
                                              realw* send_potential_dot_dot_buffer,
-                                             int* FORWARD_OR_ADJOINT){} 
+                                             int* FORWARD_OR_ADJOINT){}
 
 void FC_FUNC_(transfer_asmbl_pot_to_device,
               TRANSFER_ASMBL_POT_TO_DEVICE)(long* Mesh_pointer,
                                             realw* buffer_recv_scalar,
-                                            int* FORWARD_OR_ADJOINT) {} 
+                                            int* FORWARD_OR_ADJOINT) {}
 
 
 //
@@ -59,13 +59,13 @@
               TRANSFER_BOUN_ACCEL_FROM_DEVICE)(long* Mesh_pointer_f,
                                                   realw* send_accel_buffer,
                                                   int* IREGION,
-                                                  int* FORWARD_OR_ADJOINT){} 
+                                                  int* FORWARD_OR_ADJOINT){}
 
 void FC_FUNC_(transfer_asmbl_accel_to_device,
               TRANSFER_ASMBL_ACCEL_TO_DEVICE)(long* Mesh_pointer,
                                               realw* buffer_recv_vector,
                                               int* IREGION,
-                                              int* FORWARD_OR_ADJOINT) {} 
+                                              int* FORWARD_OR_ADJOINT) {}
 
 
 //
@@ -73,58 +73,58 @@
 //
 
 void FC_FUNC_(pause_for_debug,
-              PAUSE_FOR_DEBUG)() {} 
+              PAUSE_FOR_DEBUG)() {}
 
 void FC_FUNC_(output_free_device_memory,
-              OUTPUT_FREE_DEVICE_MEMORY)(int* myrank) {} 
+              OUTPUT_FREE_DEVICE_MEMORY)(int* myrank) {}
 
 void FC_FUNC_(get_free_device_memory,
-              get_FREE_DEVICE_MEMORY)(realw* free, realw* used, realw* total ) {} 
+              get_FREE_DEVICE_MEMORY)(realw* free, realw* used, realw* total ) {}
 
 void FC_FUNC_(check_norm_acoustic_from_device,
               CHECK_NORM_ACOUSTIC_FROM_DEVICE)(realw* norm,
                                                   long* Mesh_pointer_f,
-                                                  int* SIMULATION_TYPE) {} 
+                                                  int* SIMULATION_TYPE) {}
 
 void FC_FUNC_(check_norm_elastic_from_device,
               CHECK_NORM_ELASTIC_FROM_DEVICE)(realw* norm,
                                               long* Mesh_pointer_f,
-                                              int* SIMULATION_TYPE) {} 
+                                              int* SIMULATION_TYPE) {}
 
 void FC_FUNC_(check_norm_strain_from_device,
               CHECK_NORM_STRAIN_FROM_DEVICE)(realw* strain_norm,
                                              realw* strain_norm2,
-                                             long* Mesh_pointer_f) {} 
+                                             long* Mesh_pointer_f) {}
 
  void FC_FUNC_(check_max_norm_displ_gpu,
- CHECK_MAX_NORM_DISPL_GPU)(int* size, realw* displ,long* Mesh_pointer_f,int* announceID) {} 
+ CHECK_MAX_NORM_DISPL_GPU)(int* size, realw* displ,long* Mesh_pointer_f,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_vector,
- CHECK_MAX_NORM_VECTOR)(int* size, realw* vector1, int* announceID) {} 
+ CHECK_MAX_NORM_VECTOR)(int* size, realw* vector1, int* announceID) {}
 
  void FC_FUNC_(check_max_norm_displ,
- CHECK_MAX_NORM_DISPL)(int* size, realw* displ, int* announceID) {} 
+ CHECK_MAX_NORM_DISPL)(int* size, realw* displ, int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_displ_gpu,
- CHECK_MAX_NORM_B_DISPL_GPU)(int* size, realw* b_displ,long* Mesh_pointer_f,int* announceID) {} 
+ CHECK_MAX_NORM_B_DISPL_GPU)(int* size, realw* b_displ,long* Mesh_pointer_f,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_accel_gpu,
- CHECK_MAX_NORM_B_ACCEL_GPU)(int* size, realw* b_accel,long* Mesh_pointer_f,int* announceID) {} 
+ CHECK_MAX_NORM_B_ACCEL_GPU)(int* size, realw* b_accel,long* Mesh_pointer_f,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_veloc_gpu,
- CHECK_MAX_NORM_B_VELOC_GPU)(int* size, realw* b_veloc,long* Mesh_pointer_f,int* announceID) {} 
+ CHECK_MAX_NORM_B_VELOC_GPU)(int* size, realw* b_veloc,long* Mesh_pointer_f,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_displ,
- CHECK_MAX_NORM_B_DISPL)(int* size, realw* b_displ,int* announceID) {} 
+ CHECK_MAX_NORM_B_DISPL)(int* size, realw* b_displ,int* announceID) {}
 
  void FC_FUNC_(check_max_norm_b_accel,
- CHECK_MAX_NORM_B_ACCEL)(int* size, realw* b_accel,int* announceID) {} 
+ CHECK_MAX_NORM_B_ACCEL)(int* size, realw* b_accel,int* announceID) {}
 
  void FC_FUNC_(check_error_vectors,
- CHECK_ERROR_VECTORS)(int* sizef, realw* vector1,realw* vector2) {} 
+ CHECK_ERROR_VECTORS)(int* sizef, realw* vector1,realw* vector2) {}
 
  void FC_FUNC_(get_max_accel,
- GET_MAX_ACCEL)(int* itf,int* sizef,long* Mesh_pointer) {} 
+ GET_MAX_ACCEL)(int* itf,int* sizef,long* Mesh_pointer) {}
 
 
 //
@@ -134,12 +134,12 @@
 void FC_FUNC_(compute_add_sources_el_cuda,
               COMPUTE_ADD_SOURCES_EL_CUDA)(long* Mesh_pointer_f,
                                            int* NSOURCESf,
-                                           double* h_stf_pre_compute) {} 
+                                           double* h_stf_pre_compute) {}
 
 void FC_FUNC_(compute_add_sources_el_s3_cuda,
               COMPUTE_ADD_SOURCES_EL_S3_CUDA)(long* Mesh_pointer_f,
                                               int* NSOURCESf,
-                                              double* h_stf_pre_compute) {} 
+                                              double* h_stf_pre_compute) {}
 
 void FC_FUNC_(add_sources_el_sim_type_2_or_3,
               ADD_SOURCES_EL_SIM_TYPE_2_OR_3)(long* Mesh_pointer,
@@ -147,7 +147,7 @@
                                               realw* h_adj_sourcearrays,
                                               int* h_islice_selected_rec,
                                               int* h_ispec_selected_rec,
-                                              int* time_index) {} 
+                                              int* time_index) {}
 
 
 //
@@ -155,20 +155,20 @@
 //
 
 void FC_FUNC_(compute_coupling_fluid_cmb_cuda,
-              COMPUTE_COUPLING_FLUID_CMB_CUDA)(long* Mesh_pointer_f) {} 
+              COMPUTE_COUPLING_FLUID_CMB_CUDA)(long* Mesh_pointer_f) {}
 
 void FC_FUNC_(compute_coupling_fluid_icb_cuda,
-              COMPUTE_COUPLING_FLUID_ICB_CUDA)(long* Mesh_pointer_f) {} 
+              COMPUTE_COUPLING_FLUID_ICB_CUDA)(long* Mesh_pointer_f) {}
 
 void FC_FUNC_(compute_coupling_cmb_fluid_cuda,
-              COMPUTE_COUPLING_CMB_FLUID_CUDA)(long* Mesh_pointer_f) {} 
+              COMPUTE_COUPLING_CMB_FLUID_CUDA)(long* Mesh_pointer_f) {}
 
 void FC_FUNC_(compute_coupling_icb_fluid_cuda,
-              COMPUTE_COUPLING_ICB_FLUID_CUDA)(long* Mesh_pointer_f) {} 
+              COMPUTE_COUPLING_ICB_FLUID_CUDA)(long* Mesh_pointer_f) {}
 
 void FC_FUNC_(compute_coupling_ocean_cuda,
               COMPUTE_COUPLING_OCEAN_CUDA)(long* Mesh_pointer_f,
-                                           int* NCHUNKS_VAL) {} 
+                                           int* NCHUNKS_VAL) {}
 
 
 //
@@ -177,7 +177,7 @@
 
 void FC_FUNC_(compute_forces_crust_mantle_cuda,
               COMPUTE_FORCES_CRUST_MANTLE_CUDA)(long* Mesh_pointer_f,
-                                                int* iphase) {} 
+                                                int* iphase) {}
 
 
 //
@@ -186,7 +186,7 @@
 
 void FC_FUNC_(compute_forces_inner_core_cuda,
               COMPUTE_FORCES_INNER_CORE_CUDA)(long* Mesh_pointer_f,
-                                              int* iphase) {} 
+                                              int* iphase) {}
 
 
 //
@@ -197,7 +197,7 @@
               COMPUTE_FORCES_OUTER_CORE_CUDA)(long* Mesh_pointer_f,
                                               int* iphase,
                                               realw* time_f,
-                                              realw* b_time_f) {} 
+                                              realw* b_time_f) {}
 
 
 //
@@ -205,22 +205,22 @@
 //
 
 void FC_FUNC_(compute_kernels_cm_cuda,
-              COMPUTE_KERNELS_CM_CUDA)(long* Mesh_pointer,realw* deltat_f) {} 
+              COMPUTE_KERNELS_CM_CUDA)(long* Mesh_pointer,realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_ic_cuda,
-              COMPUTE_KERNELS_IC_CUDA)(long* Mesh_pointer,realw* deltat_f) {} 
+              COMPUTE_KERNELS_IC_CUDA)(long* Mesh_pointer,realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_oc_cuda,
-              COMPUTE_KERNELS_OC_CUDA)(long* Mesh_pointer,realw* deltat_f) {} 
+              COMPUTE_KERNELS_OC_CUDA)(long* Mesh_pointer,realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_strgth_noise_cu,
               COMPUTE_KERNELS_STRGTH_NOISE_CU)(long* Mesh_pointer,
                                                realw* h_noise_surface_movie,
-                                               realw* deltat_f) {} 
+                                               realw* deltat_f) {}
 
 void FC_FUNC_(compute_kernels_hess_cuda,
               COMPUTE_KERNELS_HESS_CUDA)(long* Mesh_pointer,
-                                         realw* deltat_f) {} 
+                                         realw* deltat_f) {}
 
 
 //
@@ -230,7 +230,7 @@
 void FC_FUNC_(compute_stacey_acoustic_cuda,
               COMPUTE_STACEY_ACOUSTIC_CUDA)(long* Mesh_pointer_f,
                                             realw* absorb_potential,
-                                            int* itype) {} 
+                                            int* itype) {}
 
 
 //
@@ -240,7 +240,7 @@
 void FC_FUNC_(compute_stacey_elastic_cuda,
               COMPUTE_STACEY_ELASTIC_CUDA)(long* Mesh_pointer_f,
                                                 realw* absorb_field,
-                                                int* itype) {} 
+                                                int* itype) {}
 
 
 //
@@ -248,10 +248,10 @@
 //
 
 void FC_FUNC_(initialize_cuda_device,
-              INITIALIZE_CUDA_DEVICE)(int* myrank_f,int* ncuda_devices) { 
+              INITIALIZE_CUDA_DEVICE)(int* myrank_f,int* ncuda_devices) {
  fprintf(stderr,"ERROR: GPU_MODE enabled without GPU/CUDA Support. To enable GPU support, reconfigure with --with-cuda flag.\n");
  exit(1);
-} 
+}
 
 
 //
@@ -265,7 +265,7 @@
                                              realw* deltatover2_F,
                                              realw* b_deltat_F,
                                              realw* b_deltatsqover2_F,
-                                             realw* b_deltatover2_F) {} 
+                                             realw* b_deltatover2_F) {}
 
 void FC_FUNC_(it_update_displacement_cm_cuda,
               IT_UPDATE_DISPLACMENT_CM_CUDA)(long* Mesh_pointer_f,
@@ -274,7 +274,7 @@
                                              realw* deltatover2_F,
                                              realw* b_deltat_F,
                                              realw* b_deltatsqover2_F,
-                                             realw* b_deltatover2_F) {} 
+                                             realw* b_deltatover2_F) {}
 
 void FC_FUNC_(it_update_displacement_oc_cuda,
               IT_UPDATE_DISPLACEMENT_OC_cuda)(long* Mesh_pointer_f,
@@ -283,55 +283,55 @@
                                                realw* deltatover2_F,
                                                realw* b_deltat_F,
                                                realw* b_deltatsqover2_F,
-                                               realw* b_deltatover2_F) {} 
+                                               realw* b_deltatover2_F) {}
 
 void FC_FUNC_(kernel_3_a_cuda,
               KERNEL_3_A_CUDA)(long* Mesh_pointer,
                                realw* deltatover2_F,
                                int* SIMULATION_TYPE_f,
                                realw* b_deltatover2_F,
-                               int* NCHUNKS_VAL) {} 
+                               int* NCHUNKS_VAL) {}
 
 void FC_FUNC_(kernel_3_b_cuda,
               KERNEL_3_B_CUDA)(long* Mesh_pointer,
                                realw* deltatover2_F,
                                int* SIMULATION_TYPE_f,
-                               realw* b_deltatover2_F) {} 
+                               realw* b_deltatover2_F) {}
 
 void FC_FUNC_(kernel_3_outer_core_cuda,
               KERNEL_3_OUTER_CORE_CUDA)(long* Mesh_pointer,
                                         realw* deltatover2_F,
                                         int* SIMULATION_TYPE_f,
-                                        realw* b_deltatover2_F) {} 
+                                        realw* b_deltatover2_F) {}
 
 
 //
 // src/cuda/noise_tomography_cuda.cu
 //
 
-void FC_FUNC_(fortranflush,FORTRANFLUSH)(int* rank){} 
+void FC_FUNC_(fortranflush,FORTRANFLUSH)(int* rank){}
 
-void FC_FUNC_(fortranprint,FORTRANPRINT)(int* id) {} 
+void FC_FUNC_(fortranprint,FORTRANPRINT)(int* id) {}
 
-void FC_FUNC_(fortranprintf,FORTRANPRINTF)(realw* val) {} 
+void FC_FUNC_(fortranprintf,FORTRANPRINTF)(realw* val) {}
 
-void FC_FUNC_(fortranprintd,FORTRANPRINTD)(double* val) {} 
+void FC_FUNC_(fortranprintd,FORTRANPRINTD)(double* val) {}
 
-void FC_FUNC_(make_displ_rand,MAKE_DISPL_RAND)(long* Mesh_pointer_f,realw* h_displ) {} 
+void FC_FUNC_(make_displ_rand,MAKE_DISPL_RAND)(long* Mesh_pointer_f,realw* h_displ) {}
 
 void FC_FUNC_(noise_transfer_surface_to_host,
               NOISE_TRANSFER_SURFACE_TO_HOST)(long* Mesh_pointer_f,
-                                              realw* h_noise_surface_movie) {} 
+                                              realw* h_noise_surface_movie) {}
 
 void FC_FUNC_(noise_add_source_master_rec_cu,
               NOISE_ADD_SOURCE_MASTER_REC_CU)(long* Mesh_pointer_f,
                                               int* it_f,
                                               int* irec_master_noise_f,
-                                              int* islice_selected_rec) {} 
+                                              int* islice_selected_rec) {}
 
 void FC_FUNC_(noise_add_surface_movie_cuda,
               NOISE_ADD_SURFACE_MOVIE_CUDA)(long* Mesh_pointer_f,
-                                            realw* h_noise_surface_movie) {} 
+                                            realw* h_noise_surface_movie) {}
 
 
 //
@@ -375,7 +375,7 @@
                                         int* ANISOTROPIC_KL_f,
                                         int* APPROXIMATE_HESS_KL_f,
                                         realw* deltat_f,
-                                        realw* b_deltat_f) {} 
+                                        realw* b_deltat_f) {}
 
 void FC_FUNC_(prepare_fields_rotation_device,
               PREPARE_FIELDS_ROTATION_DEVICE)(long* Mesh_pointer_f,
@@ -385,7 +385,7 @@
                                               realw* b_two_omega_earth_f,
                                               realw* b_A_array_rotation,
                                               realw* b_B_array_rotation,
-                                              int* NSPEC_OUTER_CORE_ROTATION) {} 
+                                              int* NSPEC_OUTER_CORE_ROTATION) {}
 
 void FC_FUNC_(prepare_fields_gravity_device,
               PREPARE_FIELDS_gravity_DEVICE)(long* Mesh_pointer_f,
@@ -399,7 +399,7 @@
                                              realw* minus_g_icb,
                                              realw* minus_g_cmb,
                                              double* RHO_BOTTOM_OC,
-                                             double* RHO_TOP_OC) {} 
+                                             double* RHO_TOP_OC) {}
 
 void FC_FUNC_(prepare_fields_attenuat_device,
               PREPARE_FIELDS_ATTENUAT_DEVICE)(long* Mesh_pointer_f,
@@ -428,7 +428,7 @@
                                                  realw* factor_common_inner_core,
                                                  realw* one_minus_sum_beta_inner_core,
                                                  realw* alphaval,realw* betaval,realw* gammaval,
-                                                 realw* b_alphaval,realw* b_betaval,realw* b_gammaval) {} 
+                                                 realw* b_alphaval,realw* b_betaval,realw* b_gammaval) {}
 
 void FC_FUNC_(prepare_fields_strain_device,
               PREPARE_FIELDS_STRAIN_DEVICE)(long* Mesh_pointer_f,
@@ -455,7 +455,7 @@
                                             realw* b_epsilondev_xz_inner_core,
                                             realw* b_epsilondev_yz_inner_core,
                                             realw* eps_trace_over_3_inner_core,
-                                            realw* b_eps_trace_over_3_inner_core) {} 
+                                            realw* b_eps_trace_over_3_inner_core) {}
 
 void FC_FUNC_(prepare_fields_absorb_device,
               PREPARE_FIELDS_ABSORB_DEVICE)(long* Mesh_pointer_f,
@@ -484,7 +484,7 @@
                                             int* ibelm_ymin_outer_core,int* ibelm_ymax_outer_core,
                                             realw* jacobian2D_xmin_outer_core, realw* jacobian2D_xmax_outer_core,
                                             realw* jacobian2D_ymin_outer_core, realw* jacobian2D_ymax_outer_core,
-                                            realw* vp_outer_core) {} 
+                                            realw* vp_outer_core) {}
 
 void FC_FUNC_(prepare_mpi_buffers_device,
               PREPARE_MPI_BUFFERS_DEVICE)(long* Mesh_pointer_f,
@@ -499,7 +499,7 @@
                                           int* num_interfaces_outer_core,
                                           int* max_nibool_interfaces_oc,
                                           int* nibool_interfaces_outer_core,
-                                          int* ibool_interfaces_outer_core){} 
+                                          int* ibool_interfaces_outer_core){}
 
 void FC_FUNC_(prepare_fields_noise_device,
               PREPARE_FIELDS_NOISE_DEVICE)(long* Mesh_pointer_f,
@@ -511,14 +511,14 @@
                                            realw* normal_y_noise,
                                            realw* normal_z_noise,
                                            realw* mask_noise,
-                                           realw* jacobian2D_top_crust_mantle) {} 
+                                           realw* jacobian2D_top_crust_mantle) {}
 
 void FC_FUNC_(prepare_oceans_device,
               PREPARE_OCEANS_DEVICE)(long* Mesh_pointer_f,
                                      int* npoin_oceans,
                                      int* h_iglob_ocean_load,
                                      realw* h_rmass_ocean_load_selected,
-                                     realw* h_normal_ocean_load) {} 
+                                     realw* h_normal_ocean_load) {}
 
 void FC_FUNC_(prepare_crust_mantle_device,
              PREPARE_CRUST_MANTLE_DEVICE)(long* Mesh_pointer_f,
@@ -551,7 +551,7 @@
                                           int* NCHUNKS_VAL,
                                           int* num_colors_outer,
                                           int* num_colors_inner,
-                                          int* num_elem_colors) {} 
+                                          int* num_elem_colors) {}
 
 void FC_FUNC_(prepare_outer_core_device,
               PREPARE_OUTER_CORE_DEVICE)(long* Mesh_pointer_f,
@@ -576,7 +576,7 @@
                                          int* h_ibelm_bottom_outer_core,
                                          int* num_colors_outer,
                                          int* num_colors_inner,
-                                         int* num_elem_colors) {} 
+                                         int* num_elem_colors) {}
 
 void FC_FUNC_(prepare_inner_core_device,
               PREPARE_INNER_CORE_DEVICE)(long* Mesh_pointer_f,
@@ -598,11 +598,11 @@
                                          int* h_ibelm_top_inner_core,
                                          int* num_colors_outer,
                                          int* num_colors_inner,
-                                         int* num_elem_colors) {} 
+                                         int* num_elem_colors) {}
 
 void FC_FUNC_(prepare_cleanup_device,
               PREPARE_CLEANUP_DEVICE)(long* Mesh_pointer_f,
-              int* NCHUNKS_VAL) {} 
+              int* NCHUNKS_VAL) {}
 
 
 //
@@ -610,88 +610,88 @@
 //
 
 void FC_FUNC_(transfer_fields_cm_to_device,
-              TRANSFER_FIELDS_CM_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_CM_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_ic_to_device,
-              TRANSFER_FIELDS_IC_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_IC_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_oc_to_device,
-              TRANSFER_FIELDS_OC_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_OC_TO_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_cm_to_device,
               TRANSFER_FIELDS_B_CM_TO_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                              long* Mesh_pointer_f) {} 
+                                              long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_ic_to_device,
               TRANSFER_FIELDS_B_IC_TO_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                              long* Mesh_pointer_f) {} 
+                                              long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_oc_to_device,
               TRANSFER_FIELDS_B_OC_TO_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                              long* Mesh_pointer_f) {} 
+                                              long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_cm_from_device,
-              TRANSFER_FIELDS_CM_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_CM_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_ic_from_device,
-              TRANSFER_FIELDS_IC_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_IC_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_fields_oc_from_device,
-              TRANSFER_FIELDS_OC_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_FIELDS_OC_FROM_DEVICE)(int* size, realw* displ, realw* veloc, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_cm_from_device,
               TRANSFER_B_FIELDS_CM_FROM_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                                long* Mesh_pointer_f) {} 
+                                                long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_ic_from_device,
               TRANSFER_B_FIELDS_IC_FROM_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                                long* Mesh_pointer_f) {} 
+                                                long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_fields_oc_from_device,
               TRANSFER_B_FIELDS_OC_FROM_DEVICE)(int* size, realw* b_displ, realw* b_veloc, realw* b_accel,
-                                                long* Mesh_pointer_f) {} 
+                                                long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_displ_cm_from_device,
-              TRANSFER_DISPL_CM_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_DISPL_CM_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_displ_cm_from_device,
-              TRANSFER_B_DISPL_CM_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_B_DISPL_CM_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_displ_ic_from_device,
-              TRANSFER_DISPL_IC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_DISPL_IC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_displ_ic_from_device,
-              TRANSFER_B_DISPL_IC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_B_DISPL_IC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_displ_oc_from_device,
-              TRANSFER_DISPL_OC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_DISPL_OC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_displ_oc_from_device,
-              TRANSFER_B_DISPL_OC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {} 
+              TRANSFER_B_DISPL_OC_FROM_DEVICE)(int* size, realw* displ, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_veloc_cm_from_device,
-              TRANSFER_VELOC_CM_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {} 
+              TRANSFER_VELOC_CM_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_veloc_ic_from_device,
-              TRANSFER_VELOC_IC_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {} 
+              TRANSFER_VELOC_IC_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_veloc_oc_from_device,
-              TRANSFER_VELOC_OC_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {} 
+              TRANSFER_VELOC_OC_FROM_DEVICE)(int* size, realw* veloc, long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_accel_cm_to_device,
-              TRANSFER_ACCEL_CM_TO_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_ACCEL_CM_TO_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_accel_cm_from_device,
-              TRANSFER_ACCEL_CM_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_ACCEL_CM_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_b_accel_cm_from_device,
-              TRANSFER_B_ACCEL_CM_FROM_DEVICE)(int* size, realw* b_accel,long* Mesh_pointer_f) {} 
+              TRANSFER_B_ACCEL_CM_FROM_DEVICE)(int* size, realw* b_accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_accel_ic_from_device,
-              TRANSFER_ACCEL_IC_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_ACCEL_IC_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_accel_oc_from_device,
-              TRANSFER_ACCEL_OC_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {} 
+              TRANSFER_ACCEL_OC_FROM_DEVICE)(int* size, realw* accel,long* Mesh_pointer_f) {}
 
 void FC_FUNC_(transfer_strain_cm_from_device,
               TRANSFER_STRAIN_CM_FROM_DEVICE)(long* Mesh_pointer,
@@ -700,7 +700,7 @@
                                                   realw* epsilondev_yy,
                                                   realw* epsilondev_xy,
                                                   realw* epsilondev_xz,
-                                                  realw* epsilondev_yz) {} 
+                                                  realw* epsilondev_yz) {}
 
 void FC_FUNC_(transfer_b_strain_cm_to_device,
               TRANSFER_B_STRAIN_CM_TO_DEVICE)(long* Mesh_pointer,
@@ -708,7 +708,7 @@
                                               realw* epsilondev_yy,
                                               realw* epsilondev_xy,
                                               realw* epsilondev_xz,
-                                              realw* epsilondev_yz) {} 
+                                              realw* epsilondev_yz) {}
 
 void FC_FUNC_(transfer_strain_ic_from_device,
               TRANSFER_STRAIN_IC_FROM_DEVICE)(long* Mesh_pointer,
@@ -717,7 +717,7 @@
                                               realw* epsilondev_yy,
                                               realw* epsilondev_xy,
                                               realw* epsilondev_xz,
-                                              realw* epsilondev_yz) {} 
+                                              realw* epsilondev_yz) {}
 
 void FC_FUNC_(transfer_b_strain_ic_to_device,
               TRANSFER_B_STRAIN_IC_TO_DEVICE)(long* Mesh_pointer,
@@ -725,7 +725,7 @@
                                               realw* epsilondev_yy,
                                               realw* epsilondev_xy,
                                               realw* epsilondev_xz,
-                                              realw* epsilondev_yz) {} 
+                                              realw* epsilondev_yz) {}
 
 void FC_FUNC_(transfer_b_rmemory_cm_to_device,
               TRANSFER_B_RMEMORY_CM_TO_DEVICE)(long* Mesh_pointer,
@@ -733,7 +733,7 @@
                                               realw* b_R_yy,
                                               realw* b_R_xy,
                                               realw* b_R_xz,
-                                              realw* b_R_yz) {} 
+                                              realw* b_R_yz) {}
 
 void FC_FUNC_(transfer_b_rmemory_ic_to_device,
               TRANSFER_B_RMEMORY_IC_TO_DEVICE)(long* Mesh_pointer,
@@ -741,17 +741,17 @@
                                               realw* b_R_yy,
                                               realw* b_R_xy,
                                               realw* b_R_xz,
-                                              realw* b_R_yz) {} 
+                                              realw* b_R_yz) {}
 
 void FC_FUNC_(transfer_rotation_from_device,
               TRANSFER_ROTATION_FROM_DEVICE)(long* Mesh_pointer,
                                              realw* A_array_rotation,
-                                             realw* B_array_rotation) {} 
+                                             realw* B_array_rotation) {}
 
 void FC_FUNC_(transfer_b_rotation_to_device,
               TRANSFER_B_ROTATION_TO_DEVICE)(long* Mesh_pointer,
                                               realw* A_array_rotation,
-                                              realw* B_array_rotation) {} 
+                                              realw* B_array_rotation) {}
 
 void FC_FUNC_(transfer_kernels_cm_to_host,
               TRANSFER_KERNELS_CM_TO_HOST)(long* Mesh_pointer,
@@ -759,30 +759,30 @@
                                            realw* h_alpha_kl,
                                            realw* h_beta_kl,
                                            realw* h_cijkl_kl,
-                                           int* NSPEC) {} 
+                                           int* NSPEC) {}
 
 void FC_FUNC_(transfer_kernels_ic_to_host,
               TRANSFER_KERNELS_IC_TO_HOST)(long* Mesh_pointer,
                                            realw* h_rho_kl,
                                            realw* h_alpha_kl,
                                            realw* h_beta_kl,
-                                           int* NSPEC) {} 
+                                           int* NSPEC) {}
 
 void FC_FUNC_(transfer_kernels_oc_to_host,
               TRANSFER_KERNELS_OC_TO_HOST)(long* Mesh_pointer,
                                            realw* h_rho_kl,
                                            realw* h_alpha_kl,
-                                           int* NSPEC) {} 
+                                           int* NSPEC) {}
 
 void FC_FUNC_(transfer_kernels_noise_to_host,
               TRANSFER_KERNELS_NOISE_TO_HOST)(long* Mesh_pointer,
                                               realw* h_Sigma_kl,
-                                              int* NSPEC) {} 
+                                              int* NSPEC) {}
 
 void FC_FUNC_(transfer_kernels_hess_cm_tohost,
               TRANSFER_KERNELS_HESS_CM_TOHOST)(long* Mesh_pointer,
                                               realw* h_hess_kl,
-                                              int* NSPEC) {} 
+                                              int* NSPEC) {}
 
 
 //
@@ -802,5 +802,5 @@
                                                int* number_receiver_global,
                                                int* ispec_selected_rec,
                                                int* ispec_selected_source,
-                                               int* ibool) {} 
+                                               int* ibool) {}
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/create_regions_mesh_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/create_regions_mesh_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/create_regions_mesh_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -73,7 +73,7 @@
 
   ! create a prefix for the file name such as LOCAL_PATH/regX_
   call create_name_database_adios(reg_name,iregion_code,LOCAL_PATH)
-  outputname = trim(reg_name) // "AVS_DX.bp" 
+  outputname = trim(reg_name) // "AVS_DX.bp"
   write(group_name,"('SPECFEM3D_GLOBE_AVS_DX_reg',i1)") iregion_code
   call world_size(sizeprocs) ! TODO keep it in parameters
   ! Alias COMM_WORLD to use ADIOS
@@ -88,7 +88,7 @@
   !--- Define ADIOS variables -----------------------------
   call define_AVS_DX_global_data_adios(adios_group, myrank, nspec, ibool, &
       npointot, mask_ibool, group_size_inc, avs_dx_global_vars)
-    
+
   call define_AVS_DX_global_faces_data_adios (adios_group, &
       myrank, prname, nspec, iMPIcut_xi,iMPIcut_eta, &
       ibool,idoubling,xstore,ystore,zstore,num_ibool_AVS_DX,mask_ibool, &

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/get_absorb_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/get_absorb_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/get_absorb_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -28,11 +28,11 @@
 !-------------------------------------------------------------------------------
 !> \file get_absorb_adios.f90
 !! \brief Function to write stacey boundary condition to disk with ADIOS.
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 
 !===============================================================================
-!> \brief Write stacey boundary conditions to a single file using ADIOS 
+!> \brief Write stacey boundary conditions to a single file using ADIOS
 !!
 !! \param myrank The MPI rank of the current process
 !! \param iregion The region the absorbing conditon is written for. Check
@@ -47,7 +47,7 @@
 !!                             in argument
 !! \param NSPEC2DMAX_YMIN_YMAX Integer to compute the size of the arrays
 !!                             in argument
-!! 
+!!
 !! \note This routine only call adios to write the file to disk, Note that he
 !!       necessary data preparation is done by the get_absorb() routine.
 subroutine get_absorb_adios(myrank, iregion, nimin, nimax, njmin, njmax, &
@@ -82,14 +82,14 @@
   call create_name_database_adios(reg_name,iregion,LOCAL_PATH)
 
   ! Postpend the actual file name.
-  outputname = trim(reg_name) // "stacey.bp" 
+  outputname = trim(reg_name) // "stacey.bp"
 
   ! save these temporary arrays for the solver for Stacey conditions
   write(group_name,"('SPECFEM3D_GLOBE_STACEY_reg',i1)") iregion
   call world_size(sizeprocs) ! TODO keep it in parameters
   ! Alias COMM_WORLD to use ADIOS
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
-  ! set the adios group size to 0 before incremented by calls to 
+  ! set the adios group size to 0 before incremented by calls to
   ! helpers functions.
   group_size_inc = 0
   call adios_declare_group(adios_group, group_name, &
@@ -99,7 +99,7 @@
   call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
   !--- Define ADIOS variables -----------------------------
-  local_dim = 2*NSPEC2DMAX_XMIN_XMAX 
+  local_dim = 2*NSPEC2DMAX_XMIN_XMAX
   call define_adios_global_integer_1d_array(adios_group, "njmin", &
       local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "njmax", &
@@ -121,7 +121,7 @@
                          adios_totalsize, adios_err)
 
   !--- Schedule writes for the previously defined ADIOS variables
-  local_dim = 2*NSPEC2DMAX_XMIN_XMAX 
+  local_dim = 2*NSPEC2DMAX_XMIN_XMAX
   call adios_set_path (adios_handle, "njmin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -137,7 +137,7 @@
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", nkmin_xi, adios_err)
 
-  local_dim = 2*NSPEC2DMAX_YMIN_YMAX 
+  local_dim = 2*NSPEC2DMAX_YMIN_YMAX
   call adios_set_path (adios_handle, "nimin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/initialize_mesher.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/initialize_mesher.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/initialize_mesher.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -142,7 +142,7 @@
                 HONOR_1D_SPHERICAL_MOHO,CRUSTAL,ONE_CRUST,CASE_3D,TRANSVERSE_ISOTROPY, &
                 ISOTROPIC_3D_MANTLE,ANISOTROPIC_3D_MANTLE,HETEROGEN_3D_MANTLE, &
                 ATTENUATION,ATTENUATION_NEW,ATTENUATION_3D,ANISOTROPIC_INNER_CORE,NOISE_TOMOGRAPHY)
-  ! broadcasts optional ADIOS_ENABLED 
+  ! broadcasts optional ADIOS_ENABLED
   call broadcast_adios_parameters(myrank,ADIOS_ENABLED, &
       ADIOS_FOR_FORWARD_ARRAYS, ADIOS_FOR_MPI_ARRAYS, ADIOS_FOR_ARRAYS_SOLVER, &
       ADIOS_FOR_SOLVER_MESHFILES, ADIOS_FOR_AVS_DX)

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/save_arrays_solver_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/save_arrays_solver_adios.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/save_arrays_solver_adios.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -28,7 +28,7 @@
 !-------------------------------------------------------------------------------
 !> \file get_absorb_adios.f90
 !! \brief Function to write stacey boundary condition to disk with ADIOS.
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 
 !===============================================================================
@@ -41,9 +41,9 @@
 !! \param ibool Array of information on every mesh point
 !! \param iregion_code The region the absorbing conditon is written for. Check
 !!                     constant.h files to see what these regions are.
-!! \param xstore Array with the x coordinates of the mesh points 
-!! \param ystore Array with the y coordinates of the mesh points 
-!! \param zstore Array with the z coordinates of the mesh points 
+!! \param xstore Array with the x coordinates of the mesh points
+!! \param ystore Array with the y coordinates of the mesh points
+!! \param zstore Array with the z coordinates of the mesh points
 !! \param NSPEC2DMAX_XMIN_XMAX Integer to compute the size of the arrays
 !!                             in argument
 !! \param NSPEC2DMAX_YMIN_YMAX Integer to compute the size of the arrays
@@ -127,14 +127,14 @@
   !---------------------------------------------------------
 
   ! create the name for the database of the current slide and region
-  outputname = trim(reg_name) // "solver_data.bp" 
+  outputname = trim(reg_name) // "solver_data.bp"
 
   ! save arrays for the solver to run.
   write(group_name,"('SPECFEM3D_GLOBE_ARRAYS_SOLVER_reg',i1)") iregion_code
   call world_size(sizeprocs) ! TODO keep it in parameters
   ! Alias COMM_WORLD to use ADIOS
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
-  ! set the adios group size to 0 before incremented by calls to 
+  ! set the adios group size to 0 before incremented by calls to
   ! helpers functions.
   group_size_inc = 0
   call adios_declare_group(adios_group, group_name, &
@@ -150,7 +150,7 @@
   call define_adios_integer_scalar (adios_group, "nglob", "", &
       group_size_inc)
 
-  local_dim = nglob 
+  local_dim = nglob
   call define_adios_global_real_1d_array(adios_group, "xstore", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "ystore", &
@@ -209,7 +209,7 @@
   call define_adios_global_real_1d_array(adios_group, "gammazstore", &
       local_dim, group_size_inc)
 
-  local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani 
+  local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani
   if(iregion_code /= IREGION_OUTER_CORE) then
     !   save anisotropy in the inner core only
     if(ANISOTROPIC_INNER_CORE .and. iregion_code == IREGION_INNER_CORE) then
@@ -379,7 +379,7 @@
   call adios_write(adios_handle, "nspec", nspec, adios_err)
   call adios_write(adios_handle, "nglob", nglob, adios_err)
 
-  local_dim = nglob 
+  local_dim = nglob
   call adios_set_path (adios_handle, "xstore", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -389,7 +389,7 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", tmp_array_y, adios_err)
-  
+
   call adios_set_path (adios_handle, "zstore", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -497,7 +497,7 @@
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", gammazstore, adios_err)
 
-  local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani 
+  local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani
   if(iregion_code /= IREGION_OUTER_CORE) then
     !   save anisotropy in the inner core only
     if(ANISOTROPIC_INNER_CORE .and. iregion_code == IREGION_INNER_CORE) then
@@ -699,11 +699,11 @@
   !---------------------------------------------------------
 
   ! Postpend the actual file name.
-  outputname = trim(reg_name) // "boundary.bp" 
+  outputname = trim(reg_name) // "boundary.bp"
 
-  ! save boundary arrays in ADIOS files 
+  ! save boundary arrays in ADIOS files
   write(group_name,"('SPECFEM3D_GLOBE_BOUNDARY_reg',i1)") iregion_code
-  ! set the adios group size to 0 before incremented by calls to 
+  ! set the adios group size to 0 before incremented by calls to
   ! helpers functions.
   group_size_inc = 0
   call adios_declare_group(adios_group, group_name, &
@@ -723,73 +723,73 @@
       group_size_inc)
   call define_adios_integer_scalar (adios_group, "NSPEC2D_TOP", "", &
       group_size_inc)
-  
+
   !local_dim = NSPEC2DMAX_XMIN_YMAX
-  local_dim = size (ibelm_xmin) 
+  local_dim = size (ibelm_xmin)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_xmin", &
       local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_xmax", &
       local_dim, group_size_inc)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (ibelm_ymin) 
+  local_dim = size (ibelm_ymin)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_ymin", &
       local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_ymax", &
       local_dim, group_size_inc)
 
   !local_dim = NSPEC2D_BOTTOM
-  local_dim = size (ibelm_bottom) 
+  local_dim = size (ibelm_bottom)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_bottom", &
       local_dim, group_size_inc)
 
   !local_dim = NSPEC2D_TOP
-  local_dim = size (ibelm_top) 
+  local_dim = size (ibelm_top)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_top", &
       local_dim, group_size_inc)
 
   !local_dim = NDIM*NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (normal_xmin) 
+  local_dim = size (normal_xmin)
   call define_adios_global_real_1d_array(adios_group, "normal_xmin", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "normal_xmax", &
       local_dim, group_size_inc)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (normal_ymin) 
+  local_dim = size (normal_ymin)
   call define_adios_global_real_1d_array(adios_group, "normal_ymin", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "normal_ymax", &
       local_dim, group_size_inc)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM
-  local_dim = size (normal_bottom) 
+  local_dim = size (normal_bottom)
   call define_adios_global_real_1d_array(adios_group, "normal_bottom", &
       local_dim, group_size_inc)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP
-  local_dim = size (normal_top) 
+  local_dim = size (normal_top)
   call define_adios_global_real_1d_array(adios_group, "normal_top", &
       local_dim, group_size_inc)
 
   !local_dim = NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (jacobian2D_xmin) 
+  local_dim = size (jacobian2D_xmin)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_xmin", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_xmax", &
       local_dim, group_size_inc)
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (jacobian2D_ymin) 
+  local_dim = size (jacobian2D_ymin)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_ymin", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_ymax", &
       local_dim, group_size_inc)
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM
-  local_dim = size (jacobian2D_bottom) 
+  local_dim = size (jacobian2D_bottom)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_bottom", &
       local_dim, group_size_inc)
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP
-  local_dim = size (jacobian2D_top) 
+  local_dim = size (jacobian2D_top)
   call define_adios_global_real_1d_array(adios_group, "jacobian2D_top", &
       local_dim, group_size_inc)
 
@@ -806,9 +806,9 @@
   call adios_write(adios_handle, "nspec2D_ymax", nspec2D_ymax, adios_err)
   call adios_write(adios_handle, "NSPEC2D_BOTTOM", NSPEC2D_BOTTOM, adios_err)
   call adios_write(adios_handle, "NSPEC2D_TOP", NSPEC2D_TOP, adios_err)
-  
+
   !local_dim = NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (ibelm_xmin) 
+  local_dim = size (ibelm_xmin)
   call adios_set_path (adios_handle, "ibelm_xmin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -819,7 +819,7 @@
   call adios_write(adios_handle, "array", ibelm_xmax, adios_err)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (ibelm_ymin) 
+  local_dim = size (ibelm_ymin)
   call adios_set_path (adios_handle, "ibelm_ymin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -830,21 +830,21 @@
   call adios_write(adios_handle, "array", ibelm_ymax, adios_err)
 
   !local_dim = NSPEC2D_BOTTOM
-  local_dim = size (ibelm_bottom) 
+  local_dim = size (ibelm_bottom)
   call adios_set_path (adios_handle, "ibelm_bottom", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", ibelm_bottom, adios_err)
 
   !local_dim = NSPEC2D_TOP
-  local_dim = size (ibelm_top) 
+  local_dim = size (ibelm_top)
   call adios_set_path (adios_handle, "ibelm_top", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", ibelm_top, adios_err)
 
   !local_dim = NDIM*NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (normal_xmin) 
+  local_dim = size (normal_xmin)
   call adios_set_path (adios_handle, "normal_xmin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -855,7 +855,7 @@
   call adios_write(adios_handle, "array", normal_xmax, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (normal_ymin) 
+  local_dim = size (normal_ymin)
   call adios_set_path (adios_handle, "normal_ymin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -866,21 +866,21 @@
   call adios_write(adios_handle, "array", normal_ymax, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM
-  local_dim = size (normal_bottom) 
+  local_dim = size (normal_bottom)
   call adios_set_path (adios_handle, "normal_bottom", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", normal_bottom, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP
-  local_dim = size (normal_top) 
+  local_dim = size (normal_top)
   call adios_set_path (adios_handle, "normal_top", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", normal_top, adios_err)
 
   !local_dim = NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX
-  local_dim = size (jacobian2D_xmin) 
+  local_dim = size (jacobian2D_xmin)
   call adios_set_path (adios_handle, "jacobian2D_xmin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -891,7 +891,7 @@
   call adios_write(adios_handle, "array", jacobian2D_xmax, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX
-  local_dim = size (jacobian2D_ymin) 
+  local_dim = size (jacobian2D_ymin)
   call adios_set_path (adios_handle, "jacobian2D_ymin", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -902,14 +902,14 @@
   call adios_write(adios_handle, "array", jacobian2D_ymax, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM
-  local_dim = size (jacobian2D_bottom) 
+  local_dim = size (jacobian2D_bottom)
   call adios_set_path (adios_handle, "jacobian2D_bottom", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", jacobian2D_bottom, adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP
-  local_dim = size (jacobian2D_top) 
+  local_dim = size (jacobian2D_top)
   call adios_set_path (adios_handle, "jacobian2D_top", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -923,7 +923,7 @@
   !--- Attenuation arrays ----------------------------------
   !---------------------------------------------------------
   if(ATTENUATION) then
-    outputname = trim(reg_name) // "attenuation.bp" 
+    outputname = trim(reg_name) // "attenuation.bp"
     write(group_name,"('SPECFEM3D_GLOBE_ATTENUATION_reg',i1)") iregion_code
     group_size_inc = 0
     call adios_declare_group(adios_group, group_name, &
@@ -953,17 +953,17 @@
     !--- Schedule writes for the previously defined ADIOS variables
     call adios_write(adios_handle, "T_c_source", T_c_source, adios_err)
 
-    local_dim = size (tau_s) 
+    local_dim = size (tau_s)
     call adios_set_path (adios_handle, "tau_s", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
     call adios_write(adios_handle, "array", tau_s, adios_err)
-    local_dim = size (tau_e_store) 
+    local_dim = size (tau_e_store)
     call adios_set_path (adios_handle, "tau_e_store", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
     call adios_write(adios_handle, "array", tau_e_store, adios_err)
-    local_dim = size (Qmu_store) 
+    local_dim = size (Qmu_store)
     call adios_set_path (adios_handle, "Qmu_store", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -978,7 +978,7 @@
   !--- dvp arrays ------------------------------------------
   !---------------------------------------------------------
   if(HETEROGEN_3D_MANTLE .and. iregion_code == IREGION_CRUST_MANTLE) then
-    outputname = trim(reg_name) // "dvp.bp" 
+    outputname = trim(reg_name) // "dvp.bp"
     write(group_name,"('SPECFEM3D_GLOBE_DVP_reg',i1)") iregion_code
     group_size_inc = 0
     call adios_declare_group(adios_group, group_name, &
@@ -986,7 +986,7 @@
     call adios_select_method(adios_group, "MPI", "", "", adios_err)
 
     !--- Define ADIOS variables -----------------------------
-    local_dim = size (dvpstore) 
+    local_dim = size (dvpstore)
     call define_adios_global_real_1d_array(adios_group, "dvp", &
         local_dim, group_size_inc)
     !--- Open an ADIOS handler to the restart file. ---------
@@ -1024,7 +1024,7 @@
 
 !===============================================================================
 !> \brief Save the meshfiles that will be used by the solver in an ADIOS format.
-!! 
+!!
 !! \param myrank The MPI rank of the current process.
 !! \param iregion_code Code of the region considered. See constant.h for details
 !! \param reg_name Output file prefix with the name of the region included
@@ -1072,7 +1072,7 @@
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   ! isotropic model
-  outputname = trim(reg_name) // "solver_meshfiles.bp" 
+  outputname = trim(reg_name) // "solver_meshfiles.bp"
   write(group_name,"('SPECFEM3D_GLOBE_solver_meshfiles_reg',i1)") iregion_code
 
   group_size_inc = 0
@@ -1083,37 +1083,37 @@
 
   !--- Define ADIOS variables -----------------------------
   !--- vp arrays -------------------------------------------
-  local_dim = size (kappavstore) 
+  local_dim = size (kappavstore)
   call define_adios_global_real_1d_array(adios_group, "vp", &
       local_dim, group_size_inc)
   !--- vs arrays -------------------------------------------
-  local_dim = size (rhostore) 
+  local_dim = size (rhostore)
   call define_adios_global_real_1d_array(adios_group, "vs", &
       local_dim, group_size_inc)
   !--- rho arrays ------------------------------------------
-  local_dim = size (rhostore) 
+  local_dim = size (rhostore)
   call define_adios_global_real_1d_array(adios_group, "rho", &
       local_dim, group_size_inc)
   ! transverse isotropic model
   if( TRANSVERSE_ISOTROPY ) then
     !--- vpv arrays ----------------------------------------
-    local_dim = size (kappavstore) 
+    local_dim = size (kappavstore)
     call define_adios_global_real_1d_array(adios_group, "vpv", &
         local_dim, group_size_inc)
     !--- vph arrays ----------------------------------------
-    local_dim = size (kappavstore) 
+    local_dim = size (kappavstore)
     call define_adios_global_real_1d_array(adios_group, "vph", &
         local_dim, group_size_inc)
     !--- vsv arrays ----------------------------------------
-    local_dim = size (rhostore) 
+    local_dim = size (rhostore)
     call define_adios_global_real_1d_array(adios_group, "vsv", &
         local_dim, group_size_inc)
     !--- vsh arrays ----------------------------------------
-    local_dim = size (rhostore) 
+    local_dim = size (rhostore)
     call define_adios_global_real_1d_array(adios_group, "vsh", &
         local_dim, group_size_inc)
     !--- eta arrays ----------------------------------------
-    local_dim = size (eta_anisostore) 
+    local_dim = size (eta_anisostore)
     call define_adios_global_real_1d_array(adios_group, "eta", &
         local_dim, group_size_inc)
   endif
@@ -1132,7 +1132,7 @@
 
   !--- Schedule writes for the previously defined ADIOS variables
   !--- vp arrays -------------------------------------------
-  local_dim = size (kappavstore) 
+  local_dim = size (kappavstore)
   call adios_set_path (adios_handle, "vp", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -1140,7 +1140,7 @@
       sqrt( (kappavstore+4.*muvstore/3.)/rhostore )*scaleval1, &
       adios_err)
   !--- vs arrays -------------------------------------------
-  local_dim = size (rhostore) 
+  local_dim = size (rhostore)
   call adios_set_path (adios_handle, "vs", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -1148,7 +1148,7 @@
       sqrt( muvstore/rhostore )*scaleval1, &
       adios_err)
   !--- rho arrays ------------------------------------------
-  local_dim = size (rhostore) 
+  local_dim = size (rhostore)
   call adios_set_path (adios_handle, "rho", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -1159,7 +1159,7 @@
   ! transverse isotropic model
   if( TRANSVERSE_ISOTROPY ) then
     !--- vpv arrays ----------------------------------------
-    local_dim = size (kappavstore) 
+    local_dim = size (kappavstore)
     call adios_set_path (adios_handle, "vpv", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1167,7 +1167,7 @@
         sqrt( (kappavstore+4.*muvstore/3.)/rhostore )*scaleval1, &
         adios_err)
     !--- vph arrays ----------------------------------------
-    local_dim = size (kappavstore) 
+    local_dim = size (kappavstore)
     call adios_set_path (adios_handle, "vph", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1175,7 +1175,7 @@
         sqrt( (kappahstore+4.*muhstore/3.)/rhostore )*scaleval1, &
         adios_err)
     !--- vsv arrays ----------------------------------------
-    local_dim = size (rhostore) 
+    local_dim = size (rhostore)
     call adios_set_path (adios_handle, "vsv", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1183,7 +1183,7 @@
         sqrt( muvstore/rhostore )*scaleval1, &
         adios_err)
     !--- vsh arrays ----------------------------------------
-    local_dim = size (rhostore) 
+    local_dim = size (rhostore)
     call adios_set_path (adios_handle, "vsh", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1191,7 +1191,7 @@
         sqrt( muhstore/rhostore )*scaleval1, &
         adios_err)
     !--- eta arrays ----------------------------------------
-    local_dim = size (eta_anisostore) 
+    local_dim = size (eta_anisostore)
     call adios_set_path (adios_handle, "eta", adios_err)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         local_dim, sizeprocs)
@@ -1254,7 +1254,7 @@
 
 !===============================================================================
 !> \brief Save the arrays use by the solver for MPI communications.
-!! 
+!!
 !! \param myrank The MPI rank of the current process.
 !! \param iregion_code Code of the region considered. See constant.h for details
 !! \param LOCAL_PATH The full path to the output directory
@@ -1309,7 +1309,7 @@
   ! create the name for the database of the current slide and region
   call create_name_database_adios(prname,iregion_code,LOCAL_PATH)
 
-  outputname = trim(prname) // "solver_data_mpi.bp" 
+  outputname = trim(prname) // "solver_data_mpi.bp"
   write(group_name,"('SPECFEM3D_GLOBE_MPI_ARRAYS_reg',i1)") iregion_code
   call world_size(sizeprocs) ! TODO keep it in parameters
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
@@ -1432,7 +1432,7 @@
 
 ! saves arrays for boundaries such as MOHO, 400 and 670 discontinuities
   use mpi
-  
+
   use meshfem3d_par,only: &
     myrank, LOCAL_PATH
 
@@ -1471,7 +1471,7 @@
   if (ispec2D_670_top /= NSPEC2D_670 .or. ispec2D_670_bot /= NSPEC2D_670) &
            call exit_mpi(myrank,'Not the same number of 670 surface elements')
 
-  outputname = trim(LOCAL_PATH) // "/boundary_disc.bp" 
+  outputname = trim(LOCAL_PATH) // "/boundary_disc.bp"
   group_name = "SPECFEM3D_GLOBE_BOUNDARY_DISC"
   call world_size(sizeprocs) ! TODO keep it in parameters
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
@@ -1498,7 +1498,7 @@
         local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_400_bot", &
         local_dim, group_size_inc)
-  local_dim = NSPEC2D_670 
+  local_dim = NSPEC2D_670
   call define_adios_global_integer_1d_array(adios_group, "ibelm_670_top", &
         local_dim, group_size_inc)
   call define_adios_global_integer_1d_array(adios_group, "ibelm_670_bot", &
@@ -1534,7 +1534,7 @@
       local_dim, sizeprocs)
   call adios_write(adios_handle, "array", ibelm_moho_bot, adios_err)
 
-  local_dim = NSPEC2D_400 
+  local_dim = NSPEC2D_400
   call adios_set_path (adios_handle, "ibelm_400_top", adios_err)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       local_dim, sizeprocs)
@@ -1578,7 +1578,7 @@
 end subroutine save_arrays_solver_boundary_adios
 
 !-------------------------------------------------------------------------------
-!> Write local, global and offset dimensions to ADIOS 
+!> Write local, global and offset dimensions to ADIOS
 !! \param adios_handle Handle to the adios file
 !! \param local_dim Number of elements to be written by one process
 !! \param sizeprocs Number of MPI processes

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_chunks_data_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_chunks_data_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_chunks_data_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -37,7 +37,7 @@
     real(kind=4), dimension(:), allocatable :: x_adios, y_adios, z_adios
     integer(kind=4), dimension(:), allocatable :: idoubling, iglob1, iglob2, &
         iglob3, iglob4
-    real, dimension(:), allocatable :: vmin, vmax 
+    real, dimension(:), allocatable :: vmin, vmax
     real, dimension(:), allocatable :: dvp, dvs
   endtype
 
@@ -183,7 +183,7 @@
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating y_adios.")
   allocate(avs_dx_adios%z_adios(npoin), stat=ierr)
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating z_adios.")
-  
+
   allocate(avs_dx_adios%vmin(npoin), stat=ierr)
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating vmin.")
   allocate(avs_dx_adios%vmax(npoin), stat=ierr)
@@ -214,7 +214,7 @@
   call define_adios_global_real_1d_array(adios_group, &
       "points_chunks_stability/vmax", npoin, group_size_inc)
   !--- Variables for AVS_DXelementschunks.txt
-  call define_adios_global_real_1d_array(adios_group, & 
+  call define_adios_global_real_1d_array(adios_group, &
       "elements_chunks/idoubling", nspecface, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, &
       "elements_chunks/num_ibool_AVS_DX_iglob1", nspecface, group_size_inc)
@@ -226,7 +226,7 @@
       "elements_chunks/num_ibool_AVS_DX_iglob4", nspecface, group_size_inc)
 
   !--- Variables for AVS_DXelementschunks_dvp_dvs.txt
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     allocate(avs_dx_adios%dvp(nspecface), stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, "Error allocating dvp.")
     allocate(avs_dx_adios%dvs(nspecface), stat=ierr)
@@ -415,7 +415,7 @@
         if(.not. mask_ibool(iglobval(4))) then
           numpoin = numpoin + 1
           num_ibool_AVS_DX(iglobval(4)) = numpoin
-          avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec)) 
+          avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec))
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(1,NGLLY,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(1,NGLLY,1,ispec))
 
@@ -504,7 +504,7 @@
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(NGLLX,1,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(NGLLX,1,1,ispec))
 
-          vmax = sqrt((kappavstore(NGLLX,1,1,ispec) & 
+          vmax = sqrt((kappavstore(NGLLX,1,1,ispec) &
               +4.*muvstore(NGLLX,1,1,ispec)/3.)/rhostore(NGLLX,1,1,ispec))
           vmin = sqrt(muvstore(NGLLX,1,1,ispec)/rhostore(NGLLX,1,1,ispec))
           ! particular case of the outer core (muvstore contains 1/rho)
@@ -524,7 +524,7 @@
         if(.not. mask_ibool(iglobval(3))) then
           numpoin = numpoin + 1
           num_ibool_AVS_DX(iglobval(3)) = numpoin
-          avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec)) 
+          avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec))
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(NGLLX,NGLLY,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(NGLLX,NGLLY,1,ispec))
 
@@ -810,7 +810,7 @@
           vmax = sqrt((kappavstore(1,NGLLY,NGLLZ,ispec) &
               + 4.*muvstore(1,NGLLY,NGLLZ,ispec)/3.) &
               / rhostore(1,NGLLY,NGLLZ,ispec))
-          vmin = sqrt(muvstore(1,NGLLY,NGLLZ,ispec) & 
+          vmin = sqrt(muvstore(1,NGLLY,NGLLZ,ispec) &
               / rhostore(1,NGLLY,NGLLZ,ispec))
           ! particular case of the outer core (muvstore contains 1/rho)
           if(idoubling(ispec) == IFLAG_OUTER_CORE_NORMAL) then
@@ -1014,7 +1014,7 @@
   !--- Variables
   integer :: npoin, nspec
   integer :: ierr
-  
+
   npoin = avs_dx_adios%npoin
   nspec = avs_dx_adios%nspecface
 
@@ -1056,27 +1056,27 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob1, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_chunks/num_ibool_AVS_DX_iglob2", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob2, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_chunks/num_ibool_AVS_DX_iglob3", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob3, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_chunks/num_ibool_AVS_DX_iglob4", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob4, ierr)
-  
 
-  if(ISOTROPIC_3D_MANTLE) then 
+
+  if(ISOTROPIC_3D_MANTLE) then
     call adios_set_path(adios_handle, "elements_chunks/dvp", ierr)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         nspec, sizeprocs)
@@ -1129,7 +1129,7 @@
   if (ierr /= 0) call exit_MPI(myrank, &
       "Error deallocating num_ibool_AVS_DX_iglob4.")
 
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     deallocate(avs_dx_adios%dvp, stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, &
         "Error deallocating dvp.")
@@ -1138,7 +1138,7 @@
         "Error deallocating dvs.")
   endif
 
-  avs_dx_adios%npoin = 0 
+  avs_dx_adios%npoin = 0
   avs_dx_adios%nspecface = 0
 end subroutine free_AVS_DX_global_chunks_data_adios
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_data_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_data_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_data_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -29,7 +29,7 @@
 !> \file write_AVS_DX_global_adios.f90
 !! \brief Define a module to hold global AVS/DX data (points and elements) and
 !!        provides function to deal with them.
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 
 !===============================================================================
@@ -193,7 +193,7 @@
   integer ispec
   integer iglob1,iglob2,iglob3,iglob4,iglob5,iglob6,iglob7,iglob8
   integer npoin,numpoin
-  
+
   type(avs_dx_global_t), intent(inout) :: avs_dx_adios
 
   integer :: ierr
@@ -255,14 +255,14 @@
     if(.not. mask_ibool(iglob3)) then
       numpoin = numpoin + 1
       num_ibool_AVS_DX(iglob3) = numpoin
-      avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec)) 
+      avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec))
       avs_dx_adios%y_adios(numpoin) = sngl(ystore(NGLLX,NGLLY,1,ispec))
       avs_dx_adios%z_adios(numpoin) = sngl(zstore(NGLLX,NGLLY,1,ispec))
     endif
     if(.not. mask_ibool(iglob4)) then
       numpoin = numpoin + 1
       num_ibool_AVS_DX(iglob4) = numpoin
-      avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec)) 
+      avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec))
       avs_dx_adios%y_adios(numpoin) = sngl(ystore(1,NGLLY,1,ispec))
       avs_dx_adios%z_adios(numpoin) = sngl(zstore(1,NGLLY,1,ispec))
     endif
@@ -349,7 +349,7 @@
   !--- Variables
   integer :: npoin, nspec
   integer :: ierr
-  
+
   npoin = avs_dx_adios%npoin
   nspec = avs_dx_adios%nspec
 
@@ -379,27 +379,27 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob1, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob2", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob2, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob3", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob3, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob4", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob4, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob5", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob5, ierr)
-  
+
   call adios_set_path(adios_handle, "elements/num_ibool_AVS_DX_iglob6", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
@@ -463,7 +463,7 @@
   if (ierr /= 0) call exit_MPI(myrank, &
       "Error deallocating num_ibool_AVS_DX_iglob8.")
 
-  avs_dx_adios%npoin = 0 
+  avs_dx_adios%npoin = 0
   avs_dx_adios%nspec = 0
 end subroutine free_AVS_DX_global_data_adios
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_faces_data_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_faces_data_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_global_faces_data_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -174,7 +174,7 @@
   enddo
   ! count global number of AVS or DX points
   npoin = count(mask_ibool(:))
-  
+
   avs_dx_adios%npoin = npoin
   avs_dx_adios%nspecface = nspecface
 
@@ -205,7 +205,7 @@
   call define_adios_global_real_1d_array(adios_group, "points_faces/z_value", &
       npoin, group_size_inc)
   !--- Variables for AVS_DXelementsfaces.txt
-  call define_adios_global_real_1d_array(adios_group, & 
+  call define_adios_global_real_1d_array(adios_group, &
       "elements_faces/idoubling", nspecface, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, &
       "elements_faces/num_ibool_AVS_DX_iglob1", nspecface, group_size_inc)
@@ -216,7 +216,7 @@
   call define_adios_global_real_1d_array(adios_group, &
       "elements_faces/num_ibool_AVS_DX_iglob4", nspecface, group_size_inc)
 
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     allocate(avs_dx_adios%dvp(nspecface), stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, "Error allocating dvp.")
     allocate(avs_dx_adios%dvs(nspecface), stat=ierr)
@@ -383,7 +383,7 @@
         if(.not. mask_ibool(iglob4)) then
           numpoin = numpoin + 1
           num_ibool_AVS_DX(iglob4) = numpoin
-          avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec)) 
+          avs_dx_adios%x_adios(numpoin) = sngl(xstore(1,NGLLY,1,ispec))
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(1,NGLLY,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(1,NGLLY,1,ispec))
         endif
@@ -419,7 +419,7 @@
         if(.not. mask_ibool(iglob3)) then
           numpoin = numpoin + 1
           num_ibool_AVS_DX(iglob3) = numpoin
-          avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec)) 
+          avs_dx_adios%x_adios(numpoin) = sngl(xstore(NGLLX,NGLLY,1,ispec))
           avs_dx_adios%y_adios(numpoin) = sngl(ystore(NGLLX,NGLLY,1,ispec))
           avs_dx_adios%z_adios(numpoin) = sngl(zstore(NGLLX,NGLLY,1,ispec))
         endif
@@ -590,7 +590,7 @@
                 ! gets reference model values:rho,vpv,vph,vsv,vsh and eta_aniso
                 call meshfem3D_models_get1D_val(myrank, iregion_code, &
                     idoubling(ispec), r, rho, vpv, vph, vsv, vsh, eta_aniso, &
-                    Qkappa, Qmu, RICB, RCMB, RTOPDDOUBLEPRIME, R80, R120, & 
+                    Qkappa, Qmu, RICB, RCMB, RTOPDDOUBLEPRIME, R80, R120, &
                     R220, R400, R600, R670, R771, RMOHO, RMIDDLE_CRUST, ROCEAN)
 
                  ! calculates isotropic values
@@ -710,7 +710,7 @@
   !--- Variables
   integer :: npoin, nspec
   integer :: ierr
-  
+
   npoin = avs_dx_adios%npoin
   nspec = avs_dx_adios%nspecface
 
@@ -741,27 +741,27 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob1, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_faces/num_ibool_AVS_DX_iglob2", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob2, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_faces/num_ibool_AVS_DX_iglob3", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob3, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_faces/num_ibool_AVS_DX_iglob4", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob4, ierr)
-  
 
-  if(ISOTROPIC_3D_MANTLE) then 
+
+  if(ISOTROPIC_3D_MANTLE) then
     call adios_set_path(adios_handle, "elements_faces/dvp", ierr)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         nspec, sizeprocs)
@@ -809,7 +809,7 @@
   if (ierr /= 0) call exit_MPI(myrank, &
       "Error deallocating num_ibool_AVS_DX_iglob4.")
 
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     deallocate(avs_dx_adios%dvp, stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, &
         "Error deallocating dvp.")
@@ -818,7 +818,7 @@
         "Error deallocating dvs.")
   endif
 
-  avs_dx_adios%npoin = 0 
+  avs_dx_adios%npoin = 0
   avs_dx_adios%nspecface = 0
 end subroutine free_AVS_DX_global_faces_data_adios
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_surface_data_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_surface_data_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/write_AVS_DX_surface_data_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -145,7 +145,7 @@
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating y_adios.")
   allocate(avs_dx_adios%z_adios(npoin), stat=ierr)
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating z_adios.")
-  
+
   ! Allocate temporary arrays for AVS/DX elements.
   allocate(avs_dx_adios%idoubling(nspecface), stat=ierr)
   if (ierr /= 0) call exit_MPI(myrank, "Error allocating idoubling.")
@@ -166,7 +166,7 @@
   call define_adios_global_real_1d_array(adios_group, &
       "points_surfaces/z_value", npoin, group_size_inc)
   !--- Variables for AVS_DXelementschunks.txt
-  call define_adios_global_real_1d_array(adios_group, & 
+  call define_adios_global_real_1d_array(adios_group, &
       "elements_surfaces/idoubling", nspecface, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, &
       "elements_surfaces/num_ibool_AVS_DX_iglob1", nspecface, group_size_inc)
@@ -178,7 +178,7 @@
       "elements_surfaces/num_ibool_AVS_DX_iglob4", nspecface, group_size_inc)
 
   !--- Variables for AVS_DXelementschunks_dvp_dvs.txt
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     allocate(avs_dx_adios%dvp(nspecface), stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, "Error allocating dvp.")
     allocate(avs_dx_adios%dvs(nspecface), stat=ierr)
@@ -446,7 +446,7 @@
       call exit_MPI(myrank,'&
           incorrect number of surface elements in AVS or DX file creation')
 
-end subroutine prepare_AVS_DX_surfaces_data_adios 
+end subroutine prepare_AVS_DX_surfaces_data_adios
 
 !===============================================================================
 subroutine write_AVS_DX_surfaces_data_adios(adios_handle, myrank, &
@@ -462,7 +462,7 @@
   !--- Variables
   integer :: npoin, nspec
   integer :: ierr
-  
+
   npoin = avs_dx_adios%npoin
   nspec = avs_dx_adios%nspecface
 
@@ -493,27 +493,27 @@
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob1, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_surfaces/num_ibool_AVS_DX_iglob2", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob2, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_surfaces/num_ibool_AVS_DX_iglob3", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob3, ierr)
-  
+
   call adios_set_path(adios_handle, &
       "elements_surfaces/num_ibool_AVS_DX_iglob4", ierr)
   call write_1D_global_array_adios_dims(adios_handle, myrank, &
       nspec, sizeprocs)
   call adios_write(adios_handle, "array", avs_dx_adios%iglob4, ierr)
-  
 
-  if(ISOTROPIC_3D_MANTLE) then 
+
+  if(ISOTROPIC_3D_MANTLE) then
     call adios_set_path(adios_handle, "elements_surfaces/dvp", ierr)
     call write_1D_global_array_adios_dims(adios_handle, myrank, &
         nspec, sizeprocs)
@@ -560,7 +560,7 @@
   if (ierr /= 0) call exit_MPI(myrank, &
       "Error deallocating num_ibool_AVS_DX_iglob4.")
 
-  if(ISOTROPIC_3D_MANTLE) then 
+  if(ISOTROPIC_3D_MANTLE) then
     deallocate(avs_dx_adios%dvp, stat=ierr)
     if (ierr /= 0) call exit_MPI(myrank, &
         "Error deallocating dvp.")
@@ -569,7 +569,7 @@
         "Error deallocating dvs.")
   endif
 
-  avs_dx_adios%npoin = 0 
+  avs_dx_adios%npoin = 0
   avs_dx_adios%nspecface = 0
 end subroutine free_AVS_DX_surfaces_data_adios
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/adios_helpers.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/adios_helpers.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/adios_helpers.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -29,7 +29,7 @@
 !-------------------------------------------------------------------------------
 !> \file adios_helpers.f90
 !! \brief Helpers to set up adios features.
-!! \author MPBL      
+!! \author MPBL
 !-------------------------------------------------------------------------------
 
 !===============================================================================
@@ -50,12 +50,12 @@
 
 
 !===============================================================================
-!> Define an ADIOS scalar double precision variable and autoincrement 
+!> Define an ADIOS scalar double precision variable and autoincrement
 !! the adios group size by (8).
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 subroutine define_adios_double_scalar (adios_group, name, path, group_size_inc)
@@ -68,7 +68,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 6 == real(kind=8) 
+  ! adios: 6 == real(kind=8)
   call adios_define_var (adios_group, name, path, 6,  "", "", "", varid)
   group_size_inc = group_size_inc + 8
 end subroutine define_adios_double_scalar
@@ -79,7 +79,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 subroutine define_adios_integer_scalar (adios_group, name, path, group_size_inc)
@@ -92,7 +92,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 2 == integer(kind=4) 
+  ! adios: 2 == integer(kind=4)
   call adios_define_var (adios_group, name, path, adios_integer,  "", "", "", varid)
   group_size_inc = group_size_inc + 4
 end subroutine define_adios_integer_scalar
@@ -103,7 +103,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param group_size_inc The inout adios group size to increment
 !!                       with the size of the variable
 subroutine define_adios_byte_scalar (adios_group, name, path, group_size_inc)
@@ -116,7 +116,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 0 == byte == any_data_type(kind=1) 
+  ! adios: 0 == byte == any_data_type(kind=1)
   call adios_define_var (adios_group, name, path, 0,  "", "", "", varid)
   group_size_inc = group_size_inc + 1
 end subroutine define_adios_byte_scalar
@@ -127,7 +127,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param dim The number of elements in the 1D array. Required to
 !!            correctly increment adios group size.
 !! \param dim_str The "stringified" version of dim. Needed by adios
@@ -145,7 +145,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 2 == integer 
+  ! adios: 2 == integer
   call adios_define_var (adios_group, name, path, 2,  dim_str, "", "", varid)
   group_size_inc = group_size_inc + 4*dim
 end subroutine define_adios_integer_local_array1D
@@ -156,7 +156,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param dim The number of elements in the 1D array. Required to
 !!            correctly increment adios group size.
 !! \param dim_str The "stringified" version of dim. Needed by adios
@@ -174,7 +174,7 @@
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
 
-  ! adios: 6 == real(kind=8) 
+  ! adios: 6 == real(kind=8)
   call adios_define_var (adios_group, name, path, 6, dim_str, "", "", varid)
   group_size_inc = group_size_inc + 8*dim
 end subroutine define_adios_double_local_array1D
@@ -185,7 +185,7 @@
 !! \param adios_group The adios group where the variables belongs
 !! \param name The variable to be defined
 !! \param path The logical path structuring the data and containing
-!!             the variable 
+!!             the variable
 !! \param len The length of the string(number of character. in Fortran
 !!            it does not include a final '\0' -- null -- character)
 !! \param group_size_inc The inout adios group size to increment
@@ -203,10 +203,10 @@
   integer                          :: length
   ! Local Variables
   integer(kind=8)                  :: varid ! dummy variable, adios use var name
-  
-  ! adios: 9 == string 
+
+  ! adios: 9 == string
   call adios_define_var (adios_group, name, path, 9,  "", "", "", varid)
-  group_size_inc = group_size_inc + 1*length 
+  group_size_inc = group_size_inc + 1*length
 end subroutine define_adios_string
 
 !===============================================================================

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/define_all_layers.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/define_all_layers.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/define_all_layers.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -263,7 +263,7 @@
       rmaxs(14) = RICB / R_EARTH
       rmins(14) = R_CENTRAL_CUBE / R_EARTH
 
-    elseif (ONE_CRUST) then
+    else if (ONE_CRUST) then
 
       ! 1D models:
       ! in order to increase stability and therefore to allow cheaper
@@ -667,7 +667,7 @@
       rmaxs(15) = RICB / R_EARTH
       rmins(15) = R_CENTRAL_CUBE / R_EARTH
 
-    elseif (ONE_CRUST) then
+    else if (ONE_CRUST) then
 
       ! 1D models:
       ! in order to increase stability and therefore to allow cheaper

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/get_timestep_and_layers.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/get_timestep_and_layers.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/get_timestep_and_layers.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -284,7 +284,7 @@
   ! the 670-discontinuity is moved up to 650 km depth.
   if (REFERENCE_1D_MODEL == REFERENCE_MODEL_1DREF) then
     NER_771_670 = NER_771_670 + 1
-  end if
+  endif
 
   !----
   !----  change some values in the case of regular PREM with two crustal layers or of 3D models

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_elastic.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_elastic.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_elastic.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -64,7 +64,7 @@
 !        print*,'third last step',it,'Rxx:',R_xx_crust_mantle(1,1,1,1,100),epsilondev_xx_crust_mantle(1,1,1,100), &
 !          displ_crust_mantle(1,iglob),displ_crust_mantle(2,iglob),displ_crust_mantle(3,iglob)
 !      endif
-!    elseif( SIMULATION_TYPE == 3 ) then
+!    else if( SIMULATION_TYPE == 3 ) then
 !      if( it == 1 .and. myrank == 0 ) then
 !        print*,'first step',it,'Rxx:',b_R_xx_crust_mantle(1,1,1,1,100),b_epsilondev_xx_crust_mantle(1,1,1,100), &
 !          b_displ_crust_mantle(1,iglob),b_displ_crust_mantle(2,iglob),b_displ_crust_mantle(3,iglob)
@@ -589,7 +589,7 @@
 !      if( it > NSTEP - 1000 .and. myrank == 0 ) then
 !        print*,'it',it,'Rxx:',R_xx_crust_mantle(1,1,1,1,100),epsilondev_xx_crust_mantle(1,1,1,100)
 !      endif
-!    elseif( SIMULATION_TYPE == 3 ) then
+!    else if( SIMULATION_TYPE == 3 ) then
 !      if( it <= 1000 .and. myrank == 0 ) then
 !        print*,'it',it,'Rxx:',b_R_xx_crust_mantle(1,1,1,1,100),b_epsilondev_xx_crust_mantle(1,1,1,100)
 !      endif

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_arrays_solver_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_arrays_solver_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_arrays_solver_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -41,7 +41,7 @@
               READ_KAPPA_MU,READ_TISO, &
               ABSORBING_CONDITIONS,LOCAL_PATH)
 
-  use mpi 
+  use mpi
   use adios_read_mod
   implicit none
 
@@ -98,7 +98,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   integer(kind=8), dimension(256),target :: selections
@@ -111,7 +111,7 @@
   call create_name_database_adios(prname, iregion_code, LOCAL_PATH)
 
   ! Postpend the actual file name.
-  file_name= trim(prname) // "solver_data.bp" 
+  file_name= trim(prname) // "solver_data.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   ! Setup the ADIOS library to read the file
@@ -136,7 +136,7 @@
 
 
   ! mesh coordinates
-  local_dim = nglob 
+  local_dim = nglob
   start(1) = local_dim*myrank; count(1) = local_dim
   sel_num = sel_num+1
   sel => selections(sel_num)
@@ -168,7 +168,7 @@
   call adios_schedule_read(adios_handle, sel, "kappavstore/array", 0, 1, &
       kappavstore, adios_err)
   call check_adios_err(myrank,adios_err)
-  if(READ_KAPPA_MU) then 
+  if(READ_KAPPA_MU) then
     call adios_schedule_read(adios_handle, sel, "muvstore/array", 0, 1, &
         muvstore, adios_err)
     call check_adios_err(myrank,adios_err)
@@ -253,7 +253,7 @@
 
 
   if(ANISOTROPIC_INNER_CORE_VAL .and. iregion_code == IREGION_INNER_CORE) then
-    local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani 
+    local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani
     start(1) = local_dim*myrank; count(1) = local_dim
     sel_num = sel_num+1
     sel => selections(sel_num)
@@ -277,7 +277,7 @@
   endif
 
   if(ANISOTROPIC_3D_MANTLE_VAL .and. iregion_code == IREGION_CRUST_MANTLE) then
-    local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani 
+    local_dim = NGLLX * NGLLY * NGLLZ * nspec_ani
     start(1) = local_dim*myrank; count(1) = local_dim
     sel_num = sel_num+1
     sel => selections(sel_num)
@@ -378,7 +378,7 @@
   ! in the case of stacey boundary conditions, add C*deltat/2 contribution to
   ! the mass matrix on Stacey edges for the crust_mantle and outer_core regions
   ! but not for the inner_core region thus the mass matrix must be replaced by
-  ! three mass matrices including the "C" damping matrix 
+  ! three mass matrices including the "C" damping matrix
   !
   ! if absorbing_conditions are not set or if NCHUNKS=6, only one mass matrix
   ! is needed for the sake of performance, only "rmassz" array will be filled

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_attenuation_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_attenuation_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_attenuation_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -62,7 +62,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! checks if attenuation is on and anything to do
@@ -72,7 +72,7 @@
 
   ! All of the following reads use the output parameters as their temporary arrays
   ! use the filename to determine the actual contents of the read
-  file_name= trim(prname) // "attenuation.bp" 
+  file_name= trim(prname) // "attenuation.bp"
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
       "verbose=1", adios_err)
@@ -87,7 +87,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = size (tau_s) 
+  local_dim = size (tau_s)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "tau_s/array", 0, 1, &
@@ -97,7 +97,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = size (factor_common) 
+  local_dim = size (factor_common)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "tau_e_store/array", 0, 1, &
@@ -107,7 +107,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = size (scale_factor) 
+  local_dim = size (scale_factor)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "Qmu_store/array", 0, 1, &

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_forward_arrays_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_forward_arrays_adios.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_forward_arrays_adios.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -32,7 +32,7 @@
 
 !-------------------------------------------------------------------------------
 !> \brief Read forward arrays from an ADIOS file.
-!> \note read_intermediate_forward_arrays_adios() 
+!> \note read_intermediate_forward_arrays_adios()
 !!       and read_forward_arrays_adios() are not factorized, because
 !>       the latest read the bp file in "b_" prefixed arrays
 subroutine read_intermediate_forward_arrays_adios()
@@ -51,7 +51,7 @@
   character(len=150) :: file_name
   integer(kind=8) :: group_size_inc
   integer :: local_dim, global_dim, offset
-!  integer, parameter :: num_arrays = 9 ! TODO correct number 
+!  integer, parameter :: num_arrays = 9 ! TODO correct number
 !  character(len=256), dimension(num_arrays) :: local_dims1, local_dims2, &
 !      global_dims1, global_dims2, offsets1, offsets2, array_name
   ! ADIOS variables
@@ -59,11 +59,11 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
 
-  file_name = trim(LOCAL_TMP_PATH) // "/dump_all_arrays_adios.bp" 
+  file_name = trim(LOCAL_TMP_PATH) // "/dump_all_arrays_adios.bp"
   call world_size(sizeprocs)
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
@@ -72,9 +72,9 @@
   call check_adios_err(myrank,adios_err)
   call adios_read_open_file (adios_handle, file_name, 0, comm, ierr)
   call check_adios_err(myrank,adios_err)
-  
 
-  local_dim = NDIM * NGLOB_CRUST_MANTLE 
+
+  local_dim = NDIM * NGLOB_CRUST_MANTLE
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "displ_crust_mantle/array", 0, 1, &
@@ -90,7 +90,7 @@
   ! NOTE: perform reads before changing selection, otherwise it will segfault
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
-  
+
   local_dim = NDIM * NGLOB_INNER_CORE
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
@@ -237,7 +237,7 @@
 
 !-------------------------------------------------------------------------------
 !> \brief Read forward arrays from an ADIOS file.
-!> \note read_intermediate_forward_arrays_adios() 
+!> \note read_intermediate_forward_arrays_adios()
 !!       and read_forward_arrays_adios() are not factorized, because
 !>       the latest read the bp file in "b_" prefixed arrays
 subroutine read_forward_arrays_adios()
@@ -261,11 +261,11 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
 
-  file_name = trim(LOCAL_TMP_PATH) // "/save_forward_arrays.bp" 
+  file_name = trim(LOCAL_TMP_PATH) // "/save_forward_arrays.bp"
   call world_size(sizeprocs)
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
@@ -274,9 +274,9 @@
   call check_adios_err(myrank,adios_err)
   call adios_read_open_file (adios_handle, file_name, 0, comm, ierr)
   call check_adios_err(myrank,adios_err)
-  
 
-  local_dim = NDIM * NGLOB_CRUST_MANTLE 
+
+  local_dim = NDIM * NGLOB_CRUST_MANTLE
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "displ_crust_mantle/array", 0, 1, &
@@ -292,7 +292,7 @@
   ! NOTE: perform reads before changing selection, otherwise it will segfault
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
-  
+
   local_dim = NDIM * NGLOB_INNER_CORE
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_mesh_databases_adios.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_mesh_databases_adios.f90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/read_mesh_databases_adios.f90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -54,7 +54,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
@@ -62,7 +62,7 @@
   ! crust and mantle
   ! create name of database
   call create_name_database_adios(prname, IREGION_CRUST_MANTLE, LOCAL_PATH)
-  file_name= trim(prname) // "boundary.bp" 
+  file_name= trim(prname) // "boundary.bp"
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
       "verbose=1", adios_err)
@@ -91,7 +91,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_XMIN_XMAX_CM
-  local_dim = size (ibelm_xmin_crust_mantle) 
+  local_dim = size (ibelm_xmin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_xmin/array", 0, 1, &
@@ -105,7 +105,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX_CM
-  local_dim = size (ibelm_ymin_crust_mantle) 
+  local_dim = size (ibelm_ymin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_ymin/array", 0, 1, &
@@ -119,7 +119,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_BOTTOM_CM
-  local_dim = size (ibelm_bottom_crust_mantle) 
+  local_dim = size (ibelm_bottom_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_bottom/array", 0, 1, &
@@ -130,7 +130,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_TOP_CM
-  local_dim = size (ibelm_top_crust_mantle) 
+  local_dim = size (ibelm_top_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_top/array", 0, 1, &
@@ -141,7 +141,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX_CM
-  local_dim = size (normal_xmin_crust_mantle) 
+  local_dim = size (normal_xmin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_xmin/array", 0, 1, &
@@ -155,7 +155,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX_CM
-  local_dim = size (normal_ymin_crust_mantle) 
+  local_dim = size (normal_ymin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_ymin/array", 0, 1, &
@@ -169,7 +169,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM_CM
-  local_dim = size (ibelm_bottom_crust_mantle) 
+  local_dim = size (ibelm_bottom_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_bottom/array", 0, 1, &
@@ -180,7 +180,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP_CM
-  local_dim = size (ibelm_top_crust_mantle) 
+  local_dim = size (ibelm_top_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_top/array", 0, 1, &
@@ -191,7 +191,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX_CM
-  local_dim = size (jacobian2D_xmin_crust_mantle) 
+  local_dim = size (jacobian2D_xmin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_xmin/array", 0, 1, &
@@ -205,7 +205,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX_CM
-  local_dim = size (jacobian2D_ymin_crust_mantle) 
+  local_dim = size (jacobian2D_ymin_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_ymin/array", 0, 1, &
@@ -219,7 +219,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLY*NSPEC2D_BOTTOM_CM
-  local_dim = size (jacobian2D_bottom_crust_mantle) 
+  local_dim = size (jacobian2D_bottom_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_bottom/array", 0, 1, &
@@ -230,7 +230,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLY*NSPEC2D_TOP_CM
-  local_dim = size (jacobian2D_top_crust_mantle) 
+  local_dim = size (jacobian2D_top_crust_mantle)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_top/array", 0, 1, &
@@ -254,7 +254,7 @@
 
   ! create name of database
   call create_name_database_adios(prname, IREGION_OUTER_CORE, LOCAL_PATH)
-  file_name= trim(prname) // "boundary.bp" 
+  file_name= trim(prname) // "boundary.bp"
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
       "verbose=1", adios_err)
@@ -285,7 +285,7 @@
   nspec2D_zmin_outer_core = NSPEC2D_BOTTOM(IREGION_OUTER_CORE)
 
   !local_dim = NSPEC2DMAX_XMIN_XMAX_OC
-  local_dim = size (ibelm_xmin_outer_core) 
+  local_dim = size (ibelm_xmin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_xmin/array", 0, 1, &
@@ -299,7 +299,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX_OC
-  local_dim = size (ibelm_ymin_outer_core) 
+  local_dim = size (ibelm_ymin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_ymin/array", 0, 1, &
@@ -313,7 +313,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_BOTTOM_OC
-  local_dim = size (ibelm_bottom_outer_core) 
+  local_dim = size (ibelm_bottom_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_bottom/array", 0, 1, &
@@ -324,7 +324,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_TOP_OC
-  local_dim = size (ibelm_top_outer_core) 
+  local_dim = size (ibelm_top_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_top/array", 0, 1, &
@@ -335,7 +335,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX_OC
-  local_dim = size (normal_xmin_outer_core) 
+  local_dim = size (normal_xmin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_xmin/array", 0, 1, &
@@ -349,7 +349,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX_OC
-  local_dim = size (normal_ymin_outer_core) 
+  local_dim = size (normal_ymin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_ymin/array", 0, 1, &
@@ -363,7 +363,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_BOTTOM_OC
-  local_dim = size (normal_bottom_outer_core) 
+  local_dim = size (normal_bottom_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_bottom/array", 0, 1, &
@@ -374,7 +374,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NDIM*NGLLX*NGLLY*NSPEC2D_TOP_OC
-  local_dim = size (normal_top_outer_core) 
+  local_dim = size (normal_top_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "normal_top/array", 0, 1, &
@@ -385,7 +385,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLY*NGLLZ*NSPEC2DMAX_XMIN_XMAX_OC
-  local_dim = size (jacobian2D_xmin_outer_core) 
+  local_dim = size (jacobian2D_xmin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_xmin/array", 0, 1, &
@@ -399,7 +399,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLZ*NSPEC2DMAX_YMIN_YMAX_OC
-  local_dim = size (jacobian2D_ymin_outer_core) 
+  local_dim = size (jacobian2D_ymin_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_ymin/array", 0, 1, &
@@ -414,7 +414,7 @@
 
 
   !local_dim = NGLLX*NGLLY*NSPEC2D_BOTTOM_OC
-  local_dim = size (jacobian2D_bottom_outer_core) 
+  local_dim = size (jacobian2D_bottom_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_bottom/array", 0, 1, &
@@ -425,7 +425,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NGLLX*NGLLY*NSPEC2D_TOP_OC
-  local_dim = size (jacobian2D_top_outer_core) 
+  local_dim = size (jacobian2D_top_outer_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "jacobian2D_top/array", 0, 1, &
@@ -448,7 +448,7 @@
 
   ! create name of database
   call create_name_database_adios(prname, IREGION_INNER_CORE, LOCAL_PATH)
-  file_name= trim(prname) // "boundary.bp" 
+  file_name= trim(prname) // "boundary.bp"
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
       "verbose=1", adios_err)
@@ -477,7 +477,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_XMIN_XMAX_IC
-  local_dim = size (ibelm_xmin_inner_core) 
+  local_dim = size (ibelm_xmin_inner_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_xmin/array", 0, 1, &
@@ -491,7 +491,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2DMAX_YMIN_YMAX_IC
-  local_dim = size (ibelm_ymin_inner_core) 
+  local_dim = size (ibelm_ymin_inner_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_ymin/array", 0, 1, &
@@ -505,7 +505,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_BOTTOM_IC
-  local_dim = size (ibelm_bottom_inner_core) 
+  local_dim = size (ibelm_bottom_inner_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_bottom/array", 0, 1, &
@@ -516,7 +516,7 @@
   call check_adios_err(myrank,adios_err)
 
   !local_dim = NSPEC2D_TOP_IC
-  local_dim = size (ibelm_top_inner_core) 
+  local_dim = size (ibelm_top_inner_core)
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "ibelm_top/array", 0, 1, &
@@ -535,7 +535,7 @@
 
   ! -- Boundary Mesh for crust and mantle ---
   if (SAVE_BOUNDARY_MESH .and. SIMULATION_TYPE == 3) then
-    file_name = LOCAL_PATH // "boundary_disc.bp" 
+    file_name = LOCAL_PATH // "boundary_disc.bp"
     call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
         "verbose=1", adios_err)
     call check_adios_err(myrank,adios_err)
@@ -761,13 +761,13 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! create the name for the database of the current slide and region
   call create_name_database_adios(prname, IREGION_CRUST_MANTLE, LOCAL_PATH)
 
-  file_name= trim(prname) // "solver_data_mpi.bp" 
+  file_name= trim(prname) // "solver_data_mpi.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -894,7 +894,7 @@
     if( ierr /= 0 ) &
       call exit_mpi(myrank,'error allocating num_elem_colors_crust_mantle array')
 
-    local_dim = num_colors_outer_crust_mantle + num_colors_inner_crust_mantle 
+    local_dim = num_colors_outer_crust_mantle + num_colors_inner_crust_mantle
     start(1) = local_dim*myrank; count(1) = local_dim
     call adios_selection_boundingbox (sel , 1, start, count)
     call adios_schedule_read(adios_handle, sel, &
@@ -944,13 +944,13 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! create the name for the database of the current slide and region
   call create_name_database_adios(prname, IREGION_OUTER_CORE, LOCAL_PATH)
 
-  file_name= trim(prname) // "solver_data_mpi.bp" 
+  file_name= trim(prname) // "solver_data_mpi.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -1129,13 +1129,13 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! create the name for the database of the current slide and region
   call create_name_database_adios(prname, IREGION_INNER_CORE, LOCAL_PATH)
 
-  file_name= trim(prname) // "solver_data_mpi.bp" 
+  file_name= trim(prname) // "solver_data_mpi.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -1262,7 +1262,7 @@
     if( ierr /= 0 ) &
       call exit_mpi(myrank,'error allocating num_elem_colors_inner_core array')
 
-    local_dim = num_colors_outer_inner_core + num_colors_inner_inner_core 
+    local_dim = num_colors_outer_inner_core + num_colors_inner_inner_core
     start(1) = local_dim*myrank; count(1) = local_dim
     call adios_selection_boundingbox (sel , 1, start, count)
     call adios_schedule_read(adios_handle, sel, &
@@ -1317,7 +1317,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid, sel
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   integer :: vars_count, attrs_count, current_step, last_step, vsteps
-  character(len=128), dimension(:), allocatable :: adios_names 
+  character(len=128), dimension(:), allocatable :: adios_names
   integer(kind=8), dimension(1) :: start, count
 
   ! crust and mantle
@@ -1325,7 +1325,7 @@
   ! create name of database
   call create_name_database_adios(reg_name, IREGION_CRUST_MANTLE, LOCAL_PATH)
 
-  file_name= trim(reg_name) // "stacey.bp" 
+  file_name= trim(reg_name) // "stacey.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -1335,7 +1335,7 @@
   call check_adios_err(myrank,adios_err)
   ! read arrays for Stacey conditions
 
-  local_dim = 2*NSPEC2DMAX_XMIN_XMAX_CM 
+  local_dim = 2*NSPEC2DMAX_XMIN_XMAX_CM
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "njmin/array", 0, 1, &
@@ -1353,7 +1353,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = 2*NSPEC2DMAX_YMIN_YMAX_CM 
+  local_dim = 2*NSPEC2DMAX_YMIN_YMAX_CM
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "nimin/array", 0, 1, &
@@ -1382,7 +1382,7 @@
   ! create name of database
   call create_name_database_adios(reg_name, IREGION_OUTER_CORE, LOCAL_PATH)
 
-  file_name= trim(reg_name) // "stacey.bp" 
+  file_name= trim(reg_name) // "stacey.bp"
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
 
   call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, &
@@ -1392,7 +1392,7 @@
   call check_adios_err(myrank,adios_err)
   ! read arrays for Stacey conditions
 
-  local_dim = 2*NSPEC2DMAX_XMIN_XMAX_OC 
+  local_dim = 2*NSPEC2DMAX_XMIN_XMAX_OC
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "njmin/array", 0, 1, &
@@ -1410,7 +1410,7 @@
   call adios_perform_reads(adios_handle, adios_err)
   call check_adios_err(myrank,adios_err)
 
-  local_dim = 2*NSPEC2DMAX_YMIN_YMAX_OC 
+  local_dim = 2*NSPEC2DMAX_YMIN_YMAX_OC
   start(1) = local_dim*myrank; count(1) = local_dim
   call adios_selection_boundingbox (sel , 1, start, count)
   call adios_schedule_read(adios_handle, sel, "nimin/array", 0, 1, &

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/save_forward_arrays_adios.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/save_forward_arrays_adios.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/save_forward_arrays_adios.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -33,7 +33,7 @@
 
 !-------------------------------------------------------------------------------
 !> \brief Write intermediate forward arrays in an ADIOS file.
-!! 
+!!
 !! This subroutine is only used when NUMBER_OF_RUNS > 1 and
 !! NUMBER_OF_THIS_RUN < NUMBER_OF_RUNS.
 subroutine save_intermediate_forward_arrays_adios()
@@ -57,7 +57,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid
   integer(kind=8)         :: adios_groupsize, adios_totalsize
 
-  outputname = trim(LOCAL_TMP_PATH) // "/dump_all_arrays_adios.bp" 
+  outputname = trim(LOCAL_TMP_PATH) // "/dump_all_arrays_adios.bp"
   call world_size(sizeprocs) ! TODO keep it in parameters
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
   group_size_inc = 0
@@ -95,9 +95,9 @@
 
 !-------------------------------------------------------------------------------
 !> \brief Write selected forward arrays in an ADIOS file.
-!! 
+!!
 !! This subroutine is only used for forward simualtions when
-!! SAVE_FORWARD is set to .true. It dumps the same arrays than 
+!! SAVE_FORWARD is set to .true. It dumps the same arrays than
 !! save_intermediate_forward_arrays_adios() execpt than some arrays
 !! are only dumped if ROTATION and ATTENUATION are set to .true.
 subroutine save_forward_arrays_adios()
@@ -116,7 +116,7 @@
   character(len=150) :: outputname
   integer(kind=8) :: group_size_inc
   integer :: local_dim, global_dim, offset
-!  integer, parameter :: num_arrays = 9 ! TODO correct number 
+!  integer, parameter :: num_arrays = 9 ! TODO correct number
 !  character(len=256), dimension(num_arrays) :: local_dims1, local_dims2, &
 !      global_dims1, global_dims2, offsets1, offsets2, array_name
   ! ADIOS variables
@@ -124,7 +124,7 @@
   integer(kind=8)         :: adios_group, adios_handle, varid
   integer(kind=8)         :: adios_groupsize, adios_totalsize
 
-  outputname = trim(LOCAL_TMP_PATH) // "/save_forward_arrays.bp" 
+  outputname = trim(LOCAL_TMP_PATH) // "/save_forward_arrays.bp"
   call world_size(sizeprocs)
   call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
   group_size_inc = 0
@@ -137,7 +137,7 @@
 
   ! Define ADIOS variables
   call define_common_forward_arrays_adios(adios_group, group_size_inc)
-  ! conditional definition of vars seem to mess with the group size, 
+  ! conditional definition of vars seem to mess with the group size,
   ! even if the variables are conditionnaly written.
 !  if (ROTATION_VAL) then
     call define_rotation_forward_arrays_adios(adios_group, group_size_inc)
@@ -190,7 +190,7 @@
 
   integer :: local_dim
 
-  local_dim = NDIM * NGLOB_CRUST_MANTLE 
+  local_dim = NDIM * NGLOB_CRUST_MANTLE
   call define_adios_global_real_1d_array(adios_group, "displ_crust_mantle", &
       local_dim, group_size_inc)
   call define_adios_global_real_1d_array(adios_group, "veloc_crust_mantle", &
@@ -312,7 +312,7 @@
 !-------------------------------------------------------------------------------
 !>  Schedule writes of ADIOS forward arrays that are always dumped.
 !! \param adios_handle The handle to the adios bp file
-!! \param group_size_inc The number of MPI processes involved in the writting 
+!! \param group_size_inc The number of MPI processes involved in the writting
 subroutine write_common_forward_arrays_adios(adios_handle, sizeprocs)
   use adios_write_mod
   use specfem_par
@@ -323,11 +323,11 @@
   implicit none
 
   integer(kind=8), intent(in) :: adios_handle
-  integer, intent(in) :: sizeprocs 
+  integer, intent(in) :: sizeprocs
 
   integer :: local_dim, adios_err
 
-  local_dim = NDIM * NGLOB_CRUST_MANTLE 
+  local_dim = NDIM * NGLOB_CRUST_MANTLE
   call adios_set_path (adios_handle, "displ_crust_mantle", adios_err)
   call check_adios_err(myrank,adios_err)
   call write_1D_global_array_adios_dims(adios_handle, local_dim, sizeprocs)
@@ -452,7 +452,7 @@
 !-------------------------------------------------------------------------------
 !>  Schedule writes of ADIOS forward arrays that are dumped if ROTATION is true.
 !! \param adios_handle The handle to the adios bp file
-!! \param group_size_inc The number of MPI processes involved in the writting 
+!! \param group_size_inc The number of MPI processes involved in the writting
 subroutine write_rotation_forward_arrays_adios(adios_handle, sizeprocs)
   use adios_write_mod
   use specfem_par
@@ -463,7 +463,7 @@
   implicit none
 
   integer(kind=8), intent(in) :: adios_handle
-  integer, intent(in) :: sizeprocs 
+  integer, intent(in) :: sizeprocs
 
   integer :: local_dim, adios_err
 
@@ -482,10 +482,10 @@
 end subroutine write_rotation_forward_arrays_adios
 
 !-------------------------------------------------------------------------------
-!>  Schedule writes of ADIOS forward arrays that are dumped if ATTENUATION 
+!>  Schedule writes of ADIOS forward arrays that are dumped if ATTENUATION
 !!  is true.
 !! \param adios_handle The handle to the adios bp file
-!! \param group_size_inc The number of MPI processes involved in the writting 
+!! \param group_size_inc The number of MPI processes involved in the writting
 subroutine write_attenuation_forward_arrays_adios(adios_handle, sizeprocs)
   use adios_write_mod
   use specfem_par
@@ -496,7 +496,7 @@
   implicit none
 
   integer(kind=8), intent(in) :: adios_handle
-  integer, intent(in) :: sizeprocs 
+  integer, intent(in) :: sizeprocs
 
   integer :: local_dim, adios_err
 
@@ -564,7 +564,7 @@
 end subroutine write_attenuation_forward_arrays_adios
 
 !-------------------------------------------------------------------------------
-!> Write local, global and offset dimensions to ADIOS 
+!> Write local, global and offset dimensions to ADIOS
 !! \param adios_handle Handle to the adios file
 !! \param local_dim Number of elements to be written by one process
 !! \param sizeprocs Number of MPI processes

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/write_specfem_adios_header.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/write_specfem_adios_header.F90	2013-07-01 02:01:51 UTC (rev 22471)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/write_specfem_adios_header.F90	2013-07-01 02:07:51 UTC (rev 22472)
@@ -77,7 +77,7 @@
   ! integer          :: NSOURCES -> in specfem_par module
   integer,           dimension(NSOURCES) :: yr, mo, da, ho, mi
   double precision,  dimension(NSOURCES) :: sec, t_shift, hdur, lat, long, depth
-  double precision,  dimension(NSOURCES) :: mrr, mtt, mpp, mrt, mrp, mtp 
+  double precision,  dimension(NSOURCES) :: mrr, mtt, mpp, mrt, mrp, mtp
   integer :: event_name_length, datasource_length
   character(len=16):: event_name
   character(len=:), allocatable  :: datasource  ! F03 feature
@@ -85,7 +85,7 @@
   ! values from STATIONS ----------------------------------
   integer :: NSTATIONS
   integer :: station_name_length, network_name_length ! for later reading
-  character(len=:),   allocatable :: station_name, network_name 
+  character(len=:),   allocatable :: station_name, network_name
   double precision, allocatable, dimension(:) :: stlat, stlon, stele, stbur
 
   character(len=150) :: OUTPUT_FILES,LOCAL_PATH,LOCAL_TMP_PATH,MODEL
@@ -96,13 +96,13 @@
   integer(kind=8)         :: adios_groupsize, adios_totalsize
   ! TODO: find a better name once the use of ADIOS is more completely
   !       implemented
-  character(len=256):: filename = "OUTPUT_FILES/header_specfem3d_globe.bp" 
+  character(len=256):: filename = "OUTPUT_FILES/header_specfem3d_globe.bp"
   integer(kind=8)   :: group_size_inc
   integer           :: model_length ! for later reading of MODEL
   integer           :: isource, irec, ier
 
 
-  ! only the master needs to read the values to be written 
+  ! only the master needs to read the values to be written
   if(myrank == 0) then
     call adios_declare_group (adios_group, "SPECFEM3D_GLOBE_HEADER",           &
                               "", 0, adios_err)
@@ -115,20 +115,20 @@
 
     !--*** Values read from DATA/Par_file ***
     ! extract all unmodified values from the Par_file
-    call read_parameter_file(OUTPUT_FILES,                                     & 
-        LOCAL_PATH, LOCAL_TMP_PATH, MODEL,                                     & 
+    call read_parameter_file(OUTPUT_FILES,                                     &
+        LOCAL_PATH, LOCAL_TMP_PATH, MODEL,                                     &
         NTSTEP_BETWEEN_OUTPUT_SEISMOS, NTSTEP_BETWEEN_READ_ADJSRC,             &
-        NTSTEP_BETWEEN_FRAMES, NTSTEP_BETWEEN_OUTPUT_INFO, NUMBER_OF_RUNS,     & 
+        NTSTEP_BETWEEN_FRAMES, NTSTEP_BETWEEN_OUTPUT_INFO, NUMBER_OF_RUNS,     &
         NUMBER_OF_THIS_RUN, NCHUNKS, SIMULATION_TYPE, MOVIE_VOLUME_TYPE,       &
-        MOVIE_START, MOVIE_STOP, NEX_XI, NEX_ETA, NPROC_XI, NPROC_ETA,         & 
-        ANGULAR_WIDTH_XI_IN_DEGREES, ANGULAR_WIDTH_ETA_IN_DEGREES,             & 
+        MOVIE_START, MOVIE_STOP, NEX_XI, NEX_ETA, NPROC_XI, NPROC_ETA,         &
+        ANGULAR_WIDTH_XI_IN_DEGREES, ANGULAR_WIDTH_ETA_IN_DEGREES,             &
         CENTER_LONGITUDE_IN_DEGREES, CENTER_LATITUDE_IN_DEGREES,               &
         GAMMA_ROTATION_AZIMUTH, HDUR_MOVIE, MOVIE_TOP_KM, MOVIE_BOTTOM_KM,     &
         RECORD_LENGTH_IN_MINUTES, MOVIE_EAST_DEG, MOVIE_WEST_DEG,              &
         MOVIE_NORTH_DEG, MOVIE_SOUTH_DEG, ELLIPTICITY, GRAVITY, ROTATION,      &
-        TOPOGRAPHY, OCEANS, MOVIE_SURFACE, MOVIE_VOLUME, MOVIE_COARSE,         & 
+        TOPOGRAPHY, OCEANS, MOVIE_SURFACE, MOVIE_VOLUME, MOVIE_COARSE,         &
         RECEIVERS_CAN_BE_BURIED, PRINT_SOURCE_TIME_FUNCTION, SAVE_MESH_FILES,  &
-        ATTENUATION, ATTENUATION_NEW, ABSORBING_CONDITIONS, SAVE_FORWARD,      & 
+        ATTENUATION, ATTENUATION_NEW, ABSORBING_CONDITIONS, SAVE_FORWARD,      &
         OUTPUT_SEISMOS_ASCII_TEXT, OUTPUT_SEISMOS_SAC_ALPHANUM,                &
         OUTPUT_SEISMOS_SAC_BINARY, ROTATE_SEISMOGRAMS_RT,                      &
         WRITE_SEISMOGRAMS_BY_MASTER, SAVE_ALL_SEISMOS_IN_ONE_FILE,             &
@@ -187,7 +187,7 @@
         mrr, mtt, mpp, mrt, mrp, mtp, event_name_length, event_name,           &
         datasource_length, datasource)
 
-    ! Write variables from 'STATIONS' 
+    ! Write variables from 'STATIONS'
     call write_adios_stations_variables (adios_handle,                         &
        NSTATIONS, stlat, stlon, stele, stbur, station_name_length,             &
        station_name, network_name_length, network_name)
@@ -205,7 +205,7 @@
 
 ! Imbricated/contained subroutines. The initial thougth was to do a module with
 ! public access to the write_specfem_header_adios routine and private access to
-! the other routines. The problem then is the files compilation order that 
+! the other routines. The problem then is the files compilation order that
 ! should be done very carefully. This require modifications of the Makefile
 ! which is not currently designed to do that.
 contains
@@ -221,7 +221,7 @@
   integer(kind=8), intent(inout) :: group_size_inc
   ! Variables
   integer :: pkg_str_len, conf_flags_len
- 
+
   pkg_str_len    = len_trim(PACKAGE_STRING)
   conf_flags_len = len_trim(CONFIGURE_FLAGS)
   call define_adios_integer_scalar (adios_group, "package_string_length", &
@@ -273,7 +273,7 @@
       "/specfem3D_globe_parameter_file", group_size_inc)
   call define_adios_double_scalar (adios_group, "RECORD_LENGTH_IN_MINUTES", &
       "/specfem3D_globe_parameter_file", group_size_inc)
-  !-- integer variables 
+  !-- integer variables
   call define_adios_integer_scalar (adios_group, "NTSTEP_BETWEEN_OUTPUT_SEISMOS", &
       "/specfem3D_globe_parameter_file", group_size_inc)
   call define_adios_integer_scalar (adios_group, "NTSTEP_BETWEEN_READ_ADJSRC", "/specfem3D_globe_parameter_file", group_size_inc)
@@ -376,9 +376,9 @@
   integer(kind=8), intent(inout) :: group_size_inc
   integer, intent(in) :: NSTATIONS, station_name_length, network_name_length
 
-  !-- Number of STATIONS inside the STATIONS file 
+  !-- Number of STATIONS inside the STATIONS file
   call define_adios_integer_scalar (adios_group, "NSTATIONS", "/STATIONS", group_size_inc)
-  !-- double precision arrays 
+  !-- double precision arrays
   call define_adios_double_local_array1D (adios_group, "station_latitude", "/STATIONS", NSTATIONS, "NSTATIONS", group_size_inc)
   call define_adios_double_local_array1D (adios_group, "station_longitude", "/STATIONS", NSTATIONS, "NSTATIONS", group_size_inc)
   call define_adios_double_local_array1D (adios_group, "station_elevation", "/STATIONS", NSTATIONS, "NSTATIONS", group_size_inc)
@@ -411,7 +411,7 @@
 !! \param event_name_length Variable for keeping the size of the event_name
 !!                          string
 !! \param event_name Strings to store the event name
-!! \param  datasource_length Variable for keeping the size of the datasource 
+!! \param  datasource_length Variable for keeping the size of the datasource
 !!                          string
 !! \param datasource String in which the different datasource names are
 !!                   concatenated
@@ -424,7 +424,7 @@
   ! Parameters
   integer,           dimension(NSOURCES), intent(out) :: yr, mo, da, ho, mi
   double precision,  dimension(NSOURCES), intent(out) :: sec, t_shift, hdur, lat, long, depth
-  double precision,  dimension(NSOURCES), intent(out) :: mrr, mtt, mpp, mrt, mrp, mtp 
+  double precision,  dimension(NSOURCES), intent(out) :: mrr, mtt, mpp, mrt, mrp, mtp
   integer, intent(inout) :: event_name_length, datasource_length
   character(len=16), intent(out) :: event_name
   character(len=:), allocatable, intent(out)  :: datasource  ! F03 feature
@@ -437,7 +437,7 @@
   !      routines
   call get_value_string(CMTSOLUTION, 'solver.CMTSOLUTION', 'DATA/CMTSOLUTION')
   open(unit=1,file=CMTSOLUTION,status='old',action='read')
-  datasource_length = 4*NSOURCES ! a datasource is 4 character, by convention 
+  datasource_length = 4*NSOURCES ! a datasource is 4 character, by convention
   allocate(character(len=(datasource_length)) :: datasource, stat=ier)
   if (ier /=0) &
       call exit_MPI (myrank, &
@@ -457,7 +457,7 @@
     read(string,"(a4,i5,i3,i3,i3,i3,f6.2)") datasource_tmp,yr(isource), &
         mo(isource),da(isource),ho(isource),mi(isource),sec(isource)
     datasource = datasource // datasource_tmp
-    ! read event name 
+    ! read event name
     read(1,"(a)") string
     read(string(12:len_trim(string)),*) event_name
     ! read time shift
@@ -518,7 +518,7 @@
   ! Parameters
   integer :: NSTATIONS
   integer, intent(inout) :: station_name_length, network_name_length ! for later reading
-  character(len=:), allocatable, intent(out) :: station_name, network_name 
+  character(len=:), allocatable, intent(out) :: station_name, network_name
   double precision, allocatable, dimension(:), intent(out) :: stlat, stlon, stele, stbur
   ! Local variables
   character(len=MAX_LENGTH_STATION_NAME) :: station_name_tmp
@@ -535,10 +535,10 @@
   enddo
   allocate (character (len=(MAX_LENGTH_STATION_NAME*NSTATIONS)) :: station_name)
   allocate (character (len=(MAX_LENGTH_NETWORK_NAME*NSTATIONS)) :: network_name)
-  allocate (stlat (NSTATIONS)) 
-  allocate (stlon (NSTATIONS)) 
-  allocate (stele (NSTATIONS)) 
-  allocate (stbur (NSTATIONS)) 
+  allocate (stlat (NSTATIONS))
+  allocate (stlon (NSTATIONS))
+  allocate (stele (NSTATIONS))
+  allocate (stbur (NSTATIONS))
   station_name = ""
   network_name = ""
   rewind(1)
@@ -550,8 +550,8 @@
     write(IMAIN,*) 'error reading in station ',irec
     call exit_MPI(myrank,'error reading in station in STATIONS file')
   endif
-  station_name = station_name // trim(station_name_tmp) // " " 
-  network_name = network_name // trim(network_name_tmp) // " " 
+  station_name = station_name // trim(station_name_tmp) // " "
+  network_name = network_name // trim(network_name_tmp) // " "
   enddo
   close(1)
   station_name = trim(station_name)
@@ -571,7 +571,7 @@
   integer :: pkg_str_len, conf_flags_len, adios_err
   character(len=:), allocatable :: pkg_str
   character(len=:), allocatable :: conf_flags
- 
+
   pkg_str    = trim(PACKAGE_STRING)
   conf_flags = trim(CONFIGURE_FLAGS)
 
@@ -581,7 +581,7 @@
   call adios_write (adios_handle, "package_name", pkg_str, adios_err)
   call adios_write (adios_handle, "conf_flags_len", conf_flags_len, adios_err)
   call adios_write (adios_handle, "conf_flags", conf_flags, adios_err)
-end subroutine write_adios_solver_info_variables 
+end subroutine write_adios_solver_info_variables
 
 !> \brief Wrapper to write the 'Par_file' variables into the adios header
 !! \param adios_handle The handle to the file where the variable should be
@@ -681,7 +681,7 @@
   call adios_write (adios_handle, "USE_BINARY_FOR_LARGE_FILE", USE_BINARY_FOR_LARGE_FILE, adios_err)
   call adios_write (adios_handle, "model_length", model_length, adios_err)
   call adios_write (adios_handle, "MODEL", MODEL, adios_err)
-end subroutine write_adios_par_file_variables 
+end subroutine write_adios_par_file_variables
 
 !> \brief Wrapper to write the 'CMTSOLUTION' variables into the adios header
 !! \param adios_handle The handle to the file where the variable should be
@@ -698,7 +698,7 @@
   double precision, dimension(NSOURCES), intent(in) :: sec, t_shift, hdur,     &
                                                        lat, long, depth
   double precision, dimension(NSOURCES), intent(in) :: mrr, mtt, mpp,          &
-                                                       mrt, mrp, mtp 
+                                                       mrt, mrp, mtp
   integer, intent(in) :: event_name_length, datasource_length
   character(len=16), intent(in) :: event_name
   character(len=:), allocatable, intent(in)  :: datasource  ! F03 feature
@@ -740,7 +740,7 @@
   integer(kind=8), intent(in) :: adios_handle
   integer, intent(in):: NSTATIONS
   integer, intent(in):: station_name_length, network_name_length ! for later reading
-  character(len=:), allocatable, intent(in) :: station_name, network_name 
+  character(len=:), allocatable, intent(in) :: station_name, network_name
   double precision, allocatable, dimension(:), intent(in) :: stlat, stlon,     &
                                                              stele, stbur
   ! Local variables



More information about the CIG-COMMITS mailing list