SPECFEM / specfem3d

SPECFEM3D_Cartesian simulates acoustic (fluid), elastic (solid), coupled acoustic/elastic, poroelastic or seismic wave propagation in any type of conforming mesh of hexahedra (structured or not).
GNU General Public License v3.0
398 stars 225 forks source link

reading multiple external tomography files #302

Closed carltape closed 9 years ago

carltape commented 9 years ago

I encountered a problem when reading external tomography files. The problem was not present in 8/11/2014 devel, but it is present in 11/11/2014 devel. I have a very simple example where I read in three external tomography files for the homogeneous halfspace example. This requires modifying the materials_file to have -1, -2, -3 for each element, and then the nummaterial_velocity_file is this:

2 -1 tomography elastic homogeneous_halfspace_tomo_dx02dy02dz01_ztop0.xyz 1 2 -2 tomography elastic homogeneous_halfspace_tomo_dx04dy04dz04_ztop10.xyz 1 2 -3 tomography elastic homogeneous_halfspace_tomo_dx16dy16dz08_ztop50.xyz 1

(The Par_file setting is MODEL = default)

The exit in the recent version occurs in model_tomography.f90:

Error specified tomographic material id was not found

In this case it arises because imat = 3 and imaterial = 1 (only in the 11/11/2014 version).

output_mesher.txt suggests that it is successfully reading these files, as it shows this:

  reading: 

./DATA/tomo_files/homogeneous_halfspace_tomo_dx02dy02dz01_ztop0.xyz number of grid points = NX_NY_NZ: 57132

  reading: 

./DATA/tomo_files/homogeneous_halfspace_tomo_dx04dy04dz04_ztop10.xyz number of grid points = NX_NY_NZ: 14700

  reading: 

./DATA/tomo_files/homogeneous_halfspace_tomo_dx16dy16dz08_ztop50.xyz number of grid points = NX_NY_NZ: 300

But that is the end of output_mesher.txt, since the exit occurs there.

There have been several changes in model_tomography.f90 between these versions: https://github.com/geodynamics/specfem3d/commits/devel/src/generate_databases/model_tomography.f90

But my impression is that the old format still applies and should work. If anyone has suggestions or is willing to try this simple example, please let me know. I can send the three xyz tomo files (they are small) and also the modified materials_file. Thanks.

danielpeter commented 9 years ago

fixed by PR #305

carltape commented 9 years ago

Excellent, thanks, Daniel. With your updates, I tested two different models and do not encounter any problem.