-
Notifications
You must be signed in to change notification settings - Fork 11
/
run-inversion
executable file
·86 lines (83 loc) · 2.1 KB
/
run-inversion
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#####################################
# This script runs tephra2-inversion
# and additional plotting scripts
# to visualize the results. Any line
# can be commented out with a # sign.
#####################################
#Path to the inversion code (example shown)
EXEI=inputs/tephra2-inversion_2020
echo $EXEI
#
INPUT=inputs/colima_38wgs84z13.xyz
echo $INPUT
#
#Selected wind field
WIND=inputs/wind1
#
echo $WIND
#
#Inversion configuration file
ICONF=inputs/tephra2-inversion.conf
echo $ICONF
#
#Path to forward model
EXE=inputs/tephra2_2020
echo $EXE
#
#Grid file for final forward model
GRID=inputs/colima.data.grid
echo $GRID
#
#Vent location
VENT=inputs/vent.xy
echo $VENT
#Machine file for MPI
MACHINE=inputs/machines
echo $MACHINE
#Integration steps for column and particles
COLUMN=200
PARTICLE=100
echo $COLUMN $PARTICLE
#Number of slave nodes to use for inversion
NODES=6
echo $NODES
###############################
date
# Do the inversion (example shown)
RUN="mpirun -np $NODES -hostfile $MACHINE $EXEI $ICONF $INPUT $WIND"
echo $RUN
$RUN
date
#
# Generate a plot of the plume model (beta function)
RUN="perl plotting_scripts/plume.gmt.pl plume.dat plume.eps"
echo $RUN
$RUN
#
# Plot equiline plot (calculated vs. observed)
RUN="perl plotting_scripts/in_vs_out.gmt.pl $INPUT in_vs_out.eps"
echo $RUN
$RUN
#
# Write out a configuration file for tephra2
RUN="perl plotting_scripts/write_conf.pl parameters.README tephra2.conf $COLUMN $PARTICLE nrmse"
echo $RUN
$RUN
#
# Generate a wind diagram
RUN="perl plotting_scripts/psrose.gmt.pl wind_levels.out psrose.in psrose0.eps"
echo $RUN
$RUN
#
# Run the tephra2 forward model
echo "$EXE inputs/tephra2.conf $GRID wind_levels.out >tephra2.out"
`$EXE inputs/tephra2.conf $GRID wind_levels.out >tephra2.out`
#
# Parse the output data and create a plotting file
echo "perl plotting_scripts/parse_tephra.out.pl tephra2.out >tephra2.out.xyz"
`perl plotting_scripts/parse_tephra.out.pl tephra2.out >tephra2.out.xyz`
#
# Plot a contour map of the tephra deposit from tephra2 model
RUN="perl plotting_scripts/plot_tephra_contours.gmt.pl $INPUT tephra2.out.xyz contours.eps $VENT"
echo $RUN
$RUN