small changes adde ids, etc
[wrffire.git] / wrfv2_fire / Makefile
blob1e78283e2e0f44e86343563435d6fe1966b8e966
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 ) ; \
70 all_wrfvar :
71 $(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" ext
72 $(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" toolsdir
73 if [ $(BUFR) ] ; then \
74 ( cd var/external/bufr; \
75 $(MAKE) FC="$(SFC)" CC="$(SCC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" FFLAGS="$(FCDEBUG) $(FORMAT_FIXED)" RANLIB="$(RANLIB)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" ) ; \
77 # ( cd var/build; touch depend.txt; make links; make depend; $(MAKE) $(J) all_wrfvar )
78 ( cd var/build; make depend; $(MAKE) $(J) all_wrfvar )
79 ( cd var/obsproc; $(MAKE) BUFR_CPP="$(BUFR_CPP)" )
81 ### 3.a. rules to build the framework and then the experimental core
83 exp_wrf : configcheck
84 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" ext
85 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" toolsdir
86 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" framework
87 $(MAKE) MODULE_DIRS="$(ALL_MODULES)" shared
88 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=exp exp_wrf )
91 nmm_wrf : wrf
94 # Eulerian mass coordinate initializations
96 em_fire : wrf
97 @ echo '--------------------------------------'
98 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=fire em_ideal )
99 ( cd test/em_fire ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
100 ( cd test/em_fire ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
101 ( cd test/em_fire ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
102 ( cd test/em_fire ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
103 ( cd test/em_fire ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
104 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
105 ( cd run ; if test -f namelist.input ; then \
106 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
107 /bin/rm -f namelist.input ; ln -s ../test/em_fire/namelist.input . )
108 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_fire/input_sounding . )
110 em_quarter_ss : wrf
111 @ echo '--------------------------------------'
112 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=quarter_ss em_ideal )
113 ( cd test/em_quarter_ss ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
114 ( cd test/em_quarter_ss ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
115 ( cd test/em_quarter_ss ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
116 ( cd test/em_quarter_ss ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
117 ( cd test/em_quarter_ss ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
118 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
119 ( cd run ; if test -f namelist.input ; then \
120 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
121 /bin/rm -f namelist.input ; ln -s ../test/em_quarter_ss/namelist.input . )
122 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_quarter_ss/input_sounding . )
124 em_squall2d_x : wrf
125 @ echo '--------------------------------------'
126 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=squall2d_x em_ideal )
127 ( cd test/em_squall2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
128 ( cd test/em_squall2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
129 ( cd test/em_squall2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
130 ( cd test/em_squall2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
131 ( cd test/em_squall2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
132 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
133 ( cd run ; if test -f namelist.input ; then \
134 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
135 /bin/rm -f namelist.input ; ln -s ../test/em_squall2d_x/namelist.input . )
136 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_squall2d_x/input_sounding . )
138 em_squall2d_y : wrf
139 @ echo '--------------------------------------'
140 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=squall2d_y em_ideal )
141 ( cd test/em_squall2d_y ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
142 ( cd test/em_squall2d_y ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
143 ( cd test/em_squall2d_y ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
144 ( cd test/em_squall2d_y ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
145 ( cd test/em_squall2d_y ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
146 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
147 ( cd run ; if test -f namelist.input ; then \
148 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
149 /bin/rm -f namelist.input ; ln -s ../test/em_squall2d_y/namelist.input . )
150 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_squall2d_y/input_sounding . )
152 em_b_wave : wrf
153 @ echo '--------------------------------------'
154 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=b_wave em_ideal )
155 ( cd test/em_b_wave ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
156 ( cd test/em_b_wave ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
157 ( cd test/em_b_wave ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
158 ( cd test/em_b_wave ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
159 ( cd test/em_b_wave ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
160 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
161 ( cd run ; if test -f namelist.input ; then \
162 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
163 /bin/rm -f namelist.input ; ln -s ../test/em_b_wave/namelist.input . )
164 ( cd run ; /bin/rm -f input_jet ; ln -s ../test/em_b_wave/input_jet . )
166 em_les : wrf
167 @ echo '--------------------------------------'
168 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=les em_ideal )
169 ( cd test/em_les ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
170 ( cd test/em_les ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
171 ( cd test/em_les ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
172 ( cd test/em_les ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
173 ( cd test/em_les ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
174 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
175 ( cd run ; if test -f namelist.input ; then \
176 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
177 /bin/rm -f namelist.input ; ln -s ../test/em_les/namelist.input . )
178 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_les/input_sounding . )
180 em_seabreeze2d_x : wrf
181 @ echo '--------------------------------------'
182 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=seabreeze2d_x em_ideal )
183 ( cd test/em_seabreeze2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
184 ( cd test/em_seabreeze2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
185 ( cd test/em_seabreeze2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
186 ( cd test/em_seabreeze2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
187 ( cd test/em_seabreeze2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
188 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
189 ( cd run ; if test -f namelist.input ; then \
190 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
191 /bin/rm -f namelist.input ; ln -s ../test/em_seabreeze2d_x/namelist.input . )
192 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_seabreeze2d_x/input_sounding . )
194 em_scm_xy : wrf
195 @ echo '--------------------------------------'
196 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=scm_xy em_ideal )
197 ( cd test/em_scm_xy ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
198 ( cd test/em_scm_xy ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
199 ( cd test/em_scm_xy ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
200 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
201 ( cd run ; if test -f namelist.input ; then \
202 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
203 /bin/rm -f namelist.input ; ln -s ../test/em_scm_xy/namelist.input . )
204 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_scm_xy/input_sounding . )
206 convert_em : framework_only
207 if [ $(WRF_CONVERT) -eq 1 ] ; then \
208 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" convert_em ) ; \
211 # Link wrf.exe and wrf_SST_ESMF.exe into
212 # test/em_esmf_exp when ESMF_COUPLING is set. wrf.exe
213 # can be used for stand-alone testing in this case.
214 # wrf_SST_ESMF.exe is a coupled application. Note that make
215 # target $(SOLVER)_wrf_SST_ESMF builds wrf_SST_ESMF.exe.
216 em_real : wrf
217 @ echo '--------------------------------------'
218 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real em_real )
219 ( cd test/em_real ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
220 if [ $(ESMF_COUPLING) -eq 1 ] ; then \
221 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real em_wrf_SST_ESMF ) ; \
222 ( cd test/em_esmf_exp ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . ) ; \
223 ( cd test/em_esmf_exp ; /bin/rm -f wrf_SST_ESMF.exe ; ln -s ../../main/wrf_SST_ESMF.exe . ) ; \
224 ( cd test/em_esmf_exp ; /bin/rm -f real.exe ; ln -s ../../main/real.exe . ) ; \
225 ( cd test/em_esmf_exp ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . ) ; \
226 ( cd test/em_esmf_exp ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA RRTMG_LW_DATA RRTMG_SW_DATA ; \
227 ln -sf ../../run/ETAMPNEW_DATA . ; \
228 ln -sf ../../run/RRTM_DATA . ; \
229 ln -sf ../../run/RRTMG_LW_DATA . ; \
230 ln -sf ../../run/RRTMG_SW_DATA . ; \
231 ln -sf ../../run/CAM_ABS_DATA . ; \
232 ln -sf ../../run/CAM_AEROPT_DATA . ; \
233 ln -sf ../../run/ozone.formatted . ; \
234 ln -sf ../../run/ozone_lat.formatted . ; \
235 ln -sf ../../run/ozone_plev.formatted . ; \
236 if [ $(RWORDSIZE) -eq 8 ] ; then \
237 ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
238 ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
239 ln -sf ../../run/RRTMG_LW_DATA_DBL RRTMG_LW_DATA ; \
240 ln -sf ../../run/RRTMG_SW_DATA_DBL RRTMG_SW_DATA ; \
241 fi ) ; \
242 ( cd test/em_esmf_exp ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . ) ; \
243 ( cd test/em_esmf_exp ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . ) ; \
244 ( cd test/em_esmf_exp ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . ) ; \
245 ( cd test/em_esmf_exp ; /bin/rm -f URBPARM.TBL ; ln -s ../../run/URBPARM.TBL . ) ; \
246 ( cd test/em_esmf_exp ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . ) ; \
247 ( cd test/em_esmf_exp ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . ) ; \
248 ( cd test/em_esmf_exp ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . ) ; \
249 ( cd test/em_esmf_exp ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . ) ; \
250 ( cd test/em_esmf_exp ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . ) ; \
251 ( cd test/em_esmf_exp ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . ) ; \
253 ( cd test/em_real ; /bin/rm -f real.exe ; ln -s ../../main/real.exe . )
254 ( cd test/em_real ; /bin/rm -f tc.exe ; ln -s ../../main/tc.exe . )
255 ( cd test/em_real ; /bin/rm -f ndown.exe ; ln -s ../../main/ndown.exe . )
256 ( cd test/em_real ; /bin/rm -f nup.exe ; ln -s ../../main/nup.exe . )
257 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
258 ( cd test/em_real ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA RRTMG_LW_DATA RRTMG_SW_DATA ; \
259 ln -sf ../../run/ETAMPNEW_DATA . ; \
260 ln -sf ../../run/RRTM_DATA . ; \
261 ln -sf ../../run/RRTMG_LW_DATA . ; \
262 ln -sf ../../run/RRTMG_SW_DATA . ; \
263 ln -sf ../../run/CAM_ABS_DATA . ; \
264 ln -sf ../../run/CAM_AEROPT_DATA . ; \
265 ln -sf ../../run/ozone.formatted . ; \
266 ln -sf ../../run/ozone_lat.formatted . ; \
267 ln -sf ../../run/ozone_plev.formatted . ; \
268 if [ $(RWORDSIZE) -eq 8 ] ; then \
269 ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
270 ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
271 ln -sf ../../run/RRTMG_LW_DATA_DBL RRTMG_LW_DATA ; \
272 ln -sf ../../run/RRTMG_SW_DATA_DBL RRTMG_SW_DATA ; \
273 fi )
274 ( cd test/em_real ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . )
275 ( cd test/em_real ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . )
276 ( cd test/em_real ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . )
277 ( cd test/em_real ; /bin/rm -f URBPARM.TBL ; ln -s ../../run/URBPARM.TBL . )
278 ( cd test/em_real ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . )
279 ( cd test/em_real ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . )
280 ( cd test/em_real ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . )
281 ( cd test/em_real ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . )
282 ( cd test/em_real ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
283 ( cd test/em_real ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
284 ( cd run ; /bin/rm -f real.exe ; ln -s ../main/real.exe . )
285 ( cd run ; /bin/rm -f tc.exe ; ln -s ../main/tc.exe . )
286 ( cd run ; /bin/rm -f ndown.exe ; ln -s ../main/ndown.exe . )
287 ( cd run ; /bin/rm -f nup.exe ; ln -s ../main/nup.exe . )
288 ( cd run ; if test -f namelist.input ; then \
289 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
290 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
293 em_hill2d_x : wrf
294 @ echo '--------------------------------------'
295 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=hill2d_x em_ideal )
296 ( cd test/em_hill2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
297 ( cd test/em_hill2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
298 ( cd test/em_hill2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
299 ( cd test/em_hill2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
300 ( cd test/em_hill2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
301 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
302 ( cd run ; if test -f namelist.input ; then \
303 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
304 /bin/rm -f namelist.input ; ln -s ../test/em_hill2d_x/namelist.input . )
305 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_hill2d_x/input_sounding . )
307 em_grav2d_x : wrf
308 @ echo '--------------------------------------'
309 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=grav2d_x em_ideal )
310 ( cd test/em_grav2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
311 ( cd test/em_grav2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
312 ( cd test/em_grav2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
313 ( cd test/em_grav2d_x ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
314 ( cd test/em_grav2d_x ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
315 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
316 ( cd run ; if test -f namelist.input ; then \
317 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
318 /bin/rm -f namelist.input ; ln -s ../test/em_grav2d_x/namelist.input . )
319 ( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_grav2d_x/input_sounding . )
321 em_heldsuarez : wrf
322 @ echo '--------------------------------------'
323 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=heldsuarez em_ideal )
324 ( cd test/em_heldsuarez ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
325 ( cd test/em_heldsuarez ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
326 ( cd test/em_heldsuarez ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
327 ( cd test/em_heldsuarez ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
328 ( cd test/em_heldsuarez ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
329 ( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
330 ( cd run ; if test -f namelist.input ; then \
331 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
332 /bin/rm -f namelist.input ; ln -s ../test/em_heldsuarez/namelist.input . )
334 #### anthropogenic emissions converter
336 emi_conv : wrf
337 @ echo '--------------------------------------'
338 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_emiss )
339 ( cd test/em_real ; /bin/rm -f convert_emiss.exe ; ln -s ../../chem/convert_emiss.exe . )
340 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
341 ( cd run ; if test -f namelist.input ; then \
342 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
343 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
345 #### emissions opt 3 converter
347 opt3_conv : wrf
348 @ echo '--------------------------------------'
349 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_fireemiss )
350 ( cd test/em_real ; /bin/rm -f convert_fireemiss.exe ; ln -s ../../chem/convert_fireemiss.exe . )
351 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
352 ( cd run ; if test -f namelist.input ; then \
353 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
354 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
356 #### biogenic emissions converter
358 bio_conv : wrf
359 @ echo '--------------------------------------'
360 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_bioemiss )
361 ( cd test/em_real ; /bin/rm -f convert_bioemiss.exe ; ln -s ../../chem/convert_bioemiss.exe . )
362 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
363 ( cd run ; if test -f namelist.input ; then \
364 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
365 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
367 bioemiss_conv_megan2 : wrf
368 @ echo '--------------------------------------'
369 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_bioemiss_megan2 )
370 ( cd test/em_real ; /bin/rm -f convert_bioemiss_megan2.exe ; ln -s ../../chem/convert_bioemiss_megan2.exe . )
371 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
372 ( cd run ; if test -f namelist.input ; then \
373 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
374 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
376 #### DMS emissions converter
378 dms_conv : wrf
379 @ echo '--------------------------------------'
380 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_dms )
381 ( cd test/em_real ; /bin/rm -f convert_dms.exe ; ln -s ../../chem/convert_dms.exe . )
382 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
383 ( cd run ; if test -f namelist.input ; then \
384 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
385 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
388 #### Dust errosion factor emissions converter
390 dust_conv : wrf
391 @ echo '--------------------------------------'
392 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_dust )
393 ( cd test/em_real ; /bin/rm -f convert_dust.exe ; ln -s ../../chem/convert_dust.exe . )
394 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
395 ( cd run ; if test -f namelist.input ; then \
396 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
397 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
399 #### GOCART background state for oh, no3 and h2o2 converter
401 gocart_conv : wrf
402 @ echo '--------------------------------------'
403 ( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_gocart )
404 ( cd test/em_real ; /bin/rm -f convert_gocart.exe ; ln -s ../../chem/convert_gocart.exe . )
405 ( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
406 ( cd run ; if test -f namelist.input ; then \
407 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
408 /bin/rm -f namelist.input ; ln -s ../test/em_real/namelist.input . )
411 #### nmm converter
413 nmm_real : nmm_wrf
414 @ echo '--------------------------------------'
415 ( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=nmm IDEAL_CASE=real real_nmm )
416 ( cd test/nmm_real ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
417 ( cd test/nmm_real ; /bin/rm -f real_nmm.exe ; ln -s ../../main/real_nmm.exe . )
418 ( cd test/nmm_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
419 ( cd test/nmm_real ; /bin/rm -f ETAMPNEW_DATA RRTM_DATA ; \
420 ln -sf ../../run/ETAMPNEW_DATA . ; \
421 ln -sf ../../run/RRTM_DATA . ; \
422 if [ $(RWORDSIZE) -eq 8 ] ; then \
423 ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
424 ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
425 fi )
426 ( cd test/nmm_real ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . )
427 ( cd test/nmm_real ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . )
428 ( cd test/nmm_real ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . )
429 ( cd test/nmm_real ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . )
430 ( cd test/nmm_real ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . )
431 ( cd test/nmm_real ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . )
432 ( cd test/nmm_real ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . )
433 ( cd test/nmm_real ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
434 ( cd test/nmm_real ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
435 ( cd test/nmm_real ; /bin/rm -f co2_trans ; ln -s ../../run/co2_trans . )
436 ( cd run ; /bin/rm -f real_nmm.exe ; ln -s ../main/real_nmm.exe . )
437 ( cd run ; if test -f namelist.input ; then \
438 /bin/cp -f namelist.input namelist.input.backup ; fi ; \
439 /bin/rm -f namelist.input ; ln -s ../test/nmm_real/namelist.input . )
443 # semi-Lagrangian initializations
446 ext :
447 @ echo '--------------------------------------'
448 ( cd frame ; $(MAKE) externals )
450 framework :
451 @ echo '--------------------------------------'
452 ( cd frame ; $(MAKE) $(J) framework; \
453 cd ../external/io_netcdf ; \
454 $(MAKE) NETCDFPATH="$(NETCDFPATH)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" \
455 CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
456 ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf; \
457 cd ../io_int ; \
458 $(MAKE) SFC="$(SFC) $(FCBASEOPTS)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
459 TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
460 ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf ; \
461 cd ../../frame )
463 # cd ../external/io_netcdf ; \
464 # $(MAKE) NETCDFPATH="$(NETCDFPATH)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" \
465 # CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
466 # ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="$(AR)" ARFLAGS+"$(ARFLAGS)" diffwrf; \
467 # cd ../io_int ; \
468 # $(MAKE) SFC="$(SFC) $(FCBASEOPTS)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
469 # TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
470 # ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="$(AR)" "$(ARFLAGS)" diffwrf ; \
472 shared :
473 @ echo '--------------------------------------'
474 ( cd share ; $(MAKE) $(J) )
476 chemics :
477 @ echo '--------------------------------------'
478 ( cd chem ; $(MAKE) )
480 physics :
481 @ echo '--------------------------------------'
482 ( cd phys ; $(MAKE) $(J) )
484 em_core :
485 @ echo '--------------------------------------'
486 ( cd dyn_em ; $(MAKE) $(J) )
488 # rule used by configure to test if this will compile with MPI 2 calls MPI_Comm_f2c and _c2f
489 mpi2_test :
490 @ cd tools ; /bin/rm -f mpi2_test ; $(CC) -c mpi2_test.c ; cd ..
492 # rule used by configure to test if this will compile with MPI 2 calls MPI_Init_thread
493 mpi2_thread_test :
494 @ cd tools ; /bin/rm -f mpi2_thread_test ; $(CC) -c mpi2_thread_test.c ; cd ..
496 # rule used by configure to test if fseeko and fseeko64 are supported (for share/landread.c to work right)
497 fseek_test :
498 @ cd tools ; /bin/rm -f fseeko_test ; $(SCC) -DTEST_FSEEKO -o fseeko_test fseek_test.c ; cd ..
499 @ cd tools ; /bin/rm -f fseeko64_test ; $(SCC) -DTEST_FSEEKO64 -o fseeko64_test fseek_test.c ; cd ..
501 ### 3.b. sub-rule to build the expimental core
503 # uncomment the two lines after exp_core for EXP
504 exp_core :
505 @ echo '--------------------------------------'
506 ( cd dyn_exp ; $(MAKE) )
508 # uncomment the two lines after nmm_core for NMM
509 nmm_core :
510 @ echo '--------------------------------------'
511 ( cd dyn_nmm ; $(MAKE) )
513 toolsdir :
514 @ echo '--------------------------------------'
515 ( cd tools ; $(MAKE) CC_TOOLS="$(CC_TOOLS) -DIWORDSIZE=$(IWORDSIZE) -DMAX_HISTORY=$(MAX_HISTORY)" )
518 # ( cd tools ; $(MAKE) CC_TOOLS="$(CC_TOOLS) -DIO_MASK_SIZE=$(IO_MASK_SIZE)" )
520 # Use this target to build stand-alone tests of esmf_time_f90.
521 # Only touches external/esmf_time_f90/.
522 esmf_time_f90_only :
523 @ echo '--------------------------------------'
524 ( cd external/esmf_time_f90 ; $(MAKE) FC="$(FC) $(FCFLAGS)" CPP="$(CPP) -DTIME_F90_ONLY" tests )
526 clean :
527 @ echo 'Use the clean script'
529 # DO NOT DELETE