run_toy_example_SH.sh 1.44 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#!/bin/bash

###############################################################
#  running forward modeling for calculation of observed data  #
###############################################################

# compiling all libraries and  DENISE
# make clean
make denise MODEL=../genmod/toy_example_true.c
pause
# starting DENISE for forward modeling
# (depending on the MPI package you maybe have to adjust the following programme call, 
#  e.g. when using openMPI you do not have to use the 'lamboot' command)
#lamboot
mpirun -np 4 ../bin/denise in_and_out/toy_example/toy_example_FW.json | tee in_and_out/toy_example/toy_example_FW.out

# the forward modeled data have to be renamed for the inversion
for (( i=1; i <= 5; i++ )) ; do

     mv su/measured_data/toy_example_vx.su.shot${i}.it1 su/measured_data/toy_example_x.su.shot${i}
     mv su/measured_data/toy_example_vy.su.shot${i}.it1 su/measured_data/toy_example_y.su.shot${i}
     mv su/measured_data/toy_example_vz.su.shot${i}.it1 su/measured_data/toy_example_z.su.shot${i}

done

exit

###############################################################
#                    running the inversion                    #
###############################################################

# compiling DENISE
make clean
make denise MODEL=../genmod/toy_example_start.c

# starting DENISE
#lamboot
38
mpirun -np 4 ../bin/denise in_and_out/toy_example/toy_example_INV_SH.json | tee in_and_out/toy_example/toy_example_INV_SH.out