Step 5. Perform MCMC
The hypo_tremor_MCMC program utilizes the Markov-chain Monte Carlo (MCMC) algorithm to perform Bayesian inversion for tremor locations.
To enhance convergence towards the global minimum, the algorithm is enhanced with a parallel tempering scheme for improved efficiency.
This program processes input data, specifically relative arrival times and amplitudes, sourced from opt_data.ddddd.dat files, generated by the hypo_tremor_measure tool.
It then proceeds to solve for various parameters, including tremor locations, uniform Vs and Qs values, as well as station-specific delay and amplification factors.
The selected_win.dat file, an output generated by the hypo_tremor_select tool, is expected to contain the time segment IDs of the events applied in this inversion.
The following output files are generated by this program:
hypo.dd.out
The hypo.dd.out file, where "dd" represents the process ID for parallel computation, serves as a repository for MCMC samples related to event locations in binary format.
To extract and read data in this binary format, you can employ the following pseudo-code:
do i = 1, N_samples
do j = 1, N_events
read iteration_number # as a 32-bit integer
read X_ij, Y_ij, Z_ij # as 64-bit double-precision floats
end do
end do
This pseudo-code illustrates the procedure to read the binary data from the file,
where N_samples and N_events represent the number of MCMC samples and events, respectively.
The iteration_number is read as a 32-bit integer,
while X_ij, Y_ij, and Z_ij are read as double precision floating-point numbers.
It is worth noting that if your goal is to calculate the 95% confidence intervals for each parameter directly from the binary data, you can achieve this using the hypo_tremor_statistics program.
vs.dd.out & qs.dd.out
The vs.dd.out and qs.dd.out files, where "dd" represents the process ID for parallel computation, store uniform Vs and Qs values sampled using the MCMC algorithm in binary format. .
Below is a pseudo-code example for extracting Vs values from the binary file:
do i = 1, N_samples
read iteration_number # as a 32-bit integer
read Vs # as 64-bit double-precision floats
end do
Similar pseudo-code can be used to extract Qs values from the qs.dd.out file.
t_corr.dd.out & a_corr.dd.out
The t_corr.dd.out and a_corr.dd.out files, "dd" represents the process ID for parallel computation, store station-specific correction factors for arrival time delays and amplifications, respectively.
For reading t_corr.dd.out, pseudo-code such as below can be used:
do i = 1, N_samples
do j = 1, N_stations
read iteration_number # as a 32-bit integer
read delay_correction_ij # as 64-bit double-precision floats
end do
end do