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
=quarter_ss em_ideal
)
110 ( cd
test/em_quarter_ss
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
111 ( cd
test/em_quarter_ss
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
112 ( cd
test/em_quarter_ss
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
113 ( cd
test/em_quarter_ss
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
114 ( cd
test/em_quarter_ss
; /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_quarter_ss
/namelist.input .
)
119 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_quarter_ss
/input_sounding .
)
122 @ echo
'--------------------------------------'
123 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=squall2d_x em_ideal
)
124 ( cd
test/em_squall2d_x
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
125 ( cd
test/em_squall2d_x
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
126 ( cd
test/em_squall2d_x
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
127 ( cd
test/em_squall2d_x
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
128 ( cd
test/em_squall2d_x
; /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_squall2d_x
/namelist.input .
)
133 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_squall2d_x
/input_sounding .
)
136 @ echo
'--------------------------------------'
137 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=squall2d_y em_ideal
)
138 ( cd
test/em_squall2d_y
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
139 ( cd
test/em_squall2d_y
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
140 ( cd
test/em_squall2d_y
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
141 ( cd
test/em_squall2d_y
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
142 ( cd
test/em_squall2d_y
; /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_y
/namelist.input .
)
147 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_squall2d_y
/input_sounding .
)
150 @ echo
'--------------------------------------'
151 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=b_wave em_ideal
)
152 ( cd
test/em_b_wave
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
153 ( cd
test/em_b_wave
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
154 ( cd
test/em_b_wave
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
155 ( cd
test/em_b_wave
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
156 ( cd
test/em_b_wave
; /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_b_wave
/namelist.input .
)
161 ( cd run
; /bin
/rm -f input_jet
; ln
-s ..
/test/em_b_wave
/input_jet .
)
164 @ echo
'--------------------------------------'
165 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=les em_ideal
)
166 ( cd
test/em_les
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
167 ( cd
test/em_les
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
168 ( cd
test/em_les
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
169 ( cd
test/em_les
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
170 ( cd
test/em_les
; /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_les
/namelist.input .
)
175 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_les
/input_sounding .
)
177 em_seabreeze2d_x
: wrf
178 @ echo
'--------------------------------------'
179 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=seabreeze2d_x em_ideal
)
180 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
181 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
182 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
183 ( cd
test/em_seabreeze2d_x
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
184 ( cd
test/em_seabreeze2d_x
; /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_seabreeze2d_x
/namelist.input .
)
189 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_seabreeze2d_x
/input_sounding .
)
191 convert_em
: framework_only
192 if
[ $(WRF_CONVERT
) -eq
1 ] ; then \
193 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" convert_em
) ; \
196 # Link wrf.exe and wrf_SST_ESMF.exe into
197 # test/em_esmf_exp when ESMF_COUPLING is set. wrf.exe
198 # can be used for stand-alone testing in this case.
199 # wrf_SST_ESMF.exe is a coupled application. Note that make
200 # target $(SOLVER)_wrf_SST_ESMF builds wrf_SST_ESMF.exe.
202 @ echo
'--------------------------------------'
203 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real em_real
)
204 ( cd
test/em_real
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
205 if
[ $(ESMF_COUPLING
) -eq
1 ] ; then \
206 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real em_wrf_SST_ESMF
) ; \
207 ( cd
test/em_esmf_exp
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
) ; \
208 ( cd
test/em_esmf_exp
; /bin
/rm -f wrf_SST_ESMF.exe
; ln
-s ..
/..
/main
/wrf_SST_ESMF.exe .
) ; \
209 ( cd
test/em_esmf_exp
; /bin
/rm -f real.exe
; ln
-s ..
/..
/main
/real.exe .
) ; \
210 ( cd
test/em_esmf_exp
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
) ; \
211 ( cd
test/em_esmf_exp
; /bin
/rm -f ETAMPNEW_DATA RRTM_DATA
; \
212 ln
-sf ..
/..
/run
/ETAMPNEW_DATA .
; \
213 ln
-sf ..
/..
/run
/RRTM_DATA .
; \
214 ln
-sf ..
/..
/run
/CAM_ABS_DATA .
; \
215 ln
-sf ..
/..
/run
/CAM_AEROPT_DATA .
; \
216 ln
-sf ..
/..
/run
/ozone.formatted .
; \
217 ln
-sf ..
/..
/run
/ozone_lat.formatted .
; \
218 ln
-sf ..
/..
/run
/ozone_plev.formatted .
; \
219 if
[ $(RWORDSIZE
) -eq
8 ] ; then \
220 ln
-sf ..
/..
/run
/ETAMPNEW_DATA_DBL ETAMPNEW_DATA
; \
221 ln
-sf ..
/..
/run
/RRTM_DATA_DBL RRTM_DATA
; \
223 ( cd
test/em_esmf_exp
; /bin
/rm -f GENPARM.TBL
; ln
-s ..
/..
/run
/GENPARM.TBL .
) ; \
224 ( cd
test/em_esmf_exp
; /bin
/rm -f LANDUSE.TBL
; ln
-s ..
/..
/run
/LANDUSE.TBL .
) ; \
225 ( cd
test/em_esmf_exp
; /bin
/rm -f SOILPARM.TBL
; ln
-s ..
/..
/run
/SOILPARM.TBL .
) ; \
226 ( cd
test/em_esmf_exp
; /bin
/rm -f urban_param.tbl
; ln
-s ..
/..
/run
/urban_param.tbl .
) ; \
227 ( cd
test/em_esmf_exp
; /bin
/rm -f VEGPARM.TBL
; ln
-s ..
/..
/run
/VEGPARM.TBL .
) ; \
228 ( cd
test/em_esmf_exp
; /bin
/rm -f tr49t67
; ln
-s ..
/..
/run
/tr49t67 .
) ; \
229 ( cd
test/em_esmf_exp
; /bin
/rm -f tr49t85
; ln
-s ..
/..
/run
/tr49t85 .
) ; \
230 ( cd
test/em_esmf_exp
; /bin
/rm -f tr67t85
; ln
-s ..
/..
/run
/tr67t85 .
) ; \
231 ( cd
test/em_esmf_exp
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
) ; \
232 ( cd
test/em_esmf_exp
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
) ; \
234 ( cd
test/em_real
; /bin
/rm -f real.exe
; ln
-s ..
/..
/main
/real.exe .
)
235 ( cd
test/em_real
; /bin
/rm -f ndown.exe
; ln
-s ..
/..
/main
/ndown.exe .
)
236 ( cd
test/em_real
; /bin
/rm -f nup.exe
; ln
-s ..
/..
/main
/nup.exe .
)
237 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
238 ( cd
test/em_real
; /bin
/rm -f ETAMPNEW_DATA RRTM_DATA
; \
239 ln
-sf ..
/..
/run
/ETAMPNEW_DATA .
; \
240 ln
-sf ..
/..
/run
/RRTM_DATA .
; \
241 ln
-sf ..
/..
/run
/CAM_ABS_DATA .
; \
242 ln
-sf ..
/..
/run
/CAM_AEROPT_DATA .
; \
243 ln
-sf ..
/..
/run
/ozone.formatted .
; \
244 ln
-sf ..
/..
/run
/ozone_lat.formatted .
; \
245 ln
-sf ..
/..
/run
/ozone_plev.formatted .
; \
246 if
[ $(RWORDSIZE
) -eq
8 ] ; then \
247 ln
-sf ..
/..
/run
/ETAMPNEW_DATA_DBL ETAMPNEW_DATA
; \
248 ln
-sf ..
/..
/run
/RRTM_DATA_DBL RRTM_DATA
; \
250 ( cd
test/em_real
; /bin
/rm -f GENPARM.TBL
; ln
-s ..
/..
/run
/GENPARM.TBL .
)
251 ( cd
test/em_real
; /bin
/rm -f LANDUSE.TBL
; ln
-s ..
/..
/run
/LANDUSE.TBL .
)
252 ( cd
test/em_real
; /bin
/rm -f SOILPARM.TBL
; ln
-s ..
/..
/run
/SOILPARM.TBL .
)
253 ( cd
test/em_real
; /bin
/rm -f urban_param.tbl
; ln
-s ..
/..
/run
/urban_param.tbl .
)
254 ( cd
test/em_real
; /bin
/rm -f VEGPARM.TBL
; ln
-s ..
/..
/run
/VEGPARM.TBL .
)
255 ( cd
test/em_real
; /bin
/rm -f tr49t67
; ln
-s ..
/..
/run
/tr49t67 .
)
256 ( cd
test/em_real
; /bin
/rm -f tr49t85
; ln
-s ..
/..
/run
/tr49t85 .
)
257 ( cd
test/em_real
; /bin
/rm -f tr67t85
; ln
-s ..
/..
/run
/tr67t85 .
)
258 ( cd
test/em_real
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
259 ( cd
test/em_real
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
260 ( cd run
; /bin
/rm -f real.exe
; ln
-s ..
/main
/real.exe .
)
261 ( cd run
; /bin
/rm -f ndown.exe
; ln
-s ..
/main
/ndown.exe .
)
262 ( cd run
; /bin
/rm -f nup.exe
; ln
-s ..
/main
/nup.exe .
)
263 ( cd run
; if
test -f namelist.input
; then \
264 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
265 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
269 @ echo
'--------------------------------------'
270 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=hill2d_x em_ideal
)
271 ( cd
test/em_hill2d_x
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
272 ( cd
test/em_hill2d_x
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
273 ( cd
test/em_hill2d_x
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
274 ( cd
test/em_hill2d_x
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
275 ( cd
test/em_hill2d_x
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
276 ( cd run
; /bin
/rm -f ideal.exe
; ln
-s ..
/main
/ideal.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_hill2d_x
/namelist.input .
)
280 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_hill2d_x
/input_sounding .
)
283 @ echo
'--------------------------------------'
284 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=grav2d_x em_ideal
)
285 ( cd
test/em_grav2d_x
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
286 ( cd
test/em_grav2d_x
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
287 ( cd
test/em_grav2d_x
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
288 ( cd
test/em_grav2d_x
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
289 ( cd
test/em_grav2d_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_grav2d_x
/namelist.input .
)
294 ( cd run
; /bin
/rm -f input_sounding
; ln
-s ..
/test/em_grav2d_x
/input_sounding .
)
297 @ echo
'--------------------------------------'
298 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=heldsuarez em_ideal
)
299 ( cd
test/em_heldsuarez
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
300 ( cd
test/em_heldsuarez
; /bin
/rm -f ideal.exe
; ln
-s ..
/..
/main
/ideal.exe .
)
301 ( cd
test/em_heldsuarez
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
302 ( cd
test/em_heldsuarez
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
303 ( cd
test/em_heldsuarez
; /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_heldsuarez
/namelist.input .
)
309 #### anthropogenic emissions converter
312 @ echo
'--------------------------------------'
313 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_emiss
)
314 ( cd
test/em_real
; /bin
/rm -f convert_emiss.exe
; ln
-s ..
/..
/chem
/convert_emiss.exe .
)
315 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
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_real
/namelist.input .
)
320 #### emissions opt 3 converter
323 @ echo
'--------------------------------------'
324 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_fireemiss
)
325 ( cd
test/em_real
; /bin
/rm -f convert_fireemiss.exe
; ln
-s ..
/..
/chem
/convert_fireemiss.exe .
)
326 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
327 ( cd run
; if
test -f namelist.input
; then \
328 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
329 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
331 #### biogenic emissions converter
334 @ echo
'--------------------------------------'
335 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_bioemiss
)
336 ( cd
test/em_real
; /bin
/rm -f convert_bioemiss.exe
; ln
-s ..
/..
/chem
/convert_bioemiss.exe .
)
337 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
338 ( cd run
; if
test -f namelist.input
; then \
339 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
340 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
342 bioemiss_conv_megan2
: wrf
343 @ echo
'--------------------------------------'
344 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_bioemiss_megan2
)
345 ( cd
test/em_real
; /bin
/rm -f convert_bioemiss_megan2.exe
; ln
-s ..
/..
/chem
/convert_bioemiss_megan2.exe .
)
346 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
347 ( cd run
; if
test -f namelist.input
; then \
348 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
349 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
351 #### DMS emissions converter
354 @ echo
'--------------------------------------'
355 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_dms
)
356 ( cd
test/em_real
; /bin
/rm -f convert_dms.exe
; ln
-s ..
/..
/chem
/convert_dms.exe .
)
357 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
358 ( cd run
; if
test -f namelist.input
; then \
359 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
360 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
363 #### Dust errosion factor emissions converter
366 @ echo
'--------------------------------------'
367 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_dust
)
368 ( cd
test/em_real
; /bin
/rm -f convert_dust.exe
; ln
-s ..
/..
/chem
/convert_dust.exe .
)
369 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
370 ( cd run
; if
test -f namelist.input
; then \
371 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
372 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
374 #### GOCART background state for oh, no3 and h2o2 converter
377 @ echo
'--------------------------------------'
378 ( cd chem
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=em IDEAL_CASE
=real convert_gocart
)
379 ( cd
test/em_real
; /bin
/rm -f convert_gocart.exe
; ln
-s ..
/..
/chem
/convert_gocart.exe .
)
380 ( cd
test/em_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
381 ( cd run
; if
test -f namelist.input
; then \
382 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
383 /bin
/rm -f namelist.input
; ln
-s ..
/test/em_real
/namelist.input .
)
389 @ echo
'--------------------------------------'
390 ( cd main
; $(MAKE
) MODULE_DIRS
="$(ALL_MODULES)" SOLVER
=nmm IDEAL_CASE
=real real_nmm
)
391 ( cd
test/nmm_real
; /bin
/rm -f wrf.exe
; ln
-s ..
/..
/main
/wrf.exe .
)
392 ( cd
test/nmm_real
; /bin
/rm -f real_nmm.exe
; ln
-s ..
/..
/main
/real_nmm.exe .
)
393 ( cd
test/nmm_real
; /bin
/rm -f README.namelist
; ln
-s ..
/..
/run
/README.namelist .
)
394 ( cd
test/nmm_real
; /bin
/rm -f ETAMPNEW_DATA RRTM_DATA
; \
395 ln
-sf ..
/..
/run
/ETAMPNEW_DATA .
; \
396 ln
-sf ..
/..
/run
/RRTM_DATA .
; \
397 if
[ $(RWORDSIZE
) -eq
8 ] ; then \
398 ln
-sf ..
/..
/run
/ETAMPNEW_DATA_DBL ETAMPNEW_DATA
; \
399 ln
-sf ..
/..
/run
/RRTM_DATA_DBL RRTM_DATA
; \
401 ( cd
test/nmm_real
; /bin
/rm -f GENPARM.TBL
; ln
-s ..
/..
/run
/GENPARM.TBL .
)
402 ( cd
test/nmm_real
; /bin
/rm -f LANDUSE.TBL
; ln
-s ..
/..
/run
/LANDUSE.TBL .
)
403 ( cd
test/nmm_real
; /bin
/rm -f SOILPARM.TBL
; ln
-s ..
/..
/run
/SOILPARM.TBL .
)
404 ( cd
test/nmm_real
; /bin
/rm -f VEGPARM.TBL
; ln
-s ..
/..
/run
/VEGPARM.TBL .
)
405 ( cd
test/nmm_real
; /bin
/rm -f tr49t67
; ln
-s ..
/..
/run
/tr49t67 .
)
406 ( cd
test/nmm_real
; /bin
/rm -f tr49t85
; ln
-s ..
/..
/run
/tr49t85 .
)
407 ( cd
test/nmm_real
; /bin
/rm -f tr67t85
; ln
-s ..
/..
/run
/tr67t85 .
)
408 ( cd
test/nmm_real
; /bin
/rm -f gribmap.txt
; ln
-s ..
/..
/run
/gribmap.txt .
)
409 ( cd
test/nmm_real
; /bin
/rm -f grib2map.tbl
; ln
-s ..
/..
/run
/grib2map.tbl .
)
410 ( cd run
; /bin
/rm -f real_nmm.exe
; ln
-s ..
/main
/real_nmm.exe .
)
411 ( cd run
; if
test -f namelist.input
; then \
412 /bin
/cp
-f namelist.input namelist.input.backup
; fi
; \
413 /bin
/rm -f namelist.input
; ln
-s ..
/test/nmm_real
/namelist.input .
)
417 # semi-Lagrangian initializations
421 @ echo
'--------------------------------------'
422 ( cd frame
; $(MAKE
) externals
)
425 @ echo
'--------------------------------------'
426 ( cd frame
; $(MAKE
) framework
; \
427 cd ..
/external
/io_netcdf
; \
428 $(MAKE
) NETCDFPATH
="$(NETCDFPATH)" FC
="$(SFC) $(FCBASEOPTS)" RANLIB
="$(RANLIB)" \
429 CPP
="$(CPP)" LDFLAGS
="$(LDFLAGS)" TRADFLAG
="$(TRADFLAG)" ESMF_IO_LIB_EXT
="$(ESMF_IO_LIB_EXT)" \
430 ESMF_MOD_DEPENDENCE
="$(ESMF_MOD_DEPENDENCE)" AR
="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf
; \
432 $(MAKE
) SFC
="$(SFC) $(FCBASEOPTS)" FC
="$(SFC) $(FCBASEOPTS)" RANLIB
="$(RANLIB)" CPP
="$(CPP)" \
433 TRADFLAG
="$(TRADFLAG)" ESMF_IO_LIB_EXT
="$(ESMF_IO_LIB_EXT)" \
434 ESMF_MOD_DEPENDENCE
="$(ESMF_MOD_DEPENDENCE)" AR
="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf
; \
437 # cd ../external/io_netcdf ; \
438 # $(MAKE) NETCDFPATH="$(NETCDFPATH)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" \
439 # CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
440 # ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="$(AR)" ARFLAGS+"$(ARFLAGS)" diffwrf; \
442 # $(MAKE) SFC="$(SFC) $(FCBASEOPTS)" FC="$(SFC) $(FCBASEOPTS)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
443 # TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
444 # ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="$(AR)" "$(ARFLAGS)" diffwrf ; \
447 @ echo
'--------------------------------------'
448 ( cd share
; $(MAKE
) )
451 @ echo
'--------------------------------------'
452 ( cd chem
; $(MAKE
) )
455 @ echo
'--------------------------------------'
456 ( cd phys
; $(MAKE
) )
459 @ echo
'--------------------------------------'
460 ( cd dyn_em
; $(MAKE
) )
462 # rule used by configure to test if this will compile with MPI 2 calls MPI_Comm_f2c and _c2f
464 @ cd tools
; /bin
/rm -f mpi2_test
; $(CC
) -c mpi2_test.c
; cd ..
466 # rule used by configure to test if this will compile with MPI 2 calls MPI_Init_thread
468 @ cd tools
; /bin
/rm -f mpi2_thread_test
; $(CC
) -c mpi2_thread_test.c
; cd ..
470 # rule used by configure to test if fseeko and fseeko64 are supported (for share/landread.c to work right)
472 @ cd tools
; /bin
/rm -f fseeko_test
; $(SCC
) -DTEST_FSEEKO
-o fseeko_test fseek_test.c
; cd ..
473 @ cd tools
; /bin
/rm -f fseeko64_test
; $(SCC
) -DTEST_FSEEKO64
-o fseeko64_test fseek_test.c
; cd ..
475 ### 3.b. sub-rule to build the expimental core
477 # uncomment the two lines after exp_core for EXP
479 @ echo
'--------------------------------------'
480 ( cd dyn_exp
; $(MAKE
) )
482 # uncomment the two lines after nmm_core for NMM
484 @ echo
'--------------------------------------'
485 ( cd dyn_nmm
; $(MAKE
) )
488 @ echo
'--------------------------------------'
489 ( cd tools
; $(MAKE
) CC_TOOLS
="$(CC_TOOLS)" )
491 # Use this target to build stand-alone tests of esmf_time_f90.
492 # Only touches external/esmf_time_f90/.
494 @ echo
'--------------------------------------'
495 ( cd external
/esmf_time_f90
; $(MAKE
) FC
="$(FC) $(FCFLAGS)" CPP
="$(CPP) -DTIME_F90_ONLY" tests
)
498 @ echo
'Use the clean script'