Skip to content

Commit d722812

Browse files
authored
Merge pull request #1369 from NCAR/develop-cloud-bug-fix
cam6_4_112: Fix minor bugs in cloud chemistry
2 parents a239db6 + 13e1132 commit d722812

File tree

8 files changed

+408
-141
lines changed

8 files changed

+408
-141
lines changed

doc/ChangeLog

Lines changed: 226 additions & 0 deletions
Large diffs are not rendered by default.

src/chemistry/aerosol/aero_convproc.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ subroutine aero_convproc_intr( aero_props, aero_state, state, ptend, pbuf, ztodt
460460

461461
ndx = aer_cnst_ndx(mm)
462462

463-
if (ndx>0) call outfld( trim(cnst_name_extd(1,mm))//'SFWET', aerdepwetis(:,ndx), pcols, lchnk )
463+
if (ndx>0) call outfld( trim(cnst_name_extd(1,mm))//'SFWETC', aerdepwetis(:,ndx), pcols, lchnk )
464464
call outfld( trim(cnst_name_extd(1,mm))//'SFSIC', sflxic(:,mm), pcols, lchnk )
465465
call outfld( trim(cnst_name_extd(1,mm))//'SFSEC', sflxec(:,mm), pcols, lchnk )
466466

src/chemistry/aerosol/aero_wetdep_cam.F90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ subroutine add_hist_fields(name,baseunits)
268268

269269
call addfld (trim(name)//'SFWET', &
270270
horiz_only, 'A',baseunits//'/m2/s ','Wet deposition flux at surface')
271+
call addfld (trim(name)//'SFWETC', &
272+
horiz_only, 'A',baseunits//'/m2/s ','Wet deposition flux (convective) at surface')
271273
call addfld (trim(name)//'SFSIC', &
272274
horiz_only, 'A',baseunits//'/m2/s ','Wet deposition flux (incloud, convective) at surface')
273275
call addfld (trim(name)//'SFSIS', &
@@ -666,8 +668,8 @@ subroutine aero_wetdep_tend( state, dt, dlf, cam_out, ptend, pbuf)
666668
call outfld( trim(name)//'SFWET', sflx, pcols, lchnk)
667669
if (ndx>0) aerdepwetcw(:ncol,ndx) = sflx(:ncol)
668670
else
669-
if (.not.convproc_do_aer) call outfld( trim(name)//'SFWET', sflx, pcols, lchnk)
670671
if (ndx>0) aerdepwetis(:ncol,ndx) = aerdepwetis(:ncol,ndx) + sflx(:ncol)
672+
call outfld( trim(name)//'SFWET', aerdepwetis(:ncol,ndx), ncol, lchnk)
671673
end if
672674

673675
sflx(:)=0._r8

src/chemistry/aerosol/mo_setsox.F90

Lines changed: 163 additions & 130 deletions
Large diffs are not rendered by default.

src/chemistry/bulk_aero/aero_model.F90

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,13 @@ subroutine aero_model_init( pbuf2d )
369369

370370
if( has_sox ) then
371371
call addfld( 'XPH_LWC',(/ 'lev' /), 'A','kg/kg', 'pH value multiplied by lwc')
372+
call addfld( 'AQSO4_H2O2', horiz_only, 'A', 'kg/m2/s', 'SO4 aqueous phase chemistry due to H2O2')
373+
call addfld( 'AQSO4_O3', horiz_only, 'A', 'kg/m2/s', 'SO4 aqueous phase chemistry due to O3')
372374

373375
if ( history_aerosol ) then
374376
call add_default ('XPH_LWC', 1, ' ')
377+
call add_default ('AQSO4_H2O2', 1, ' ')
378+
call add_default ('AQSO4_O3', 1, ' ')
375379
endif
376380
endif
377381

@@ -1067,6 +1071,7 @@ subroutine aero_model_gasaerexch( state, loffset, ncol, lchnk, troplev, delt, re
10671071

10681072
if( has_sox ) then
10691073
call setsox( state, &
1074+
pbuf, &
10701075
ncol, &
10711076
lchnk, &
10721077
loffset, &
@@ -1078,7 +1083,6 @@ subroutine aero_model_gasaerexch( state, loffset, ncol, lchnk, troplev, delt, re
10781083
cwat, &
10791084
cldfr, &
10801085
cldnum, &
1081-
airdens, &
10821086
invariants, &
10831087
vmrcw, &
10841088
vmr, &
@@ -1088,7 +1092,9 @@ subroutine aero_model_gasaerexch( state, loffset, ncol, lchnk, troplev, delt, re
10881092
aqso4_h2o2,&
10891093
aqso4_o3 &
10901094
)
1091-
call outfld( 'XPH_LWC',xphlwc(:ncol,:), ncol , lchnk )
1095+
call outfld( 'XPH_LWC', xphlwc(:ncol,:), ncol, lchnk )
1096+
call outfld( 'AQSO4_H2O2', aqso4_h2o2(:ncol), ncol, lchnk )
1097+
call outfld( 'AQSO4_O3', aqso4_o3(:ncol), ncol, lchnk )
10921098
endif
10931099

10941100
if( has_soa ) then

src/chemistry/carma_aero/aero_model.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ subroutine aero_model_gasaerexch( state, loffset, ncol, lchnk, troplev, delt, re
678678

679679
if( has_sox ) then
680680
call setsox( state, &
681+
pbuf, &
681682
ncol, &
682683
lchnk, &
683684
loffset, &
@@ -689,7 +690,6 @@ subroutine aero_model_gasaerexch( state, loffset, ncol, lchnk, troplev, delt, re
689690
cwat, &
690691
cldfr, &
691692
cldnum, &
692-
airdens, &
693693
invariants, &
694694
vmrcw, &
695695
vmr, &

src/chemistry/modal_aero/aero_model.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,7 @@ subroutine aero_model_gasaerexch( state, loffset, ncol, lchnk, troplev, delt, re
10601060

10611061
if( has_sox ) then
10621062
call setsox( state, &
1063+
pbuf, &
10631064
ncol, &
10641065
lchnk, &
10651066
loffset, &
@@ -1071,7 +1072,6 @@ subroutine aero_model_gasaerexch( state, loffset, ncol, lchnk, troplev, delt, re
10711072
cwat, &
10721073
cldfr, &
10731074
cldnum, &
1074-
airdens, &
10751075
invariants, &
10761076
vmrcw, &
10771077
vmr, &

src/chemistry/modal_aero/sox_cldaero_mod.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,11 @@ subroutine sox_cldaero_update( &
448448

449449
end do
450450

451-
qin(:,k,id_so2) = MAX( qin(:,k,id_so2), small_value )
452-
453-
if ( id_nh3 > 0 ) then
454-
qin(:,k,id_nh3) = MAX( qin(:,k,id_nh3), small_value )
455-
endif
451+
qin(:,k,id_so2) = MAX( qin(:,k,id_so2), small_value )
452+
qin(:,k,id_h2o2) = MAX( qin(:,k,id_h2o2), small_value )
453+
qin(:,k,id_h2so4) = MAX( qin(:,k,id_h2so4), small_value )
454+
if ( id_msa > 0 ) qin(:,k,id_msa) = MAX( qin(:,k,id_msa), small_value )
455+
if ( id_nh3 > 0 ) qin(:,k,id_nh3) = MAX( qin(:,k,id_nh3), small_value )
456456

457457
end do
458458

0 commit comments

Comments
 (0)