[cig-commits] [commit] devel,master: my initial idea of not calling meshfem3D_models_getatten_val() at all does not work because that routine calls another routine to compute tau values; I thus now only avoid the problematic lines in that routine (908d430)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:11:22 PST 2014


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

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

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

commit 908d430624f19a16e742f67416038002c1401caf
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Tue Apr 22 03:50:04 2014 +0200

    my initial idea of not calling meshfem3D_models_getatten_val() at all does not work because that routine calls another routine to compute tau values; I thus now only avoid the problematic lines in that routine


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

908d430624f19a16e742f67416038002c1401caf
 src/meshfem3D/get_model.f90        | 16 ++++------------
 src/meshfem3D/meshfem3D_models.f90 | 27 +++++++++++++++++----------
 2 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/src/meshfem3D/get_model.f90 b/src/meshfem3D/get_model.f90
index 7b40d8e..bb05551 100644
--- a/src/meshfem3D/get_model.f90
+++ b/src/meshfem3D/get_model.f90
@@ -179,18 +179,10 @@
         ! and before TOPOGRAPHY / ELLIPTICITY
         !
         !note:  only Qmu attenuation considered, Qkappa attenuation not used so far...
-!! DK DK BUG
-!! DK DK BUG   routine meshfem3D_models_getatten_val() is unsafe and for instance breaks s362ani + attenuation
-!! DK DK BUG   (see the so-called mcmodel=medium bug at https://github.com/geodynamics/specfem3d/issues/8 )
-!! DK DK BUG   and thus for now I comment it out here.
-!! DK DK BUG
-!! DK DK BUG   It is also not clear to me if the if() statement below is sufficient or if the routine should
-!! DK DK BUG   be called in the case of 3D Earth models only.
-!! DK DK BUG
-!! DK DK BUG        if( ATTENUATION ) &
-!! DK DK BUG          call meshfem3D_models_getatten_val(idoubling,xmesh,ymesh,zmesh,r_prem, &
-!! DK DK BUG                                             tau_e,tau_s,T_c_source, &
-!! DK DK BUG                                             moho,Qmu,Qkappa,elem_in_crust)
+        if( ATTENUATION ) &
+          call meshfem3D_models_getatten_val(idoubling,xmesh,ymesh,zmesh,r_prem, &
+                                             tau_e,tau_s,T_c_source, &
+                                             moho,Qmu,Qkappa,elem_in_crust)
 
 ! define elastic parameters in the model
 
diff --git a/src/meshfem3D/meshfem3D_models.f90 b/src/meshfem3D/meshfem3D_models.f90
index d76c108..bc380a5 100644
--- a/src/meshfem3D/meshfem3D_models.f90
+++ b/src/meshfem3D/meshfem3D_models.f90
@@ -817,7 +817,9 @@
 !! DK DK BUG
 !! DK DK BUG
 !! DK DK BUG   routine meshfem3D_models_getatten_val() is unsafe and for instance breaks s362ani + attenuation
-!! DK DK BUG   (see the so-called mcmodel=medium bug at https://github.com/geodynamics/specfem3d/issues/8 )
+!! DK DK BUG   (see the so-called mcmodel=medium bug at https://github.com/geodynamics/specfem3d/issues/8 ).
+!! DK DK BUG   I thus temporarily patched it to avoid the problematic lines;
+!! DK DK BUG   of course this should be changed / fixed in the future.
 !! DK DK BUG
 !! DK DK BUG
 
@@ -848,15 +850,6 @@
   double precision :: r_used
   double precision, parameter :: rmoho_prem = 6371.d0 - 24.4d0
 
-!! DK DK BUG
-!! DK DK BUG
-!! DK DK BUG   routine meshfem3D_models_getatten_val() is unsafe and for instance breaks s362ani + attenuation
-!! DK DK BUG   (see the so-called mcmodel=medium bug at https://github.com/geodynamics/specfem3d/issues/8 )
-!! DK DK BUG   and thus for now I add a stop statement here.
-!! DK DK BUG
-!! DK DK BUG
-  stop 'DK DK BUG routine meshfem3D_models_getatten_val() is unsafe and for instance breaks s362ani + attenuation, thus removed'
-
   ! initializes
   tau_e(:)   = 0.0d0
 
@@ -896,6 +889,13 @@
 
   else
 
+!! DK DK BUG
+!! DK DK BUG
+!! DK DK BUG since using the routines below is unsafe (see the above comment), I remove them for now
+!! DK DK BUG
+!! DK DK BUG
+    goto 777
+
     select case (REFERENCE_1D_MODEL)
 
       ! case(REFERENCE_MODEL_PREM)
@@ -930,6 +930,13 @@
 
     end select
 
+!! DK DK BUG
+!! DK DK BUG
+!! DK DK BUG since using the routines above is unsafe (see the above comment), I remove them for now
+!! DK DK BUG
+!! DK DK BUG
+  777 continue
+
   endif
 
   ! Get tau_e from tau_s and Qmu



More information about the CIG-COMMITS mailing list