Subversion Repositories lagranto.ecmwf

Rev

Rev 9 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
25 michaesp 1
#!/bin/csh
2
 
3 michaesp 3
# ----- Load modules --------------------------
4
 
5 michaesp 5
module load netcdf/4.2.1-pgf90
6
module list 
3 michaesp 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
 
5 michaesp 17
set ncdf_incs  = `nc-config --fflags`
18
set ncdf_libs  = `nc-config --flibs`
3 michaesp 19
 
20
# ---- Modules ---------------------------------
21
 
5 michaesp 22
\rm -f precmod.o precision.mod
3 michaesp 23
echo ${FORTRAN} -c precmod.f90
24
${FORTRAN} -c precmod.f90
25
 
5 michaesp 26
\rm -f stringmod.o strings.mod
3 michaesp 27
echo ${FORTRAN} -c stringmod.f90
28
${FORTRAN} -c stringmod.f90
29
 
5 michaesp 30
\rm -f evalmod.o evaluate.mod
31
echo ${FORTRAN} -c evalmod.f90
32
${FORTRAN} -c evalmod.f90
33
 
3 michaesp 34
set mods = " evalmod.o precmod.o stringmod.o " 
35
 
36
# ----- Compile --------------------- ----------
37
 
38
\rm -f ${tool}.o
39
\rm -f ${tool}
40
 
9 michaesp 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}
3 michaesp 45
 
46
if ( ! -f ${tool} ) then
47
  echo "ERROR: compilation of <tool> failed... exit"
48
  exit 1
49
endif
50
 
51
exit 0