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