-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_timeavgs
executable file
·60 lines (48 loc) · 1.28 KB
/
run_timeavgs
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
#
echo " "
echo " =>executing: run_timeavgs"
echo " "
#
# script for executing the "timeavgs.F" module
#
# options: (must choose only one of these)
# -Dread_my_grid : read in your own grid definition
# -Dgenerate_a_grid : generate a grid based on USER INPUT
# in grids.F
set OPTIONS = '-Ddrive_timeavgs -Dgenerate_a_grid'
set MOM2 = /home/rcp/MOM_2 # base model code
set WORK = TEMP_DIR # temp directory
set error = false
if (! -r timeavgs.F) then
echo '=>Error: "timeavgs.F" is not in this UPDATES directory'
set error = true
endif
if (! -r grids.F) then
echo '=>Error: "grids.F" is not in this UPDATES directory'
set error = true
endif
if (! -r size.h) then
echo '=>Error: "size.h" is not in this UPDATES directory'
set error = true
endif
if ("$error" == "true") then
exit
endif
echo "=>Grabbing sources from $MOM2"
mkdir $WORK
cd $WORK
set list = (stdunits.h util.F iomngr.F iomngr.h size_check.F coord.h)
foreach file ($list)
cp $MOM2/$file .
end
cp ../timeavgs.F .
cp ../grids.F .
cp ../size.h .
echo "=>compiling..."
f77 -P $OPTIONS timeavgs.F; f77 timeavgs.i
echo "=> running...results are being written to results_timeavgs"
a.out > ../results_timeavgs
echo " "
tail ../results_timeavgs
cd ../
/bin/rm -r $WORK