Subversion Repositories lagranto.ecmwf

Rev

Rev 5 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 12
Line 1... Line 1...
1
#!/bin/csh
1
#!/bin/csh
2
 
2
 
3
# Set netCDF
3
# Set  GRIB_API
4
setenv GRIB_API_INCLUDE -I/usr/local/ecmwf_tools/pgi-9.0-1/include
4
setenv GRIB_API_INCLUDE -I/usr/local/ecmwf_tools/pgi-9.0-1/include
5
setenv GRIB_API_LIB     -L/usr/local/ecmwf_tools/pgi-9.0-1/lib
5
setenv GRIB_API_LIB     -L/usr/local/ecmwf_tools/pgi-9.0-1/lib
6
 
6
 
-
 
7
# Set netCDF
-
 
8
set ncdf_incs  = `nc-config --fflags`
-
 
9
set ncdf_libs  = `nc-config --flibs`
-
 
10
 
7
# Remove old files
11
# Remove old files
8
\rm *.o
12
\rm *.o
9
\rm *.a
13
\rm *.a
10
\rm frgbtocdf_api
14
\rm frgbtocdf_api
11
 
15
 
12
# libgm2em + libtra + libipo
16
# libgm2em + libtra + libipo
13
pgf90 -c -O libgm2em.f
17
pgf90 -c -O libgm2em.f ${ncdf_incs}
14
ar r libgm2em.a libgm2em.o
18
ar r libgm2em.a libgm2em.o
15
ranlib libgm2em.a
19
ranlib libgm2em.a
16
 
20
 
17
pgf90 -c -O libtra.f
21
pgf90 -c -O libtra.f ${ncdf_incs}
18
ar r libtra.a libtra.o
22
ar r libtra.a libtra.o
19
ranlib libtra.a
23
ranlib libtra.a
20
 
24
 
21
pgf90 -c -O libipo.f
25
pgf90 -c -O libipo.f ${ncdf_incs}
22
ar r libipo.a libipo.o
26
ar r libipo.a libipo.o
23
ranlib libipo.a
27
ranlib libipo.a
24
 
28
 
25
# cdfio + cdfplus
29
# cdfio + cdfplus
26
pgf90 -c -O -I${NETCDF}/include libcdfio.f
30
pgf90 -c -O -I${NETCDF}/include libcdfio.f ${ncdf_incs}
27
ar r libcdfio.a libcdfio.o
31
ar r libcdfio.a libcdfio.o
28
ranlib libcdfio.a
32
ranlib libcdfio.a
29
 
33
 
30
pgf90 -c -O -I${NETCDF}/include libcdfplus.f
34
pgf90 -c -O -I${NETCDF}/include libcdfplus.f ${ncdf_incs}
31
ar r libcdfplus.a libcdfplus.o
35
ar r libcdfplus.a libcdfplus.o
32
ranlib libcdfplus.a
36
ranlib libcdfplus.a
33
 
37
 
34
# fgrb2cdf_api
38
# fgrb2cdf_api
35
pgf90 -O -o fgrbtocdf_api ${GRIB_API_INCLUDE} fgrbtocdf_api.f -I${NETCDF}/include -L. -lcdfio -lcdfplus -ltra -lipo -lgm2em -L${NETCDF}/lib -lnetcdf ${GRIB_API_INCLUDE} ${GRIB_API_LIB}  -lgrib_api_f77 -lgrib_api -ljasper -lm
39
pgf90 -O -o fgrbtocdf_api ${GRIB_API_INCLUDE} fgrbtocdf_api.f ${ncdf_incs} -L. -lcdfio -lcdfplus -ltra -lipo -lgm2em ${ncdf_libs} ${GRIB_API_INCLUDE} ${GRIB_API_LIB}  -lgrib_api_f77 -lgrib_api -ljasper -lm
36
 
40
 
37
exit 0
41
exit 0
38
 
42