[cig-commits] [commit] devel, master: Fix real-to-integer conversion warnings. (7607904)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:19:55 PST 2014


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

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

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

commit 7607904c878e28a7c82f00751dab7043544abebb
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Sat May 31 03:24:39 2014 -0400

    Fix real-to-integer conversion warnings.


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

7607904c878e28a7c82f00751dab7043544abebb
 src/meshfem3D/model_attenuation.f90      |  2 +-
 src/meshfem3D/model_heterogen_mantle.f90 | 16 ++++++++--------
 src/shared/auto_ner.f90                  |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/meshfem3D/model_attenuation.f90 b/src/meshfem3D/model_attenuation.f90
index 3111b69..0b3abf3 100644
--- a/src/meshfem3D/model_attenuation.f90
+++ b/src/meshfem3D/model_attenuation.f90
@@ -477,7 +477,7 @@
   ! by default: resolution is Q_resolution = 10
   ! converts Qmu to an array integer index:
   ! e.g. Qmu = 150.31 -> Qtmp = 150.31 * 10 = int( 1503.10 ) = 1503
-  Qtmp    = Qmu * dble(AM_S%Q_resolution)
+  Qtmp    = int(Qmu * dble(AM_S%Q_resolution))
 
   ! rounds to corresponding double value:
   ! e.g. Qmu_new = dble( 1503 ) / dble(10) = 150.30
diff --git a/src/meshfem3D/model_heterogen_mantle.f90 b/src/meshfem3D/model_heterogen_mantle.f90
index 39630a7..b71cf02 100644
--- a/src/meshfem3D/model_heterogen_mantle.f90
+++ b/src/meshfem3D/model_heterogen_mantle.f90
@@ -172,35 +172,35 @@
     z_high = z_low + 1
 
     ! rho1 at: x_low y_low z_low
-    rec_read = 1+(x_low*N_R*N_R)+(y_low*N_R)+z_low
+    rec_read = int(1+(x_low*N_R*N_R)+(y_low*N_R)+z_low)
     rho1 = HMM_rho_in(rec_read)
 
     ! rho2 at: x_low y_high z_low
-    rec_read = 1+(x_low*N_R*N_R)+(y_high*N_R)+z_low
+    rec_read = int(1+(x_low*N_R*N_R)+(y_high*N_R)+z_low)
     rho2 = HMM_rho_in(rec_read)
 
     ! rho3 at: x_high y_low z_low
-    rec_read = 1+(x_high*N_R*N_R)+(y_low*N_R)+z_low
+    rec_read = int(1+(x_high*N_R*N_R)+(y_low*N_R)+z_low)
     rho3 = HMM_rho_in(rec_read)
 
     ! rho4 at: x_high y_high z_low
-    rec_read = 1+(x_high*N_R*N_R)+(y_high*N_R)+z_low
+    rec_read = int(1+(x_high*N_R*N_R)+(y_high*N_R)+z_low)
     rho4 = HMM_rho_in(rec_read)
 
     ! rho5 at: x_low y_low z_high
-    rec_read = 1+(x_low*N_R*N_R)+(y_low*N_R)+z_high
+    rec_read = int(1+(x_low*N_R*N_R)+(y_low*N_R)+z_high)
     rho5 = HMM_rho_in(rec_read)
 
     ! rho6 at: x_low y_high z_high
-    rec_read = 1+(x_low*N_R*N_R)+(y_high*N_R)+z_high
+    rec_read = int(1+(x_low*N_R*N_R)+(y_high*N_R)+z_high)
     rho6 = HMM_rho_in(rec_read)
 
     ! rho7 at: x_high y_low z_high
-    rec_read = 1+(x_high*N_R*N_R)+(y_low*N_R)+z_high
+    rec_read = int(1+(x_high*N_R*N_R)+(y_low*N_R)+z_high)
     rho7 = HMM_rho_in(rec_read)
 
     ! rho8 at: x_high y_high z_high
-    rec_read = 1+(x_high*N_R*N_R)+(y_high*N_R)+z_high
+    rec_read = int(1+(x_high*N_R*N_R)+(y_high*N_R)+z_high)
     rho8 = HMM_rho_in(rec_read)
 
     ! perform linear interpolation between the 8 points
diff --git a/src/shared/auto_ner.f90 b/src/shared/auto_ner.f90
index 16fa957..814613a 100644
--- a/src/shared/auto_ner.f90
+++ b/src/shared/auto_ner.f90
@@ -130,7 +130,7 @@
 
   TMP = (WIDTH / ( GLL_SPACING * dble(NEX_MAX)) * DEG2KM * PTS_PER_WAVELENGTH ) / &
        S_VELOCITY_MIN
-  MIN_ATTENUATION_PERIOD = TMP
+  MIN_ATTENUATION_PERIOD = int(TMP)
 
   if(N_SLS < 2 .OR. N_SLS > 5) then
      stop 'N_SLS must be greater than 1 or less than 6'
@@ -141,7 +141,7 @@
   ! The max attenuation period for 3 SLS is optimally
   !   1.75 decades from the min attenuation period, see THETA above
   TMP = TMP * 10.0d0**THETA(N_SLS)
-  MAX_ATTENUATION_PERIOD = TMP
+  MAX_ATTENUATION_PERIOD = int(TMP)
 
   end subroutine auto_attenuation_periods
 



More information about the CIG-COMMITS mailing list