Skip to content

Commit

Permalink
Merge branch 'dev' into feature/msl/Ethnye_Ethylene
Browse files Browse the repository at this point in the history
  • Loading branch information
yantosca committed Sep 22, 2021
2 parents 77b688b + c744c29 commit 93d5c1e
Show file tree
Hide file tree
Showing 16 changed files with 897 additions and 138 deletions.
102 changes: 74 additions & 28 deletions GeosCore/aerosol_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ MODULE AEROSOL_MOD
! SALC : Coarse mode seasalt aerosol [kg/m3]
! SO4_NH4_NIT : Lumped SO4-NH4-NIT aerosol [kg/m3]
! SO4 : Sulfate aerosol [kg/m3]
! HMS : Hydroxymethane sulfonate aerosol [kg/m3] ! (jmm, 06/29/18)
! NH4 : Ammonium aerosol [kg/m3]
! NIT : Inorganic nitrate aerosol [kg/m3]
! SOILDUST : Mineral dust aerosol from soils [kg/m3]
Expand All @@ -69,6 +70,7 @@ MODULE AEROSOL_MOD
REAL(fp), ALLOCATABLE, PUBLIC :: SALC(:,:,:)
REAL(fp), ALLOCATABLE, PUBLIC :: SO4_NH4_NIT(:,:,:)
REAL(fp), ALLOCATABLE, PUBLIC :: SO4(:,:,:)
REAL(fp), ALLOCATABLE, PUBLIC :: HMS(:,:,:) ! (jmm, 06/29/18)
REAL(fp), ALLOCATABLE, PUBLIC :: NH4(:,:,:)
REAL(fp), ALLOCATABLE, PUBLIC :: NIT(:,:,:)
REAL(fp), ALLOCATABLE, PUBLIC :: FRAC_SNA(:,:,:,:)
Expand Down Expand Up @@ -130,7 +132,7 @@ MODULE AEROSOL_MOD
INTEGER :: id_POA1, id_POA2, id_OPOA1, id_OPOA2
INTEGER :: id_TSOA1, id_TSOA2, id_TSOA3, id_TSOA0
INTEGER :: id_ASOAN, id_ASOA1, id_ASOA2, id_ASOA3
INTEGER :: id_DUST1, id_SOAS, id_SALACL
INTEGER :: id_DUST1, id_SOAS, id_SALACL, id_HMS ! (jmm, 06/29/18)
INTEGER :: id_SOAGX, id_SOAIE
INTEGER :: id_INDIOL,id_LVOCOA

Expand Down Expand Up @@ -234,7 +236,7 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
LOGICAL :: LSULF
LOGICAL :: IS_OCPO, IS_OCPI, IS_BC
LOGICAL :: IS_SO4, IS_NH4, IS_NIT
LOGICAL :: IS_SAL, IS_DST
LOGICAL :: IS_SAL, IS_DST, IS_HMS ! (jmm, 06/29/18)
LOGICAL :: IS_TSOA, IS_ASOA
LOGICAL :: IS_POA, IS_OPOA
LOGICAL :: IS_SOAGX
Expand Down Expand Up @@ -282,6 +284,7 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
IS_OCPO = ( id_OCPO > 0 )
IS_BC = ( id_BCPI > 0 .AND. id_BCPO > 0 )
IS_SO4 = ( id_SO4 > 0 )
IS_HMS = ( id_HMS > 0 ) !(jmm, 06/29/18)
IS_NH4 = ( id_NH4 > 0 )
IS_NIT = ( id_NIT > 0 )
IS_DST = ( id_DST1 > 0 .AND. id_DST2 > 0 )
Expand Down Expand Up @@ -452,7 +455,7 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
!==============================================================
IF ( LSULF ) THEN

