-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
1008 lines (920 loc) · 49.5 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Top level Makefile for wrf system
LN = ln -s
MAKE = make -i -r
MV = /bin/mv
RM = /bin/rm -f
CHEM_FILES = ../chem/module_aerosols_sorgam.o \
../chem/module_gocart_aerosols.o \
../chem/module_mosaic_driver.o \
../chem/module_input_tracer.o \
../chem/module_aerosols_soa_vbs.o
CHEM_FILES2 = ../chem/module_data_mosaic_asect.o
deflt :
@ echo Please compile the code using ./compile
include ./configure.wrf
EM_MODULE_DIR = -I../dyn_em
EM_MODULES = $(EM_MODULE_DIR)
DA_WRFVAR_MODULES = $(INCLUDE_MODULES)
DA_WRFVAR_MODULES_2 = $(INC_MOD_WRFVAR)
DA_CONVERTOR_MOD_DIR = -I../var/convertor -p../var/convertor
DA_CONVERTOR_MODULES = $(DA_CONVERTOR_MOD_DIR) $(INCLUDE_MODULES)
#### 3.d. add macros to specify the modules for this core
#EXP_MODULE_DIR = -I../dyn_exp
#EXP_MODULES = $(EXP_MODULE_DIR)
NMM_MODULE_DIR = -I../dyn_nmm
NMM_MODULES = $(NMM_MODULE_DIR)
ALL_MODULES = \
$(EM_MODULE_DIR) \
$(NMM_MODULES) \
$(EXP_MODULES) \
$(INCLUDE_MODULES)
configcheck:
@echo " "
@echo "============================================================================================== "
@echo " "
@echo "The following indicate the compilers selected to build the WRF system"
@echo " "
@echo "Serial Fortran compiler (mostly for tool generation):"
@echo which SFC
@which `echo $(SFC) | cut -d " " -f1`
@echo " "
@echo "Serial C compiler (mostly for tool generation):"
@echo which SCC
@which `echo $(SCC) | cut -d " " -f1`
@echo " "
@echo "Fortran compiler for the model source code:"
@echo which FC
@if command -v timex > /dev/null 2>&1; then \
which `echo $(FC) | cut -d " " -f2` ; \
echo "Will use 'timex' to report timing information" ; \
elif command -v time > /dev/null 2>&1; then \
which `echo $(FC) | cut -d " " -f2` ; \
echo "Will use 'time' to report timing information" ; \
else \
which `echo $(FC) | cut -d " " -f1` ; \
fi
@echo " "
@echo "C compiler for the model source code:"
@echo which CC
@which `echo $(CC) | cut -d " " -f1`
@echo " "
@echo "============================================================================================== "
@echo " "
@if [ "$(A2DCASE)" -a "$(DMPARALLEL)" ] ; then \
echo "------------------------------------------------------------------------------" ; \
echo "WRF CONFIGURATION ERROR " ; \
echo "The $(A2DCASE) case requires a build for only single domain. " ; \
echo "The $(A2DCASE) case cannot be used on distributed memory parallel systems. " ; \
echo "Only 3D WRF cases will run with the options that you selected. " ; \
echo "Please choose a different case, or rerun configure and choose a different set of options." ; \
echo "------------------------------------------------------------------------------" ; \
exit 2 ; \
fi
framework_only : configcheck
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" ext
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" toolsdir
/bin/rm -f main/libwrflib.a main/libwrflib.lib
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" framework
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" shared
wrf : framework_only
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" physics
if [ $(WRF_CHEM) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" chemics ; fi
if [ $(WRF_SMOKE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" smoke_opt ; fi
if [ $(WRF_EM_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" em_core ; fi
if [ $(WRF_NMM_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" nmm_core ; fi
if [ $(WRF_EXP_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" exp_core ; fi
if [ $(WRF_HYDRO) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" wrf_hydro ; fi
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em em_wrf )
( cd run ; /bin/rm -f wrf.exe ; ln -s ../main/wrf.exe . )
if [ $(ESMF_COUPLING) -eq 1 ] ; then \
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em em_wrf_SST_ESMF ) ; \
fi
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
all_wrfvar :
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" ext
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" toolsdir
if [ $(CRTM) -ne 0 ] ; then \
(cd var/external/crtm_2.2.3; $(MAKE) $(J)) ; \
fi
if [ $(BUFR) ] ; then \
(cd var/external/bufr; \
$(MAKE) $(J) FC="$(SFC)" CC="$(SCC)" CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" FFLAGS="$(FCOPTIM) $(FORMAT_FIXED)" RANLIB="$(RANLIB)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" ) ; \
fi
### Use 'make' to avoid '-i -r' above:
if [ $(WAVELET) ] ; then \
( cd var/external/wavelet; \
make CC="$(SC99) -DNOUNDERSCORE" RM="$(RM)" libWavelet.a; \
make FC="$(FC)" RM="$(RM)" lib_wavelet.a ) ; \
fi
# ( cd var/build; touch depend.txt; make links; make depend; $(MAKE) $(J) all_wrfvar )
( cd var/build; make depend; $(MAKE) $(J) all_wrfvar )
( cd var/obsproc; $(MAKE) $(J) BUFR_CPP="$(BUFR_CPP)" )
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
gen_be :
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" ext
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" toolsdir
( cd var/build; make depend; $(MAKE) $(J) gen_be )
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
### 3.a. rules to build the framework and then the experimental core
exp_wrf : configcheck
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" ext
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" toolsdir
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" framework
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" shared
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=exp exp_wrf )
nmm_wrf : wrf
# Eulerian mass coordinate initializations
em_fire : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=fire em_ideal )
( cd test/em_fire ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_fire ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_fire ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_fire ; /bin/sh create_links.sh )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_fire/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_fire/input_sounding . )
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
em_quarter_ss : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=quarter_ss em_ideal )
( cd test/em_quarter_ss ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_quarter_ss ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_quarter_ss ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_quarter_ss ; /bin/rm -f bulkdens.asc_s_0_03_0_9 ; ln -s ../../run/bulkdens.asc_s_0_03_0_9 . )
( cd test/em_quarter_ss ; /bin/rm -f bulkradii.asc_s_0_03_0_9 ; ln -s ../../run/bulkradii.asc_s_0_03_0_9 . )
( cd test/em_quarter_ss ; /bin/rm -f capacity.asc ; ln -s ../../run/capacity.asc . )
( cd test/em_quarter_ss ; /bin/rm -f coeff_p.asc ; ln -s ../../run/coeff_p.asc . )
( cd test/em_quarter_ss ; /bin/rm -f coeff_q.asc ; ln -s ../../run/coeff_q.asc . )
( cd test/em_quarter_ss ; /bin/rm -f constants.asc ; ln -s ../../run/constants.asc . )
( cd test/em_quarter_ss ; /bin/rm -f kernels.asc_s_0_03_0_9 ; ln -s ../../run/kernels.asc_s_0_03_0_9 . )
( cd test/em_quarter_ss ; /bin/rm -f kernels_z.asc ; ln -s ../../run/kernels_z.asc . )
( cd test/em_quarter_ss ; /bin/rm -f masses.asc ; ln -s ../../run/masses.asc . )
( cd test/em_quarter_ss ; /bin/rm -f termvels.asc ; ln -s ../../run/termvels.asc . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_quarter_ss/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_quarter_ss/input_sounding . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_squall2d_x : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=squall2d_x em_ideal )
( cd test/em_squall2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_squall2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_squall2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_squall2d_x/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_squall2d_x/input_sounding . )
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_squall2d_y : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=squall2d_y em_ideal )
( cd test/em_squall2d_y ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_squall2d_y ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_squall2d_y ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_squall2d_y/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_squall2d_y/input_sounding . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_b_wave : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=b_wave em_ideal )
( cd test/em_b_wave ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_b_wave ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_b_wave ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_b_wave/namelist.input . )
( cd run ; /bin/rm -f input_jet ; ln -s ../test/em_b_wave/input_jet . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_les : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=les em_ideal )
( cd test/em_les ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_les ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_les ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_les/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_les/input_sounding . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_seabreeze2d_x : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=seabreeze2d_x em_ideal )
( cd test/em_seabreeze2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_seabreeze2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_seabreeze2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_seabreeze2d_x/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_seabreeze2d_x/input_sounding . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_convrad : wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=convrad em_ideal )
( cd test/em_convrad ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_convrad ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_convrad ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_convrad/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_convrad/input_sounding . )
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
em_tropical_cyclone : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=tropical_cyclone em_ideal )
( cd test/em_tropical_cyclone ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_tropical_cyclone ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_tropical_cyclone ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_tropical_cyclone/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_tropical_cyclone/input_sounding . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_scm_xy : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=scm_xy em_ideal )
( cd test/em_scm_xy ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_scm_xy ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_scm_xy ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_scm_xy/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_scm_xy/input_sounding . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
convert_em : framework_only
if [ $(WRF_CONVERT) -eq 1 ] ; then \
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" convert_em ) ; \
fi
# Link wrf.exe and wrf_SST_ESMF.exe into
# test/em_esmf_exp when ESMF_COUPLING is set. wrf.exe
# can be used for stand-alone testing in this case.
# wrf_SST_ESMF.exe is a coupled application. Note that make
# target $(SOLVER)_wrf_SST_ESMF builds wrf_SST_ESMF.exe.
em_real : wrf
@/bin/rm -f real.exe > /dev/null 2>&1
@/bin/rm -f tc.exe > /dev/null 2>&1
@/bin/rm -f ndown.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real em_real )
( cd test/em_real ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
if [ $(ESMF_COUPLING) -eq 1 ] ; then \
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real em_wrf_SST_ESMF ) ; \
( cd test/em_esmf_exp ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f wrf_SST_ESMF.exe ; ln -s ../../main/wrf_SST_ESMF.exe . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f real.exe ; ln -s ../../main/real.exe . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f ETAMPNEW_DATA.expanded_rain ETAMPNEW_DATA RRTM_DATA RRTMG_LW_DATA RRTMG_SW_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA . ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain . ; \
ln -sf ../../run/RRTM_DATA . ; \
ln -sf ../../run/RRTMG_LW_DATA . ; \
ln -sf ../../run/RRTMG_SW_DATA . ; \
ln -sf ../../run/CAM_ABS_DATA . ; \
ln -sf ../../run/CAM_AEROPT_DATA . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP4.5 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP6 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 CAMtr_volume_mixing_ratio ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A1B . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A2 . ; \
ln -sf ../../run/CLM_ALB_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_ALB_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_ASM_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_ASM_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_DRDSDT0_DATA . ; \
ln -sf ../../run/CLM_EXT_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_EXT_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_KAPPA_DATA . ; \
ln -sf ../../run/CLM_TAU_DATA . ; \
ln -sf ../../run/ozone.formatted . ; \
ln -sf ../../run/ozone_lat.formatted . ; \
ln -sf ../../run/ozone_plev.formatted . ; \
ln -sf ../../run/aerosol.formatted . ; \
ln -sf ../../run/aerosol_lat.formatted . ; \
ln -sf ../../run/aerosol_lon.formatted . ; \
ln -sf ../../run/aerosol_plev.formatted . ; \
ln -sf ../../run/CCN_ACTIVATE.BIN . ; \
ln -sf ../../run/p3_lookup_table_1.dat . ; \
if [ $(RWORDSIZE) -eq 8 ] ; then \
ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain_DBL ETAMPNEW_DATA.expanded_rain ; \
ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
ln -sf ../../run/RRTMG_LW_DATA_DBL RRTMG_LW_DATA ; \
ln -sf ../../run/RRTMG_SW_DATA_DBL RRTMG_SW_DATA ; \
fi ) ; \
( cd test/em_esmf_exp ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f URBPARM.TBL ; ln -s ../../run/URBPARM.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f MPTABLE.TBL ; ln -s ../../run/MPTABLE.TBL . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . ) ; \
( cd test/em_esmf_exp ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . ) ; \
fi
( cd test/em_real ; /bin/rm -f real.exe ; ln -s ../../main/real.exe . )
( cd test/em_real ; /bin/rm -f tc.exe ; ln -s ../../main/tc.exe . )
( cd test/em_real ; /bin/rm -f ndown.exe ; ln -s ../../main/ndown.exe . )
#TEMPORARILY REMOVED ( cd test/em_real ; /bin/rm -f nup.exe ; ln -s ../../main/nup.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/em_real ; /bin/rm -f ETAMPNEW_DATA.expanded_rain ETAMPNEW_DATA RRTM_DATA RRTMG_LW_DATA RRTMG_SW_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA . ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain . ; \
ln -sf ../../run/RRTM_DATA . ; \
ln -sf ../../run/RRTMG_LW_DATA . ; \
ln -sf ../../run/RRTMG_SW_DATA . ; \
ln -sf ../../run/CAM_ABS_DATA . ; \
ln -sf ../../run/CAM_AEROPT_DATA . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP4.5 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP6 . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.RCP8.5 CAMtr_volume_mixing_ratio ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A1B . ; \
ln -sf ../../run/CAMtr_volume_mixing_ratio.A2 . ; \
ln -sf ../../run/CLM_ALB_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_ALB_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_ASM_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_ASM_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_DRDSDT0_DATA . ; \
ln -sf ../../run/CLM_EXT_ICE_DFS_DATA . ; \
ln -sf ../../run/CLM_EXT_ICE_DRC_DATA . ; \
ln -sf ../../run/CLM_KAPPA_DATA . ; \
ln -sf ../../run/CLM_TAU_DATA . ; \
ln -sf ../../run/ozone.formatted . ; \
ln -sf ../../run/ozone_lat.formatted . ; \
ln -sf ../../run/ozone_plev.formatted . ; \
ln -sf ../../run/aerosol.formatted . ; \
ln -sf ../../run/aerosol_lat.formatted . ; \
ln -sf ../../run/aerosol_lon.formatted . ; \
ln -sf ../../run/aerosol_plev.formatted . ; \
ln -sf ../../run/capacity.asc . ; \
ln -sf ../../run/coeff_p.asc . ; \
ln -sf ../../run/coeff_q.asc . ; \
ln -sf ../../run/constants.asc . ; \
ln -sf ../../run/masses.asc . ; \
ln -sf ../../run/termvels.asc . ; \
ln -sf ../../run/kernels.asc_s_0_03_0_9 . ; \
ln -sf ../../run/kernels_z.asc . ; \
ln -sf ../../run/bulkdens.asc_s_0_03_0_9 . ; \
ln -sf ../../run/bulkradii.asc_s_0_03_0_9 . ; \
ln -sf ../../run/CCN_ACTIVATE.BIN . ; \
ln -sf ../../run/p3_lookup_table_1.dat . ; \
if [ $(RWORDSIZE) -eq 8 ] ; then \
ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain_DBL ETAMPNEW_DATA.expanded_rain ; \
ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
ln -sf ../../run/RRTMG_LW_DATA_DBL RRTMG_LW_DATA ; \
ln -sf ../../run/RRTMG_SW_DATA_DBL RRTMG_SW_DATA ; \
fi )
( cd test/em_real ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . )
( cd test/em_real ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . )
( cd test/em_real ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . )
( cd test/em_real ; /bin/rm -f URBPARM.TBL ; ln -s ../../run/URBPARM.TBL . )
( cd test/em_real ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . )
( cd test/em_real ; /bin/rm -f MPTABLE.TBL ; ln -s ../../run/MPTABLE.TBL . )
( cd test/em_real ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . )
( cd test/em_real ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . )
( cd test/em_real ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . )
( cd test/em_real ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/em_real ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd run ; /bin/rm -f real.exe ; ln -s ../main/real.exe . )
( cd run ; /bin/rm -f tc.exe ; ln -s ../main/tc.exe . )
( cd run ; /bin/rm -f ndown.exe ; ln -s ../main/ndown.exe . )
#TEMPORARILY REMOVED ( cd run ; /bin/rm -f nup.exe ; ln -s ../main/nup.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/real.exe -a -e main/ndown.exe -a -e main/tc.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_hill2d_x : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=hill2d_x em_ideal )
( cd test/em_hill2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_hill2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_hill2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_hill2d_x/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_hill2d_x/input_sounding . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_grav2d_x : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=grav2d_x em_ideal )
( cd test/em_grav2d_x ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_grav2d_x ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_grav2d_x ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_grav2d_x/namelist.input . )
( cd run ; /bin/rm -f input_sounding ; ln -s ../test/em_grav2d_x/input_sounding . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
em_heldsuarez : wrf
@/bin/rm -f ideal.exe > /dev/null 2>&1
@/bin/rm -f wrf.exe > /dev/null 2>&1
@ echo '--------------------------------------'
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=heldsuarez em_ideal )
( cd test/em_heldsuarez ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/em_heldsuarez ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/em_heldsuarez ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_heldsuarez/namelist.input . )
@echo " "
@echo "=========================================================================="
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
@if test -e main/wrf.exe -a -e main/ideal.exe ; then \
echo " " ; \
echo "---> Executables successfully built <---" ; \
echo " " ; \
ls -l main/*.exe ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
else \
echo " " ; \
echo "---> Problems building executables, look for errors in the build log <---" ; \
echo " " ; \
echo "==========================================================================" ; \
echo " " ; \
fi
#### anthropogenic emissions converter
emi_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_emiss )
( cd test/em_real ; /bin/rm -f convert_emiss.exe ; ln -s ../../chem/convert_emiss.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . )
#### emissions opt 3 converter
opt3_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_fireemiss )
( cd test/em_real ; /bin/rm -f convert_fireemiss.exe ; ln -s ../../chem/convert_fireemiss.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . )
#### biogenic emissions converter
bio_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_bioemiss )
( cd test/em_real ; /bin/rm -f convert_bioemiss.exe ; ln -s ../../chem/convert_bioemiss.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . )
bioemiss_conv_megan2 : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_bioemiss_megan2 )
( cd test/em_real ; /bin/rm -f convert_bioemiss_megan2.exe ; ln -s ../../chem/convert_bioemiss_megan2.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . )
#### DMS emissions converter
dms_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_dms )
( cd test/em_real ; /bin/rm -f convert_dms.exe ; ln -s ../../chem/convert_dms.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . )
#### Dust errosion factor emissions converter
dust_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_dust )
( cd test/em_real ; /bin/rm -f convert_dust.exe ; ln -s ../../chem/convert_dust.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . )
#### GOCART background state for oh, no3 and h2o2 converter
gocart_conv : wrf
@ echo '--------------------------------------'
( cd chem ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=em IDEAL_CASE=real convert_gocart )
( cd test/em_real ; /bin/rm -f convert_gocart.exe ; ln -s ../../chem/convert_gocart.exe . )
( cd test/em_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . )
#### nmm converter
### Idealized NMM tropical cyclone case
nmm_tropical_cyclone : nmm_wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=nmm IDEAL_CASE=tropical_cyclone nmm_ideal )
( cd test/nmm_tropical_cyclone ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/nmm_tropical_cyclone ; /bin/rm -f ideal.exe ; ln -s ../../main/ideal.exe . )
( cd test/nmm_tropical_cyclone ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/nmm_tropical_cyclone/namelist.input . )
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`
nmm_real : nmm_wrf
@ echo '--------------------------------------'
( cd main ; $(MAKE) MODULE_DIRS="$(ALL_MODULES)" SOLVER=nmm IDEAL_CASE=real real_nmm )
( cd test/nmm_real ; /bin/rm -f wrf.exe ; ln -s ../../main/wrf.exe . )
( cd test/nmm_real ; /bin/rm -f real_nmm.exe ; ln -s ../../main/real_nmm.exe . )
( cd test/nmm_real ; /bin/rm -f README.namelist ; ln -s ../../run/README.namelist . )
( cd test/nmm_real ; /bin/rm -f ETAMPNEW_DATA.expanded_rain ETAMPNEW_DATA RRTM_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA . ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain . ; \
ln -sf ../../run/RRTM_DATA . ; \
if [ $(RWORDSIZE) -eq 8 ] ; then \
ln -sf ../../run/ETAMPNEW_DATA_DBL ETAMPNEW_DATA ; \
ln -sf ../../run/ETAMPNEW_DATA.expanded_rain_DBL ETAMPNEW_DATA.expanded_rain ; \
ln -sf ../../run/RRTM_DATA_DBL RRTM_DATA ; \
fi )
( cd test/nmm_real ; /bin/rm -f GENPARM.TBL ; ln -s ../../run/GENPARM.TBL . )
( cd test/nmm_real ; /bin/rm -f LANDUSE.TBL ; ln -s ../../run/LANDUSE.TBL . )
( cd test/nmm_real ; /bin/rm -f SOILPARM.TBL ; ln -s ../../run/SOILPARM.TBL . )
( cd test/nmm_real ; /bin/rm -f VEGPARM.TBL ; ln -s ../../run/VEGPARM.TBL . )
( cd test/nmm_real ; /bin/rm -f MPTABLE.TBL ; ln -s ../../run/MPTABLE.TBL . )
( cd test/nmm_real ; /bin/rm -f tr49t67 ; ln -s ../../run/tr49t67 . )
( cd test/nmm_real ; /bin/rm -f tr49t85 ; ln -s ../../run/tr49t85 . )
( cd test/nmm_real ; /bin/rm -f tr67t85 ; ln -s ../../run/tr67t85 . )
( cd test/nmm_real ; /bin/rm -f gribmap.txt ; ln -s ../../run/gribmap.txt . )
( cd test/nmm_real ; /bin/rm -f grib2map.tbl ; ln -s ../../run/grib2map.tbl . )
( cd test/nmm_real ; /bin/rm -f co2_trans ; ln -s ../../run/co2_trans . )
( cd run ; /bin/rm -f real_nmm.exe ; ln -s ../main/real_nmm.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
/bin/rm -f namelist.input ; cp ../test/nmm_real/namelist.input . )
# semi-Lagrangian initializations
io :
@ echo '--------------------------------------'
( cd tools ; $(MAKE) standard.exe )
( $(MAKE) io_only )
( $(MAKE) MODULE_DIRS="$(ALL_MODULES)" toolsdir )
( cd frame ; $(MAKE) module_driver_constants.o pack_utils.o module_machine.o module_internal_header_util.o wrf_debug.o )
( cd frame ; $(AR) $(ARFLAGS) ../main/libwrflib.a module_driver_constants.o pack_utils.o module_machine.o \
module_internal_header_util.o module_wrf_error.o wrf_debug.o )
ext :
@ echo '--------------------------------------'
( cd frame ; $(MAKE) externals )
framework :
@ echo '--------------------------------------'
( cd frame ; $(MAKE) $(J) framework; \
cd ../external/io_netcdf ; \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" \
FC="$(FC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf; \
cd ../io_netcdf ; \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" \
FC="$(SFC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR"; \
cd ../io_pio ; \
echo SKIPPING PIO BUILD $(MAKE) NETCDFPATH="$(PNETCDFPATH)" \
FC="$(SFC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR"; \
cd ../io_int ; \
$(MAKE) SFC="$(SFC) $(FCBASEOPTS)" \
FC="$(SFC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" \
RANLIB="$(RANLIB)" CPP="$(CPP) $(ARCH_LOCAL)" DM_FC="$(DM_FC) $(FCBASEOPTS)"\
TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf ; \
cd ../../frame )
shared :
@ echo '--------------------------------------'
if [ "`echo $(J) | sed -e 's/-j//g' -e 's/ \+//g'`" -gt "6" ] ; then \
( cd share ; $(MAKE) -j 6 ) ; \
else \
( cd share ; $(MAKE) $(J) ) ; \
fi
wrf_hydro :
@ echo '----------wrf_hydro-----------------------'
if [ $(WRF_HYDRO) -eq 1 ] ; then (cd hydro/CPL/WRF_cpl; make -f Makefile.cpl) ; fi
chemics :
@ echo '--------------------------------------'
if [ $(WRF_KPP) -eq 1 ] ; then ( cd chem ; $(MAKE) ) ; fi
if [ $(WRF_KPP) -eq 0 ] ; then \
if [ "`echo $(J) | sed -e 's/-j//g' -e 's/ \+//g'`" -gt "16" ] ; then \
( cd chem ; $(MAKE) -j 16 ) ; \
else \
( cd chem ; $(MAKE) $(J) ) ; \
fi \
fi
# ( cd chem ; $(MAKE) )
# ( cd chem ; $(MAKE) $(J) )
smoke_opt :
@ echo '------Smoke code is being compiled----'
if [ $(WRF_SMOKE) -eq 1 ] ; then ( cd smoke ; $(MAKE) ) ; fi
physics :
@ echo '--------------------------------------'
if [ $(WRF_CHEM) -eq 0 ] ; then \
( cd phys ; $(MAKE) CF2=" " ) ; \
else \
( cd phys ; $(MAKE) CF2="$(CHEM_FILES2)" ) ; \
fi
em_core :
@ echo '--------------------------------------'
if [ $(WRF_CHEM) -eq 0 ] ; then \
CF= ; \
else \
CF="$(CHEM_FILES)" ; \
fi
( cd dyn_em ; $(MAKE) $(J) CF="$(CF)" )
# rule used by configure to test if this will compile with MPI 2 calls MPI_Comm_f2c and _c2f
mpi2_test :
@ cd tools ; /bin/rm -f mpi2_test ; $(CC) -c mpi2_test.c ; cd ..
# rule used by configure to test if this will compile with MPI 2 calls MPI_Init_thread
mpi2_thread_test :
@ cd tools ; /bin/rm -f mpi2_thread_test ; $(CC) -c mpi2_thread_test.c ; cd ..
# rule used by configure to test if fseeko and fseeko64 are supported (for share/landread.c to work right)
fseek_test :
@ cd tools ; /bin/rm -f fseeko_test ; $(SCC) -DTEST_FSEEKO -o fseeko_test fseek_test.c ; cd ..
@ cd tools ; /bin/rm -f fseeko64_test ; $(SCC) -DTEST_FSEEKO64 -o fseeko64_test fseek_test.c ; cd ..
# rule used by configure to test if this will compile with netcdf4
nc4_test:
@cd tools ; /bin/rm -f nc4_test.{exe,nc,o} ; $(SCC) -o nc4_test.exe nc4_test.c -I$(NETCDF)/include -L$(NETCDF)/lib -lnetcdf $(NETCDF4_DEP_LIB) ; cd ..
# rule used by configure to test if Fortran 2003 IEEE signaling is available
fortran_2003_ieee_test:
@cd tools ; /bin/rm -f fortran_2003_ieee_test.{exe,o} ; $(SFC) -o fortran_2003_ieee_test.exe fortran_2003_ieee_test.F ; cd ..
# rule used by configure to test if Fortran 2003 ISO_C support is available
fortran_2003_iso_c_test:
@cd tools ; /bin/rm -f fortran_2003_iso_c_test.{exe,o} ; $(SFC) -o fortran_2003_iso_c_test.exe fortran_2003_iso_c_test.F ; cd ..
# rule used by configure to test if Fortran 2003 FLUSH intrinsic subroutine support is available
fortran_2003_flush_test:
@cd tools ; /bin/rm -f fortran_2003_flush_test.{exe,o} ; $(SFC) -o fortran_2003_flush_test.exe fortran_2003_flush_test.F ; cd ..
# rule used by configure to test if Fortran 2003 FLUSH intrinsic subroutine is replaced by FFLUSH (thanks xlf)
fortran_2003_fflush_test:
@cd tools ; /bin/rm -f fortran_2003_fflush_test.{exe,o} ; $(SFC) -o fortran_2003_fflush_test.exe fortran_2003_fflush_test.F ; cd ..
### 3.b. sub-rule to build the experimental core
# uncomment the two lines after exp_core for EXP
exp_core :
@ echo '--------------------------------------'
( cd dyn_exp ; $(MAKE) )
# uncomment the two lines after nmm_core for NMM
nmm_core :
@ echo '--------------------------------------'
if [ "`echo $(J) | sed -e 's/-j//g' -e 's/ \+//g'`" -gt "16" ] ; then \
( cd dyn_nmm ; $(MAKE) -j 16 ) ; \
else \
( cd dyn_nmm ; $(MAKE) $(J) ) ; \
fi
toolsdir :
@ echo '--------------------------------------'
( cd tools ; $(MAKE) CC_TOOLS_CFLAGS="$(CC_TOOLS_CFLAGS)" CC_TOOLS="$(CC_TOOLS) -DIWORDSIZE=$(IWORDSIZE) -DMAX_HISTORY=$(MAX_HISTORY)" )
# ( cd tools ; $(MAKE) CC_TOOLS="$(CC_TOOLS) -DIO_MASK_SIZE=$(IO_MASK_SIZE)" )
# Use this target to build stand-alone tests of esmf_time_f90.
# Only touches external/esmf_time_f90/.