forked from ohenne/coldpool_tracer_tracking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile.job
executable file
·61 lines (52 loc) · 2.87 KB
/
compile.job
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# TODOS
# How to compile having parameters.m in the bin directory?
set -ex
i=1
COMPILE_COMMAND='gfortran'
if [ "${!i}" == "rc" ]; then
SRC='src/raincell'
BIN='bin/raincell'
${COMPILE_COMMAND} -c $SRC/irt_parameters.f90
${COMPILE_COMMAND} -o $BIN/irt_objects_release.x $SRC/irt_objects_release.f90 $SRC/irt_parameters.f90
${COMPILE_COMMAND} -o $BIN/irt_advection_field_release.x $SRC/irt_advection_field_release.f90 $SRC/irt_parameters.f90
${COMPILE_COMMAND} -o $BIN/irt_tracks_release.x $SRC/irt_tracks_release.f90 $SRC/irt_parameters.f90
${COMPILE_COMMAND} -o $BIN/irt_trackmask_release.x $SRC/irt_trackmask_release.f90 $SRC/irt_parameters.f90 #-no-wrap-margin
# i++
fi
if [ "${!i}" == "cp" ]; then
SRC='src/cp'
BIN='bin/cp'
${COMPILE_COMMAND} -c $SRC/cp_parameters.f90
cp cp_parameters.mod $BIN/cp_parameters.mod
cp cp_parameters.o $BIN/cp_parameters.o
${COMPILE_COMMAND} -o $BIN/tracer_tracking.x $SRC/tracer_tracking.f90 $BIN/cp_parameters.o -L/usr/lib64/gfortran/modules/netcdf.mod -lnetcdf -lnetcdff
# ${COMPILE_COMMAND} -fbounds-check -fbacktrace -Wall -Wextra -ggdb -fcheck=all -o $BIN/tracer_tracking.x $SRC/tracer_tracking.f90 $BIN/cp_parameters.o -L/usr/lib64/gfortran/modules/netcdf.mod -lnetcdf -lnetcdff
fi
if [ "${!i}" == "rcnc" ]; then
SRC='src/raincell'
BIN='bin/raincell'
${COMPILE_COMMAND} -c $SRC/irt_parameters.f90
${COMPILE_COMMAND} -o $BIN/irt_objects_release.x $SRC/irt_objects_releasenc.f90 $SRC/irt_parameters.f90 -L/usr/lib64/gfortran/modules/netcdf.mod -lnetcdf -lnetcdff
${COMPILE_COMMAND} -o $BIN/irt_advection_field_release.x $SRC/irt_advection_field_release.f90 $SRC/irt_parameters.f90
${COMPILE_COMMAND} -o $BIN/irt_tracks_release.x $SRC/irt_tracks_release.f90 $SRC/irt_parameters.f90
${COMPILE_COMMAND} -o $BIN/irt_trackmask_release.x $SRC/irt_trackmask_release.f90 $SRC/irt_parameters.f90 #-no-wrap-margin
# i++
fi
if [ "${!i}" == "bet" ]; then
SRC='src/cp'
BIN='bin/cp'
${COMPILE_COMMAND} -c $SRC/cp_parameters_bet.f90
cp cp_parameters_bet.mod $BIN/cp_parameters_bet.mod
cp cp_parameters_bet.o $BIN/cp_parameters_bet.o
${COMPILE_COMMAND} -o $BIN/tracer_tracking_bet.x $SRC/tracer_tracking_bet.f90 $BIN/cp_parameters_bet.o -L/usr/lib64/gfortran/modules/netcdf.mod -lnetcdf -lnetcdff
fi
if [ "${!i}" == "test" ]; then
SRC='src/cp'
BIN='bin/cp'
${COMPILE_COMMAND} -c $SRC/cp_parameters.f90
cp cp_parameters.mod $BIN/cp_parameters.mod
cp cp_parameters.o $BIN/cp_parameters.o
${COMPILE_COMMAND} -o $BIN/testnc.x $SRC/testnc.f90 $BIN/cp_parameters.o -L/usr/lib64/gfortran/modules/netcdf.mod -lnetcdf -lnetcdff
#${COMPILE_COMMAND} -fbounds-check -fbacktrace -Wall -Wextra -ggdb -fcheck=all -o $BIN/tracer_tracking.x $SRC/tracer_tracking.f90 $BIN/cp_parameters.o -L/usr/lib64/gfortran/modules/netcdf.mod -lnetcdf -lnetcdff
fi