2 |
|
|
3 |
mkdir -p .darwinview |
mkdir -p .darwinview |
4 |
|
|
5 |
echo -n "What format is the data in? (netcdf/binary): " |
echo -n "What format is the data in? (binary/netcdf): " |
6 |
read nb |
read nb |
7 |
|
|
8 |
if [ $nb = 'binary' ]; then |
if [ $nb = 'binary' ]; then |
9 |
|
|
10 |
echo -n "Would you like to use default settings? (y/n): " |
echo -n "Would you like to use default settings? (y/n): " |
11 |
read yn |
read yn |
12 |
|
|
13 |
if [ $yn = 'n' ]; then |
if [ $yn = 'n' ]; then |
14 |
|
|
15 |
rm -f .darwinview/binfilenames |
rm -f .darwinview/binfilenames |
23 |
read dimset |
read dimset |
24 |
echo $dimset >> .darwinview/binconfig |
echo $dimset >> .darwinview/binconfig |
25 |
echo .darwinview/binfilenames >> .darwinview/binconfig |
echo .darwinview/binfilenames >> .darwinview/binconfig |
26 |
|
|
27 |
echo -n "Please enter directory containing data: " |
echo -n "Please enter directory containing data: " |
28 |
read dir |
read dir |
29 |
|
|
40 |
done |
done |
41 |
done |
done |
42 |
|
|
43 |
|
elif [ `echo $yn | grep -v y` ]; then |
44 |
|
echo "Error: please enter 'y' or 'n.'" |
45 |
|
exit |
46 |
fi |
fi |
47 |
|
|
48 |
elif [ $nb = 'netcdf' ]; then |
elif [ $nb = 'netcdf' ]; then |
67 |
echo -n "Please enter directory containing data: " |
echo -n "Please enter directory containing data: " |
68 |
read tmp |
read tmp |
69 |
echo $tmp > .darwinview/netcdf |
echo $tmp > .darwinview/netcdf |
70 |
|
|
71 |
|
|
72 |
echo -n "Please enter directory to write to: " |
echo -n "Please enter directory to write to: " |
73 |
read tmp |
read tmp |
74 |
echo $tmp >> .darwinview/netcdf |
echo $tmp >> .darwinview/netcdf |
76 |
echo -n "Please enter name of file containing desired species: " |
echo -n "Please enter name of file containing desired species: " |
77 |
read tmp |
read tmp |
78 |
echo $tmp >> .darwinview/netcdf |
echo $tmp >> .darwinview/netcdf |
79 |
|
|
80 |
echo -n "Please enter name of file containing desired tiles: " |
echo -n "Please enter name of file containing desired tiles: " |
81 |
read tmp |
read tmp |
82 |
echo $tmp >> .darwinview/netcdf |
echo $tmp >> .darwinview/netcdf |
83 |
|
|
84 |
echo -n "Please enter name of file containing desired time steps: " |
echo -n "Please enter name of file containing desired time steps: " |
85 |
read tmp |
read tmp |
86 |
echo $tmp >> .darwinview/netcdf |
echo $tmp >> .darwinview/netcdf |
87 |
|
|
88 |
|
elif [ `echo $yn | grep -v y` ]; then |
89 |
|
echo "Error: please enter 'y' or 'n.'" |
90 |
|
exit |
91 |
fi |
fi |
92 |
|
|
93 |
indir=( `cat .darwinview/netcdf | head -1` ) |
indir=( `cat .darwinview/netcdf | head -1` ) |
124 |
done |
done |
125 |
done |
done |
126 |
|
|
127 |
|
else |
128 |
|
echo "Error: please enter 'binary' or 'netcdf.'" |
129 |
|
exit |
130 |
|
fi |
131 |
|
|
132 |
|
if [ ! `ls | grep jet.dat` ]; then |
133 |
|
echo "Error: jet.dat not found." |
134 |
|
exit |
135 |
fi |
fi |
136 |
|
|
137 |
gcc darwin.c -lglut |
gcc darwin.c -lglut |