Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Registry/registry.chem
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ state real QC_B4MP ikj misc 1 - - "Q
state real QI_B4MP ikj misc 1 - - "QI_B4MP" "CLOUD ICE BEFORE MICROPHYSICS" "kg kg-1"
state real QS_B4MP ikj misc 1 - - "QS_B4MP" "SNOW BEFORE MICROPHYSICS" "kg kg-1"

state real ph_cw ikj misc 1 - - "ph_cw" "pH of cloud water" "unitless"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stacy,
If these diagnostics are only to be activated when a specific namelist option is selected, these should all be in a package.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravanah @kayeekayee
If this is indeed an optional diagnostic, then the namelist option that activates the pH for Mozart should be used for a package for the ph_cw, ph_aer01 through 04.

state real ph_aer01 ikj misc 1 - - "ph_aer01" "H+ of aerosol bin 1" "mol/kg"
state real ph_aer02 ikj misc 1 - - "ph_aer02" "H+ of aerosol bin 2" "mol/kg"
state real ph_aer03 ikj misc 1 - - "ph_aer03" "H+ of aerosol bin 3" "mol/kg"
state real ph_aer04 ikj misc 1 - - "ph_aer04" "H+ of aerosol bin 4" "mol/kg"

state real ccn1 ikj misc 1 - r "ccn1" "CCN concentration at S=0.02%" "#/cm3"
state real ccn2 ikj misc 1 - r "ccn2" "CCN concentration at S=0.05%" "#/cm3"
state real ccn3 ikj misc 1 - r "ccn3" "CCN concentration at S=0.1%" "#/cm3"
Expand Down
7 changes: 7 additions & 0 deletions chem/aerosol_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SUBROUTINE aerosols_driver (id,curr_secs,ktau,dtstep,ktauc, &
vdrog3, vdrog3_vbs,brch_ratio,dgnum,dgnumwet,wetdens_ap, &
del_h2so4_gasprod,dvmrdt_sv13d,dvmrcwdt_sv13d, &
is_CAMMGMP_used, &!BSINGH:01/31/2013: Added is_CAMMGMP_used for cam_mam_aerchem_driver
ph_aer01, ph_aer02, ph_aer03, ph_aer04, &
ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
its,ite, jts,jte, kts,kte )
Expand Down Expand Up @@ -190,6 +191,11 @@ SUBROUTINE aerosols_driver (id,curr_secs,ktau,dtstep,ktauc, &
REAL, dimension (ims:ime,kms:kme-0,jms:jme), &
INTENT(INOUT) :: &
vcsulf_old

! output of aerosol pH from MOSAIC 4-bin
REAL, DIMENSION( ims:ime , kms:kme , jms:jme ) , &
INTENT(OUT ) :: &
ph_aer01, ph_aer02, ph_aer03, ph_aer04
!
!tendencies:dvmrdt_sv13d,dvmrcwdt_sv13d are the tendencies which are passsed on from the CAM-MAM cloud chemistry
! to gasaerexch subroutine
Expand Down Expand Up @@ -288,6 +294,7 @@ SUBROUTINE aerosols_driver (id,curr_secs,ktau,dtstep,ktauc, &
id, curr_secs, ktau, dtstep, ktauc, dtstepc, config_flags, &
t_phy, rho_phy, p_phy, &
moist, chem,vbs_nbin, &
ph_aer01, ph_aer02, ph_aer03, ph_aer04, &
ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
its,ite, jts,jte, kts,kte )
Expand Down
2 changes: 2 additions & 0 deletions chem/chem_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,7 @@ end SUBROUTINE sum_pm_driver
grid%f_ice_phy,grid%f_rain_phy,grid%cldfrai, grid%cldfral, &
moist, grid%cldfra, grid%cldfra_mp_all, grid%ph_no2, &
chem, gas_aqfrac, numgas_mam,grid%is_CAMMGMP_used, &
grid%ph_cw, &
ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
its,ite, jts,jte, kts,kte )
Expand All @@ -1572,6 +1573,7 @@ end SUBROUTINE sum_pm_driver
vdrog3,vdrog3_vbs,grid%br_rto,grid%dgnum4d,grid%dgnumwet4d,wetdens_ap, &
del_h2so4_gasprod,grid%dvmrdt_sv13d,grid%dvmrcwdt_sv13d, &
grid%is_CAMMGMP_used, &
grid%ph_aer01, grid%ph_aer02, grid%ph_aer03, grid%ph_aer04, &
ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
its,ite,jts,jte,kts,kte )
Expand Down
6 changes: 5 additions & 1 deletion chem/cloudchem_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SUBROUTINE cloudchem_driver( &
moist, cldfra, cldfra_mp_all, ph_no2, &
chem, gas_aqfrac, numgas_aqfrac, &
is_CAMMGMP_used, &!BSINGH:01/31/2013: Added is_CAMMGMP_used for CAM_MAM_cloudchem
ph_cw, &
ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
its,ite, jts,jte, kts,kte )
Expand Down Expand Up @@ -169,6 +170,9 @@ SUBROUTINE cloudchem_driver( &
REAL, DIMENSION( ims:ime, kms:kme, jms:jme, numgas_aqfrac ), &
INTENT(INOUT ) :: gas_aqfrac

REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
INTENT(OUT) :: ph_cw ! ph_cw - pH of cloud water



! LOCAL VAR
Expand Down Expand Up @@ -200,7 +204,7 @@ SUBROUTINE cloudchem_driver( &
id, ktau, ktauc, dtstepc, config_flags, &
p_phy, t_phy, rho_phy, alt, &
cldfra, ph_no2, &
moist, chem, &
moist, chem, ph_cw, &
gas_aqfrac, numgas_aqfrac, &
ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
Expand Down
3 changes: 2 additions & 1 deletion chem/module_chem_cup.F
Original file line number Diff line number Diff line change
Expand Up @@ -3205,6 +3205,7 @@ subroutine chem_cup_aqchem( &
integer :: l
real(r8) :: tmpb
real(r8) :: tmp_chem_up(1:num_chem), tmp_chem_up_old(1:num_chem)
real(r4), dimension( 1:1, kts:kte, 1:1 ) :: tmp_ph_cw

! single precision variable used for calls to other wrf-chem routines
real(r4) :: dt_aqchem_sp
Expand Down Expand Up @@ -3276,7 +3277,7 @@ subroutine chem_cup_aqchem( &
grid_id, ktau, ktau, dt_aqchem_sp, config_flags, &
tmp_p_sp, tmp_t_sp, tmp_rho_sp, tmp_alt_sp, &
tmp_cldfra_sp, tmp_ph_no2_sp, &
tmp_moist_sp, tmp_chem_sp, &
tmp_moist_sp, tmp_chem_sp, tmp_ph_cw, &
tmp_gas_aqfrac_sp, num_chem, &
1,1, 1,1, kts,kte, &
1,1, 1,1, kts,kte, &
Expand Down
14 changes: 13 additions & 1 deletion chem/module_mosaic_cloudchem.F
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ subroutine mosaic_cloudchem_driver( &
id, ktau, ktauc, dtstepc, config_flags, &
p_phy, t_phy, rho_phy, alt, &
cldfra, ph_no2, &
moist, chem, &
moist, chem, ph_cw, &
gas_aqfrac, numgas_aqfrac, &
ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
Expand Down Expand Up @@ -107,6 +107,9 @@ subroutine mosaic_cloudchem_driver( &
gas_aqfrac
! gas_aqfrac - fraction (0-1) of gas that is dissolved in cloud water

real, intent(out), &
dimension( ims:ime, kms:kme, jms:jme ) :: &
ph_cw

! local variables
integer :: it, jt, kt, kpeg, k_pegshift, l, mpeg
Expand Down Expand Up @@ -146,6 +149,14 @@ subroutine mosaic_cloudchem_driver( &
! following line turns aqueous radical chem off unconditionally
iradical_onoff = 0

! Initialize pH of CW ph_cw to a FillValue value
do jt = jts, jte
do kt = kts, kte
do it = its, ite
ph_cw(it,kt,jt) = -9999.
end do
end do
end do

do 3920 jt = jts, jte
do 3910 it = its, ite
Expand Down Expand Up @@ -204,6 +215,7 @@ subroutine mosaic_cloudchem_driver( &
t_phy, p_phy, rho_phy )

gas_aqfrac(it,kt,jt,:) = gas_aqfrac_box(:)
ph_cw(it,kt,jt) = ph_aq_box


3800 continue
Expand Down
9 changes: 8 additions & 1 deletion chem/module_mosaic_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ subroutine mosaic_aerchem_driver( &
id, curr_secs, ktau, dtstep, ktauc, dtstepc, config_flags, &
t_phy, rho_phy, p_phy, &
moist, chem, vbs_nbin, &
ph_aer01, ph_aer02, ph_aer03, ph_aer04, &

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stacy,
Line these up

ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
its,ite, jts,jte, kts,kte )
Expand Down Expand Up @@ -235,6 +236,10 @@ subroutine mosaic_aerchem_driver( &
! chem - mixing ratios of trace gase (ppm) and aerosol species
! (ug/kg for mass species, #/kg for number species)

real, intent(out), &
dimension( ims:ime, kms:kme, jms:jme ) :: &
ph_aer01, ph_aer02, ph_aer03, ph_aer04

type(grid_config_rec_type), intent(in) :: config_flags
! config_flags - configuration and control parameters

Expand Down Expand Up @@ -449,7 +454,9 @@ subroutine mosaic_aerchem_driver( &
print 93010, 'calling aerchem - it,jt,maerchem =', it, jt, maerchem
! print 93010, 'calling aerchem - it,jt,maerchem =', it, jt, maerchem
call aerchemistry( it, jt, kclm_calcbgn, kclm_calcend, &
dtchem, idiagaa_dum, vbs_nbin )
dtchem, idiagaa_dum, vbs_nbin, &
ph_aer01(it,kms:kme,jt), ph_aer02(it,kms:kme,jt), &
ph_aer03(it,kms:kme,jt), ph_aer04(it,kms:kme,jt), kms,kme )

! note units for aerosol is now ug/m3

Expand Down
11 changes: 10 additions & 1 deletion chem/module_mosaic_therm.F
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ module module_mosaic_therm
! update: jan 2005
!-----------------------------------------------------------------------
subroutine aerchemistry( iclm, jclm, kclm_calcbgn, kclm_calcend, &
dtchem_sngl, idiagaa,vbs_nbin )
dtchem_sngl, idiagaa,vbs_nbin, &
ph_aer1, ph_aer2, ph_aer3, ph_aer4, kms,kme )

use module_data_mosaic_asect
use module_data_mosaic_other
Expand All @@ -105,6 +106,9 @@ subroutine aerchemistry( iclm, jclm, kclm_calcbgn, kclm_calcend, &
! subr arguments
integer iclm, jclm, kclm_calcbgn, kclm_calcend, idiagaa,vbs_nbin(1)
real dtchem_sngl
integer kms, kme
real, intent(out), dimension(kms:kme) :: &
ph_aer1, ph_aer2, ph_aer3, ph_aer4 ! pH of the aerosols
! local variables
real(kind=8) :: dtchem
integer k, m
Expand Down Expand Up @@ -154,6 +158,11 @@ subroutine aerchemistry( iclm, jclm, kclm_calcbgn, kclm_calcend, &
call move_sections( 1, iclm, jclm, k, m)
call specialoutaa( iclm, jclm, k, m, 'after_movesect' )

ph_aer1(k) = mc(1,1)
ph_aer2(k) = mc(1,2)
ph_aer3(k) = mc(1,3)
ph_aer4(k) = mc(1,4)

100 continue ! k levels

200 continue ! subareas
Expand Down