Skip to content

Commit 6c2d4e8

Browse files
Merge pull request NCAR#73 from SamuelTrahanNOAA/feature/pert-scale
gsd-chem stochastic emissions: scale factor, remove CA support, remove emis_multiplier
2 parents c6c60cc + cef23b6 commit 6c2d4e8

8 files changed

+97
-203
lines changed

gsdchem/gsd_chem_anthropogenic_wrapper.F90

+7-11
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ end subroutine gsd_chem_anthropogenic_wrapper_finalize
4141
subroutine gsd_chem_anthropogenic_wrapper_run(im, kte, kme, ktau, dt, &
4242
pr3d, ph3d,phl3d, prl3d, tk3d, spechum,emi_in, &
4343
ntrac,ntso2,ntsulf,ntpp25,ntbc1,ntoc1,ntpp10, &
44-
gq0,qgrs,abem,chem_opt_in,kemit_in, &
45-
emis_amp_anthro, emis_multiplier, do_sppt_emis, ca_global_emis, &
46-
errmsg,errflg)
44+
gq0,qgrs,abem,chem_opt_in,kemit_in,pert_scale_anthro, &
45+
emis_amp_anthro,do_sppt_emis,sppt_wts,errmsg,errflg)
4746

4847
implicit none
4948

@@ -52,10 +51,9 @@ subroutine gsd_chem_anthropogenic_wrapper_run(im, kte, kme, ktau, dt,
5251
integer, intent(in) :: ntrac
5352
integer, intent(in) :: ntso2,ntpp25,ntbc1,ntoc1,ntpp10
5453
integer, intent(in) :: ntsulf
55-
real(kind_phys),intent(in) :: dt, emis_amp_anthro
56-
57-
logical, intent(in) :: ca_global_emis, do_sppt_emis
58-
real, optional, intent(in) :: emis_multiplier(:)
54+
real(kind_phys),intent(in) :: dt, emis_amp_anthro, pert_scale_anthro
55+
real(kind_phys), optional, intent(in) :: sppt_wts(:,:)
56+
logical, intent(in) :: do_sppt_emis
5957

6058
integer, parameter :: ids=1,jds=1,jde=1, kds=1
6159
integer, parameter :: ims=1,jms=1,jme=1, kms=1
@@ -102,10 +100,8 @@ subroutine gsd_chem_anthropogenic_wrapper_run(im, kte, kme, ktau, dt,
102100
!ppm2ugkg(p_so2 ) = 1.e+03_kind_phys * mw_so2_aer / mwdry
103101
ppm2ugkg(p_sulf) = 1.e+03_kind_phys * mw_so4_aer / mwdry
104102

105-
if(do_sppt_emis .or. ca_global_emis) then
106-
do i = ims, im
107-
random_factor(i,jms) = min(10.0,max(0.0,(emis_multiplier(i)-1.0)*emis_amp_anthro + 1.0))
108-
enddo
103+
if(do_sppt_emis) then
104+
random_factor(:,jms) = pert_scale_anthro*max(min(1+(sppt_wts(:,kme/2)-1)*emis_amp_anthro,2.0),0.0)
109105
else
110106
random_factor = 1.0
111107
endif

gsdchem/gsd_chem_anthropogenic_wrapper.meta

+17-16
Original file line numberDiff line numberDiff line change
@@ -220,32 +220,24 @@
220220
type = integer
221221
intent = in
222222
optional = F
223-
[emis_amp_anthro]
224-
standard_name = anthropogenic_emissions_perturbation_amplitude
225-
long_name = multiplier of emissions random perturbation of anthropogenic emissions
223+
[pert_scale_anthro]
224+
standard_name = anthropogenic_scaling_factor
225+
long_name = Scaling factor for emissions of anthropogenic emissions
226226
units = none
227227
dimensions = ()
228228
type = real
229229
kind = kind_phys
230230
intent = in
231231
optional = F
232-
[emis_multiplier]
233-
standard_name = gsd_chem_ca_global_emis_multiplier
234-
long_name = fraction of emissions to generate based on cellular automata
235-
units = frac
236-
dimensions = (horizontal_dimension)
232+
[emis_amp_anthro]
233+
standard_name = anthropogenic_emissions_perturbation_amplitude
234+
long_name = multiplier of emissions random perturbation of anthropogenic emissions
235+
units = none
236+
dimensions = ()
237237
type = real
238238
kind = kind_phys
239239
intent = in
240240
optional = F
241-
[ca_global_emis]
242-
standard_name = flag_for_tracer_emissions_global_cellular_automata
243-
long_name = switch for global ca applied to chemical tracer emissions
244-
units = flag
245-
dimensions = ()
246-
type = logical
247-
intent = in
248-
optional = F
249241
[do_sppt_emis]
250242
standard_name = flag_for_stochastic_emissions_perturbations
251243
long_name = flag for stochastic emissions perturbations
@@ -254,6 +246,15 @@
254246
type = logical
255247
intent = in
256248
optional = F
249+
[sppt_wts]
250+
standard_name = weights_for_stochastic_sppt_perturbation
251+
long_name = weights for stochastic sppt perturbation
252+
units = none
253+
dimensions = (horizontal_dimension,vertical_dimension)
254+
type = real
255+
kind = kind_phys
256+
intent = in
257+
optional = F
257258
[errmsg]
258259
standard_name = ccpp_error_message
259260
long_name = error message for error handling in CCPP

gsdchem/gsd_chem_dust_wrapper.F90

+7-10
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,19 @@ subroutine gsd_chem_dust_wrapper_run(im, kte, kme, ktau, dt, garea, land, &
5050
ntdust1,ntdust2,ntdust3,ntdust4,ntdust5,ndust, &
5151
gq0,qgrs,duem, &
5252
chem_opt_in,dust_opt_in,dust_calcdrag_in, &
53-
dust_alpha_in,dust_gamma_in, &
54-
emis_amp_dust, emis_multiplier, do_sppt_emis, ca_global_emis,&
55-
errmsg,errflg)
53+
dust_alpha_in,dust_gamma_in,pert_scale_dust, &
54+
emis_amp_dust, do_sppt_emis, sppt_wts, errmsg,errflg)
5655

5756
implicit none
5857

5958

6059
integer, intent(in) :: im,kte,kme,ktau,nsoil
6160
integer, intent(in) :: nseasalt,ntrac
6261
integer, intent(in) :: ntdust1,ntdust2,ntdust3,ntdust4,ntdust5,ndust
63-
real(kind_phys),intent(in) :: dt, emis_amp_dust
62+
real(kind_phys),intent(in) :: dt, emis_amp_dust, pert_scale_dust
6463

65-
logical, intent(in) :: ca_global_emis, do_sppt_emis
66-
real, optional, intent(in) :: emis_multiplier(:)
64+
logical, intent(in) :: do_sppt_emis
65+
real(kind_phys), optional, intent(in) :: sppt_wts(:,:)
6766

6867
integer, parameter :: ids=1,jds=1,jde=1, kds=1
6968
integer, parameter :: ims=1,jms=1,jme=1, kms=1
@@ -135,10 +134,8 @@ subroutine gsd_chem_dust_wrapper_run(im, kte, kme, ktau, dt, garea, land, &
135134
ite=im
136135
kde=kte
137136

138-
if(do_sppt_emis .or. ca_global_emis) then
139-
do i = ims, im
140-
random_factor(i,jms) = min(10.0,max(0.0,(emis_multiplier(i)-1.0)*emis_amp_dust + 1.0))
141-
enddo
137+
if(do_sppt_emis) then
138+
random_factor(:,jms) = pert_scale_dust*max(min(1+(sppt_wts(:,kme/2)-1)*emis_amp_dust,2.0),0.0)
142139
else
143140
random_factor = 1.0
144141
endif

gsdchem/gsd_chem_dust_wrapper.meta

+17-16
Original file line numberDiff line numberDiff line change
@@ -439,32 +439,24 @@
439439
kind = kind_phys
440440
intent = in
441441
optional = F
442-
[emis_amp_dust]
443-
standard_name = dust_emissions_perturbation_amplitude
444-
long_name = multiplier of emissions random perturbation of dust emissions
442+
[pert_scale_dust]
443+
standard_name = dust_emissions_scaling_factor
444+
long_name = Scaling factor for emissions of dust emissions
445445
units = none
446446
dimensions = ()
447447
type = real
448448
kind = kind_phys
449449
intent = in
450450
optional = F
451-
[emis_multiplier]
452-
standard_name = gsd_chem_ca_global_emis_multiplier
453-
long_name = fraction of emissions to generate based on cellular automata
454-
units = frac
455-
dimensions = (horizontal_dimension)
451+
[emis_amp_dust]
452+
standard_name = dust_emissions_perturbation_amplitude
453+
long_name = multiplier of emissions random perturbation of dust emissions
454+
units = none
455+
dimensions = ()
456456
type = real
457457
kind = kind_phys
458458
intent = in
459459
optional = F
460-
[ca_global_emis]
461-
standard_name = flag_for_tracer_emissions_global_cellular_automata
462-
long_name = switch for global ca applied to chemical tracer emissions
463-
units = flag
464-
dimensions = ()
465-
type = logical
466-
intent = in
467-
optional = F
468460
[do_sppt_emis]
469461
standard_name = flag_for_stochastic_emissions_perturbations
470462
long_name = flag for stochastic emissions perturbations
@@ -473,6 +465,15 @@
473465
type = logical
474466
intent = in
475467
optional = F
468+
[sppt_wts]
469+
standard_name = weights_for_stochastic_sppt_perturbation
470+
long_name = weights for stochastic sppt perturbation
471+
units = none
472+
dimensions = (horizontal_dimension,vertical_dimension)
473+
type = real
474+
kind = kind_phys
475+
intent = in
476+
optional = F
476477
[errmsg]
477478
standard_name = ccpp_error_message
478479
long_name = error message for error handling in CCPP

gsdchem/gsd_chem_plume_wrapper.F90

+8-11
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,23 @@ subroutine gsd_chem_plume_wrapper_run(im, kte, kme, ktau, dt, &
4444
pr3d, ph3d,phl3d, prl3d, tk3d, us3d, vs3d, spechum, &
4545
w,vegtype,fire_GBBEPx,fire_MODIS, &
4646
ntrac,ntso2,ntpp25,ntbc1,ntoc1,ntpp10, &
47-
gq0,qgrs,ebu,abem, &
48-
biomass_burn_opt_in,plumerise_flag_in,plumerisefire_frq_in, &
49-
emis_amp_plume, emis_multiplier, do_sppt_emis, &
50-
ca_global_emis, errmsg,errflg)
47+
gq0,qgrs,ebu,abem,biomass_burn_opt_in,plumerise_flag_in, &
48+
plumerisefire_frq_in,pert_scale_plume, &
49+
emis_amp_plume, do_sppt_emis, sppt_wts, errmsg,errflg)
5150

5251
implicit none
5352

5453

5554
integer, intent(in) :: im,kte,kme,ktau
5655
integer, intent(in) :: ntrac,ntso2,ntpp25,ntbc1,ntoc1,ntpp10
57-
real(kind_phys),intent(in) :: dt, emis_amp_plume
56+
real(kind_phys),intent(in) :: dt, emis_amp_plume, pert_scale_plume
5857

5958
integer, parameter :: ids=1,jds=1,jde=1, kds=1
6059
integer, parameter :: ims=1,jms=1,jme=1, kms=1
6160
integer, parameter :: its=1,jts=1,jte=1, kts=1
6261

63-
logical, intent(in) :: ca_global_emis, do_sppt_emis
64-
real, optional, intent(in) :: emis_multiplier(:)
62+
logical, intent(in) :: do_sppt_emis
63+
real(kind_phys), optional, intent(in) :: sppt_wts(:,:)
6564
integer, dimension(im), intent(in) :: vegtype
6665
real(kind_phys), dimension(im, 5), intent(in) :: fire_GBBEPx
6766
real(kind_phys), dimension(im, 13), intent(in) :: fire_MODIS
@@ -175,10 +174,8 @@ subroutine gsd_chem_plume_wrapper_run(im, kte, kme, ktau, dt, &
175174
if (biomass_burn_opt == BURN_OPT_ENABLE) then
176175
jp = jte
177176

178-
if(plumerise_flag == FIRE_OPT_GBBEPx .and. (do_sppt_emis .or. ca_global_emis)) then
179-
do i = ims, im
180-
random_factor(i) = min(10.0,max(0.0,(emis_multiplier(i)-1.0)*emis_amp_plume + 1.0))
181-
enddo
177+
if(plumerise_flag == FIRE_OPT_GBBEPx .and. do_sppt_emis) then
178+
random_factor(:) = pert_scale_plume*max(min(1+(sppt_wts(:,kme/2)-1)*emis_amp_plume,2.0),0.0)
182179
endif
183180

184181
factor3 = 0._kind_phys

gsdchem/gsd_chem_plume_wrapper.meta

+18-17
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,15 @@
249249
kind = kind_phys
250250
intent = inout
251251
optional = F
252+
[pert_scale_plume]
253+
standard_name = plume_emissions_scaling_factor
254+
long_name = Scaling factor for emissions of plume rising
255+
units = none
256+
dimensions = ()
257+
type = real
258+
kind = kind_phys
259+
intent = in
260+
optional = F
252261
[biomass_burn_opt_in]
253262
standard_name = gsd_chem_biomass_burn_opt
254263
long_name = gsd chem biomass burning option
@@ -280,23 +289,6 @@
280289
dimensions = ()
281290
type = real
282291
kind = kind_phys
283-
[emis_multiplier]
284-
standard_name = gsd_chem_ca_global_emis_multiplier
285-
long_name = fraction of emissions to generate based on cellular automata
286-
units = frac
287-
dimensions = (horizontal_dimension)
288-
type = real
289-
kind = kind_phys
290-
intent = in
291-
optional = F
292-
[ca_global_emis]
293-
standard_name = flag_for_tracer_emissions_global_cellular_automata
294-
long_name = switch for global ca applied to chemical tracer emissions
295-
units = flag
296-
dimensions = ()
297-
type = logical
298-
intent = in
299-
optional = F
300292
[do_sppt_emis]
301293
standard_name = flag_for_stochastic_emissions_perturbations
302294
long_name = flag for stochastic emissions perturbations
@@ -305,6 +297,15 @@
305297
type = logical
306298
intent = in
307299
optional = F
300+
[sppt_wts]
301+
standard_name = weights_for_stochastic_sppt_perturbation
302+
long_name = weights for stochastic sppt perturbation
303+
units = none
304+
dimensions = (horizontal_dimension,vertical_dimension)
305+
type = real
306+
kind = kind_phys
307+
intent = in
308+
optional = F
308309
[errmsg]
309310
standard_name = ccpp_error_message
310311
long_name = error message for error handling in CCPP

gsdchem/gsd_chem_seas_wrapper.F90

+14-46
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,7 @@ module gsd_chem_seas_wrapper
1919

2020
!> \brief Brief description of the subroutine
2121
!!
22-
subroutine gsd_chem_seas_wrapper_init(ca_global_emis,do_sppt_emis,im,emis_multiplier,errmsg,errflg)
23-
implicit none
24-
logical, intent(in) :: ca_global_emis, do_sppt_emis
25-
real, intent(out) :: emis_multiplier(:)
26-
character(len=*), intent(out) :: errmsg
27-
integer, intent(out) :: errflg, im
28-
29-
errmsg=''
30-
errflg=0
31-
32-
if(ca_global_emis .or. do_sppt_emis) then
33-
emis_multiplier=1.0
34-
endif
22+
subroutine gsd_chem_seas_wrapper_init
3523
end subroutine gsd_chem_seas_wrapper_init
3624

3725
!> \brief Brief description of the subroutine
@@ -51,23 +39,21 @@ end subroutine gsd_chem_seas_wrapper_finalize
5139
!!
5240
!>\section gsd_chem_seas_wrapper GSD Chemistry Scheme General Algorithm
5341
!> @{
54-
subroutine gsd_chem_seas_wrapper_run(im, kte, kme, ktau, dt, garea, &
55-
land, u10m, v10m, ustar, rlat, rlon, tskin, &
56-
pr3d, ph3d,prl3d, tk3d, us3d, vs3d, spechum, &
57-
nseasalt,ntrac,ntss1,ntss2,ntss3,ntss4,ntss5, &
58-
gq0,qgrs,ssem,seas_opt_in, emis_amp_seas, emis_multiplier, &
59-
ca1, ca_global_emis, do_sppt_emis, sppt_wts, errmsg, errflg)
42+
subroutine gsd_chem_seas_wrapper_run(im, kte, kme, ktau, dt, garea, &
43+
land, u10m, v10m, ustar, rlat, rlon, tskin, &
44+
pr3d, ph3d,prl3d, tk3d, us3d, vs3d, spechum, &
45+
nseasalt,ntrac,ntss1,ntss2,ntss3,ntss4,ntss5, &
46+
gq0,qgrs,ssem,seas_opt_in, pert_scale_seas, emis_amp_seas, &
47+
do_sppt_emis, sppt_wts, errmsg, errflg)
6048

6149
implicit none
6250

63-
6451
integer, intent(in) :: im,kte,kme,ktau
6552
integer, intent(in) :: nseasalt,ntrac,ntss1,ntss2,ntss3,ntss4,ntss5
6653
real(kind_phys),intent(in) :: dt
6754

68-
logical, intent(in) :: ca_global_emis, do_sppt_emis
69-
real, optional, intent(inout) :: emis_multiplier(:)
70-
real, intent(in) :: ca1(im), emis_amp_seas
55+
logical, intent(in) :: do_sppt_emis
56+
real(kind=kind_phys), intent(in) :: emis_amp_seas, pert_scale_seas
7157
real(kind_phys), optional, intent(in) :: sppt_wts(:,:)
7258

7359

@@ -100,7 +86,7 @@ subroutine gsd_chem_seas_wrapper_run(im, kte, kme, ktau, dt, garea, &
10086

10187
integer :: ide, ime, ite, kde
10288
real(kind_phys), dimension(1:num_chem) :: ppm2ugkg
103-
real(kind_phys) :: ca1_scaled, random_factor(ims:im,jms:jme)
89+
real(kind_phys) :: random_factor(ims:im,jms:jme)
10490

10591
!>-- local variables
10692
integer :: i, j, jp, k, kp, n
@@ -122,28 +108,10 @@ subroutine gsd_chem_seas_wrapper_run(im, kte, kme, ktau, dt, garea, &
122108
!ppm2ugkg(p_so2 ) = 1.e+03_kind_phys * mw_so2_aer / mwdry
123109
ppm2ugkg(p_sulf) = 1.e+03_kind_phys * mw_so4_aer / mwdry
124110

125-
random_factor = 1
126-
127-
if (do_sppt_emis) then
128-
do i = ims, im
129-
emis_multiplier(i) = sppt_wts(i,kme/2)
130-
enddo
131-
elseif (ca_global_emis) then
132-
do i = ims, im
133-
! ca1(i) is always precisely 0 or 2
134-
if(ca1(i)<1.0) then
135-
ca1_scaled=0.9
136-
else
137-
ca1_scaled=1.0/0.9
138-
endif
139-
emis_multiplier(i) = max(0.8,min(1.2,emis_multiplier(i)*0.95 + ca1_scaled*0.05))
140-
enddo
141-
endif
142-
143-
if(do_sppt_emis .or. ca_global_emis) then
144-
do i=ims,im
145-
random_factor(i,jms) = min(10.0,max(0.0,(emis_multiplier(i)-1.0)*emis_amp_seas + 1.0))
146-
enddo
111+
if(do_sppt_emis) then
112+
random_factor(:,jms) = pert_scale_seas*max(min(1+(sppt_wts(:,kme/2)-1)*emis_amp_seas,2.0),0.0)
113+
else
114+
random_factor = 1.0
147115
endif
148116

149117
!>- get ready for chemistry run

0 commit comments

Comments
 (0)