Subversion Repositories lagranto.wrf

Rev

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

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