Subversion Repositories lagranto.wrf

Rev

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

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