! For the full stratospheric chemistry mechanism,
! If we are using the full stratospheric chemistry mechanism,
! stratospheric NH4 is ignored, stratospheric NIT is taken
! as available for NAT formation and stratospheric SO4 is
! taken as sulfuric acid
Expand All @@ -464,47 +467,70 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
! distribution but are currently simply treated in the same
! way (size and optics) as all other sulfate aerosol (DAR
! 2013)
SO4_NH4_NIT(I,J,L) = ( Spc(I,J,L,id_SO4) + &
Spc(I,J,L,id_NH4) + &
Spc(I,J,L,id_NIT)) / &
!Spc(I,J,L,id_SO4s) + &
!Spc(I,J,L,id_NITs) ) / &
AIRVOL(I,J,L)

IF ( IS_HMS ) THEN

!%%%%% Fullchem simulations: add contribution from HMS
SO4_NH4_NIT(I,J,L) = ( Spc(I,J,L,id_SO4) &
+ Spc(I,J,L,id_HMS) &
+ Spc(I,J,L,id_NH4) &
+ Spc(I,J,L,id_NIT) ) &
/ AIRVOL(I,J,L)

HMS(I,J,L) = Spc(I,J,L,id_HMS) / AIRVOL(I,J,L)

ELSE

!%%%%% Aerosol-only simulations: Skip contribution from HMS
SO4_NH4_NIT(I,J,L) = ( Spc(I,J,L,id_SO4) &
+ Spc(I,J,L,id_NH4) &
+ Spc(I,J,L,id_NIT) ) &
/ AIRVOL(I,J,L)

HMS(I,J,L) = 0.0_fp
ENDIF

SO4(I,J,L) = Spc(I,J,L,id_SO4) / AIRVOL(I,J,L)
NH4(I,J,L) = Spc(I,J,L,id_NH4) / AIRVOL(I,J,L)
NIT(I,J,L) = Spc(I,J,L,id_NIT) / AIRVOL(I,J,L)
SLA(I,J,L) = 0e+0_fp
SPA(I,J,L) = 0e+0_fp
SLA(I,J,L) = 0.0_fp
SPA(I,J,L) = 0.0_fp


ELSE

! Tropospheric sulfate is zero in stratosphere
SO4_NH4_NIT(I,J,L) = 0e+0_fp
SO4(I,J,L) = 0e+0_fp
NH4(I,J,L) = 0e+0_fp
NIT(I,J,L) = 0e+0_fp
SO4_NH4_NIT(I,J,L) = 0.0_fp
SO4(I,J,L) = 0.0_fp
HMS(I,J,L) = 0.0_fp ! (jmm, 06/30/18)
NH4(I,J,L) = 0.0_fp
NIT(I,J,L) = 0.0_fp
SLA(I,J,L) = KG_STRAT_AER(I,J,L,1) / AIRVOL(I,J,L)
SPA(I,J,L) = KG_STRAT_AER(I,J,L,2) / AIRVOL(I,J,L)

ENDIF

! Add error check for safe division (bmy, 4/7/15)
IF ( SO4_NH4_NIT(I,J,L) > 0e+0_fp ) THEN

! Save these fractions for partitioning of optics
! until later when these may be treated independently
FRAC_SNA(I,J,L,1) = ( ( Spc(I,J,L,id_SO4 ) ) &
! & + Spc(I,J,L,id_SO4s) )
/ AIRVOL(I,J,L) ) &
/ SO4_NH4_NIT(I,J,L)
! Only use HMS if it is defined (for fullchem sims)
IF ( IS_HMS ) THEN
FRAC_SNA(I,J,L,1) = ( ( Spc(I,J,L,id_SO4 ) + &
Spc(I,J,L,id_HMS ) ) &
/ AIRVOL(I,J,L) ) &
/ SO4_NH4_NIT(I,J,L)
ELSE
FRAC_SNA(I,J,L,1) = ( Spc(I,J,L,id_SO4 ) / AIRVOL(I,J,L) ) &
/ SO4_NH4_NIT(I,J,L)
ENDIF


FRAC_SNA(I,J,L,2) = ( ( Spc(I,J,L,id_NIT ) ) &
! & + Spc(I,J,L,id_NITs) )
/ AIRVOL(I,J,L) )&
/ SO4_NH4_NIT(I,J,L)
FRAC_SNA(I,J,L,2) = ( Spc(I,J,L,id_NIT) / AIRVOL(I,J,L) ) &
/ SO4_NH4_NIT(I,J,L)

