Skip to content

Commit

Permalink
Add quick fix for aerosol pH calculation when dry
Browse files Browse the repository at this point in the history
Xuan Wang wrote:

   My quick fix is very simple, which only changes one number in the source
   code:

   In GeosCore/ isorropiaII_mod.F, line 685, change

            NITRTEMP        = 1e-30_fp
            State_Chm%pHSav(I,J,L) = -999e+0_fp
         ELSE

   To
            NITRTEMP        = 1e-30_fp
            State_Chm%pHSav(I,J,L) = 20e+0_fp
         ELSE

Becky Alexander wrote:

   Note that [this fix] is not ideal. We have a better way of doing it
   which requires some sort of counting diagnostic.  We have this working
   for .bpch only because in the version of the code that we are using
   (the one from Xuan's paper, v11-02d), not all of the netCDF diagnostics
   work.  So we are unable to test this fix for the netCDF diagnostics.

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
  • Loading branch information
msulprizio committed Jun 27, 2019
1 parent 37c86c1 commit ce29c6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GeosCore/isorropiaII_mod.F
Expand Up @@ -678,13 +678,13 @@ SUBROUTINE DO_ISORROPIAII( am_I_Root, Input_Opt, State_Chm,
! in mol/m3 air --> convert to mol/L water
IF ( AERLIQ(8) < 1e-18_fp ) THEN
! Aerosol is dry so HPLUSTEMP and PH_SAV are undefined
! We force HPLUSTEMP to 1d20 and PH_SAV to -999e+0_fp.
! (hotp, ccc, 12/18/09)
! We force HPLUSTEMP to 1d20 (hotp, ccc, 12/18/09)
! Force pHSav to 20e0 (X. Wang, 6/27/19)
HPLUSTEMP = 1e+20_fp
SULFTEMP = 1e-30_fp
BISULTEMP = 1e-30_fp
NITRTEMP = 1e-30_fp
State_Chm%pHSav(I,J,L) = -999e+0_fp
State_Chm%pHSav(I,J,L) = 20e+0_fp
ELSE
HPLUSTEMP = AERLIQ(1) / AERLIQ(8) * 1e+3_fp/18e+0_fp
SULFTEMP = AERLIQ(5) / AERLIQ(8) * 1e+3_fp/18e+0_fp
Expand Down

0 comments on commit ce29c6c

Please sign in to comment.