Subversion Repositories lagranto.ecmwf

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
13 michaesp 1
# ----- Load modules --------------------------
2
 
3
module load netcdf/4.2.1-pgf90
4
module list 
5
 
6
set tool = p2s
7
 
8
# ----- Set libraries and includes ------------
9
 
10
set libs   = "-L ${LAGRANTO}/lib"
11
set libs   = "${libs} -lcdfio" 
12
set libs   = "${libs} -lcdfplus" 
13
 
14
set ncdf_incs  = `nc-config --fflags`
15
set ncdf_libs  = `nc-config --flibs`
16
 
17
# ----- Compile --------------------- ----------
18
 
19
\rm -f p2s.o
20
\rm -f libcalvar.o
21
\rm -f libgm2em.o
22
echo "pgf90 -c p2s.f       ${ncdf_incs}"  
23
      pgf90 -c p2s.f       ${ncdf_incs}
24
echo "pgf90 -c libgm2em.f  ${ncdf_incs}"  
25
      pgf90 -c libgm2em.f  ${ncdf_incs}
26
echo "pgf90 -c libcalvar.f ${ncdf_incs}"  
27
      pgf90 -c libcalvar.f ${ncdf_incs}
28
 
29
\rm -f p2s
30
echo "pgf90 -o p2s p2s.o libgm2em.o libcalvar.o ${libs} ${ncdf_libs}"        
31
      pgf90 -o p2s p2s.o libgm2em.o libcalvar.o ${libs} ${ncdf_libs}
32
 
33
if ( ! -f p2s ) then
34
  echo "ERROR: compilation of p2s failed... exit"
35
  exit 1
36
endif
37
 
38
exit 0