A binary workflow was created to address issues we ran into with the standard text based workflow.
mpirun -n 80 python2 hf_sim.py source.stoch stations.ll HF.bin -m /home/nesi00213/VelocityModel/Mod-1D/Cant1D_v1-midQ.1d --duration 100.0 --dt 0.02 -i
source.stoch is the rupture file
stations.ll is the (lon, lat, name) file of the stations to run HF for
HF.bin is the output file-i
runs stations independently through the binary for reproducible results (same seed)-m
sets the global 1D velocity model, alternatively set the site specific 1D directory with -s
-h
to see a complete list of options
mpirun -n 80 python2 bb_sim.py LF/bevan2012_v3_s103252/OutBin /path/to/vm/ HF.bin vsites.vs30 BB.bin
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
hf_vs_ref is taken from the HF input (stored as part of HF)
lf_vs_ref is taken from the VM (vs3dfile.s)
I ran two simulations on Kupe based on a pre-existing SRF file (/nesi/transit/nesi00213/RupModel/Kelly/Srf/Kelly_HYP01-03_S1244.srf), the first one with the traditional workflow and the second one using the binary workflow. In order to compare the results I have calculated the average of several intensity measures on both (hoping to get rid of high frequencies). In the following table, I summarize some of the results in the following table:
Intensity Measure | Text workflow | Binary workflow | % Error |
---|---|---|---|
PGV | 17.3892119464033 | 16.29306813 | 6.3 |
AI | 33.6016055285084 | 31.2437428 | 7 |
PGA | 0.13174644427203 | 0.1273347395 | 3.3 |
pSA(0.1s) | 0.222951243202933 | 0.2232570382 | 0.1 |
pSA(5.0s) | 0.029897273815546 | 0.0292533373 | 2.2 |
pSA(10.0s) | 0.00834024121890869 | 0.00827248629 | 0.8 |
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>)
# 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.
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')