Sea salt aerosols

From Geos-chem
Revision as of 18:42, 18 July 2008 by Bmy (Talk | contribs) (Double-substitution bug in routine GET_ALK)

Jump to: navigation, search

Double-substitution bug in routine GET_ALK

Becky Alexander (beckya@u.washington.edu) wrote:

The code in GET_ALK (in routine seasalt_mod.f) as it is now is wrong. I did a substitution twice by mistake, that should have been applied only once. This is calculated for both accumulation and coarse mode seasalt, for both SO2 and HNO3, so there are 4 places in the code that must be fixed.
The correct code should be as follows:
            !----------------------------------
            ! SO2 uptake onto fine particles 
            !----------------------------------
 
            ! calculate gas-to-particle rate constant for uptake of 
            ! SO2 onto fine sea-salt aerosols [Jacob, 2000] analytical solution
            CONST1 = 4.D0/(V*GAMMA_SO2)
            A1     = (RAD1/DG)+CONST1
            B1     = (RAD2/DG)+CONST1
   !-----------------------------------------------------------------------------
   ! Prior to 7/18/08:
   ! Becky Alexander's fix to remove double-substitution (bec, bmy, 7/18/08)
   ! Remove these lines:
   !         TERM1A = (((B1/DG)**2)+(2.0D0*CONST1*B1/DG)+(CONST1**2)) -
   !     &            (((A1/DG)**2)+(2.0D0*CONST1*A1/DG)+(CONST1**2))
   !         TERM2A = 2.D0*CONST1*(((B1/DG)+CONST1)-((A1/DG)+CONST1))
   !         TERM3A = (CONST1**2)*(LOG((B1/DG)+CONST1) -
   !     &            LOG((A1/DG)+CONST1))
   !         KT1    = 4.D0*PI*N1*(DG**2)*(TERM1A - TERM2A + TERM3A)
   !-----------------------------------------------------------------------------
            TERM1A = ((B1**2)/2.0d0) - (((A1**2)/2.0d0)
            TERM2A = 2.D0*CONST1*(B1-A1)
            TERM3A = (CONST1**2)*LOG(B1/A1)
            KT1    = 4.D0*PI*N1*(DG**3)*(TERM1A - TERM2A + TERM3A)

            !----------------------------------
            ! SO2 uptake onto coarse particles 
            !----------------------------------
        
            ! calculate gas-to-particle rate constant for uptake of 
            ! SO2 onto coarse sea-salt aerosols [Jacob, 2000] analytical solution
            CONST2 = 4.D0/(V*GAMMA_SO2)
            A2     = (RAD2/DG)+CONST2
            B2     = (RAD3/DG)+CONST2
   !------------------------------------------------------------------------------
   ! Prior to 7/18/08:
   ! Becky Alexander's fix to remove double-substitution (bec, bmy, 7/18/08)
   ! Remove these lines:
   !         TERM1B = (((B2/DG)**2)+(2.0D0*CONST2*B2/DG)+(CONST2**2)) -
   !     &            (((A2/DG)**2)+(2.0D0*CONST2*A2/DG)+(CONST2**2))
   !         TERM2B = 2.D0*CONST2*(((B2/DG)+CONST2)-((A2/DG)+CONST2))
   !         TERM3B = (CONST2**2)*(LOG((B2/DG)+CONST2) -
   !     &             LOG((A2/DG)+CONST2))
   !         KT2    = 4.D0*PI*N2*(DG**2)*(TERM1B - TERM2B + TERM3B)
   !------------------------------------------------------------------------------
            TERM1B = ((B2**2)/2.0d0) - (((A2**2)/2.0d0)
            TERM2B = 2.D0*CONST2*(B2-A2)
            TERM3B = (CONST2**2)*LOG(B2/A2)
            KT2    = 4.D0*PI*N2*(DG**3)*(TERM1B - TERM2B + TERM3B)
            KT     = KT1 + KT2

            !----------------------------------
            ! HNO3 uptake onto fine particles 
            !----------------------------------

            ! calculate gas-to-particle rate constant for uptake of 
            ! HNO3 onto fine sea-salt aerosols [Jacob, 2000] analytical solution
            CONST1N = 4.D0/(V*GAMMA_HNO3)
            A1N     = (RAD1/DG)+CONST1N
            B1N     = (RAD2/DG)+CONST1N
   !-----------------------------------------------------------------------------
   ! Prior to 7/18/08:
   ! Becky Alexander's fix to remove double-substitution (bec, bmy, 7/18/08)
   ! Remove these lines:
   !         TERM1AN = (((B1N/DG)**2)+(2.0D0*CONST1N*B1N/DG)+(CONST1N**2)) -
   !     &             (((A1N/DG)**2)+(2.0D0*CONST1N*A1N/DG)+(CONST1N**2))
   !         TERM2AN = 2.D0*CONST1N*(((B1N/DG)+CONST1N)-((A1N/DG)+CONST1N))
   !         TERM3AN = (CONST1N**2)*(LOG((B1N/DG)+CONST1N) -
   !     &             LOG((A1N/DG)+CONST1N))
   !         KT1N    = 4.D0*PI*N1*(DG**2)*(TERM1AN - TERM2AN + TERM3AN)
   !-----------------------------------------------------------------------------
            TERM1AN = ((B1N**2)/2.0d0) - (((A1N**2)/2.0d0)
            TERM2AN = 2.D0*CONST1N*(B1N-A1N)
            TERM3AN = (CONST1N**2)*LOG(B1N/A1N)
            KT1N    = 4.D0*PI*N1*(DG**3)*(TERM1AN - TERM2AN + TERM3AN)

            !----------------------------------
            ! HNO3 uptake onto coarse particles 
            !----------------------------------

            ! calculate gas-to-particle rate constant for uptake of 
            ! HNO3 onto coarse sea-salt aerosols [Jacob, 2000] analytical solution
            CONST2N = 4.D0/(V*GAMMA_HNO3)
            A2N     = (RAD2/DG)+CONST2N
            B2N     = (RAD3/DG)+CONST2N
   !-----------------------------------------------------------------------------
   ! Prior to 7/18/08:
   ! Becky Alexander's fix to remove double-substitution (bec, bmy, 7/18/08)
   ! Remove these lines:
   !         TERM1BN = (((B2N/DG)**2)+(2.0D0*CONST2N*B2N/DG)+(CONST2N**2)) -
   !     &             (((A2N/DG)**2)+(2.0D0*CONST2N*A2N/DG)+(CONST2N**2))
   !         TERM2BN = 2.D0*CONST2N*(((B2N/DG)+CONST2N)-((A2N/DG)+CONST2N))
   !         TERM3BN = (CONST2N**2)*(LOG((B2N/DG)+CONST2N) -
   !     &             LOG((A2N/DG)+CONST2N))
   !         KT2N    = 4.D0*PI*N2*(DG**2)*(TERM1BN - TERM2BN + TERM3BN)
   !-----------------------------------------------------------------------------
            TERM1BN = ((B2N**2)/2.0d0) - (((A2N**2)/2.0d0)
            TERM2BN = 2.D0*CONST2N*(B2N-A2N)
            TERM3BN = (CONST2N**2)*LOG(B2N/A2N)
            KT2N    = 4.D0*PI*N2*(DG**3)*(TERM1BN - TERM2BN + TERM3BN)

Please make the fix in your version, or you may download it from ftp://ftp.as.harvard.edu/pub/geos-chem/patches/v8-01-01/seasalt_mod.f_w_getalk_fix.

--Bob Y. 14:41, 18 July 2008 (EDT)