[cig-commits] [commit] devel, master: added more precise comments and doc about ellipticity calculations (bde5c50)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:14:34 PST 2014


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

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

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

commit bde5c504e0043a8730b3445d175f8a650e84b295
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Wed May 7 22:19:05 2014 +0200

    added more precise comments and doc about ellipticity calculations


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

bde5c504e0043a8730b3445d175f8a650e84b295
 doc/ellipticity_equations_from_Dahlen_Tromp_1998.pdf  | Bin 0 -> 3650396 bytes
 ..._geocentric_coordinates_from_Dahlen_Tromp_1998.pdf | Bin 0 -> 1023843 bytes
 src/auxiliaries/combine_vol_data_shared.f90           |   2 ++
 src/meshfem3D/get_ellipticity.f90                     |   8 +++++++-
 src/shared/make_ellipticity.f90                       |   9 ++++++---
 src/shared/rthetaphi_xyz.f90                          |   2 ++
 6 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/doc/ellipticity_equations_from_Dahlen_Tromp_1998.pdf b/doc/ellipticity_equations_from_Dahlen_Tromp_1998.pdf
new file mode 100644
index 0000000..19165f0
Binary files /dev/null and b/doc/ellipticity_equations_from_Dahlen_Tromp_1998.pdf differ
diff --git a/doc/geographic_versus_geocentric_coordinates_from_Dahlen_Tromp_1998.pdf b/doc/geographic_versus_geocentric_coordinates_from_Dahlen_Tromp_1998.pdf
new file mode 100644
index 0000000..5ab4c05
Binary files /dev/null and b/doc/geographic_versus_geocentric_coordinates_from_Dahlen_Tromp_1998.pdf differ
diff --git a/src/auxiliaries/combine_vol_data_shared.f90 b/src/auxiliaries/combine_vol_data_shared.f90
index 90af0b4..57dc6b3 100644
--- a/src/auxiliaries/combine_vol_data_shared.f90
+++ b/src/auxiliaries/combine_vol_data_shared.f90
@@ -50,11 +50,13 @@
   call xyz_2_rthetaphi_dble(x1,y1,z1,r,theta,phi)
 
   cost=dcos(theta)
+! this is the Legendre polynomial of degree two, P2(cos(theta)), see the discussion above eq (14.4) in Dahlen and Tromp (1998)
   p20=0.5d0*(3.0d0*cost*cost-1.0d0)
 
   ! get ellipticity using spline evaluation
   call spline_evaluation(rspl,espl,espl2,nspl,r,ell)
 
+! this is eq (14.4) in Dahlen and Tromp (1998)
   factor=ONE-(TWO/3.0d0)*ell*p20
 
   ! removes ellipticity factor
diff --git a/src/meshfem3D/get_ellipticity.f90 b/src/meshfem3D/get_ellipticity.f90
index 8d51937..84111cb 100644
--- a/src/meshfem3D/get_ellipticity.f90
+++ b/src/meshfem3D/get_ellipticity.f90
@@ -54,11 +54,13 @@
     call xyz_2_rthetaphi_dble(x,y,z,r,theta,phi)
 
     cost = dcos(theta)
+! this is the Legendre polynomial of degree two, P2(cos(theta)), see the discussion above eq (14.4) in Dahlen and Tromp (1998)
     p20 = 0.5d0*(3.0d0*cost*cost-1.0d0)
 
     ! get ellipticity using spline evaluation
     call spline_evaluation(rspl,espl,espl2,nspl,r,ell)
 
+! this is eq (14.4) in Dahlen and Tromp (1998)
     factor = ONE-(TWO/3.0d0)*ell*p20
 
     xelm(ia) = x*factor
@@ -74,7 +76,7 @@
 !
 
   !> Hejun
-  ! get ellipticity according to GLL points
+  ! ellipticity at the GLL points
   ! JAN08, 2010
   subroutine get_ellipticity_gll(xstore,ystore,zstore,ispec,nspec,nspl,rspl,espl,espl2)
 
