Subversion Repositories lagranto.ecmwf

Rev

Rev 9 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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