makefile.general.gfortran 3.94 KB
Newer Older
1
SHELL = /bin/bash
Don Morton's avatar
Don Morton committed
2
3
4
5
6
7
FLEXPART_EXECUTABLE = FLEXPART_GFORTRAN
GRIB2FLEXPART_EXECUTABLE = GRIB2FLEXPART_GFORTRAN

#############################################
#### Uncomment this to activate performance timing
#DEFS = -DPERFTIMER -DCTBTO
8
9
10
#DEFS = -DPERFTIMER
# DEFS = -DCTBTO
DEFS = 
Don Morton's avatar
Don Morton committed
11
#############################################
12
13

FC       = gfortran
14
15
16
17

# devlan
INCPATH  = /dvl/atm/software/local/include
LIBPATH1 = /dvl/atm/software/usr/lib
Don Morton's avatar
Don Morton committed
18
LIBPATH2 = /usr/lib/x86_64-linux-gnu
19
20
21
22
23
24
25
26


# alaskawx
#INCPATH  = /opt/grib-api/include
#LIBPATH1 = /opt/grib-api/lib
#LIBPATH2 = /usr/lib/x86_64-linux-gnu

FFLAGS   =   -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH) 
27
28
29

LDFLAGS  = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper

Don Morton's avatar
Don Morton committed
30

31
MODOBJS = \
Don Morton's avatar
Don Morton committed
32
par_mod.o               com_mod.o \
33
34
35
36
conv_mod.o              hanna_mod.o \
interpol_mod.o          cmapf_mod.o \
unc_mod.o               oh_mod.o \
xmass_mod.o             flux_mod.o \
Don Morton's avatar
Don Morton committed
37
38
39
point_mod.o             outg_mod.o \
fpmetbinary_mod.o	class_vtable_mod.o

40
41

OBJECTS = \
Don Morton's avatar
Don Morton committed
42
43
grib2check.o 		fpgridcheck.o \
writeheader.o           assignland.o\
44
calcpar.o               part0.o \
Don Morton's avatar
Don Morton committed
45
calcpar_gfs.o 		detectformat.o \
46
47
caldate.o               partdep.o \
coordtrafo.o            psih.o \
Don Morton's avatar
Don Morton committed
48
raerod.o 		convertfields.o \
49
50
51
52
53
drydepokernel.o         random.o \
erf.o                   readavailable.o \
ew.o                    readcommand.o \
advance.o               readdepo.o \
releaseparticles.o      psim.o     \
Don Morton's avatar
Don Morton committed
54
readlanduse.o           getfpfields.o \
55
56
57
58
59
60
61
getfields.o             init_domainfill.o\
interpol_wind.o         readoutgrid.o \
interpol_all.o          readpaths.o \
getrb.o                 readreceptors.o \
getrc.o                 readreleases.o \
getvdep.o               readspecies.o \
interpol_misslev.o      readwind.o \
Don Morton's avatar
Don Morton committed
62
readwind_gfs.o 		richardson_gfs.o \
63
conccalc.o              richardson.o \
Don Morton's avatar
Don Morton committed
64
concoutput.o            scalev.o \
65
66
67
pbl_profile.o           readOHfield.o\
juldate.o               timemanager.o \
interpol_vdep.o         interpol_rain.o \
Don Morton's avatar
Don Morton committed
68
69
verttransform_gfs.o         partoutput.o \
verttransform.o         \
70
71
72
hanna.o                 wetdepokernel.o \
mean.o                  wetdepo.o \
hanna_short.o           windalign.o \
Don Morton's avatar
Don Morton committed
73
obukhov_gfs.o		gridcheck_gfs.o \
74
75
76
77
78
79
80
81
82
83
84
obukhov.o               gridcheck.o \
hanna1.o                initialize.o \
                        gridcheck_nests.o \
readwind_nests.o        calcpar_nests.o \
verttransform_nests.o   interpol_all_nests.o \
interpol_wind_nests.o   interpol_misslev_nests.o \
interpol_vdep_nests.o   interpol_rain_nests.o \
readageclasses.o        readpartpositions.o \
calcfluxes.o            fluxoutput.o \
qvsat.o                 skplin.o \
convmix.o               calcmatrix.o \
Don Morton's avatar
Don Morton committed
85
convmix_gfs.o		calcmatrix_gfs.o \
86
87
88
89
90
91
92
93
94
95
convect43c.o               redist.o \
sort2.o                 distance.o \
centerofmass.o          plumetraj.o \
openouttraj.o           calcpv.o \
calcpv_nests.o          distance2.o \
clustering.o            interpol_wind_short.o \
interpol_wind_short_nests.o shift_field_0.o \
shift_field.o           outgrid_init.o \
openreceptors.o         boundcond_domainfill.o\
partoutput_short.o      readoutgrid_nest.o \
Don Morton's avatar
Don Morton committed
96
97
outgrid_init_nest.o     writeheader_nest.o \
concoutput_nest.o       wetdepokernel_nest.o \
98
99
100
101
102
drydepokernel_nest.o    zenithangle.o \
ohreaction.o            getvdep_nests.o \
initial_cond_calc.o     initial_cond_output.o \
dynamic_viscosity.o     get_settling.o

Don Morton's avatar
Don Morton committed
103
104
105
106
107
108
109
110
all: $(FLEXPART_EXECUTABLE) $(GRIB2FLEXPART_EXECUTABLE)

flexpart: $(FLEXPART_EXECUTABLE)

grib2flexpart: $(GRIB2FLEXPART_EXECUTABLE)

$(FLEXPART_EXECUTABLE): $(MODOBJS) $(OBJECTS) FLEXPART.o
	$(FC) FLEXPART.o $(OBJECTS) $(MODOBJS) -o $(FLEXPART_EXECUTABLE) $(LDFLAGS)
111

Don Morton's avatar
Don Morton committed
112
113
$(GRIB2FLEXPART_EXECUTABLE): $(MODOBJS) $(OBJECTS) GRIB2FLEXPART.o
	$(FC) GRIB2FLEXPART.o $(OBJECTS) $(MODOBJS) -o $(GRIB2FLEXPART_EXECUTABLE) $(LDFLAGS)
114
115
116

$(OBJECTS): $(MODOBJS)

Don Morton's avatar
Don Morton committed
117
118
119
120
121
FLEXPART.o: $(MODOBJS)

GRIB2FLEXPART.o: $(MODOBJS)

%.o: %.f90 
122
123
	$(FC) -c $(FFLAGS) $<

Don Morton's avatar
Don Morton committed
124
125
126
127
%.o: %.F90
	$(FC) -c $(FFLAGS) $(DEFS) $<


128
clean:
Don Morton's avatar
Don Morton committed
129
130
	rm -f *.o *.mod

131