Subversion Repositories lagranto.wrf

Rev

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

Rev 7 Rev 11
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 paths for development 
16
# Set path for development
17
set path_devel = "/home/michaesp/project/lagranto.wrf/"
17
set path_devel = "${DYN_TOOLS}/lagranto.wrf/"
-
 
18
set path_sync  = "${DYN_TOOLS}/lagranto/"
18
 
19
 
19
# Init Fortran compiler and set netCDF acccordingly
20
# Init Fortran compiler and set netCDF acccordingly
20
setenv FORTRAN pgf90 
21
setenv FORTRAN pgf90 
21
 
22
 
22
# Init netCDF library depending on the Fortran compiler
23
# Init netCDF library depending on the Fortran compiler
23
if ( "${FORTRAN}" == "pgf90" ) then
24
if ( "${FORTRAN}" == "pgf90" ) then
24
  module load pgi/9.0-1
-
 
25
  module load netcdf/4.1.1-pgf90
25
  module load netcdf/4.2.1-pgf90
26
 
26
 
27
else if ( "${FORTRAN}" == "gfortran" ) then
27
else if ( "${FORTRAN}" == "gfortran" ) then
28
  module load gfortran
28
  module load gfortran
29
  module load netcdf/4.1.1
29
  module load netcdf/4.1.1
30
 
30
 
Line 44... Line 44...
44
 
44
 
45
# Set LAGRANTO environment variable
45
# Set LAGRANTO environment variable
46
setenv LAGRANTO ${path_devel}
46
setenv LAGRANTO ${path_devel}
47
 
47
 
48
# Set netCDF paths
48
# Set netCDF paths
49
setenv NETCDF_LIB ${NETCDF}/lib/ 
49
setenv NETCDF_LIB `nc-config --flibs`
50
setenv NETCDF_INC ${NETCDF}/include/
50
setenv NETCDF_INC `nc-config --fflags`
51
 
51
 
52
# Set list of core programs
52
# Set list of core programs
53
set core  = "caltra trace select"
53
set core  = "caltra trace select"
54
 
54
 
55
# Set list of goodies
55
# Set list of goodies
Line 129... Line 129...
129
foreach lib ( $libs )
129
foreach lib ( $libs )
130
 
130
 
131
\rm -f ${lib}.a
131
\rm -f ${lib}.a
132
\rm -f ${lib}.o
132
\rm -f ${lib}.o
133
echo ${FORTRAN} -c -O ${lib}.f
133
echo ${FORTRAN} -c -O ${lib}.f
134
${FORTRAN} -c -O -I ${NETCDF_INC} ${lib}.f
134
${FORTRAN} -c -O ${NETCDF_INC} ${lib}.f
135
ar r ${lib}.a ${lib}.o
135
ar r ${lib}.a ${lib}.o
136
\rm -f ${lib}.l ${lib}.o
136
\rm -f ${lib}.l ${lib}.o
137
ranlib ${lib}.a
137
ranlib ${lib}.a
138
if ( ! -f ${lib}.a ) then
138
if ( ! -f ${lib}.a ) then
139
  echo "Problem in compiling ${lib} ... Stop"
139
  echo "Problem in compiling ${lib} ... Stop"
Line 306... Line 306...
306
 
306
 
307
if ( ! -d ${LAGRANTO}/bin ) mkdir ${LAGRANTO}/bin
307
if ( ! -d ${LAGRANTO}/bin ) mkdir ${LAGRANTO}/bin
308
cd ${LAGRANTO}/bin
308
cd ${LAGRANTO}/bin
309
 
309
 
310
ln -svf ${LAGRANTO}/bin/lagrantohelp        lagrantohelp.sh
310
ln -svf ${LAGRANTO}/bin/lagrantohelp        lagrantohelp.sh
-
 
311
ln -svf ${LAGRANTO}/bin/lagrantohelp        lagrantohelp.wrf
311
 
312
 
