Jpp 21.0.1
the software that should make you happy
Loading...
Searching...
No Matches
JLight.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5version=1.0
6script=${0##*/}
7
8# ------------------------------------------------------------------------------------------
9#
10# Utility script to plot optical properties of sea water.
11#
12# ------------------------------------------------------------------------------------------
13
14
15if [ -z $JPP_DIR ]; then
16 echo "Variable JPP_DIR undefined."
17 exit
18fi
19
20
21source $JPP_DIR/setenv.sh $JPP_DIR
22
23set_variable DEBUG 2
24set_variable WORKDIR ${TMPDIR:-/tmp}/
25set_variable DIR $JPP_DIR/examples/JSirene
26set_variable: FORMAT GRAPHICS_FORMAT gif
27set_variable+ BATCH GRAPHICS_BATCH -B
28
29if do_usage $*; then
30 usage "$script [working directory]"
31fi
32
33case $# in
34 1) set_variable WORKDIR $1;;
35esac
36
37
38OUTPUT_FILE=$WORKDIR/light.root
39
40$DIR/JLight \
41 -o $OUTPUT_FILE
42
43
44JPlot1D \
45 -f ${OUTPUT_FILE}:"pure" \
46 -f ${OUTPUT_FILE}:"smith&baker" \
47 -y "1.0 300" \
48 -Y \
49 -> "#lambda [nm]" \
50 -\^ "#lambda_{abs} [m]" \
51 -T "" \
52 -o water.$FORMAT $BATCH
53
54JPlot1D \
55 -f ${OUTPUT_FILE}:abs \
56 -f ${OUTPUT_FILE}:"smith&baker" \
57 -y "0 100" \
58 -> "#lambda [nm]" \
59 -\^ "#lambda_{abs} [m]" \
60 -L TR \
61 -o abs.$FORMAT $BATCH
62
63
64JPlot1D \
65 -f ${OUTPUT_FILE}:scat \
66 -y "0 150" \
67 -> "#lambda [nm]" \
68 -\^ "#lambda_{scat} [m]" \
69 -L TR \
70 -o scat.$FORMAT $BATCH
71
72
73JPlot1D \
74 -f ${OUTPUT_FILE}:vp \
75 -y "1.0 1.6" \
76 -> "#lambda [nm]" \
77 -\^ "n" \
78 -L TR \
79 -o vp.$FORMAT $BATCH
80
81
82JPlot1D \
83 -f ${OUTPUT_FILE}:vg \
84 -y "1.0 1.6" \
85 -> "#lambda [nm]" \
86 -\^ "c/v_{group}" \
87 -L TR \
88 -o vg.$FORMAT $BATCH
89
90
91JPlot1D \
92 -f ${OUTPUT_FILE}:Ps \
93 -y "1e-2 20" -Y \
94 -> "cos(#theta)" \
95 -\^ "d^{2}P/dcos(#theta)d#phi" \
96 -L TR \
97 -o Ps.$FORMAT $BATCH