This repository contains the code and hyperparameters for the paper:
"Site-Specific Ground Motion Generative Model for Crustal Earthquakes in Japan Based on Generative Adversarial Networks." Matsumoto, Y., Yaoyama, T., Lee, S., Hida, T., and Itoi, T., https://arxiv.org/abs/2404.15640 (2024).
Please cite this paper if you use the code in this repository as part of a published research project.
The codes in this repository has been tested and is known to run under the following environment:
- Ubuntu 20.04.6 LTS
- conda 22.9.0
- Python 3.8.13
- pytorch 1.13.0
- numpy 1.23.3
- pandas 1.4.4
- matplotlib 3.5.3
- Code that defines the neural network and code to run the training are located in the
src
directory. - To perform training, execute
run_train.py
. - A dataset must be prepared in advance and
input_file.csv
needs to be placed inside thedata
directory before training. - Data generation using the trained model can be performed by running
generate_data.py
.
For this code, it is necessary to prepare input_file.csv
for loading ground motion data.
The meanings of the file headers are as follows.
Header | Description |
---|---|
file_name |
Path to the npy file containing a single ground motion data |
mw |
Moment magnitude, |
log_fault_dist |
Natural logarithm of rupture distance, |
log10_pga |
Common logarithm of the Peak Ground Acceleration (PGA) of ground motion |
log10_v5 |
Common logarithm of |
log10_v10 |
Common logarithm of |
log10_v20 |
Common logarithm of |
log10_z1 |
Common logarithm of |
log10_z14 |
Common logarithm of |
Each npy file contains a single ground motion data, and the values in each row correspond to the values of the condition labels. The ground motion data must be normalized in amplitude.
The contents of the example_*.npy files are ground motion time history data in a one-dimensional array, and the length of the data is equal to the number of steps in the ground motion records.
This code is licensed under the MIT License.