source: LMDZ6/trunk/libf/phylmd/ecrad/test/ifs/Makefile @ 4853

Last change on this file since 4853 was 4853, checked in by idelkadi, 9 months ago

Ecrad update in LMDZ / Implementation of Ecrad double call in LMDZ

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