Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
JAttenuationLength.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Example script plot attenuation lentgh.
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 
15 if [ -z $JPP_DIR ]; then
16  echo "Variable JPP_DIR undefined."
17  exit
18 fi
19 
20 
21 source $JPP_DIR/setenv.sh $JPP_DIR
22 
23 
24 set_variable DEBUG 2
25 set_variable WORKDIR ${TMPDIR:-/tmp}/
26 set_variable DEPTH_M 2000.0
27 
28 if do_usage $*; then
29  usage "$script [<depth [m]>]"
30 fi
31 
32 case $# in
33  1) set_variable DEPTH_M $1;;
34 esac
35 
36 set_variable OUTPUT_FILE $WORKDIR/attenuation_length.root
37 
38 $JPP_DIR/examples/JAcoustics/JAttenuationLength \
39  -o $OUTPUT_FILE \
40  -D $DEPTH_M \
41  -d $DEBUG --!
42 
43 JPlot1D \
44  -f ${OUTPUT_FILE}:h0 \
45  -XX \
46  -y "1.0e-2 1e4" -Y \
47  -> "Frequency [kHz]" \
48  -\^ "Attenuation length [km]" \
49  -O "][" \
50  -T "D = $DEPTH_M [m]" \
51  -o L.gif