Subversion Repositories lagranto.um

Rev

Rev 3 | Rev 7 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 5
Line 11... Line 11...
11
endif
11
endif
12
 
12
 
13
# Set the mode
13
# Set the mode
14
set mode = $1
14
set mode = $1
15
 
15
 
-
 
16
# Set path to SVN repository
-
 
17
set svnpath=https://svn.iac.ethz.ch/pub/lagranto.um/
-
 
18
 
16
# Set paths for development and for synchronisation (operational)
19
# Set paths for development and for synchronisation (operational)
17
set path_devel = '/home/sprenger/project/lagranto.um/'
20
set path_devel = '/home/sprenger/project/lagranto.um/'
18
 
21
 
19
# Init Fortran compiler and set netCDF acccordingly
22
# Init Fortran compiler and set netCDF acccordingly
20
setenv FORTRAN pgf90
23
setenv FORTRAN pgf90
21
 
24
 
22
# Init netCDF library depending on the Fortran compiler
25
# Init netCDF library depending on the Fortran compiler
23
if ( "${FORTRAN}" == "pgf90" ) then
26
if ( "${FORTRAN}" == "pgf90" ) then
24
  module load pgi/9.0-1
27
  module load netcdf/4.2.1-pgf90
25
  module load netcdf/4.1.1-pgf90
28
  module list
26
 
29
 
27
else if ( "${FORTRAN}" == "gfortran" ) then
30
else if ( "${FORTRAN}" == "gfortran" ) then
28
  module load gfortran
31
  module load gfortran
29
  module load netcdf/4.1.1
32
  module load netcdf/4.1.1
30
 
33
 
Line 40... Line 43...
40
 
43
 
41
# Set Lagranto path
44
# Set Lagranto path
42
setenv LAGRANTO ${path_devel}
45
setenv LAGRANTO ${path_devel}
43
 
46
 
44
# -----------------------------------------------------------------------------
47
# -----------------------------------------------------------------------------
-
 
48
# Create a new tag in SVN repository
-
 
49
# -----------------------------------------------------------------------------
-
 
50
 
-
 
51
if ( "${mode}" == "tag" ) then
-
 
52
   svn info
-
 
53
   if ( "${#argv}" != 2 ) then
-
 
54
     echo "Usage: install.csh tag id <id=tag number>"
-
 
55
   else
-
 
56
     set tagnr = $2
-
 
57
   endif
-
 
58
   svn copy ${svnpath}/trunk ${svnpath}/tags/${tagnr} -m "Release ${tagnr}"
-
 
59
   exit 0
-
 
60
endif
-
 
61
 
-
 
62
# -----------------------------------------------------------------------------
45
# Set internal parameters and detailed installation mode
63
# Set internal parameters and detailed installation mode
46
# -----------------------------------------------------------------------------
64
# -----------------------------------------------------------------------------
47
 
65
 
-
 
66
# Set Lagranto path
-
 
67
setenv LAGRANTO ${path_devel}
-
 
68
 
48
# Set netCDF paths
69
# Set netCDF paths
49
setenv NETCDF_LIB ${NETCDF}/lib/ 
70
setenv NETCDF_LIB `nc-config --flibs`
50
setenv NETCDF_INC ${NETCDF}/include/
71
setenv NETCDF_INC `nc-config --fflags`
-
 
72
 
-
 
73
echo $NETCDF_LIB
-
 
74
echo $NETCDF_INC
51
 
75
 
52
# Set list of core programs
76
# Set list of core programs
53
set core  = "create_startf caltra trace select density"
77
set core  = "create_startf caltra trace select density"
54
 
78
 
55
# Set list of goodies
79
# Set list of goodies
Line 182... Line 206...
182
foreach lib ( $libs )
206
foreach lib ( $libs )
183
 
207
 
184
\rm -f ${lib}.a
208
\rm -f ${lib}.a
185
\rm -f ${lib}.o
209
\rm -f ${lib}.o
186
echo ${FORTRAN} -c -O ${lib}.f
210
echo ${FORTRAN} -c -O ${lib}.f
187
${FORTRAN} -c -O -I ${NETCDF_INC} ${lib}.f
211
${FORTRAN} -c -O ${NETCDF_INC} ${lib}.f
188
ar r ${lib}.a ${lib}.o
212
ar r ${lib}.a ${lib}.o
189
\rm -f ${lib}.l ${lib}.o
213
\rm -f ${lib}.l ${lib}.o
190
ranlib ${lib}.a
214
ranlib ${lib}.a
191
if ( ! -f ${lib}.a ) then
215
if ( ! -f ${lib}.a ) then
192
  echo "Problem in compiling ${lib} ... Stop"
216
  echo "Problem in compiling ${lib} ... Stop"