Closed yantosca closed 1 year ago
I am also attempting to replace the code above by this cleaner formulation. To match the behavior of the existing code, I have to do:
!========================================================================
! Het1stOrderUptakeVOC begins here!
!========================================================================
! Initialize
rate = 0.0_dp
! Only consider inorganic aqueous aerosols with RH > 35%.
IF ( RELHUM >= CRITRH ) THEN
! Uptake by tropospheric sulfate (aerosol type 8)
rate = rate + ARSL1K( XAREA(8 ), XRADI(8 ), XDENA, gamma, XTEMP, SrMw )
! Uptake by black carbon and organic carbon (aerosol types 9-10)
rate = rate + ARSL1K( XAREA(9 ), XRADI(9 ), XDENA, gamma, XTEMP, SrMw )
rate = rate + ARSL1K( XAREA(10), XRADI(10), XDENA, gamma, XTEMP, SrMw )
! Uptake by fine & coarse sea salt (aerosol types 11-12)
rate = rate + ARSL1K( XAREA(11), XRADI(11), XDENA, gamma, XTEMP, SrMw )
rate = rate + ARSL1K( XAREA(12), XRADI(12), XDENA, gamma, XTEMP, SrMw )
! Uptake by stratospheric sulfate (aerosol type 13)
! and by irregular ice cloud (aerosol type 14)
rate = rate + XAREA(13) * gamma
rate = rate + ARSL1K( XAREA(14), XRADI(14), XDENA, gamma, XTEMP, SrMw )
ENDIF
but if there is a bug in the code from the prior comment and we should be setting the reaction proabability to zero after each iteration, then this all reduces to:
IF ( RELHUM >= CRITRH ) THEN
! Uptake by tropospheric sulfate (aerosol type 8)
rate = rate + ARSL1K( XAREA(8 ), XRADI(8 ), XDENA, gamma, XTEMP, SrMw )
ENDIF
Closing out this issue
I am not sure if this is a bug or a "feature", but I noticed what may be an error where we compute 1st order uptake of VOC species. If you look in routines HetLVOC (and in similar routines), there code such as:
Following the execution of the loop:
HET_LVOC
= 0 for aerosol types N=1 to N=7xstkcf
is set to the 2nd argumentB
only if N=8 (tropospheric sulfate) and if RH > 35%,HET_LVOC
.xstckf
is not reset to zero (but I think it should be).a. For grid boxes where RH > 35%, The uptake of VOC by aerosol types N=9 thru N=14 is done.
b. But for grid boxes where RH <=35%, uptake of VOC is not computed.
Long story short, I think there is a missing statement to zero out
xstkcf
at the beginning of each N iteration:This will then skip computing the uptake of VOC on other aerosol types, regardless of the value of RH in the grid box.
@sdeastham, @msulprizio, @msl3v, @lizziel: any thoughts?