1 | INPUT = ecrad_meridian |
---|
2 | |
---|
3 | #DRIVER = totalview ../../bin/ecrad -a |
---|
4 | DRIVER = ../../bin/ecrad |
---|
5 | IFS_DRIVER = ../../bin/ecrad_ifs |
---|
6 | IFS_DRIVER_BLOCKED = ../../bin/ecrad_ifs_blocked |
---|
7 | CHANGENAM = ../common/change_namelist.sh |
---|
8 | |
---|
9 | # Various configuration files corresponding to cycles of ECMWF's |
---|
10 | # Integrated Forecasting System (IFS) |
---|
11 | #CONFIG = configCY43R3.nam |
---|
12 | #CONFIG = configCY46R1.nam |
---|
13 | #CONFIG = configCY47R1.nam |
---|
14 | #CONFIG = configCY47R3.nam |
---|
15 | CONFIG = configCY49R1.nam |
---|
16 | CONFIG_ECCKD = configCY49R1_ecckd.nam |
---|
17 | |
---|
18 | # Typing "make" will run radiation scheme on IFS profiles |
---|
19 | all: test |
---|
20 | |
---|
21 | test: test_orig test_ecckd |
---|
22 | |
---|
23 | # Tests of CY47R1 configuration with RRTMG gas optics model and |
---|
24 | # various solvers |
---|
25 | test_orig: test_default test_noaer test_expexp test_vec test_tripleclouds test_spartacus \ |
---|
26 | test_spartacus_maxentr |
---|
27 | |
---|
28 | # Tests of ecCKD gas optics model and various solvers |
---|
29 | test_ecckd: test_ecckd_mcica test_ecckd_tc test_ecckd_tc_noaer test_ecckd_spartacus |
---|
30 | |
---|
31 | # Default IFS settings: McICA solver with exponential-exponential |
---|
32 | # overlap |
---|
33 | test_default: |
---|
34 | $(DRIVER) $(CONFIG) $(INPUT).nc $(INPUT)_default_out.nc |
---|
35 | |
---|
36 | test_ifsdriver: |
---|
37 | $(CHANGENAM) $(CONFIG) config_net.nam do_save_net_fluxes=true do_write_double_precision=true \ |
---|
38 | sw_solver_name='"Tripleclouds"' lw_solver_name='"Tripleclouds"' |
---|
39 | $(IFS_DRIVER) config_net.nam $(INPUT).nc $(INPUT)_ifsdriver_out.nc | tee $(INPUT)_ifsdriver_out.log |
---|
40 | $(DRIVER) config_net.nam $(INPUT).nc $(INPUT)_net_out.nc | tee $(INPUT)_net_out.log |
---|
41 | |
---|
42 | test_ifsdriver_blocked: |
---|
43 | $(CHANGENAM) $(CONFIG) config_net.nam do_save_net_fluxes=true do_write_double_precision=true \ |
---|
44 | sw_solver_name='"Tripleclouds"' lw_solver_name='"Tripleclouds"' |
---|
45 | $(IFS_DRIVER_BLOCKED) config_net.nam $(INPUT).nc $(INPUT)_ifsdriver_blocked_out.nc | tee $(INPUT)_ifsdriver_blocked_out.log |
---|
46 | $(DRIVER) config_net.nam $(INPUT).nc $(INPUT)_net_out.nc | tee $(INPUT)_net_out.log |
---|
47 | |
---|
48 | # Turn off aerosols |
---|
49 | test_noaer: |
---|
50 | $(CHANGENAM) $(CONFIG) config_noaer.nam \ |
---|
51 | use_aerosols=false |
---|
52 | $(DRIVER) config_noaer.nam $(INPUT).nc $(INPUT)_noaer_out.nc |
---|
53 | |
---|
54 | # Older exponential-exponential overlap |
---|
55 | test_expexp: |
---|
56 | $(CHANGENAM) $(CONFIG) config_expexp.nam \ |
---|
57 | overlap_scheme_name='"Exp-Exp"' |
---|
58 | $(DRIVER) config_expexp.nam $(INPUT).nc $(INPUT)_expexp_out.nc |
---|
59 | |
---|
60 | # Tripleclouds solver with exponential-random overlap |
---|
61 | test_tripleclouds: |
---|
62 | $(CHANGENAM) $(CONFIG) config_tc.nam \ |
---|
63 | sw_solver_name='"Tripleclouds"' lw_solver_name='"Tripleclouds"' |
---|
64 | $(DRIVER) config_tc.nam $(INPUT).nc $(INPUT)_tc_out.nc |
---|
65 | |
---|
66 | # Longwave scattering; since 46R1 this is the default |
---|
67 | test_lwscat: |
---|
68 | $(CHANGENAM) $(CONFIG) config_lwscat.nam \ |
---|
69 | do_lw_cloud_scattering="true" |
---|
70 | $(DRIVER) config_lwscat.nam $(INPUT).nc $(INPUT)_lwscat_out.nc |
---|
71 | |
---|
72 | # 3D radiative transfer |
---|
73 | test_spartacus: |
---|
74 | $(CHANGENAM) $(CONFIG) config_spartacus.nam \ |
---|
75 | sw_solver_name='"SPARTACUS"' lw_solver_name='"SPARTACUS"' \ |
---|
76 | do_3d_effects="true" \ |
---|
77 | do_sw_delta_scaling_with_gases="false" |
---|
78 | $(DRIVER) config_spartacus.nam $(INPUT).nc $(INPUT)_spartacus_out.nc |
---|
79 | |
---|
80 | # 3D radiative transfer using the older "maximum entrapment" |
---|
81 | test_spartacus_maxentr: |
---|
82 | $(CHANGENAM) $(CONFIG) config_spartacus_maxentr.nam \ |
---|
83 | sw_solver_name='"SPARTACUS"' lw_solver_name='"SPARTACUS"' \ |
---|
84 | do_3d_effects="true" \ |
---|
85 | sw_entrapment_name='"Maximum"' \ |
---|
86 | do_sw_delta_scaling_with_gases="false" |
---|
87 | $(DRIVER) config_spartacus_maxentr.nam $(INPUT).nc $(INPUT)_spartacus_maxentr_out.nc |
---|
88 | |
---|
89 | # "Cloudless" solver |
---|
90 | test_cloudless: |
---|
91 | $(CHANGENAM) $(CONFIG) config_cloudless.nam \ |
---|
92 | use_aerosols=false \ |
---|
93 | sw_solver_name='"Cloudless"' lw_solver_name='"Cloudless"' |
---|
94 | $(DRIVER) config_cloudless.nam $(INPUT).nc $(INPUT)_cloudless_out.nc |
---|
95 | |
---|
96 | # Exponential-random overlap with "vectorizable" cloud generator |
---|
97 | test_vec: |
---|
98 | $(CHANGENAM) $(CONFIG) config_vec.nam use_vectorizable_generator=true |
---|
99 | $(DRIVER) config_vec.nam $(INPUT).nc $(INPUT)_vec_out.nc |
---|
100 | |
---|
101 | |
---|
102 | ### The following targets use the $CONFIG_ECCKD configuration file ### |
---|
103 | |
---|
104 | # ecCKD gas optics scheme (note that default solver is Tripleclouds) |
---|
105 | test_ecckd_mcica: |
---|
106 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_mcica.nam \ |
---|
107 | sw_solver_name='"McICA"' lw_solver_name='"McICA"' |
---|
108 | $(DRIVER) config_ecckd_mcica.nam $(INPUT).nc $(INPUT)_ecckd_mcica_out.nc |
---|
109 | |
---|
110 | # ecCKD with Tripleclouds solver (default) |
---|
111 | test_ecckd_tc: |
---|
112 | $(DRIVER) $(CONFIG_ECCKD) $(INPUT).nc $(INPUT)_ecckd_tc_out.nc |
---|
113 | |
---|
114 | # ecCKD with no aerosols |
---|
115 | test_ecckd_noaer: |
---|
116 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_noaer.nam \ |
---|
117 | use_aerosols=false |
---|
118 | $(DRIVER) config_ecckd_noaer.nam $(INPUT).nc $(INPUT)_ecckd_noaer_out.nc |
---|
119 | |
---|
120 | # Test the different ways that aerosol optical properties can be |
---|
121 | # averaged, outputing the aerosol properties in each gas-optics |
---|
122 | # spectral interval, producing the following: |
---|
123 | # aerosol_optics_rrtmg.nc: RRTMG gas optics, aerosol properties from band-wise file |
---|
124 | # aerosol_optics_ecckd.nc: ecCKD gas optics, aerosol properties from high-res file |
---|
125 | # aerosol_optics_rrtmg.nc: RRTMG gas optics, aerosol properties from high-res file |
---|
126 | # aerosol_optics_ecckd.nc: ecCKD gas optics, aerosol properties from band-wise file |
---|
127 | test_aerosol_averaging: |
---|
128 | $(CHANGENAM) $(CONFIG) config_rrtmg_saveaer.nam \ |
---|
129 | do_save_aerosol_optics=true |
---|
130 | $(DRIVER) config_rrtmg_saveaer.nam $(INPUT).nc $(INPUT)_rrtmg_saveaer_out.nc |
---|
131 | mv aerosol_optics.nc aerosol_optics_rrtmg.nc |
---|
132 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_saveaer.nam \ |
---|
133 | do_save_aerosol_optics=true |
---|
134 | $(DRIVER) config_ecckd_saveaer.nam $(INPUT).nc $(INPUT)_ecckd_saveaer_out.nc |
---|
135 | mv aerosol_optics.nc aerosol_optics_ecckd.nc |
---|
136 | $(CHANGENAM) $(CONFIG) config_rrtmg_gen_saveaer.nam \ |
---|
137 | do_save_aerosol_optics=true use_general_aerosol_optics=true \ |
---|
138 | aerosol_optics_override_file_name="'aerosol_ifs_48R1.nc'" |
---|
139 | $(DRIVER) config_rrtmg_gen_saveaer.nam $(INPUT).nc $(INPUT)_rrtmg_gen_saveaer_out.nc |
---|
140 | mv aerosol_optics.nc aerosol_optics_rrtmg_gen.nc |
---|
141 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_band_saveaer.nam \ |
---|
142 | do_save_aerosol_optics=true \ |
---|
143 | aerosol_optics_override_file_name="'aerosol_ifs_rrtm_46R1_with_NI_AM.nc'" |
---|
144 | $(DRIVER) config_ecckd_band_saveaer.nam $(INPUT).nc $(INPUT)_ecckd_band_saveaer_out.nc |
---|
145 | mv aerosol_optics.nc aerosol_optics_ecckd_band.nc |
---|
146 | |
---|
147 | # ecCKD gas optics with SPARTACUS solver (not currently correct) |
---|
148 | test_ecckd_spartacus: |
---|
149 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_spartacus.nam \ |
---|
150 | sw_solver_name='"SPARTACUS"' lw_solver_name='"SPARTACUS"' \ |
---|
151 | do_3d_effects="true" |
---|
152 | $(DRIVER) config_ecckd_spartacus.nam $(INPUT).nc $(INPUT)_ecckd_spartacus_out.nc |
---|
153 | |
---|
154 | # ecCKD gas optics with no aerosol |
---|
155 | test_ecckd_tc_noaer: |
---|
156 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_tc_noaer.nam \ |
---|
157 | use_aerosols=false |
---|
158 | $(DRIVER) config_ecckd_tc_noaer.nam $(INPUT).nc $(INPUT)_ecckd_tc_noaer_out.nc |
---|
159 | |
---|
160 | # Profiling |
---|
161 | TAG = default |
---|
162 | profile: |
---|
163 | mkdir -p profiling_$(TAG) |
---|
164 | $(CHANGENAM) $(CONFIG) config_profile.nam \ |
---|
165 | nrepeat=100 do_save_spectral_flux=false |
---|
166 | DR_HOOK=1 DR_HOOK_OPT=prof DR_HOOK_PROFILE=profiling_$(TAG)/$(INPUT)_default_prof_out.drhook \ |
---|
167 | $(DRIVER) config_profile.nam $(INPUT).nc $(INPUT)_default_prof_out.nc \ |
---|
168 | | tee $(INPUT)_default_prof_out.log |
---|
169 | if [[ -f gmon.out ]]; then gprof $(DRIVER) gmon.out > profiling_$(TAG)/$(INPUT)_default_prof_out.gprof; fi |
---|
170 | $(CHANGENAM) $(CONFIG_ECCKD) config_profile.nam \ |
---|
171 | nrepeat=100 do_save_spectral_flux=false do_save_radiative_properties=false |
---|
172 | DR_HOOK=1 DR_HOOK_OPT=prof DR_HOOK_PROFILE=profiling_$(TAG)/$(INPUT)_ecckd_tc_prof_out.drhook \ |
---|
173 | $(DRIVER) config_profile.nam $(INPUT).nc $(INPUT)_ecckd_tc_prof_out.nc \ |
---|
174 | | tee $(INPUT)_ecckd_tc_prof_out.log |
---|
175 | if [[ -f gmon.out ]]; then gprof $(DRIVER) gmon.out > $(INPUT)_ecckd_tc_prof_out.gprof; fi |
---|
176 | |
---|
177 | mv $(INPUT)_*_prof_out.* profiling_$(TAG) |
---|
178 | |
---|
179 | # ecCKD gas optics with spectral diagnostics every 25nm in the visible |
---|
180 | # written to a separate file; do this both with the 32- and 96-gpoint |
---|
181 | # models (which have 100nm and 25nm resolution in the visible, |
---|
182 | # respectively). |
---|
183 | DIAGBOUNDS="sw_diag_wavelength_bound=.2e-6,.225e-6,.25e-6,.275e-6,.3e-6,.325e-6,.35e-6,.375e-6,.4e-6,.425e-6,.45e-6,.475e-6,.5e-6,.525e-6,.55e-6,.575e-6,.6e-6,.625e-6,.65e-6,.675e-6,.7e-6" |
---|
184 | test_diag: |
---|
185 | $(CHANGENAM) $(CONFIG_ECCKD) config_diag.nam $(DIAGBOUNDS) sw_diag_file_name='"sw_diag_rrtmg.nc"' gas_model_name='"RRTMG-IFS"' |
---|
186 | $(DRIVER) config_diag.nam $(INPUT).nc $(INPUT)_diag_rrtmg_out.nc |
---|
187 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_diag.nam $(DIAGBOUNDS) sw_diag_file_name='"sw_diag_rgb_orig.nc"' |
---|
188 | $(DRIVER) config_ecckd_diag.nam $(INPUT).nc $(INPUT)_ecckd_diag_rgb_orig_out.nc |
---|
189 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_diag.nam $(DIAGBOUNDS) sw_diag_file_name='"sw_diag_rgb.nc"' \ |
---|
190 | gas_optics_sw_override_file_name='"ecckd-1.4_sw_climate_rgb-32b_ckd-definition.nc"' |
---|
191 | $(DRIVER) config_ecckd_diag.nam $(INPUT).nc $(INPUT)_ecckd_diag_rgb_out.nc |
---|
192 | $(CHANGENAM) $(CONFIG_ECCKD) config_ecckd_diag.nam $(DIAGBOUNDS) sw_diag_file_name='"sw_diag_vfine.nc"' \ |
---|
193 | gas_optics_sw_override_file_name='"ecckd-1.4_sw_climate_vfine-96b_ckd-definition.nc"' |
---|
194 | $(DRIVER) config_ecckd_diag.nam $(INPUT).nc $(INPUT)_ecckd_diag_vfine_out.nc |
---|
195 | |
---|
196 | # Clean data files |
---|
197 | clean: |
---|
198 | rm -f *_out.nc tmp*.nc radiative_properties*.nc inputs.nc sw_diag*nc \ |
---|
199 | config_*.nam gmon.out |
---|