[cig-commits] [commit] pluggable: Partitioned models into subdirectories. Corrected a mistake I made in get_model(). (93686cb)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Mar 10 13:39:48 PDT 2014


Repository : ssh://geoshell/specfem3d_globe

On branch  : pluggable
Link       : https://github.com/geodynamics/specfem3d_globe/compare/0000000000000000000000000000000000000000...99d99a4dcea0911a22759b11dba98723049af96b

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

commit 93686cbe1bbec42a0ffc89e8c8f3f35f171566a2
Author: Leif Strand <leif at geodynamics.org>
Date:   Tue Nov 11 01:59:24 2008 +0000

    Partitioned models into subdirectories.  Corrected a mistake I made in
    get_model().


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

93686cbe1bbec42a0ffc89e8c8f3f35f171566a2
 Makefile.in   | 19 ++++++++++---------
 get_model.f90 | 40 +++++++++++++++++++++++-----------------
 2 files changed, 33 insertions(+), 26 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index e5447ee..244c15f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -51,7 +51,7 @@ RANLIB = ranlib
 O = obj
 S = @srcdir@
 
-model_OBJECTS = $(crust_2_0_OBJECTS) $(s20rts_OBJECTS) $(s362ani_OBJECTS) $(reference_1d_model_OBJECTS)
+model_OBJECTS = $(crustal_model_OBJECTS) $(s20rts_OBJECTS) $(s362ani_OBJECTS) $(reference_1d_model_OBJECTS)
 
 libspecfem_a_OBJECTS = \
 	$O/add_missing_nodes.o \
@@ -182,15 +182,16 @@ bak: backup
 #### includes
 ####
 
-include $S/MODELS/crust2.0/build.mk
-include $S/MODELS/s20rts/build.mk
-include $S/MODELS/s362ani/build.mk
+include $S/MODELS/crustal/crust2.0/build.mk
 
-include $S/MODELS/prem/build.mk
-#include $S/MODELS/iasp91/build.mk
-#include $S/MODELS/1066a/build.mk
-#include $S/MODELS/ak135/build.mk
-#include $S/MODELS/ref/build.mk
+include $S/MODELS/3D_mantle/s20rts/build.mk
+include $S/MODELS/3D_mantle/s362ani/build.mk
+
+include $S/MODELS/1D_ref/prem/build.mk
+#include $S/MODELS/1D_ref/iasp91/build.mk
+#include $S/MODELS/1D_ref/1066a/build.mk
+#include $S/MODELS/1D_ref/ak135/build.mk
+#include $S/MODELS/1D_ref/ref/build.mk
 
 
 ####
diff --git a/get_model.f90 b/get_model.f90
index 9b4f4a1..e9ba7a4 100644
--- a/get_model.f90
+++ b/get_model.f90
@@ -193,24 +193,30 @@ subroutine get_model(myrank,iregion_code,nspec, &
 
            !      get the 3-D model parameters
            if(ISOTROPIC_3D_MANTLE) then
-              if(r_prem > RCMB/R_EARTH .and. r_prem < RMOHO/R_EARTH) then
-                 radius = r
-              else if(r_prem >= RMOHO/R_EARTH) then
-                 ! extend 3-D mantle model above the Moho to the surface before adding the crust
-                 radius = 0.999999d0*RMOHO/R_EARTH ! r_moho
-              endif
+              do
+                 if(r_prem > RCMB/R_EARTH .and. r_prem < RMOHO/R_EARTH) then
+                    radius = r
+                 else if(r_prem >= RMOHO/R_EARTH) then
+                    ! extend 3-D mantle model above the Moho to the surface before adding the crust
+                    radius = 0.999999d0*RMOHO/R_EARTH ! r_moho
+                 else
+                    exit
+                 endif
 
-              call xyz_2_rthetaphi_dble(xmesh,ymesh,zmesh,r_dummy,theta,phi)
-              call reduce(theta,phi)
-              if(THREE_D_MODEL == THREE_D_MODEL_S20RTS) then
-                 call get_model_s20rts(radius,theta,phi,vpv,vph,vsv,vsh,rho,eta_aniso)
-              elseif(THREE_D_MODEL == THREE_D_MODEL_S362ANI .or. THREE_D_MODEL == THREE_D_MODEL_S362WMANI &
-                   .or. THREE_D_MODEL == THREE_D_MODEL_S362ANI_PREM .or. THREE_D_MODEL == THREE_D_MODEL_S29EA) then
-                 call get_model_s362ani(radius,theta,phi,vpv,vph,vsv,vsh,rho,eta_aniso, &
-                      TRANSVERSE_ISOTROPY)
-              else
-                 stop 'unknown 3D Earth model in get_model'
-              endif
+                 call xyz_2_rthetaphi_dble(xmesh,ymesh,zmesh,r_dummy,theta,phi)
+                 call reduce(theta,phi)
+                 if(THREE_D_MODEL == THREE_D_MODEL_S20RTS) then
+                    call get_model_s20rts(radius,theta,phi,vpv,vph,vsv,vsh,rho,eta_aniso)
+                 elseif(THREE_D_MODEL == THREE_D_MODEL_S362ANI .or. THREE_D_MODEL == THREE_D_MODEL_S362WMANI &
+                      .or. THREE_D_MODEL == THREE_D_MODEL_S362ANI_PREM .or. THREE_D_MODEL == THREE_D_MODEL_S29EA) then
+                    call get_model_s362ani(radius,theta,phi,vpv,vph,vsv,vsh,rho,eta_aniso, &
+                         TRANSVERSE_ISOTROPY)
+                 else
+                    stop 'unknown 3D Earth model in get_model'
+                 endif
+
+                 exit
+              end do
 
            endif
 



More information about the CIG-COMMITS mailing list