Skip to content

Commit

Permalink
updates script and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeter committed Mar 29, 2021
1 parent c3c61c7 commit fa30ad1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/specfem3D/write_output_ASDF.f90
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,7 @@ subroutine write_asdf()
trim(start_time_string(1:19))//"__"//trim(end_time_string(1:19))//"__synthetic"

call ASDF_open_waveform_f(station_grp, &
trim(waveform_name) // C_NULL_CHAR, &
data_ids(i))
trim(waveform_name) // C_NULL_CHAR, data_ids(i))

! writes (float) data
call ASDF_write_partial_waveform_f(data_ids(i), &
Expand Down
4 changes: 3 additions & 1 deletion src/tomography/postprocess_sensitivity_kernels/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ xsmooth_sem_SHARED_OBJECTS = \
$O/write_VTK_data.shared.o \
$(EMPTY_MACRO)

## GPU
###
### GPU
###
ifeq ($(CUDA),yes)
## cuda version
xsmooth_sem_OBJECTS += $(gpu_specfem3D_OBJECTS)
Expand Down
24 changes: 21 additions & 3 deletions utils/plot_ASDF_data_info.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
#!/usr/bin/env python
#
# reads in an ASDF-format file and outputs infos about content and checks validity
# see: http://seismicdata.github.io/pyasdf/tutorial.html
#
from __future__ import print_function

import sys
import pyasdf

try:
import pyasdf
except:
print("Error importing pyasdf, check if pyasdf module is installed")
print("")
# python version
print("python version:")
print(sys.version)
print("")
# import module paths
print("module paths:")
for path in sys.path:
print(path)
print("")
sys.exit(1)


def plot_ASDF_data_info(file,show_plot):
print("")
Expand Down Expand Up @@ -65,9 +83,9 @@ def plot_ASDF_data_info(file,show_plot):


def usage():
print("usage: ./read_asdf_data_info.py filename[e.g. synthetics.h5] [show]")
print("usage: ./plot_ASDF_data_info.py filename[e.g. synthetic.h5] [show]")
print(" with")
print(" filename - e.g. synthetics.h5")
print(" filename - e.g. OUTPUT_FILES/synthetic.h5")
print(" show - (optional) plot waveforms")
sys.exit(1)

Expand Down

0 comments on commit fa30ad1

Please sign in to comment.