312
ln -svf ${LAGRANTO}/caltra/caltra.sh        caltra.sh
313
ln -svf ${LAGRANTO}/caltra/caltra.sh        caltra.sh
313
ln -svf ${LAGRANTO}/select/select.sh        select.sh
314
ln -svf ${LAGRANTO}/select/select.sh        select.sh
314
ln -svf ${LAGRANTO}/trace/trace.sh          trace.sh
315
ln -svf ${LAGRANTO}/trace/trace.sh          trace.sh
315
 
316
 
316
ln -svf ${LAGRANTO}/caltra/caltra.sh        caltra
317
ln -svf ${LAGRANTO}/caltra/caltra.sh        caltra
317
ln -svf ${LAGRANTO}/select/select.sh        select
318
ln -svf ${LAGRANTO}/select/select.sh        select
318
ln -svf ${LAGRANTO}/trace/trace.sh          trace
319
ln -svf ${LAGRANTO}/trace/trace.sh          trace
319
 
320
 
-
 
321
ln -svf ${LAGRANTO}/caltra/caltra.sh        caltra.wrf
-
 
322
ln -svf ${LAGRANTO}/select/select.sh        select.wrf
-
 
323
ln -svf ${LAGRANTO}/trace/trace.sh          trace.wrf
-
 
324
 
-
 
325
 
320
foreach tool ( $tools )
326
foreach tool ( $tools )
321
 
327
 
322
ln -svf ${LAGRANTO}/goodies/${tool}.sh     ${tool}.sh 
328
ln -svf ${LAGRANTO}/goodies/${tool}.sh     ${tool}.sh 
323
ln -svf ${LAGRANTO}/goodies/${tool}.sh     ${tool} 
329
ln -svf ${LAGRANTO}/goodies/${tool}.sh     ${tool} 
-
 
330
ln -svf ${LAGRANTO}/goodies/${tool}.sh     ${tool}.wrf
324
 
331
 
325
end
332
end
326
 
333
 
327
# Set extra name for <select> to avoid conflict in BASH
334
# Set extra name for <select> to avoid conflict in BASH
328
ln -svf ${LAGRANTO}/select/select.sh        seltra
335
ln -svf ${LAGRANTO}/select/select.sh        seltra
329
ln -svf ${LAGRANTO}/select/select.sh        seltra.sh
336
ln -svf ${LAGRANTO}/select/select.sh        seltra.sh
-
 
337
ln -svf ${LAGRANTO}/select/select.sh        seltra.wrf
-
 
338
 
-
 
339
endif
-
 
340
 
-
 
341
# -----------------------------------------------------------------------------
-
 
342
# Synchronise ( development -> operational ) 
-
 
343
# -----------------------------------------------------------------------------
-
 
344
 
-
 
345
if ( ("${mode}" == "all" ) | ("${mode}" == "sync" )  ) then
-
 
346
 
-
 
347
echo
-
 
348
echo "-----------------------------------------------------------------"
-
 
349
echo "Sync ( lagranto.wrf -> lagranto )"
-
 
350
echo "-----------------------------------------------------------------"
-
 
351
echo
-
 
352
 
-
 
353
cd ${path_sync}/bin/
-
 
354
 
-
 
355
ln -svf ${path_devel}/bin/lagrantohelp.sh        lagrantohelp.wrf
-
 
356
 
-
 
357
ln -svf ${path_devel}/caltra/caltra.sh           caltra.wrf
-
 
358
ln -svf ${path_devel}/select/select.sh           select.wrf
-
 
359
ln -svf ${path_devel}/trace/trace.sh             trace.wrf
-
 
360
ln -svf ${path_devel}/lidar/seltra.sh            seltra.wrf
-
 
361
 
-
 
362
foreach tool ( $tools )
-
 
363
 
-
 
364
ln -svf ${path_devel}/goodies/${tool}.sh      ${tool}.wrf
-
 
365
 
-
 
366
end
-
 
367
 
-
 
368
# Set all permissions
-
 
369
chmod -R og+rx ${path_sync}/bin/
330
 
370
 
331
endif
371
endif
332
 
372
 
-
 
373
 
333
# -----------------------------------------------------------------------------
374
# -----------------------------------------------------------------------------
334
# Final tasks
375
# Final tasks
335
# -----------------------------------------------------------------------------
376
# -----------------------------------------------------------------------------
336
 
377
 
337
echo
378
echo