1 # Top level Makefile for wrf system
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)
29 NMM_MODULE_DIR
= -I..
/dyn_nmm
30 NMM_MODULES
= $(NMM_MODULE_DIR
)
39 @if
[ "$(A2DCASE)" -a
"$(DMPARALLEL)" ] ; then \
40 echo
"------------------------------------------------------------------------------" ; \
41 echo
"WRF CONFIGURATION ERROR " ; \
42 echo
"The $(A2DCASE) case cannot be used on distributed memory parallel systems." ; \
43 echo
"Only 3D WRF cases will run on these systems." ; \
44 echo
"Please chose a different case or rerun configure and chose a different option." ; \
45 echo
"------------------------------------------------------------------------------" ; \
49 framework_only
: configcheck
50 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" ext
51 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" toolsdir
52 /bin
/rm -f main
/libwrflib.a main
/libwrflib.lib
53 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" framework
54 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" shared
57 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" physics
58 if
[ $(WRF_CHEM
) -eq
1 ] ; then
$(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" chemics
; fi
59 if
[ $(WRF_EM_CORE
) -eq
1 ] ; then
$(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" em_core
; fi
60 if
[ $(WRF_NMM_CORE
) -eq
1 ] ; then
$(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" nmm_core
; fi
61 if
[ $(WRF_EXP_CORE
) -eq
1 ] ; then
$(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" exp_core
; fi
62 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em em_wrf
)
63 ( cd run
; /bin
/rm -f wrf.exe
; ln
-s ..
/main
/wrf.exe .
)
64 if
[ $(ESMF_COUPLING
) -eq
1 ] ; then \
65 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em em_wrf_SST_ESMF
) ; \
68 # The "da" target is a subset of the "be" target, so all_wrfvar need only build "be"
72 /bin
/rm -f main
/libwrflib.a
73 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" ext
74 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" toolsdir
75 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" REGISTRY
="Registry" framework
76 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" shared
77 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" physics
78 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" em_core
79 ( cd var
/da
; make
-r da
)
82 /bin
/rm -f main
/libwrflib.a
83 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" ext
84 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" toolsdir
85 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" REGISTRY
="Registry" framework
86 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" shared
87 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" physics
88 $(MAKE
) MODULE_DIRS
="$(DA_WRFVAR_MODULES)" em_core
89 ( cd var
/da
; $(MAKE
) da
)
90 ( cd var
/gen_be
; $(MAKE
) gen_be
)
92 ### 3.a. rules to build the framework and then the experimental core
95 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" ext
96 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" toolsdir
97 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" framework
98 $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" shared
99 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=exp exp_wrf
)
105 # Eulerian mass coordinate initializations
108 @ echo
'--------------------------------------'
109 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=fire em_ideal
)
110 ( cd
test/em_fire
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
111 ( cd
test/em_fire
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
112 ( cd
test/em_fire
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
113 ( cd
test/em_fire
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
114 ( cd
test/em_fire
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
115 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
116 ( cd run
; if
test -f namelist.input
; then \
117 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
118 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_fire
/namelist.input .
)
119 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_fire
/input_sounding .
)
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 .
)
136 @ echo
'--------------------------------------'
137 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=squall2d_x em_ideal
)
138 ( cd
test/em_squall2d_x
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
139 ( cd
test/em_squall2d_x
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
140 ( cd
test/em_squall2d_x
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
141 ( cd
test/em_squall2d_x
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
142 ( cd
test/em_squall2d_x
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
143 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
144 ( cd run
; if
test -f namelist.input
; then \
145 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
146 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_squall2d_x
/namelist.input .
)
147 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_squall2d_x
/input_sounding .
)
150 @ echo
'--------------------------------------'
151 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=squall2d_y em_ideal
)
152 ( cd
test/em_squall2d_y
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
153 ( cd
test/em_squall2d_y
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
154 ( cd
test/em_squall2d_y
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
155 ( cd
test/em_squall2d_y
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
156 ( cd
test/em_squall2d_y
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
157 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
158 ( cd run
; if
test -f namelist.input
; then \
159 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
160 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_squall2d_y
/namelist.input .
)
161 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_squall2d_y
/input_sounding .
)
164 @ echo
'--------------------------------------'
165 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=b_wave em_ideal
)
166 ( cd
test/em_b_wave
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
167 ( cd
test/em_b_wave
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
168 ( cd
test/em_b_wave
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
169 ( cd
test/em_b_wave
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
170 ( cd
test/em_b_wave
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
171 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
172 ( cd run
; if
test -f namelist.input
; then \
173 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
174 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_b_wave
/namelist.input .
)
175 ( cd run
; /bin
/rm -f input_jet
; ln
-s ..
/test/em_b_wave
/input_jet .
)
178 @ echo
'--------------------------------------'
179 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=les em_ideal
)
180 ( cd
test/em_les
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
181 ( cd
test/em_les
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
182 ( cd
test/em_les
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
183 ( cd
test/em_les
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
184 ( cd
test/em_les
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
185 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
186 ( cd run
; if
test -f namelist.input
; then \
187 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
188 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_les
/namelist.input .
)
189 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_les
/input_sounding .
)
191 em_seabreeze2d_x
: wrf
192 @ echo
'--------------------------------------'
193 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=seabreeze2d_x em_ideal
)
194 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
195 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
196 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
197 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
198 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
199 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
200 ( cd run
; if
test -f namelist.input
; then \
201 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
202 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_seabreeze2d_x
/namelist.input .
)
203 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_seabreeze2d_x
/input_sounding .
)
205 convert_em
: framework_only
206 if
[ $(WRF_CONVERT
) -eq
1 ] ; then \
207 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" convert_em
) ; \
210 # Link wrf.exe and wrf_SST_ESMF.exe into
211 # test/em_esmf_exp when ESMF_COUPLING is set. wrf.exe
212 # can be used for stand-alone testing in this case.
213 # wrf_SST_ESMF.exe is a coupled application. Note that make
214 # target $(SOLVER)_wrf_SST_ESMF builds wrf_SST_ESMF.exe.
216 @ echo
'--------------------------------------'
217 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real em_real
)
218 ( cd
test/em_real
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
219 if
[ $(ESMF_COUPLING
) -eq
1 ] ; then \
220 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real em_wrf_SST_ESMF
) ; \
221 ( cd
test/em_esmf_exp
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
) ; \
222 ( cd
test/em_esmf_exp
; /bin
/rm -f wrf_SST_ESMF.exe
; ln
-s ..
/..
/main
/wrf_SST_ESMF.exe .
) ; \
223 ( cd
test/em_esmf_exp
; /bin
/rm -f real.exe
; ln
-s ..
/..
/main
/real.exe .
) ; \
224 ( cd
test/em_esmf_exp
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
) ; \
225 ( cd
test/em_esmf_exp
; /bin
/rm -f ETAMPNEW_DATA RRTM_DATA
; \
226 ln
-sf ..
/..
/run
/ETAMPNEW_DATA .
; \
227 ln
-sf ..
/..
/run
/RRTM_DATA .
; \
228 ln
-sf ..
/..
/run
/CAM_ABS_DATA .
; \
229 ln
-sf ..
/..
/run
/CAM_AEROPT_DATA .
; \
230 ln
-sf ..
/..
/run
/ozone.formatted .
; \
231 ln
-sf ..
/..
/run
/ozone_lat.formatted .
; \
232 ln
-sf ..
/..
/run
/ozone_plev.formatted .
; \
233 if
[ $(RWORDSIZE
) -eq
8 ] ; then \
234 ln
-sf ..
/..
/run
/ETAMPNEW_DATA_DBL ETAMPNEW_DATA
; \
235 ln
-sf ..
/..
/run
/RRTM_DATA_DBL RRTM_DATA
; \
237 ( cd
test/em_esmf_exp
; /bin
/rm -f GENPARM.TBL
; ln
-s ..
/..
/run
/GENPARM.TBL .
) ; \
238 ( cd
test/em_esmf_exp
; /bin
/rm -f LANDUSE.TBL
; ln
-s ..
/..
/run
/LANDUSE.TBL .
) ; \
239 ( cd
test/em_esmf_exp
; /bin
/rm -f SOILPARM.TBL
; ln
-s ..
/..
/run
/SOILPARM.TBL .
) ; \
240 ( cd
test/em_esmf_exp
; /bin
/rm -f urban_param.tbl
; ln
-s ..
/..
/run
/urban_param.tbl .
) ; \
241 ( cd
test/em_esmf_exp
; /bin
/rm -f VEGPARM.TBL
; ln
-s ..
/..
/run
/VEGPARM.TBL .
) ; \
242 ( cd
test/em_esmf_exp
; /bin
/rm -f tr49t67
; ln
-s ..
/..
/run
/tr49t67 .
) ; \
243 ( cd
test/em_esmf_exp
; /bin
/rm -f tr49t85
; ln
-s ..
/..
/run
/tr49t85 .
) ; \
244 ( cd
test/em_esmf_exp
; /bin
/rm -f tr67t85
; ln
-s ..
/..
/run
/tr67t85 .
) ; \
245 ( cd
test/em_esmf_exp
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
) ; \
246 ( cd
test/em_esmf_exp
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
) ; \
248 ( cd
test/em_real
; /bin
/rm -f real.exe
; ln
-s ..
/..
/main
/real.exe .
)
249 ( cd
test/em_real
; /bin
/rm -f ndown.exe
; ln
-s ..
/..
/main
/ndown.exe .
)
250 ( cd
test/em_real
; /bin
/rm -f nup.exe
; ln
-s ..
/..
/main
/nup.exe .
)
251 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
252 ( cd
test/em_real
; /bin
/rm -f ETAMPNEW_DATA RRTM_DATA
; \
253 ln
-sf ..
/..
/run
/ETAMPNEW_DATA .
; \
254 ln
-sf ..
/..
/run
/RRTM_DATA .
; \
255 ln
-sf ..
/..
/run
/CAM_ABS_DATA .
; \
256 ln
-sf ..
/..
/run
/CAM_AEROPT_DATA .
; \
257 ln
-sf ..
/..
/run
/ozone.formatted .
; \
258 ln
-sf ..
/..
/run
/ozone_lat.formatted .
; \
259 ln
-sf ..
/..
/run
/ozone_plev.formatted .
; \
260 if
[ $(RWORDSIZE
) -eq
8 ] ; then \
261 ln
-sf ..
/..
/run
/ETAMPNEW_DATA_DBL ETAMPNEW_DATA
; \
262 ln
-sf ..
/..
/run
/RRTM_DATA_DBL RRTM_DATA
; \
264 ( cd
test/em_real
; /bin
/rm -f GENPARM.TBL
; ln
-s ..
/..
/run
/GENPARM.TBL .
)
265 ( cd
test/em_real
; /bin
/rm -f LANDUSE.TBL
; ln
-s ..
/..
/run
/LANDUSE.TBL .
)
266 ( cd
test/em_real
; /bin
/rm -f SOILPARM.TBL
; ln
-s ..
/..
/run
/SOILPARM.TBL .
)
267 ( cd
test/em_real
; /bin
/rm -f urban_param.tbl
; ln
-s ..
/..
/run
/urban_param.tbl .
)
268 ( cd
test/em_real
; /bin
/rm -f VEGPARM.TBL
; ln
-s ..
/..
/run
/VEGPARM.TBL .
)
269 ( cd
test/em_real
; /bin
/rm -f tr49t67
; ln
-s ..
/..
/run
/tr49t67 .
)
270 ( cd
test/em_real
; /bin
/rm -f tr49t85
; ln
-s ..
/..
/run
/tr49t85 .
)
271 ( cd
test/em_real
; /bin
/rm -f tr67t85
; ln
-s ..
/..
/run
/tr67t85 .
)
272 ( cd
test/em_real
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
273 ( cd
test/em_real
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
274 ( cd run
; /bin
/rm -f real.exe
; ln
-s ..
/main
/real.exe .
)
275 ( cd run
; /bin
/rm -f ndown.exe
; ln
-s ..
/main
/ndown.exe .
)
276 ( cd run
; /bin
/rm -f nup.exe
; ln
-s ..
/main
/nup.exe .
)
277 ( cd run
; if
test -f namelist.input
; then \
278 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
279 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
283 @ echo
'--------------------------------------'
284 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=hill2d_x em_ideal
)
285 ( cd
test/em_hill2d_x
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
286 ( cd
test/em_hill2d_x
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
287 ( cd
test/em_hill2d_x
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
288 ( cd
test/em_hill2d_x
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
289 ( cd
test/em_hill2d_x
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
290 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
291 ( cd run
; if
test -f namelist.input
; then \
292 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
293 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_hill2d_x
/namelist.input .
)
294 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_hill2d_x
/input_sounding .
)
297 @ echo
'--------------------------------------'
298 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=grav2d_x em_ideal
)
299 ( cd
test/em_grav2d_x
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
300 ( cd
test/em_grav2d_x
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
301 ( cd
test/em_grav2d_x
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
302 ( cd
test/em_grav2d_x
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
303 ( cd
test/em_grav2d_x
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
304 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
305 ( cd run
; if
test -f namelist.input
; then \
306 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
307 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_grav2d_x
/namelist.input .
)
308 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_grav2d_x
/input_sounding .
)
311 @ echo
'--------------------------------------'
312 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=heldsuarez em_ideal
)
313 ( cd
test/em_heldsuarez
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
314 ( cd
test/em_heldsuarez
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
315 ( cd
test/em_heldsuarez
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
316 ( cd
test/em_heldsuarez
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
317 ( cd
test/em_heldsuarez
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
318 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.exe .
)
319 ( cd run
; if
test -f namelist.input
; then \
320 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
321 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_heldsuarez
/namelist.input .
)
323 #### anthropogenic emissions converter
326 @ echo
'--------------------------------------'
327 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_emiss
)
328 ( cd
test/em_real
; /bin
/rm -f convert_emiss.exe
; ln
-s ..
/..
/chem
/convert_emiss.exe .
)
329 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
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_real
/namelist.input .
)
334 #### emissions opt 3 converter
337 @ echo
'--------------------------------------'
338 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_fireemiss
)
339 ( cd
test/em_real
; /bin
/rm -f convert_fireemiss.exe
; ln
-s ..
/..
/chem
/convert_fireemiss.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 #### biogenic emissions converter
348 @ echo
'--------------------------------------'
349 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_bioemiss
)
350 ( cd
test/em_real
; /bin
/rm -f convert_bioemiss.exe
; ln
-s ..
/..
/chem
/convert_bioemiss.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 bioemiss_conv_megan2
: wrf
357 @ echo
'--------------------------------------'
358 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_bioemiss_megan2
)
359 ( cd
test/em_real
; /bin
/rm -f convert_bioemiss_megan2.exe
; ln
-s ..
/..
/chem
/convert_bioemiss_megan2.exe .
)
360 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
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_real
/namelist.input .
)
365 #### DMS emissions converter
368 @ echo
'--------------------------------------'
369 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_dms
)
370 ( cd
test/em_real
; /bin
/rm -f convert_dms.exe
; ln
-s ..
/..
/chem
/convert_dms.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 .
)
377 #### Dust errosion factor emissions converter
380 @ echo
'--------------------------------------'
381 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_dust
)
382 ( cd
test/em_real
; /bin
/rm -f convert_dust.exe
; ln
-s ..
/..
/chem
/convert_dust.exe .
)
383 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
384 ( cd run
; if
test -f namelist.input
; then \
385 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
386 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
388 #### GOCART background state for oh, no3 and h2o2 converter
391 @ echo
'--------------------------------------'
392 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_gocart
)
393 ( cd
test/em_real
; /bin
/rm -f convert_gocart.exe
; ln
-s ..
/..
/chem
/convert_gocart.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 .
)
403 @ echo
'--------------------------------------'
404 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=nmm IDEAL_CASE
=real real_nmm
)
405 ( cd
test/nmm_real
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
406 ( cd
test/nmm_real
; /bin
/rm -f real_nmm.exe
; ln
-s ..
/..
/main
/real_nmm.exe .
)
407 ( cd
test/nmm_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
408 ( cd
test/nmm_real
; /bin
/rm -f ETAMPNEW_DATA RRTM_DATA
; \
409 ln
-sf ..
/..
/run
/ETAMPNEW_DATA .
; \
410 ln
-sf ..
/..
/run
/RRTM_DATA .
; \
411 if
[ $(RWORDSIZE
) -eq
8 ] ; then \
412 ln
-sf ..
/..
/run
/ETAMPNEW_DATA_DBL ETAMPNEW_DATA
; \
413 ln
-sf ..
/..
/run
/RRTM_DATA_DBL RRTM_DATA
; \
415 ( cd
test/nmm_real
; /bin
/rm -f GENPARM.TBL
; ln
-s ..
/..
/run
/GENPARM.TBL .
)
416 ( cd
test/nmm_real
; /bin
/rm -f LANDUSE.TBL
; ln
-s ..
/..
/run
/LANDUSE.TBL .
)
417 ( cd
test/nmm_real
; /bin
/rm -f SOILPARM.TBL
; ln
-s ..
/..
/run
/SOILPARM.TBL .
)
418 ( cd
test/nmm_real
; /bin
/rm -f VEGPARM.TBL
; ln
-s ..
/..
/run
/VEGPARM.TBL .
)
419 ( cd
test/nmm_real
; /bin
/rm -f tr49t67
; ln
-s ..
/..
/run
/tr49t67 .
)
420 ( cd
test/nmm_real
; /bin
/rm -f tr49t85
; ln
-s ..
/..
/run
/tr49t85 .
)
421 ( cd
test/nmm_real
; /bin
/rm -f tr67t85
; ln
-s ..
/..
/run
/tr67t85 .
)
422 ( cd
test/nmm_real
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
423 ( cd
test/nmm_real
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
424 ( cd run
; /bin
/rm -f real_nmm.exe
; ln
-s ..
/main
/real_nmm.exe .
)
425 ( cd run
; if
test -f namelist.input
; then \
426 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
427 /bin
/rm -f namelist.input
; ln
-s ..
/test/nmm_real
/namelist.input .
)
431 # semi-Lagrangian initializations
435 @ echo
'--------------------------------------'
436 ( cd frame
; $(MAKE
) externals
)
439 @ echo
'--------------------------------------'
440 ( cd frame
; $(MAKE
) framework
; \
441 cd ..
/external
/io_netcdf
; \
442 $(MAKE
) NETCDFPATH
="$(NETCDFPATH)" FC
="$(SFC) $(FCBASEOPTS)" RANLIB
="$(RANLIB)" \
443 CPP
="$(CPP)" LDFLAGS
="$(LDFLAGS)" TRADFLAG
="$(TRADFLAG)" ESMF_IO_LIB_EXT
="$(ESMF_IO_LIB_EXT)" \
444 ESMF_MOD_DEPENDENCE
="$(ESMF_MOD_DEPENDENCE)" AR
="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf
; \
446 $(MAKE
) SFC
="$(SFC) $(FCBASEOPTS)" FC
="$(SFC) $(FCBASEOPTS)" RANLIB
="$(RANLIB)" CPP
="$(CPP)" \
447 TRADFLAG
="$(TRADFLAG)" ESMF_IO_LIB_EXT
="$(ESMF_IO_LIB_EXT)" \
448 ESMF_MOD_DEPENDENCE
="$(ESMF_MOD_DEPENDENCE)" AR
="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf
; \
451 # cd ../external/io_netcdf ; \
452 # $(MAKE) NETCDFPATH="$(NETCDFPATH)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" \
453 # CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
454 # ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="$(AR)" ARFLAGS+"$(ARFLAGS)" diffwrf; \
456 # $(MAKE) SFC="$(SFC) $(FCBASEOPTS)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
457 # TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
458 # ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="$(AR)" "$(ARFLAGS)" diffwrf ; \
461 @ echo
'--------------------------------------'
462 ( cd share
; $(MAKE
) )
465 @ echo
'--------------------------------------'
466 ( cd chem
; $(MAKE
) )
469 @ echo
'--------------------------------------'
470 ( cd phys
; $(MAKE
) )
473 @ echo
'--------------------------------------'
474 ( cd dyn_em
; $(MAKE
) )
476 # rule used by configure to test if this will compile with MPI 2 calls MPI_Comm_f2c and _c2f
478 @ cd tools
; /bin
/rm -f mpi2_test
; $(CC
) -c mpi2_test.c
; cd ..
480 # rule used by configure to test if this will compile with MPI 2 calls MPI_Init_thread
482 @ cd tools
; /bin
/rm -f mpi2_thread_test
; $(CC
) -c mpi2_thread_test.c
; cd ..
484 # rule used by configure to test if fseeko and fseeko64 are supported (for share/landread.c to work right)
486 @ cd tools
; /bin
/rm -f fseeko_test
; $(SCC
) -DTEST_FSEEKO
-o fseeko_test fseek_test.c
; cd ..
487 @ cd tools
; /bin
/rm -f fseeko64_test
; $(SCC
) -DTEST_FSEEKO64
-o fseeko64_test fseek_test.c
; cd ..
489 ### 3.b. sub-rule to build the expimental core
491 # uncomment the two lines after exp_core for EXP
493 @ echo
'--------------------------------------'
494 ( cd dyn_exp
; $(MAKE
) )
496 # uncomment the two lines after nmm_core for NMM
498 @ echo
'--------------------------------------'
499 ( cd dyn_nmm
; $(MAKE
) )
502 @ echo
'--------------------------------------'
503 ( cd tools
; $(MAKE
) CC_TOOLS
="$(CC_TOOLS)" )
505 # Use this target to build stand-alone tests of esmf_time_f90.
506 # Only touches external/esmf_time_f90/.
508 @ echo
'--------------------------------------'
509 ( cd external
/esmf_time_f90
; $(MAKE
) FC
="$(FC) $(FCFLAGS)" CPP
="$(CPP) -DTIME_F90_ONLY" tests
)
512 @ echo
'Use the clean script'