Skip to content

Commit

Permalink
updates scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeter committed Dec 3, 2019
1 parent 1d5be84 commit e7b3968
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
9 changes: 5 additions & 4 deletions EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ cd SEM/
# checks exit code
if [[ $? -ne 0 ]]; then exit 1; fi

if [ ! -e $sta.$compx.$en.adj ]; then echo "error creating adjoint sources, please check..."; exit 1; fi
if [ ! -e $sta.$compx.adj ]; then echo "error creating adjoint sources, please check..."; exit 1; fi
echo

# renames
# (acoustic adjoint sources are read from component 1 -> MXX.adj)
mv -v $sta.$compx.$en.adj $sta.$compx.adj
mv -v $sta.$compy.$en.adj $sta.$compy.adj
mv -v $sta.$compz.$en.adj $sta.$compz.adj
#mv -v $sta.$compx.$en.adj $sta.$compx.adj
#mv -v $sta.$compy.$en.adj $sta.$compy.adj
#mv -v $sta.$compz.$en.adj $sta.$compz.adj

# create STATIONS_ADJOINT file with adjoint source location
fgrep $station ../DATA/STATIONS > ./STATIONS_ADJOINT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ step-by-step kernel tutorial:
- make designated directory for adjoint sources:
> mkdir SEM/
> mv OUTPUT_FILES/*.adj SEM/

in case needed, rename to have ending .adj:
> cd SEM/
> rename .semd.adj .adj *.adj
(on some linux machines, the last line may be rename 's/.semd.adj/.adj/' *.adj)
(on some linux machines, the last line may be rename 's/.semd.adj/.adj/' *.adj)

this should create the files:
SEM/DB.X20.BXX.adj
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ cd SEM/
# checks exit code
if [[ $? -ne 0 ]]; then exit 1; fi

if [ ! -e X20.DB.BXZ.semd.adj ]; then echo "error creating adjoint sources, please check..."; exit 1; fi
if [ ! -e X20.DB.BXZ.adj ]; then echo "error creating adjoint sources, please check..."; exit 1; fi

rename .semd.adj .adj *semd.adj
# renames
#rename .semd.adj .adj *semd.adj

cd ../

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ step-by-step kernel tutorial:
- make designated directory for adjoint sources:
> mkdir OUTPUT_FILES/SEM/
> mv OUTPUT_FILES/*.adj OUTPUT_FILES/SEM/

in case needed, rename to have ending .adj:
> cd OUTPUT_FILES/SEM/
> rename .semd.adj .adj *.adj

Expand Down
2 changes: 1 addition & 1 deletion utils/Cluster/lsf/go_mesher_solver_lsf_basin.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cd $current_pwd/OUTPUT_FILES/SEM
collect_seismo_lsf_multi.pl $current_pwd/OUTPUT_FILES/lsf_machines $current_pwd/DATA/Par_file
#xcut_velocity 29.0 32.5 3 GSC*.semd
xcreate_adjsrc_traveltime 29.0 32.5 3 GSC*.semd
rename .semd.adj .adj *.semd.ad
#rename .semd.adj .adj *.semd.ad
cd $current_pwd
##########################################################################

Expand Down

0 comments on commit e7b3968

Please sign in to comment.