Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

A binary workflow was created to address issues we ran into with the standard text based workflow.

...

mpirun -n 80 python2 bb_sim.py LF/bevan2012_v3_s103252/OutBin /path/to/vm/ HF.bin vsites.vs30 BB.bin --vsite vsites.vs30

The first parameter is the location to the OutBin folder from Emod3D where seis files can be found
The second is where the VM directory is located and contains vs3dfile.s and params_vel.py
HF.bin is the HF input binary
vsites.vs30 is the target vs30 file containing station_name vs30
BB.bin is the output file
--vsite to set vs30 file, 500 currently used otherwise
hf_vs_ref is taken from the HF input (stored as part of HF)
lf_vs_ref is taken from the VM (vs3dfile.s)

Changes needed to run on Kupe

  • Update qcore to a version that has qconfig.py
  • Update EMOD3D so that the Fortran code to write binary files instead of text is present. TODO: remove the stdout for this executable, as it produces huge log files.

FAQ

How are these binary files accessed?

from qcore.timeseries import HFSeis
# load file
hf = HFSeis('HF.bin')
# retrieve timeseries (x,y,z)
hf.acc('CACS')
# only x
hf.acc('CACS', comp = <0, or hf.X or hf.COMP['090']>X>)
# store station as txt
hf.acc2txt('CACS')
# store all stations as txt, same as if ran standard txt version
hf.all2txt(prefix = 'Acc/hf_')

Same for BB (via BBSeis class)
LF has a wrapper so the OutBin folder can be accessed in the same way via LFSeis class.

What if I want LF Acc?

from qcore.timeseries import LFSeis
lf = LFSeis('LF/OutBin')
# just like for vel
lf.vel('CACS')
# you can access transparently converted accelerations
lf.acc('CACS')

...