-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
413 lines (351 loc) · 20.6 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
# Top level Makefile for wrf system
LN = ln -s
MAKE = make -i -r
MV = /bin/mv
RM = /bin/rm -f
deflt :
@ echo Please compile the code using ./compile
include ./configure.wrf
EM_MODULE_DIR = -I../dyn_em
EM_MODULES = $(EM_MODULE_DIR)
DA_WRFVAR_MODULES = $(INCLUDE_MODULES)
DA_WRFVAR_MODULES_2 = $(INC_MOD_WRFVAR)
DA_CONVERTOR_MOD_DIR = -I../convertor -p../convertor
DA_CONVERTOR_MODULES = $(DA_CONVERTOR_MOD_DIR) $(INCLUDE_MODULES)
#### 3.d. add macros to specify the modules for this core
#EXP_MODULE_DIR = -I../dyn_exp
#EXP_MODULES = $(EXP_MODULE_DIR)
NMM_MODULE_DIR = -I../dyn_nmm
NMM_MODULES = $(NMM_MODULE_DIR)
ALL_MODULES = \
$(EM_MODULE_DIR) \
$(NMM_MODULES) \
$(EXP_MODULES) \
$(INCLUDE_MODULES)
configcheck:
@if [ "$(A2DCASE)" -a "$(DMPARALLEL)" ] ; then \
echo "------------------------------------------------------------------------------" ; \
echo "WRF CONFIGURATION ERROR " ; \
echo "The $(A2DCASE) case cannot be used on distributed memory parallel systems." ; \
echo "Only 3D WRF cases will run on these systems." ; \
echo "Please chose a different case or rerun configure and chose a different option." ; \
echo "------------------------------------------------------------------------------" ; \
exit 2 ; \
fi
framework_only : configcheck
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" ext
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" toolsdir
/bin/rm -f main/libwrflib.a main/libwrflib.lib
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" framework
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" shared
wrf : framework_only
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" physics
if [ $(WRF_CHEM) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" chemics ; fi
if [ $(WRF_EM_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" em_core ; fi
if [ $(WRF_NMM_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" nmm_core ; fi
if [ $(WRF_EXP_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" exp_core ; fi
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em em_wrf )
( cd run ; /bin/rm -f wrf.exe ; ln -s ../main/wrf.exe . )
if [ $(ESMF_COUPLING) -eq 1 ] ; then \
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em em_wrf_SST_ESMF ) ; \
fi
all_wrfvar : da be
da :
/bin/rm -f main/libwrflib.a
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" ext
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" toolsdir
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" REGISTRY="Registry" framework
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" shared
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" dyn_em
( cd da; make -r da )
be :
/bin/rm -f main/libwrflib.a
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" ext
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" toolsdir
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" REGISTRY="Registry" framework
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" shared
( cd da; $(MAKE) da )
( cd gen_be; $(MAKE) gen_be )
### 3.a. rules to build the framework and then the experimental core
exp_wrf : configcheck
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" ext
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" toolsdir
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" framework
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" shared
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=exp exp_wrf )
nmm_wrf : wrf
# Eulerian mass coordinate initializations
em_quarter_ss : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=quarter_ss em_ideal )
( cd test/em_quarter_ss ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_quarter_ss ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_quarter_ss ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_quarter_ss ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_quarter_ss ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_quarter_ss/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_quarter_ss/input_sounding . )
em_squall2d_x : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=squall2d_x em_ideal )
( cd test/em_squall2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_squall2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_squall2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_squall2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_squall2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_squall2d_x/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_squall2d_x/input_sounding . )
em_squall2d_y : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=squall2d_y em_ideal )
( cd test/em_squall2d_y ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_squall2d_y ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_squall2d_y ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_squall2d_y ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_squall2d_y ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_squall2d_y/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_squall2d_y/input_sounding . )
em_b_wave : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=b_wave em_ideal )
( cd test/em_b_wave ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_b_wave ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_b_wave ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_b_wave ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_b_wave ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_b_wave/namelist.input . )
( cd run ; /bin/rm -f input_jet ; ln -s ../test/em_b_wave/input_jet . )
convert_em : framework_only
if [ $(WRF_CONVERT) -eq 1 ] ; then \
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" convert_em ) ; \
fi
# Link wrf.exe and wrf_SST_ESMF.exe into
# test/em_esmf_exp when ESMF_COUPLING is set. wrf.exe
# can be used for stand-alone testing in this case.
# wrf_SST_ESMF.exe is a coupled application. Note that make
# target $(SOLVER)_wrf_SST_ESMF builds wrf_SST_ESMF.exe.
em_real : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real em_real )
( cd test/em_real ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
if [ $(ESMF_COUPLING) -eq 1 ] ; then \
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real em_wrf_SST_ESMF ) ; \
( cd test/em_esmf_exp ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f wrf_SST_ESMF.exe ; ln -s ../../main/wrf_SST_ESMF.exe . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f real.exe ; ln -s ../../main/real.exe . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA . ; \
ln -sf ../../run/RRTM_DATA . ; \
ln -sf ../../run/CAM_ABS_DATA . ; \
ln -sf ../../run/CAM_AEROPT_DATA . ; \
ln -sf ../../run/ozone.formatted . ; \
ln -sf ../../run/ozone_lat.formatted . ; \
ln -sf ../../run/ozone_plev.formatted . ; \
if [ $(RWORDSIZE) -eq 8 ] ; then \
ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
fi ) ; \
( cd test/em_esmf_exp ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f urban_param.tbl ; ln -s ../../run/urban_param.tbl . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . ) ; \
fi
( cd test/em_real ; /bin/rm -f real.exe ; ln -s ../../main/real.exe . )
( cd test/em_real ; /bin/rm -f ndown.exe ; ln -s ../../main/ndown.exe . )
( cd test/em_real ; /bin/rm -f nup.exe ; ln -s ../../main/nup.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_real ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA . ; \
ln -sf ../../run/RRTM_DATA . ; \
ln -sf ../../run/CAM_ABS_DATA . ; \
ln -sf ../../run/CAM_AEROPT_DATA . ; \
ln -sf ../../run/ozone.formatted . ; \
ln -sf ../../run/ozone_lat.formatted . ; \
ln -sf ../../run/ozone_plev.formatted . ; \
if [ $(RWORDSIZE) -eq 8 ] ; then \
ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
fi )
( cd test/em_real ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . )
( cd test/em_real ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . )
( cd test/em_real ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . )
( cd test/em_real ; /bin/rm -f urban_param.tbl ; ln -s ../../run/urban_param.tbl . )
( cd test/em_real ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . )
( cd test/em_real ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . )
( cd test/em_real ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . )
( cd test/em_real ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . )
( cd test/em_real ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_real ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f real.exe ; ln -s ../main/real.exe . )
( cd run ; /bin/rm -f ndown.exe ; ln -s ../main/ndown.exe . )
( cd run ; /bin/rm -f nup.exe ; ln -s ../main/nup.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
em_hill2d_x : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=hill2d_x em_ideal )
( cd test/em_hill2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_hill2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_hill2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_hill2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_hill2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_hill2d_x/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_hill2d_x/input_sounding . )
em_grav2d_x : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=grav2d_x em_ideal )
( cd test/em_grav2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_grav2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_grav2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_grav2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_grav2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_grav2d_x/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_grav2d_x/input_sounding . )
em_heldsuarez : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=heldsuarez em_ideal )
( cd test/em_heldsuarez ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_heldsuarez ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_heldsuarez ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_heldsuarez ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_heldsuarez ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_heldsuarez/namelist.input . )
#### anthropogenic emissions converter
emi_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_emiss )
( cd test/em_real ; /bin/rm -f convert_emiss.exe ; ln -s ../../chem/convert_emiss.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
#### emissions opt 3 converter
opt3_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_fireemiss )
( cd test/em_real ; /bin/rm -f convert_fireemiss.exe ; ln -s ../../chem/convert_fireemiss.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
#### biogenic emissions converter
bio_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_bioemiss )
( cd test/em_real ; /bin/rm -f convert_bioemiss.exe ; ln -s ../../chem/convert_bioemiss.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
bioemiss_conv_megan2 : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_bioemiss_megan2 )
( cd test/em_real ; /bin/rm -f convert_bioemiss_megan2.exe ; ln -s ../../chem/convert_bioemiss_megan2.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
#### nmm converter
nmm_real : nmm_wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=nmm IDEAL_CASE=real real_nmm )
( cd test/nmm_real ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/nmm_real ; /bin/rm -f real_nmm.exe ; ln -s ../../main/real_nmm.exe . )
( cd test/nmm_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/nmm_real ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA . ; \
ln -sf ../../run/RRTM_DATA . ; \
if [ $(RWORDSIZE) -eq 8 ] ; then \
ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
fi )
( cd test/nmm_real ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . )
( cd test/nmm_real ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . )
( cd test/nmm_real ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . )
( cd test/nmm_real ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . )
( cd test/nmm_real ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . )
( cd test/nmm_real ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . )
( cd test/nmm_real ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . )
( cd test/nmm_real ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/nmm_real ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f real_nmm.exe ; ln -s ../main/real_nmm.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup ; fi ; \
/bin/rm -f namelist.input ; ln -s ../test/nmm_real/namelist.input . )
# semi-Lagrangian initializations
ext :
@ echo '--------------------------------------'
( cd frame ; $(MAKE) externals )
framework :
@ echo '--------------------------------------'
( cd frame ; $(MAKE) framework; \
cd ../external/io_netcdf ; make NETCDFPATH="$(NETCDFPATH)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" ESMF_MOD_DEPENDENCE="../$(ESMF_MOD_DEPENDENCE)" diffwrf; \
cd ../io_int ; $(MAKE) SFC="$(SFC) $(FCBASEOPTS)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" ESMF_MOD_DEPENDENCE="../$(ESMF_MOD_DEPENDENCE)" diffwrf ; cd ../../frame )
shared :
@ echo '--------------------------------------'
( cd share ; $(MAKE) )
chemics :
@ echo '--------------------------------------'
( cd chem ; $(MAKE) )
physics :
@ echo '--------------------------------------'
( cd phys ; $(MAKE) )
em_core :
@ echo '--------------------------------------'
( cd dyn_em ; $(MAKE) )
# rule used by configure to test if this will compile with MPI 2 calls MPI_Comm_f2c and _c2f
mpi2_test :
@ cd tools ; /bin/rm -f mpi2_test ; $(CC) -c mpi2_test.c ; cd ..
# rule used by configure to test if fseeko and fseeko64 are supported (for share/landread.c to work right)
fseek_test :
@ cd tools ; /bin/rm -f fseeko_test ; $(SCC) -DTEST_FSEEKO -o fseeko_test fseek_test.c ; cd ..
@ cd tools ; /bin/rm -f fseeko64_test ; $(SCC) -DTEST_FSEEKO64 -o fseeko64_test fseek_test.c ; cd ..
### 3.b. sub-rule to build the expimental core
# uncomment the two lines after exp_core for EXP
exp_core :
@ echo '--------------------------------------'
( cd dyn_exp ; $(MAKE) )
# uncomment the two lines after nmm_core for NMM
nmm_core :
@ echo '--------------------------------------'
( cd dyn_nmm ; $(MAKE) )
toolsdir :
@ echo '--------------------------------------'
( cd tools ; $(MAKE) CC="$(CC_TOOLS)" CFLAGS="$(COREDEFS)" )
# Use this target to build stand-alone tests of esmf_time_f90.
# Only touches external/esmf_time_f90/.
esmf_time_f90_only :
@ echo '--------------------------------------'
( cd external/esmf_time_f90 ; $(MAKE) FC="$(FC) $(FCFLAGS)" CPP="$(CPP) -DTIME_F90_ONLY" tests )
clean :
@ echo 'Use the clean script'
# DO NOT DELETE