HPCSys-Lab / simwave

Simulates the propagation of the acoustic wave using the finite difference method in 2D and 3D domains.
GNU General Public License v3.0
40 stars 13 forks source link

3d overthrust problem #21

Closed krober10nd closed 2 years ago

krober10nd commented 3 years ago
krober10nd commented 3 years ago

Here's how to get the velocity model grid, in case you're wondering. h5 format is a good choice for doing the io.

 import h5py
 import numpy as np

 # import matplotlib.pyplot as plt

 # filename = "overthrust_2D_initial_model.h5"
 filename = "overthrust_3D_true_model.h5"

 with h5py.File(filename, "r") as f:
     # List all groups
     print("Keys: %s" % f.keys())
     a_group_key = list(f.keys())[2]

     # Get the data
     data = list(f[a_group_key])

     data = np.array(data)
     # convert to m/s
     data = (1 / (data ** (1 / 2))) * 1000.0
     # print(data)
     print(data.shape)
     print(np.amin(data))
     print(np.amax(data))
krober10nd commented 3 years ago

you may want to reduce the size of the problem initially as in its full extent there's a 128 million grid points :]