Fixed the error checkings in line_interp and four_pnts_interp
[wrffire.git] / wrfv2_fire / Makefile
blob6434c56ee5842190dc9e2134f8c0bbaa8c5fe7a7
1 # Top level Makefile for wrf system
3 LN = ln -s
4 MAKE = make -i -r
5 MV = /bin/mv
6 RM = /bin/rm -f
8 deflt :
9 @ echo Please compile the code using ./compile
11 include ./configure.wrf
13 EM_MODULE_DIR = -I../dyn_em
14 EM_MODULES = $(EM_MODULE_DIR)
16 DA_WRFVAR_MODULES = $(INCLUDE_MODULES)
17 DA_WRFVAR_MODULES_2 = $(INC_MOD_WRFVAR)
19 DA_CONVERTOR_MOD_DIR = -I../var/convertor -p../var/convertor
20 DA_CONVERTOR_MODULES = $(DA_CONVERTOR_MOD_DIR) $(INCLUDE_MODULES)
23 #### 3.d. add macros to specify the modules for this core
25 #EXP_MODULE_DIR = -I../dyn_exp
26 #EXP_MODULES = $(EXP_MODULE_DIR)
28 # set this in the compile script now
29 #J = -j 6
31 NMM_MODULE_DIR = -I../dyn_nmm
32 NMM_MODULES = $(NMM_MODULE_DIR)
34 ALL_MODULES = \
35 $(EM_MODULE_DIR) \
36 $(NMM_MODULES) \
37 $(EXP_MODULES) \
38 $(INCLUDE_MODULES)
40 configcheck:
41 @if [ "$(A2DCASE)" -a "$(DMPARALLEL)" ] ; then \
42 echo "------------------------------------------------------------------------------" ; \
43 echo "WRF CONFIGURATION ERROR " ; \
44 echo "The $(A2DCASE) case cannot be used on distributed memory parallel systems." ; \
45 echo "Only 3D WRF cases will run on these systems." ; \
46 echo "Please chose a different case or rerun configure and chose a different option." ; \
47 echo "------------------------------------------------------------------------------" ; \
48 exit 2 ; \
51 framework_only : configcheck
52 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" ext
53 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" toolsdir
54 /bin/rm -f main/libwrflib.a main/libwrflib.lib
55 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" framework
56 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" shared
58 wrf : framework_only
59 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" physics
60 if [ $(WRF_CHEM) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" chemics ; fi
61 if [ $(WRF_EM_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" em_core ; fi
62 if [ $(WRF_NMM_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" nmm_core ; fi
63 if [ $(WRF_EXP_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" exp_core ; fi
64 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em em_wrf )
65 ( cd run ; /bin/rm -f wrf.exe ; ln -s ../main/wrf.exe . )
66 if [ $(ESMF_COUPLING) -eq 1 ] ; then \
67 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em em_wrf_SST_ESMF ) ; \
69 @echo "build started: $(START_OF_COMPILE)"
70 @echo "build completed:" `date`
72 all_wrfvar :
73 $(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" ext
74 $(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" toolsdir
75 if [ $(CRTM) ] ; then \
76 (cd var/external/crtm; \
77 . configure/$(SFC).setup; $(MAKE) $(J) ) ; \
79 if [ $(BUFR) ] ; then \
80 (cd var/external/bufr; \
81 $(MAKE) $(J) FC="$(SFC)" CC="$(SCC)" CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" FFLAGS="$(FCDEBUG) $(FORMAT_FIXED)" RANLIB="$(RANLIB)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" ) ; \
83 # ( cd var/build; touch depend.txt; make links; make depend; $(MAKE) $(J) all_wrfvar )
84 ( cd var/build; make depend; $(MAKE) $(J) all_wrfvar )
85 ( cd var/obsproc; $(MAKE) $(J) BUFR_CPP="$(BUFR_CPP)" )
86 @echo "build started: $(START_OF_COMPILE)"
87 @echo "build completed:" `date`
89 ### 3.a. rules to build the framework and then the experimental core
91 exp_wrf : configcheck
92 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" ext
93 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" toolsdir
94 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" framework
95 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" shared
96 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=exp exp_wrf )
99 nmm_wrf : wrf
102 # Eulerian mass coordinate initializations
104 em_fire : wrf
105 @ echo '--------------------------------------'
106 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=fire em_ideal )
107 ( cd test/em_fire ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
108 ( cd test/em_fire ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
109 ( cd test/em_fire ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
110 ( cd test/em_fire ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
111 ( cd test/em_fire ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
112 ( cd test/em_fire ; /bin/sh create_links.sh )
113 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
114 ( cd run ; if test -f namelist.input ; then \
115 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
116 /bin/rm -f namelist.input ; ln -s ../test/em_fire/namelist.input . )
117 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_fire/input_sounding . )
118 @echo "build started: $(START_OF_COMPILE)"
119 @echo "build completed:" `date`
121 em_quarter_ss : wrf
122 @ echo '--------------------------------------'
123 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=quarter_ss em_ideal )
124 ( cd test/em_quarter_ss ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
125 ( cd test/em_quarter_ss ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
126 ( cd test/em_quarter_ss ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
127 ( cd test/em_quarter_ss ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
128 ( cd test/em_quarter_ss ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
129 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
130 ( cd run ; if test -f namelist.input ; then \
131 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
132 /bin/rm -f namelist.input ; ln -s ../test/em_quarter_ss/namelist.input . )
133 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_quarter_ss/input_sounding . )
134 @echo "build started: $(START_OF_COMPILE)"
135 @echo "build completed:" `date`
137 em_squall2d_x : wrf
138 @ echo '--------------------------------------'
139 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=squall2d_x em_ideal )
140 ( cd test/em_squall2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
141 ( cd test/em_squall2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
142 ( cd test/em_squall2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
143 ( cd test/em_squall2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
144 ( cd test/em_squall2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
145 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
146 ( cd run ; if test -f namelist.input ; then \
147 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
148 /bin/rm -f namelist.input ; ln -s ../test/em_squall2d_x/namelist.input . )
149 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_squall2d_x/input_sounding . )
150 @echo "build started: $(START_OF_COMPILE)"
151 @echo "build completed:" `date`
153 em_squall2d_y : wrf
154 @ echo '--------------------------------------'
155 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=squall2d_y em_ideal )
156 ( cd test/em_squall2d_y ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
157 ( cd test/em_squall2d_y ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
158 ( cd test/em_squall2d_y ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
159 ( cd test/em_squall2d_y ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
160 ( cd test/em_squall2d_y ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
161 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
162 ( cd run ; if test -f namelist.input ; then \
163 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
164 /bin/rm -f namelist.input ; ln -s ../test/em_squall2d_y/namelist.input . )
165 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_squall2d_y/input_sounding . )
166 @echo "build started: $(START_OF_COMPILE)"
167 @echo "build completed:" `date`
169 em_b_wave : wrf
170 @ echo '--------------------------------------'
171 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=b_wave em_ideal )
172 ( cd test/em_b_wave ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
173 ( cd test/em_b_wave ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
174 ( cd test/em_b_wave ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
175 ( cd test/em_b_wave ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
176 ( cd test/em_b_wave ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
177 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
178 ( cd run ; if test -f namelist.input ; then \
179 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
180 /bin/rm -f namelist.input ; ln -s ../test/em_b_wave/namelist.input . )
181 ( cd run ; /bin/rm -f input_jet ; ln -s ../test/em_b_wave/input_jet . )
182 @echo "build started: $(START_OF_COMPILE)"
183 @echo "build completed:" `date`
185 em_les : wrf
186 @ echo '--------------------------------------'
187 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=les em_ideal )
188 ( cd test/em_les ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
189 ( cd test/em_les ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
190 ( cd test/em_les ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
191 ( cd test/em_les ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
192 ( cd test/em_les ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
193 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
194 ( cd run ; if test -f namelist.input ; then \
195 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
196 /bin/rm -f namelist.input ; ln -s ../test/em_les/namelist.input . )
197 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_les/input_sounding . )
198 @echo "build started: $(START_OF_COMPILE)"
199 @echo "build completed:" `date`
201 em_seabreeze2d_x : wrf
202 @ echo '--------------------------------------'
203 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=seabreeze2d_x em_ideal )
204 ( cd test/em_seabreeze2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
205 ( cd test/em_seabreeze2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
206 ( cd test/em_seabreeze2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
207 ( cd test/em_seabreeze2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
208 ( cd test/em_seabreeze2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
209 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
210 ( cd run ; if test -f namelist.input ; then \
211 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
212 /bin/rm -f namelist.input ; ln -s ../test/em_seabreeze2d_x/namelist.input . )
213 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_seabreeze2d_x/input_sounding . )
214 @echo "build started: $(START_OF_COMPILE)"
215 @echo "build completed:" `date`
217 em_scm_xy : wrf
218 @ echo '--------------------------------------'
219 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=scm_xy em_ideal )
220 ( cd test/em_scm_xy ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
221 ( cd test/em_scm_xy ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
222 ( cd test/em_scm_xy ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
223 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
224 ( cd run ; if test -f namelist.input ; then \
225 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
226 /bin/rm -f namelist.input ; ln -s ../test/em_scm_xy/namelist.input . )
227 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_scm_xy/input_sounding . )
228 @echo "build started: $(START_OF_COMPILE)"
229 @echo "build completed:" `date`
231 convert_em : framework_only
232 if [ $(WRF_CONVERT) -eq 1 ] ; then \
233 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" convert_em ) ; \
236 # Link wrf.exe and wrf_SST_ESMF.exe into
237 # test/em_esmf_exp when ESMF_COUPLING is set. wrf.exe
238 # can be used for stand-alone testing in this case.
239 # wrf_SST_ESMF.exe is a coupled application. Note that make
240 # target $(SOLVER)_wrf_SST_ESMF builds wrf_SST_ESMF.exe.
241 em_real : wrf
242 @ echo '--------------------------------------'
243 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real em_real )
244 ( cd test/em_real ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
245 if [ $(ESMF_COUPLING) -eq 1 ] ; then \
246 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real em_wrf_SST_ESMF ) ; \
247 ( cd test/em_esmf_exp ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . ) ; \
248 ( cd test/em_esmf_exp ; /bin/rm -f wrf_SST_ESMF.exe ; ln -s ../../main/wrf_SST_ESMF.exe . ) ; \
249 ( cd test/em_esmf_exp ; /bin/rm -f real.exe ; ln -s ../../main/real.exe . ) ; \
250 ( cd test/em_esmf_exp ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . ) ; \
251 ( cd test/em_esmf_exp ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA RRTMG_LW_DATA RRTMG_SW_DATA ; \
252 ln -sf ../../run/ETAMPNEW_DATA . ; \
253 ln -sf ../../run/RRTM_DATA . ; \
254 ln -sf ../../run/RRTMG_LW_DATA . ; \
255 ln -sf ../../run/RRTMG_SW_DATA . ; \
256 ln -sf ../../run/CAM_ABS_DATA . ; \
257 ln -sf ../../run/CAM_AEROPT_DATA . ; \
258 ln -sf ../../run/ozone.formatted . ; \
259 ln -sf ../../run/ozone_lat.formatted . ; \
260 ln -sf ../../run/ozone_plev.formatted . ; \
261 if [ $(RWORDSIZE) -eq 8 ] ; then \
262 ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
263 ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
264 ln -sf ../../run/RRTMG_LW_DATA_DBL RRTMG_LW_DATA ; \
265 ln -sf ../../run/RRTMG_SW_DATA_DBL RRTMG_SW_DATA ; \
266 fi ) ; \
267 ( cd test/em_esmf_exp ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . ) ; \
268 ( cd test/em_esmf_exp ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . ) ; \
269 ( cd test/em_esmf_exp ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . ) ; \
270 ( cd test/em_esmf_exp ; /bin/rm -f URBPARM.TBL ; ln -s ../../run/URBPARM.TBL . ) ; \
271 ( cd test/em_esmf_exp ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . ) ; \
272 ( cd test/em_esmf_exp ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . ) ; \
273 ( cd test/em_esmf_exp ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . ) ; \
274 ( cd test/em_esmf_exp ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . ) ; \
275 ( cd test/em_esmf_exp ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . ) ; \
276 ( cd test/em_esmf_exp ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . ) ; \
278 ( cd test/em_real ; /bin/rm -f real.exe ; ln -s ../../main/real.exe . )
279 ( cd test/em_real ; /bin/rm -f tc.exe ; ln -s ../../main/tc.exe . )
280 ( cd test/em_real ; /bin/rm -f ndown.exe ; ln -s ../../main/ndown.exe . )
281 ( cd test/em_real ; /bin/rm -f nup.exe ; ln -s ../../main/nup.exe . )
282 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
283 ( cd test/em_real ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA RRTMG_LW_DATA RRTMG_SW_DATA ; \
284 ln -sf ../../run/ETAMPNEW_DATA . ; \
285 ln -sf ../../run/RRTM_DATA . ; \
286 ln -sf ../../run/RRTMG_LW_DATA . ; \
287 ln -sf ../../run/RRTMG_SW_DATA . ; \
288 ln -sf ../../run/CAM_ABS_DATA . ; \
289 ln -sf ../../run/CAM_AEROPT_DATA . ; \
290 ln -sf ../../run/ozone.formatted . ; \
291 ln -sf ../../run/ozone_lat.formatted . ; \
292 ln -sf ../../run/ozone_plev.formatted . ; \
293 if [ $(RWORDSIZE) -eq 8 ] ; then \
294 ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
295 ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
296 ln -sf ../../run/RRTMG_LW_DATA_DBL RRTMG_LW_DATA ; \
297 ln -sf ../../run/RRTMG_SW_DATA_DBL RRTMG_SW_DATA ; \
298 fi )
299 ( cd test/em_real ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . )
300 ( cd test/em_real ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . )
301 ( cd test/em_real ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . )
302 ( cd test/em_real ; /bin/rm -f URBPARM.TBL ; ln -s ../../run/URBPARM.TBL . )
303 ( cd test/em_real ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . )
304 ( cd test/em_real ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . )
305 ( cd test/em_real ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . )
306 ( cd test/em_real ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . )
307 ( cd test/em_real ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
308 ( cd test/em_real ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
309 ( cd run ; /bin/rm -f real.exe ; ln -s ../main/real.exe . )
310 ( cd run ; /bin/rm -f tc.exe ; ln -s ../main/tc.exe . )
311 ( cd run ; /bin/rm -f ndown.exe ; ln -s ../main/ndown.exe . )
312 ( cd run ; /bin/rm -f nup.exe ; ln -s ../main/nup.exe . )
313 ( cd run ; if test -f namelist.input ; then \
314 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
315 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
316 @echo "build started: $(START_OF_COMPILE)"
317 @echo "build completed:" `date`
320 em_hill2d_x : wrf
321 @ echo '--------------------------------------'
322 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=hill2d_x em_ideal )
323 ( cd test/em_hill2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
324 ( cd test/em_hill2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
325 ( cd test/em_hill2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
326 ( cd test/em_hill2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
327 ( cd test/em_hill2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
328 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
329 ( cd run ; if test -f namelist.input ; then \
330 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
331 /bin/rm -f namelist.input ; ln -s ../test/em_hill2d_x/namelist.input . )
332 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_hill2d_x/input_sounding . )
333 @echo "build started: $(START_OF_COMPILE)"
334 @echo "build completed:" `date`
336 em_grav2d_x : wrf
337 @ echo '--------------------------------------'
338 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=grav2d_x em_ideal )
339 ( cd test/em_grav2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
340 ( cd test/em_grav2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
341 ( cd test/em_grav2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
342 ( cd test/em_grav2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
343 ( cd test/em_grav2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
344 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
345 ( cd run ; if test -f namelist.input ; then \
346 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
347 /bin/rm -f namelist.input ; ln -s ../test/em_grav2d_x/namelist.input . )
348 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_grav2d_x/input_sounding . )
349 @echo "build started: $(START_OF_COMPILE)"
350 @echo "build completed:" `date`
352 em_heldsuarez : wrf
353 @ echo '--------------------------------------'
354 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=heldsuarez em_ideal )
355 ( cd test/em_heldsuarez ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
356 ( cd test/em_heldsuarez ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
357 ( cd test/em_heldsuarez ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
358 ( cd test/em_heldsuarez ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
359 ( cd test/em_heldsuarez ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
360 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
361 ( cd run ; if test -f namelist.input ; then \
362 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
363 /bin/rm -f namelist.input ; ln -s ../test/em_heldsuarez/namelist.input . )
364 @echo "build started: $(START_OF_COMPILE)"
365 @echo "build completed:" `date`
367 #### anthropogenic emissions converter
369 emi_conv : wrf
370 @ echo '--------------------------------------'
371 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_emiss )
372 ( cd test/em_real ; /bin/rm -f convert_emiss.exe ; ln -s ../../chem/convert_emiss.exe . )
373 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
374 ( cd run ; if test -f namelist.input ; then \
375 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
376 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
378 #### emissions opt 3 converter
380 opt3_conv : wrf
381 @ echo '--------------------------------------'
382 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_fireemiss )
383 ( cd test/em_real ; /bin/rm -f convert_fireemiss.exe ; ln -s ../../chem/convert_fireemiss.exe . )
384 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
385 ( cd run ; if test -f namelist.input ; then \
386 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
387 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
389 #### biogenic emissions converter
391 bio_conv : wrf
392 @ echo '--------------------------------------'
393 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_bioemiss )
394 ( cd test/em_real ; /bin/rm -f convert_bioemiss.exe ; ln -s ../../chem/convert_bioemiss.exe . )
395 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
396 ( cd run ; if test -f namelist.input ; then \
397 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
398 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
400 bioemiss_conv_megan2 : wrf
401 @ echo '--------------------------------------'
402 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_bioemiss_megan2 )
403 ( cd test/em_real ; /bin/rm -f convert_bioemiss_megan2.exe ; ln -s ../../chem/convert_bioemiss_megan2.exe . )
404 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
405 ( cd run ; if test -f namelist.input ; then \
406 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
407 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
409 #### DMS emissions converter
411 dms_conv : wrf
412 @ echo '--------------------------------------'
413 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_dms )
414 ( cd test/em_real ; /bin/rm -f convert_dms.exe ; ln -s ../../chem/convert_dms.exe . )
415 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
416 ( cd run ; if test -f namelist.input ; then \
417 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
418 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
421 #### Dust errosion factor emissions converter
423 dust_conv : wrf
424 @ echo '--------------------------------------'
425 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_dust )
426 ( cd test/em_real ; /bin/rm -f convert_dust.exe ; ln -s ../../chem/convert_dust.exe . )
427 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
428 ( cd run ; if test -f namelist.input ; then \
429 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
430 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
432 #### GOCART background state for oh, no3 and h2o2 converter
434 gocart_conv : wrf
435 @ echo '--------------------------------------'
436 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_gocart )
437 ( cd test/em_real ; /bin/rm -f convert_gocart.exe ; ln -s ../../chem/convert_gocart.exe . )
438 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
439 ( cd run ; if test -f namelist.input ; then \
440 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
441 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
444 #### nmm converter
446 nmm_real : nmm_wrf
447 @ echo '--------------------------------------'
448 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=nmm IDEAL_CASE=real real_nmm )
449 ( cd test/nmm_real ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
450 ( cd test/nmm_real ; /bin/rm -f real_nmm.exe ; ln -s ../../main/real_nmm.exe . )
451 ( cd test/nmm_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
452 ( cd test/nmm_real ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA ; \
453 ln -sf ../../run/ETAMPNEW_DATA . ; \
454 ln -sf ../../run/RRTM_DATA . ; \
455 if [ $(RWORDSIZE) -eq 8 ] ; then \
456 ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
457 ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
458 fi )
459 ( cd test/nmm_real ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . )
460 ( cd test/nmm_real ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . )
461 ( cd test/nmm_real ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . )
462 ( cd test/nmm_real ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . )
463 ( cd test/nmm_real ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . )
464 ( cd test/nmm_real ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . )
465 ( cd test/nmm_real ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . )
466 ( cd test/nmm_real ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
467 ( cd test/nmm_real ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
468 ( cd test/nmm_real ; /bin/rm -f co2_trans ; ln -s ../../run/co2_trans . )
469 ( cd run ; /bin/rm -f real_nmm.exe ; ln -s ../main/real_nmm.exe . )
470 ( cd run ; if test -f namelist.input ; then \
471 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
472 /bin/rm -f namelist.input ; ln -s ../test/nmm_real/namelist.input . )
476 # semi-Lagrangian initializations
479 ext :
480 @ echo '--------------------------------------'
481 ( cd frame ; $(MAKE) externals )
483 framework :
484 @ echo '--------------------------------------'
485 ( cd frame ; $(MAKE) $(J) framework; \
486 cd ../external/io_netcdf ; \
487 $(MAKE) NETCDFPATH="$(NETCDFPATH)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" \
488 CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
489 ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf; \
490 cd ../io_int ; \
491 $(MAKE) SFC="$(SFC) $(FCBASEOPTS)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
492 TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
493 ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf ; \
494 cd ../../frame )
496 # cd ../external/io_netcdf ; \
497 # $(MAKE) NETCDFPATH="$(NETCDFPATH)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" \
498 # CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
499 # ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="$(AR)" ARFLAGS+"$(ARFLAGS)" diffwrf; \
500 # cd ../io_int ; \
501 # $(MAKE) SFC="$(SFC) $(FCBASEOPTS)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
502 # TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
503 # ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="$(AR)" "$(ARFLAGS)" diffwrf ; \
505 shared :
506 @ echo '--------------------------------------'
507 ( cd share ; $(MAKE) $(J) )
509 chemics :
510 @ echo '--------------------------------------'
511 if [ $(WRF_KPP) -eq 1 ] ; then ( cd chem ; $(MAKE) ) ; fi
512 if [ $(WRF_KPP) -eq 0 ] ; then ( cd chem ; $(MAKE) $(J) ) ; fi
513 # ( cd chem ; $(MAKE) )
514 # ( cd chem ; $(MAKE) $(J) )
516 physics :
517 @ echo '--------------------------------------'
518 ( cd phys ; $(MAKE) $(J) )
520 em_core :
521 @ echo '--------------------------------------'
522 ( cd dyn_em ; $(MAKE) $(J) )
524 # rule used by configure to test if this will compile with MPI 2 calls MPI_Comm_f2c and _c2f
525 mpi2_test :
526 @ cd tools ; /bin/rm -f mpi2_test ; $(CC) -c mpi2_test.c ; cd ..
528 # rule used by configure to test if this will compile with MPI 2 calls MPI_Init_thread
529 mpi2_thread_test :
530 @ cd tools ; /bin/rm -f mpi2_thread_test ; $(CC) -c mpi2_thread_test.c ; cd ..
532 # rule used by configure to test if fseeko and fseeko64 are supported (for share/landread.c to work right)
533 fseek_test :
534 @ cd tools ; /bin/rm -f fseeko_test ; $(SCC) -DTEST_FSEEKO -o fseeko_test fseek_test.c ; cd ..
535 @ cd tools ; /bin/rm -f fseeko64_test ; $(SCC) -DTEST_FSEEKO64 -o fseeko64_test fseek_test.c ; cd ..
537 ### 3.b. sub-rule to build the expimental core
539 # uncomment the two lines after exp_core for EXP
540 exp_core :
541 @ echo '--------------------------------------'
542 ( cd dyn_exp ; $(MAKE) )
544 # uncomment the two lines after nmm_core for NMM
545 nmm_core :
546 @ echo '--------------------------------------'
547 ( cd dyn_nmm ; $(MAKE) )
549 toolsdir :
550 @ echo '--------------------------------------'
551 ( cd tools ; $(MAKE) CC_TOOLS="$(CC_TOOLS) -DIWORDSIZE=$(IWORDSIZE) -DMAX_HISTORY=$(MAX_HISTORY)" )
554 # ( cd tools ; $(MAKE) CC_TOOLS="$(CC_TOOLS) -DIO_MASK_SIZE=$(IO_MASK_SIZE)" )
556 # Use this target to build stand-alone tests of esmf_time_f90.
557 # Only touches external/esmf_time_f90/.
558 esmf_time_f90_only :
559 @ echo '--------------------------------------'
560 ( cd external/esmf_time_f90 ; $(MAKE) FC="$(FC) $(FCFLAGS)" CPP="$(CPP) -DTIME_F90_ONLY" tests )
562 clean :
563 @ echo 'Use the clean script'
565 # DO NOT DELETE