forked from CFMIP/COSPv1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
192 lines (151 loc) · 6.44 KB
/
Makefile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
.SUFFIXES : .F .f .c .o .a .f90 .f95 .F90
########################################################################
# Adapt these variables to your environment
########################################################################
F90 = ifort
#F90FLAGS = -C -check -fpp
#F90FLAGS = -check bounds
#F90FLAGS = -pg
F90FLAGS = -O2
NCDF_INC = /data/cr2/hadac/software/cosp/include
NCDF_LIB = /data/cr2/hadac/software/cosp/lib
CMOR_INC = /data/cr2/hadac/software/cmor/include
CMOR_LIB = /data/cr2/hadac/software/cmor/lib
INC = /data/cr2/hadac/software/include
LIB = /data/cr2/hadac/software/lib
UDUNITS_LIB = /data/cr2/hadac/software/cosp/lib
UDUNITS_INC = /data/cr2/hadac/software/cosp/include
UUID_LIB = /data/cr2/hadac/software/cosp/lib
UUID_INC = /data/cr2/hadac/software/cosp/include
# Non-optional simulators. You should not need to change this
RS_PATH = quickbeam
CS_PATH = actsim
LLNL_PATH = llnl
ISCCP_PATH = icarus-scops-4.1-bsd
MISR_PATH = MISR_simulator
MODIS_PATH = MODIS_simulator
# RTTOV variables. You may need to change this
RTTOV_PATH = /data/cr2/hadac/software/rttov
RTTOV_LIB_PATH = $(RTTOV_PATH)/rttov93.$(F90)/lib
RTTOV_INC_PATH = $(RTTOV_PATH)/rttov93.$(F90)/include
RTTOV_MOD_PATH = $(RTTOV_PATH)/rttov93.$(F90)/mod
########################################################################
# End of modifications
########################################################################
PROG = cosp_test
OBJS = cosp_radar.o cosp_types.o cosp_constants.o cosp_simulator.o \
cosp_utils.o scops.o prec_scops.o cosp.o cosp_stats.o \
pf_to_mr.o \
cosp_lidar.o radar_simulator_types.o zeff.o \
array_lib.o atmos_lib.o dsd.o calc_Re.o format_input.o \
gases.o scale_LUTs_io.o radar_simulator_init.o \
math_lib.o mrgrnk.o optics_lib.o radar_simulator.o \
lidar_simulator.o cosp_io.o llnl_stats.o lmd_ipsl_stats.o \
cosp_isccp_simulator.o icarus.o \
cosp_misr_simulator.o MISR_simulator.o \
cosp_modis_simulator.o modis_simulator.o \
cosp_rttov_simulator.o
all: $(PROG)
$(PROG): $(OBJS)
$(F90) $(F90FLAGS) $(PROG).F90 $(OBJS) \
-L${CMOR_LIB} -L. -lcmor -I$(CMOR_INC) \
-I$(NCDF_INC) -L${NCDF_LIB} -lnetcdff \
-L${UDUNITS_LIB} -Wl,-rpath=${UDUNITS_LIB} -ludunits2 -lexpat -I${UDUNITS_INC} \
-L${UUID_LIB} -Wl,-rpath=${UUID_LIB} -luuid -I$(UUID_INC) \
-o $(PROG)
rttov: $(OBJS) cosp_rttov.o
$(F90) $(F90FLAGS) $(PROG).F90 $(OBJS) cosp_rttov.o \
-I$(NCDF_INC) -L${NCDF_LIB} -lnetcdff -lnetcdf \
-I$(INC) -L${LIB} -lsz \
-I$(CMOR_INC) -L${CMOR_LIB} -lcmor \
-I$(UUID_INC) -L${UUID_LIB} -luuid \
-L${UDUNITS_LIB} -ludunits2 -lexpat \
-L${RTTOV_LIB_PATH} -lrttov9.1 \
-o $(PROG)
%.o: %.f90
@echo $(F90) $(F90FLAGS) -c -I$(NCDF_INC) -I$(CMOR_INC) $<
$(F90) $(F90FLAGS) -c -I$(NCDF_INC) -I$(CMOR_INC) $<
@echo "-----------------------------"
%.o: %.F90
@echo $(F90) $(F90FLAGS) -c -I$(NCDF_INC) -I$(CMOR_INC) $<
$(F90) $(F90FLAGS) -c -I$(NCDF_INC) -I$(CMOR_INC) $<
@echo "-----------------------------"
$(PROG).o : cosp_constants.o cosp_types.o cosp.o cosp_io.o
cosp_io.o : cosp_constants.o cosp_types.o cosp_modis_simulator.o
cosp.o : cosp_simulator.o cosp_types.o cosp_modis_simulator.o
cosp_lidar.o : cosp_constants.o cosp_types.o
cosp_radar.o : cosp_constants.o cosp_types.o radar_simulator_types.o \
array_lib.o atmos_lib.o format_input.o math_lib.o optics_lib.o
cosp_simulator.o: cosp_types.o cosp_radar.o cosp_lidar.o \
cosp_isccp_simulator.o cosp_misr_simulator.o \
cosp_modis_simulator.o cosp_rttov_simulator.o cosp_stats.o
cosp_stats.o : cosp_constants.o cosp_types.o llnl_stats.o lmd_ipsl_stats.o
cosp_types.o : cosp_constants.o cosp_utils.o radar_simulator_types.o \
scale_LUTs_io.o radar_simulator_init.o
cosp_utils.o : cosp_constants.o
lmd_ipsl_stats.o : llnl_stats.o
array_lib.o : mrgrnk.o
dsd.o : array_lib.o math_lib.o calc_Re.o
format_input.o : array_lib.o
math_lib.o : array_lib.o mrgrnk.o
radar_simulator.o : array_lib.o math_lib.o mrgrnk.o optics_lib.o \
radar_simulator_types.o
zeff.o : math_lib.o optics_lib.o
cosp_isccp_simulator.o : cosp_constants.o cosp_types.o
cosp_misr_simulator.o : cosp_constants.o cosp_types.o
cosp_modis_simulator.o : cosp_constants.o cosp_types.o modis_simulator.o
cosp_rttov_simulator.o : cosp_constants.o cosp_types.o
clean_objs:
rm -f $(OBJS) *.mod *.o
clean:
rm -f $(PROG) $(OBJS) *.mod *.o fort.*
scops.o : $(ISCCP_PATH)/scops.f
$(F90) $(F90FLAGS) -c -I$(ISCCP_PATH) $<
icarus.o : $(ISCCP_PATH)/icarus.f
$(F90) $(F90FLAGS) -c $<
prec_scops.o : $(LLNL_PATH)/prec_scops.f
$(F90) $(F90FLAGS) -c $<
pf_to_mr.o : $(LLNL_PATH)/pf_to_mr.f
$(F90) $(F90FLAGS) -c $<
radar_simulator_types.o : $(RS_PATH)/radar_simulator_types.f90
$(F90) $(F90FLAGS) -c $<
radar_simulator_init.o : $(RS_PATH)/radar_simulator_init.f90
$(F90) $(F90FLAGS) -c $<
scale_LUTs_io.o : $(RS_PATH)/scale_LUTs_io.f90
$(F90) $(F90FLAGS) -c $<
atmos_lib.o : $(RS_PATH)/atmos_lib.f90
$(F90) $(F90FLAGS) -c $<
zeff.o : $(RS_PATH)/zeff.f90
$(F90) $(F90FLAGS) -c $<
array_lib.o : $(RS_PATH)/array_lib.f90
$(F90) $(F90FLAGS) -c $<
dsd.o : $(RS_PATH)/dsd.f90
$(F90) $(F90FLAGS) -c $<
calc_Re.o : $(RS_PATH)/calc_Re.f90
$(F90) $(F90FLAGS) -c $<
format_input.o : $(RS_PATH)/format_input.f90
$(F90) $(F90FLAGS) -c $<
gases.o : $(RS_PATH)/gases.f90
$(F90) $(F90FLAGS) -c $<
math_lib.o : $(RS_PATH)/math_lib.f90
$(F90) $(F90FLAGS) -c $<
mrgrnk.o : $(RS_PATH)/mrgrnk.f90
$(F90) $(F90FLAGS) -c $<
optics_lib.o : $(RS_PATH)/optics_lib.f90
$(F90) $(F90FLAGS) -c $<
radar_simulator.o : $(RS_PATH)/radar_simulator.f90
$(F90) $(F90FLAGS) -c $<
lidar_simulator.o : $(CS_PATH)/lidar_simulator.F90
$(F90) $(F90FLAGS) -c $<
lmd_ipsl_stats.o : $(CS_PATH)/lmd_ipsl_stats.F90
$(F90) $(F90FLAGS) -c $<
llnl_stats.o : $(LLNL_PATH)/llnl_stats.F90
$(F90) $(F90FLAGS) -c $<
cosp_radar.o : $(LLNL_PATH)/cosp_radar.F90
$(F90) $(F90FLAGS) -c $<
MISR_simulator.o : $(MISR_PATH)/MISR_simulator.f
$(F90) $(F90FLAGS) -c $<
modis_simulator.o : $(MODIS_PATH)/modis_simulator.F90
$(F90) $(F90FLAGS) -c $<
cosp_rttov.o : cosp_rttov.F90
$(F90) $(F90FLAGS) -c -I $(RTTOV_INC_PATH) -I $(RTTOV_MOD_PATH) $<