3 |
michaesp |
1 |
#!/bin/csh
|
|
|
2 |
|
|
|
3 |
# ----- Load modules --------------------------
|
|
|
4 |
|
|
|
5 |
module load netcdf/4.2.1-pgf90
|
|
|
6 |
module list
|
|
|
7 |
|
|
|
8 |
set tool = tracal
|
|
|
9 |
|
|
|
10 |
# ----- Set libraries and includes ------------
|
|
|
11 |
|
|
|
12 |
set libs = "${LAGRANTO}/lib/iotra.a"
|
|
|
13 |
set libs = "${libs} -L ${LAGRANTO}/lib"
|
|
|
14 |
set libs = "${libs} -lcdfio"
|
|
|
15 |
set libs = "${libs} -lcdfplus"
|
|
|
16 |
|
|
|
17 |
set ncdf_incs = `nc-config --fflags`
|
|
|
18 |
set ncdf_libs = `nc-config --flibs`
|
|
|
19 |
|
|
|
20 |
# ---- Modules ---------------------------------
|
|
|
21 |
|
|
|
22 |
\rm -f precmod.o precision.mod
|
|
|
23 |
echo ${FORTRAN} -c precmod.f90
|
|
|
24 |
${FORTRAN} -c precmod.f90
|
|
|
25 |
|
|
|
26 |
\rm -f stringmod.o strings.mod
|
|
|
27 |
echo ${FORTRAN} -c stringmod.f90
|
|
|
28 |
${FORTRAN} -c stringmod.f90
|
|
|
29 |
|
|
|
30 |
\rm -f evalmod.o evaluate.mod
|
|
|
31 |
echo ${FORTRAN} -c evalmod.f90
|
|
|
32 |
${FORTRAN} -c evalmod.f90
|
|
|
33 |
|
|
|
34 |
set mods = " evalmod.o precmod.o stringmod.o "
|
|
|
35 |
|
|
|
36 |
# ----- Compile --------------------- ----------
|
|
|
37 |
|
|
|
38 |
\rm -f ${tool}.o
|
|
|
39 |
\rm -f ${tool}
|
|
|
40 |
|
|
|
41 |
echo "${FORTRAN} -c ${tool}.f ${ncdf_incs}"
|
|
|
42 |
${FORTRAN} -c ${tool}.f ${ncdf_incs}
|
|
|
43 |
echo "${FORTRAN} -o ${tool} ${tool}.o ${mods} ${libs} ${ncdf_libs}"
|
|
|
44 |
${FORTRAN} -o ${tool} ${tool}.o ${mods} ${libs} ${ncdf_libs}
|
|
|
45 |
|
|
|
46 |
if ( ! -f ${tool} ) then
|
|
|
47 |
echo "ERROR: compilation of <tool> failed... exit"
|
|
|
48 |
exit 1
|
|
|
49 |
endif
|
|
|
50 |
|
|
|
51 |
exit 0
|