[cig-commits] [commit] devel: Updated ASDF headers for scale factor, azimuth, and incident angle (8e6616f)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Apr 9 08:56:29 PDT 2014


Repository : ssh://geoshell/specfem3d_globe

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d_globe/compare/64e1b38f0c5ebb4056cce0b15d41c0b9f94ab6e5...099a4d330d5b173b21e51ad441f9f429e5d37842

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

commit 8e6616fe3214d126b5c63813c4f58142989ec9d9
Author: James Smith <jas11 at princeton.edu>
Date:   Wed Mar 12 17:40:39 2014 -0400

    Updated ASDF headers for scale factor, azimuth, and incident angle


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

8e6616fe3214d126b5c63813c4f58142989ec9d9
 src/specfem3D/write_output_ASDF.F90 | 25 +++++++++++++++++++++----
 src/specfem3D/write_seismograms.f90 |  2 +-
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/specfem3D/write_output_ASDF.F90 b/src/specfem3D/write_output_ASDF.F90
index 38f6a21..c88d19d 100644
--- a/src/specfem3D/write_output_ASDF.F90
+++ b/src/specfem3D/write_output_ASDF.F90
@@ -99,8 +99,9 @@ end subroutine init_asdf_data
 !! \param irec The global index of the receiver
 !! \param chn The broadband channel simulated
 !! \param iorientation The recorded seismogram's orientation direction
+!! \param phi The angle used for calculating azimuth and incident angle
 subroutine store_asdf_data(asdf_container, seismogram_tmp, irec_local, &
-                           irec, chn, iorientation)
+                           irec, chn, iorientation, phi)
 
   use asdf_data
   use specfem_par,only: &
@@ -127,6 +128,7 @@ subroutine store_asdf_data(asdf_container, seismogram_tmp, irec_local, &
   ! Variables
   integer :: length_station_name, length_network_name
   integer :: ier, i
+  double precision,intent(in) :: phi
 
   i = (irec_local-1)*(3) + (iorientation)
   asdf_container%npoints(i) = seismo_current
@@ -145,10 +147,25 @@ subroutine store_asdf_data(asdf_container, seismogram_tmp, irec_local, &
   asdf_container%receiver_dpt(i) = stbur(irec_local)
   asdf_container%begin_value(i) = seismo_offset*DT-t0+tshift_cmt 
   asdf_container%end_value(i) = -12345
-  asdf_container%cmp_azimuth(i) = 0.0
-  asdf_container%cmp_incident_ang(i) = 0.0
+  ! instrument orientation
+  if(iorientation == 1) then !N
+    asdf_container%cmp_azimuth(i)  = 0.00
+    asdf_container%cmp_incident_ang(i) =90.00
+  else if(iorientation == 2) then !E
+    asdf_container%cmp_azimuth(i)  =90.00
+    asdf_container%cmp_incident_ang(i) =90.00
+  else if(iorientation == 3) then !Z
+    asdf_container%cmp_azimuth(i)  = 0.00
+    asdf_container%cmp_incident_ang(i) = 0.00
+  else if(iorientation == 4) then !R
+    asdf_container%cmp_azimuth(i) = sngl(modulo(phi,360.0))
+    asdf_container%cmp_incident_ang(i) =90.00
+  else if(iorientation == 5) then !T
+    asdf_container%cmp_azimuth(i) = sngl(modulo(phi+90.0,360.0))
+    asdf_container%cmp_incident_ang(i) =90.00
+  endif
   asdf_container%sample_rate(i) = DT
-  asdf_container%scale_factor(i) = -12345
+  asdf_container%scale_factor(i) = 1000000000
   asdf_container%ev_to_sta_AZ(i) = -12345
   asdf_container%sta_to_ev_AZ(i) = -12345
   asdf_container%great_circle_arc(i) = -12345
diff --git a/src/specfem3D/write_seismograms.f90 b/src/specfem3D/write_seismograms.f90
index 8bb8117..45a6288 100644
--- a/src/specfem3D/write_seismograms.f90
+++ b/src/specfem3D/write_seismograms.f90
@@ -513,7 +513,7 @@ contains
 
     ! ASDF output format
     if(OUTPUT_SEISMOS_ASDF) &
-      call store_asdf_data(asdf_container,seismogram_tmp,irec_local,irec,chn,iorientation)
+      call store_asdf_data(asdf_container,seismogram_tmp,irec_local,irec,chn,iorientation,phi)
 
   enddo ! do iorientation
 



More information about the CIG-COMMITS mailing list