@@ -106,11 +108,13 @@
         call xyz_2_rthetaphi_dble(x,y,z,r,theta,phi)
 
         cost = dcos(theta)
+! this is the Legendre polynomial of degree two, P2(cos(theta)), see the discussion above eq (14.4) in Dahlen and Tromp (1998)
         p20 = 0.5d0*(3.0d0*cost*cost-1.0d0)
 
         ! get ellipticity using spline evaluation
         call spline_evaluation(rspl,espl,espl2,nspl,r,ell)
 
+! this is eq (14.4) in Dahlen and Tromp (1998)
         factor = ONE-(TWO/3.0d0)*ell*p20
 
         xstore(i,j,k,ispec) = x*factor
@@ -146,11 +150,13 @@
   call xyz_2_rthetaphi_dble(x,y,z,r,theta,phi)
 
   cost = dcos(theta)
+! this is the Legendre polynomial of degree two, P2(cos(theta)), see the discussion above eq (14.4) in Dahlen and Tromp (1998)
   p20 = 0.5d0*(3.0d0*cost*cost-1.0d0)
 
   ! get ellipticity using spline evaluation
   call spline_evaluation(rspl,espl,espl2,nspl,r,ell)
 
+! this is eq (14.4) in Dahlen and Tromp (1998)
   factor = ONE-(TWO/3.0d0)*ell*p20
 
   x = x*factor
diff --git a/src/shared/make_ellipticity.f90 b/src/shared/make_ellipticity.f90
index a6f9f39..6766fdf 100644
--- a/src/shared/make_ellipticity.f90
+++ b/src/shared/make_ellipticity.f90
@@ -143,11 +143,14 @@
 
   do i=2,NR
     call intgrl(i_rho,r,1,i,rho,s1,s2,s3)
-!! DK DK Radau approximation of Clairaut's equation for first-order terms of ellipticity, see e.g. Jeffreys H.,
-!! DK DK The figures of rotating planets, Mon. Not. R. astr. Soc., vol. 113, p. 97-105 (1953).
-!! DK DK The Radau approximation is mentioned on page 97.
+! Radau approximation of Clairaut's equation for first-order terms of ellipticity, see e.g. Jeffreys H.,
+! The figures of rotating planets, Mon. Not. R. astr. Soc., vol. 113, p. 97-105 (1953).
+! The Radau approximation is mentioned on page 97.
+! For more details see Section 14.1.2 in Dahlen and Tromp (1998)
+! (see also in file ellipticity_equations_from_Dahlen_Tromp_1998.pdf in the "doc" directory of the code).
     call intgrl(i_radau,r,1,i,radau,s1,s2,s3)
     z=(2.0d0/3.0d0)*i_radau/(i_rho*r(i)*r(i))
+! this comes from equation (14.19) in Dahlen and Tromp (1998)
     eta(i)=(25.0d0/4.0d0)*((1.0d0-(3.0d0/2.0d0)*z)**2.0d0)-1.0d0
     k(i)=eta(i)/(r(i)**3.0d0)
   enddo
diff --git a/src/shared/rthetaphi_xyz.f90 b/src/shared/rthetaphi_xyz.f90
index 1e2b946..7748631 100644
--- a/src/shared/rthetaphi_xyz.f90
+++ b/src/shared/rthetaphi_xyz.f90
@@ -168,6 +168,8 @@
 
 ! see: Dahlen & Tromp, 1998: chapter 14.1.5 Geographic versus geocentric colatitude
 
+! (see also in file geographic_versus_geocentric_coordinates_from_Dahlen_Tromp_1998.pdf in the "doc" directory of the code)
+
 !
 ! the location of a seismic station situated upon the Earth's surface is conventionally specified
 ! by giving its elevation (e) above the geoid, its longitude (phi) with respect to Greenwich,



More information about the CIG-COMMITS mailing list