FRAC_SNA(I,J,L,3) = ( Spc(I,J,L,id_NH4) &
/ AIRVOL(I,J,L) ) / SO4_NH4_NIT(I,J,L)
FRAC_SNA(I,J,L,3) = ( Spc(I,J,L,id_NH4) / AIRVOL(I,J,L) ) &
/ SO4_NH4_NIT(I,J,L)

ELSE

Expand Down Expand Up @@ -828,7 +854,7 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
!
! Compute PM2.5 concentration [kg/m3]
!
! PM25 = 1.33 (NH4 + NIT + SO4) + BCPI + BCPO +
! PM25 = 1.33 (NH4 + NIT + SO4 + HMS) + BCPI + BCPO +
! 2.10 (OCPO + 1.16 OCPI) + 1.16 SOA* +
! DST1 + 0.38 DST2 + 1.86 SALA
!
Expand All @@ -838,6 +864,7 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
! NOTES:
! - We apply growth factors at 35% RH (computed above):
! 1.33 for SO4, NIT, and NH4
! 1.33 for HMS (jmm, 06/30/18)
! 1.16 for OCPI and SOA
! 1.86 for SALA
! - Ratio of OM/OC = 2.1 is applied to OCPI and OCPO above
Expand All @@ -856,6 +883,7 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
PM25(I,J,L) = NH4(I,J,L) * SIA_GROWTH + &
NIT(I,J,L) * SIA_GROWTH + &
SO4(I,J,L) * SIA_GROWTH + &
HMS(I,J,L) * SIA_GROWTH + & ! (jmm, 06/30/18)
BCPI(I,J,L) + &
BCPO(I,J,L) + &
OCPO(I,J,L) + &
Expand Down Expand Up @@ -1808,7 +1836,7 @@ SUBROUTINE RDAER( Input_Opt, State_Chm, State_Diag, State_Grid, State_Met, &
! Volume of wet aerosol is also: VWet = 4/3*pi * RWet**3 * n
! So RWet = ( 3*VWet / (4 pi n) )**(1/3)
! RWet = RDry * ( 1 + VH2O/Vdry )**(1/3)

! Wet effective radius, um
! Here assume the dry radius of the mixture = SNA
REFF = RW(1) * min( 3d0, &
Expand Down Expand Up @@ -2280,6 +2308,7 @@ SUBROUTINE Init_Aerosol( Input_Opt, State_Chm, State_Diag, State_Grid, RC )
id_SALACL = Ind_( 'SALACL' )
id_SO4 = Ind_( 'SO4' )
id_SO4s = Ind_( 'SO4s' )
id_HMS = Ind_( 'HMS' ) ! (jmm, 06/30/18)
id_NITs = Ind_( 'NITs' )
id_POA1 = Ind_( 'POA1' )
id_POA2 = Ind_( 'POA2' )
Expand Down Expand Up @@ -2351,6 +2380,12 @@ SUBROUTINE Init_Aerosol( Input_Opt, State_Chm, State_Diag, State_Grid, RC )
IF ( RC /= GC_SUCCESS ) RETURN
SO4 = 0.0_fp

! (jmm, 06/30/18)
ALLOCATE( HMS( State_Grid%NX, State_Grid%NY, State_Grid%NZ ), STAT=RC )
CALL GC_CheckVar( 'aerosol_mod.F:HMS', 0, RC )
IF ( RC /= GC_SUCCESS ) RETURN
HMS = 0.0_fp

ALLOCATE( NH4( State_Grid%NX, State_Grid%NY, State_Grid%NZ ), STAT=RC )
CALL GC_CheckVar( 'aerosol_mod.F:NH4', 0, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Expand Down Expand Up @@ -2478,6 +2513,7 @@ SUBROUTINE CLEANUP_AEROSOL
IF ( ALLOCATED( ACL ) ) DEALLOCATE( ACL )
IF ( ALLOCATED( SO4_NH4_NIT ) ) DEALLOCATE( SO4_NH4_NIT )
IF ( ALLOCATED( SO4 ) ) DEALLOCATE( SO4 )
IF ( ALLOCATED( HMS ) ) DEALLOCATE( HMS ) ! (jmm, 06/30/18)
IF ( ALLOCATED( NH4 ) ) DEALLOCATE( NH4 )
IF ( ALLOCATED( NIT ) ) DEALLOCATE( NIT )
IF ( ALLOCATED( FRAC_SNA ) ) DEALLOCATE( FRAC_SNA )
Expand Down Expand Up @@ -2779,6 +2815,16 @@ SUBROUTINE Set_AerMass_Diagnostic( Input_Opt, State_Chm, State_Diag, &
State_Diag%AerMassSO4(I,J,L) = SO4(I,J,L) * kgm3_to_ugm3
ENDIF

!--------------------------------------
! AerMassHMS [ug/m3]
! jmm 3/6/19
!--------------------------------------
IF ( State_Diag%Archive_AerMassHMS ) THEN
State_Diag%AerMassHMS(I,J,L) = HMS(I,J,L) * &
kgm3_to_ugm3
ENDIF


!--------------------------------------
! AerMassSOAGX [ug/m3]
!--------------------------------------
Expand Down
1 change: 1 addition & 0 deletions GeosCore/input_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5730,6 +5730,7 @@ SUBROUTINE Do_Error_Checks( Input_Opt, RC )
MAX( Ind_('SO2' ,'A'), 0 ) + &
MAX( Ind_('SO4' ,'A'), 0 ) + &
MAX( Ind_('SO4s','A'), 0 ) + &
MAX( Ind_('HMS' ,'A'), 0 ) + &! (jmm, 07/2/18)
MAX( Ind_('MSA' ,'A'), 0 ) + &
MAX( Ind_('NH3' ,'A'), 0 ) + &
MAX( Ind_('NH4' ,'A'), 0 ) + &
Expand Down
49 changes: 39 additions & 10 deletions GeosCore/isorropiaII_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ SUBROUTINE DO_ISORROPIAII( Input_Opt, State_Chm, State_Diag, &
!
! SAVEd scalars
LOGICAL, SAVE :: FIRST = .TRUE.
LOGICAL, SAVE :: IS_HMS = .FALSE.
INTEGER, SAVE :: id_HNO3, id_NH3, id_NH4
INTEGER, SAVE :: id_NIT, id_SALA, id_SO4
INTEGER, SAVE :: id_HMS ! jmm 12/5/18
INTEGER, SAVE :: id_SALACL, id_HCL, id_SALCCL
INTEGER, SAVE :: id_SO4s, id_NITs, id_SALC
INTEGER, SAVE :: id_SALAAL, id_SALCAL
Expand Down Expand Up @@ -281,6 +283,7 @@ SUBROUTINE DO_ISORROPIAII( Input_Opt, State_Chm, State_Diag, &
id_NIT = Ind_('NIT' )
id_SALA = Ind_('SALA' )
id_SO4 = Ind_('SO4' )
id_HMS = Ind_('HMS' )
id_SALACL = Ind_('SALACL')
id_HCL = Ind_('HCl' )
id_SALC = Ind_('SALC' )
Expand All @@ -291,12 +294,20 @@ SUBROUTINE DO_ISORROPIAII( Input_Opt, State_Chm, State_Diag, &
id_SALAAL = Ind_('SALAAL')
id_SALCAL = Ind_('SALCAL')

! Set a flag if HMS is defined
IS_HMS = ( id_HMS > 0 )

! Make sure certain tracers are defined
IF ( id_SO4 <= 0 ) THEN
ErrMsg = 'SO4 is an undefined species!'
CALL GC_Error( ErrMsg, RC, ThisLoc )
RETURN
ENDIF
IF ( id_HMS <= 0 .and. Input_Opt%ITS_A_FULLCHEM_SIM ) THEN
ErrMsg = 'HMS is an undefined species!'
CALL GC_Error( ErrMsg, RC, ThisLoc )
RETURN
ENDIF
IF ( id_NH3 <= 0 ) THEN
ErrMsg = 'NH3 is an undefined species!'
CALL GC_Error( ErrMsg, RC, ThisLoc )
Expand Down Expand Up @@ -583,8 +594,15 @@ SUBROUTINE DO_ISORROPIAII( Input_Opt, State_Chm, State_Diag, &
IF ( N == 1 ) THEN

! Total SO4 [mole/m3], also consider SO4s in SALA
TSO4 = (Spc(I,J,L,id_SO4)+Spc(I,J,L,id_SALA)*0.08_fp*AlkR) * &
1.e+3_fp / ( 96.0_fp * VOL)
IF ( IS_HMS ) THEN
TSO4 = (Spc(I,J,L,id_SO4)+Spc(I,J,L,id_SALA)*0.08_fp*AlkR) * &
1.e+3_fp / ( 96.0_fp * VOL) &
+ Spc(I,J,L,id_HMS) * 0.5e+3_fp / ( 111.0_fp * VOL )
ELSE
TSO4 = (Spc(I,J,L,id_SO4)+Spc(I,J,L,id_SALA)*0.08_fp*AlkR) * &
1.e+3_fp / ( 96.0_fp * VOL)
ENDIF


! Total NH3 [mole/m3]
TNH3 = Spc(I,J,L,id_NH4) * 1.0e+3_fp / (18.0_fp * VOL) + &
Expand All @@ -593,9 +611,9 @@ SUBROUTINE DO_ISORROPIAII( Input_Opt, State_Chm, State_Diag, &
ELSE

! Total SO4 [mole/m3], also consider SO4s in SALC
TSO4 = Spc(I,J,L,id_SO4s) * &
1.e+3_fp * AlkR / (31.4_fp * VOL) + &
Spc(I,J,L,id_SALC) * 0.08_fp * &
TSO4 = Spc(I,J,L,id_SO4s) * &
1.e+3_fp * AlkR / (31.4_fp * VOL) + &
Spc(I,J,L,id_SALC) * 0.08_fp * &
1.e+3_fp * AlkR / (96.0_fp * VOL)

! Total NH3 [mole/m3]
Expand Down Expand Up @@ -932,15 +950,26 @@ SUBROUTINE DO_ISORROPIAII( Input_Opt, State_Chm, State_Diag, &
State_Chm%IsorropSulfate(I,J,L) = MAX(SULFTEMP, 1e-30_fp)
State_Chm%IsorropBisulfate(I,J,L)= MAX(BISULTEMP, 1e-30_fp)
State_Chm%AeroH2O(I,J,L,1+NDUST) = AERLIQ(8) * 18e+0_fp ! mol/m3 -> g/m3

NUM_SAV = ( Spc(I,J,L,id_NH3) / 17.0_fp &
+ Spc(I,J,L,id_NH4) / 18.0_fp &
+ Spc(I,J,L,id_SALA) * 0.3061_fp / 23.0_fp )

DEN_SAV = ( Spc(I,J,L,id_SO4) / 96.0_fp * 2.0_fp &
+ Spc(I,J,L,id_NIT) / 62.0_fp &
+ HNO3_DEN / 63.0_fp &
+ Spc(I,J,L,id_SALA) * 0.55_fp / 35.45_fp )
! HMS is only defined for fullchem is simulations,
! so skip it if it is not a defined species
IF ( IS_HMS ) THEN
DEN_SAV = ( Spc(I,J,L,id_SO4) / 96.0_fp * 2.0_fp &
+ Spc(I,J,L,id_HMS) / 111.0_fp &
+ Spc(I,J,L,id_NIT) / 62.0_fp &
+ HNO3_DEN / 63.0_fp &
+ Spc(I,J,L,id_SALA) * 0.55_fp / 35.45_fp )
ELSE
DEN_SAV = ( Spc(I,J,L,id_SO4) / 96.0_fp * 2.0_fp &
+ Spc(I,J,L,id_NIT) / 62.0_fp &
+ HNO3_DEN / 63.0_fp &
+ Spc(I,J,L,id_SALA) * 0.55_fp / 35.45_fp )
ENDIF

ENDIF
ENDDO

Expand Down
Loading

0 comments on commit 93d5c1e

Please sign in to comment.