-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_convect
executable file
·59 lines (49 loc) · 1.23 KB
/
run_convect
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
#
echo " "
echo " =>executing: run_convect"
echo " "
#
# script for testing the "convect.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 = '-Dtest_convect -Dgenerate_a_grid'
set MOM2 = /home/rcp/MOM_2 # base model code
set WORK = TEMP_DIR # temp directory
set error = false
if (! -r convect.F) then
echo '=>Error: "convect.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 = (util.F iomngr.F size_check.F state.F)
foreach file ($list)
cp $MOM2/$file .
end
cp $MOM2/*.h .
cp ../convect.F .
cp ../grids.F .
cp ../size.h .
echo "=>compiling..."
f77 -P $OPTIONS convect.F; f77 convect.i
echo "=> running...results are being written to results_convect"
a.out > ../results_convect
echo "Done"
cd ../
/bin/rm -r $WORK