Subversion Repositories lagranto.ecmwf

Rev

Rev 5 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 michaesp 1
#!/bin/csh
2
 
12 michaesp 3
# Set  GRIB_API
5 michaesp 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
6
 
12 michaesp 7
# Set netCDF
8
set ncdf_incs  = `nc-config --fflags`
9
set ncdf_libs  = `nc-config --flibs`
10
 
5 michaesp 11
# Remove old files
12
\rm *.o
13
\rm *.a
14
\rm frgbtocdf_api
15
 
16
# libgm2em + libtra + libipo
12 michaesp 17
pgf90 -c -O libgm2em.f ${ncdf_incs}
5 michaesp 18
ar r libgm2em.a libgm2em.o
19
ranlib libgm2em.a
20
 
12 michaesp 21
pgf90 -c -O libtra.f ${ncdf_incs}
5 michaesp 22
ar r libtra.a libtra.o
23
ranlib libtra.a
24
 
12 michaesp 25
pgf90 -c -O libipo.f ${ncdf_incs}
5 michaesp 26
ar r libipo.a libipo.o
27
ranlib libipo.a
28
 
29
# cdfio + cdfplus
12 michaesp 30
pgf90 -c -O -I${NETCDF}/include libcdfio.f ${ncdf_incs}
5 michaesp 31
ar r libcdfio.a libcdfio.o
32
ranlib libcdfio.a
33
 
12 michaesp 34
pgf90 -c -O -I${NETCDF}/include libcdfplus.f ${ncdf_incs}
5 michaesp 35
ar r libcdfplus.a libcdfplus.o
36
ranlib libcdfplus.a
37
 
38
# fgrb2cdf_api
12 michaesp 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
5 michaesp 40
 
41
exit 0
42